Skip to:

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#6773 closed defect (bug) (no action required)

Translation: wrong key given for plural form

Reported by: KristianJI Owned by:
Milestone: Priority: lowest
Severity: normal Version: 2.3.2
Component: Groups Keywords:



In buddypress/bp-groups/bp-groups-template.php around line 1842:
$message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s group', 'Viewing %1$s - %2$s of %3$s groups', $groups_template->total_group_count, 'buddypress' ), $from_num, $to_num, $total );

The _n() function is looking up the translation by the key in the .po file. The key in the .po file i "Viewing 1 group" - not "Viewing %1$s - %2$s of %3$s group".

Either the key in the .po file should be changed, or the line should be changed to:
$message = sprintf( _n( 'Viewing 1 group', 'Viewing %1$s - %2$s of %3$s groups', $groups_template->total_group_count, 'buddypress' ), $from_num, $to_num, $total );

Change History (5)

#1 @DJPaul
5 years ago

This string was changed in r9765 to explicitly remove what you've suggested (see that change's commit message for details).

#2 @boonebgorges
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

@DJPaul is correct. We are treating "singular" strings like "Viewing 1 group" as distinct from the plural forms, for better accomodation with languages that use the "singular" grammatical form for numbers other than 1. The practical consequence is that strings "Viewing %1$ - %2$s of %3$s group" will never be used in English, but they will be used in languages like Russian.

Thanks for the ticket!

#3 @SergeyBiryukov
5 years ago

The key in the .po file i "Viewing 1 group" - not "Viewing %1$s - %2$s of %3$s group".

Seems like the .po file is outdated, where did it came from and what is the language in question?

#4 @netweb
5 years ago

Is up to date? I believe it should be based on 2.4.3 released ~12 hours ago

Currently /trunk/readme.txt contains:

	== Upgrade Notice ==

	= 2.4.2 =
	= 2.4.1 =

Whereas /tags/2.4.3/readme.txt includes the 2.4.3 changelog link that /trunk does not:

	== Upgrade Notice ==

	= 2.4.3 =

	= 2.4.2 =
	= 2.4.1 =

Curious if anything else is out of sync, I'm svn up the repo now but that might take a while ;)

Translations wise, /trunk only includes the changelog codex link for 2.4.0:

Whereas /stable contains all 4 2.4.x releases (2.4.0, 2.4.1, 2.4.2, 2.4.3):

Based on the state of what I see at the /dev translations should have all 3 of these strings but in fact only has the first:

I'd suggest a trip to #meta-i18n to work out why the current strings committed to plugs.svn /trunk are not showing

This ticket was mentioned in Slack in #buddypress by netweb. View the logs.

5 years ago

Note: See TracTickets for help on using tickets.