Skip to:

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1108 closed defect (bug) (fixed)

Forum directory posts and topics count [not finished yet]

Reported by: slaffik's profile slaFFik Owned by: slaffik's profile slaFFik
Milestone: 1.1 Priority: major
Severity: Version:
Component: Keywords: localization, forum, translation


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 );
	$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).

Change History (3)

#1 @apeatling
15 years ago

Try this:

Please open a new ticket with 1.2 milestone and attach the changes you are talking about. Thanks.

#2 @apeatling
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [1968]) Fixing missing translation domain. Fixes #1108

#3 @slaFFik
15 years ago

Thank you for the link to patch-creation.

Note: See TracTickets for help on using tickets.