#1108 closed defect (bug) (fixed)
Forum directory posts and topics count [not finished yet]
Reported by: | slaFFik | Owned by: | slaFFik |
---|---|---|---|
Milestone: | 1.1 | Priority: | major |
Severity: | Version: | ||
Component: | Keywords: | localization, forum, translation | |
Cc: |
Description
On forums page there is a block Popular Group Forums. It shows groups titles, description and not translatable number of topics and posts.
The reason is trivial:
bp-groups/bp-groups-templatetags.php(2131-2134). There:
if ( 1 == (int) $site_groups_template->group->forum_counts[0]->topics ) $total_topics = sprintf( __( '%d topic'), (int) $site_groups_template->group->forum_counts[0]->topics ); else $total_topics = sprintf( __( '%d topics'), (int) $site_groups_template->group->forum_counts[0]->topics );
Why not make instead all that lines this one:
sprintf( __ngettext('%s topic','%s topics', (int) $site_groups_template->group->forum_counts[0]->topics, 'buddypress'), (int) $site_groups_template->group->forum_counts[0]->topics);
The same is for # of posts: bp-groups/bp-groups-templatetags.php(2165-2168) - the end result only:
sprintf( __ngettext('%s posts','%s posts', (int) $site_groups_template->group->forum_counts[0]->posts, 'buddypress'), (int) $site_groups_template->group->forum_counts[0]->posts);
It will make translation flexible for all languages.
I'm talking about r1964.
PS I don't know how to create patches. If you'll explain how to I can try to make the same thing for all countable phrases (# of members, blogs, messages and so on and so far).
Try this: http://asymptomatic.net/2005/12/03/586/how-to-patch-wordpress
Please open a new ticket with 1.2 milestone and attach the changes you are talking about. Thanks.