[buddypress-trac] [BuddyPress] #1108: Forum directory posts and topics count [not finished yet]

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sun Sep 27 20:25:06 UTC 2009


#1108: Forum directory posts and topics count [not finished yet]
---------------------------------------------+------------------------------
Reporter:  slaFFik                           |       Owner:  slaFFik
    Type:  defect                            |      Status:  new    
Priority:  major                             |   Milestone:  1.1    
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 );
 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).

-- 
Ticket URL: <http://trac.buddypress.org/ticket/1108>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list