Skip to:

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

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

Translation: wrong key given for plural form

Reported by: kristianji's profile 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
8 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
8 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
8 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
8 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.

8 years ago

Note: See TracTickets for help on using tickets.