For the post count the value the user_stats_get_stats function returns does not contain the word "post" or "posts". I think the line nr 248 return $user->$post_count_profile_field; should look like this:

return format_plural($user->$post_count_profile_field, '1 post', '@count posts');

This would gurantee proper plural forms no matter what number of posts a user has.

Comments

liam mcdermott’s picture

Status: Active » Closed (works as designed)

This is a deliberate policy, User stats only returns the post count. It's up to the theme to display that information in the way the author requires.

I have incorporated your example into the module documentation, which will be released shortly. So thanks for raising this issue. :)

archetwist’s picture

Status: Closed (works as designed) » Active

Then I think that maybe there should be two functions (one with and one without the format_plural part), because to me it appears rather unlogical to force the theme to handle (multi)lingual issues.

liam mcdermott’s picture

Status: Active » Closed (works as designed)

Sorry, this isn't how user_stats works. I've double-checked in #drupal and there's nothing stopping you from using format_plural in a theme. :)