#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: | |
Cc: |
Description
Hello
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)
#2
@
9 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
@
9 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
@
9 years ago
Is plugins.svn.wordpress.org
up to date? I believe it should be based on 2.4.3 released ~12 hours ago
Currently /trunk/readme.txt
contains: https://plugins.trac.wordpress.org/browser/buddypress/trunk/readme.txt#L119
== Upgrade Notice == = 2.4.2 = See: https://codex.buddypress.org/releases/version-2-4-2/ = 2.4.1 = See: https://codex.buddypress.org/releases/version-2-4-1/ ...
Whereas /tags/2.4.3/readme.txt
includes the 2.4.3 changelog link that /trunk does not: https://plugins.trac.wordpress.org/browser/buddypress/tags/2.4.3/readme.txt#L119
== Upgrade Notice == = 2.4.3 = See: https://codex.buddypress.org/releases/version-2-4-3/ = 2.4.2 = See: https://codex.buddypress.org/releases/version-2-4-2/ = 2.4.1 = See: https://codex.buddypress.org/releases/version-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 plugins.svn.wordpress.org
the /dev
translations should have all 3 of these strings but in fact only has the first:
- See: https://codex.buddypress.org/releases/version-2-4-0/
- See: https://codex.buddypress.org/releases/version-2-4-1/
- See: https://codex.buddypress.org/releases/version-2-4-2/
I'd suggest a trip to #meta-i18n to work out why the current strings committed to plugs.svn
/trunk
are not showing
This string was changed in r9765 to explicitly remove what you've suggested (see that change's commit message for details).