[wp-meta] [Making WordPress.org] #1322: Missing plural forms for '%d people say it works.'

Making WordPress.org noreply at wordpress.org
Fri Jul 29 22:41:30 UTC 2016


#1322: Missing plural forms for '%d people say it works.'
------------------------------+---------------------
 Reporter:  SergeyBiryukov    |       Owner:
     Type:  defect            |      Status:  closed
 Priority:  normal            |   Milestone:
Component:  Plugin Directory  |  Resolution:  fixed
 Keywords:                    |
------------------------------+---------------------
Changes (by coffee2code):

 * resolution:  wontfix => fixed


Comment:

 Fixed in [12229-dotorg].

 Turns out the issue is the same string appears in two contexts, one as a
 standalone, non-pluralized string:

 {{{
 __( '1 person says it works.', 'wporg' )
 }}}

 Then again as part of a string pluralization:

 {{{
 _n( '1 person says it works.', '%s people say it works.', $works_num,
 'wporg' )
 }}}

 They are actually different strings used in different contexts, but since
 they aren't otherwise differentiated, only the latter is presented to
 translators.

 The former is used in the JS to set up the singularized string for it to
 use, and that's what most people will see when then count is 1 (when JS is
 active, obviously). And the JS only replaces `%d` with the count, not
 `%s`, thus the `%s` was shown on the front-end. The pluralized version
 uses `%s` because in that context the count is passed through
 `bb_number_format_i18n()`.

 I changed the translation of the first instance of the string (as cited
 above) to be:

 {{{
 _x( '1 person says it works.', 'non-pluralized singular', 'wporg' )
 _x( "1 person says it's broken.", 'non-pluralized singular', 'wporg' )
 }}}

 This should cause them to appear as separately translatable strings. In
 the translation, `%d` can be used in place of `1`.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/1322#comment:9>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list