[wp-meta] [Making WordPress.org] #1322: Missing plural forms for '%d people say it works.'
Making WordPress.org
noreply at wordpress.org
Thu Oct 8 22:23:04 UTC 2015
#1322: Missing plural forms for '%d people say it works.'
-----------------------------+------------------------------
Reporter: SergeyBiryukov | Owner:
Type: defect | Status: closed
Priority: normal | Component: Plugin Directory
Resolution: invalid | Keywords:
-----------------------------+------------------------------
Changes (by coffee2code):
* status: new => closed
* resolution: => invalid
Comment:
The former is part of the JS related to the compatibility feature. The JS
allows the "it works" and "it's broken" text under the 'Compatibility'
dropdowns on individual plugin pages to update dynamically as the dropdown
values are changed. It is passed translated strings for singular and
plural forms for 'works' and 'broken'.
Here's the actual code defining those strings (ignore the deprecated
function use...):
{{{
worksTextN = [ '<?php echo js_escape( __( '1 person says it works.',
'wporg' ) ); ?>', '<?php echo js_escape( __( '%d people say it works.',
'wporg' ) ); ?>' ],
brokeTextN = [ '<?php echo js_escape( __( "1 person says it's broken.",
'wporg' ) ); ?>', '<?php echo js_escape( __( "%d people say it's broken.",
'wporg' ) ); ? >' ];
}}}
You can load an individual plugin's page and see the output. The JS has to
decide which plural form to use, so it needs both strings of each type.
The latter string translation you noted is the text used for the initial
output of the 'Compatibility' section.
Seems like the current approach is a legitimate use for non-plural forms
support.
Feel free to reopen with recommendations for changing the JS or for
passing context to translators if it's beneficial to do so.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/1322#comment:1>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list