[wp-trac] Re: [WordPress Trac] #6261: Modifiy a dozen strings to allow for plural form

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 18 10:59:16 GMT 2008


#6261: Modifiy a dozen strings to allow for plural form
------------------------------------+---------------------------------------
 Reporter:  xibe                    |        Owner:  anonymous
     Type:  defect                  |       Status:  new      
 Priority:  low                     |    Milestone:  2.5      
Component:  i18n                    |      Version:  2.5      
 Severity:  minor                   |   Resolution:           
 Keywords:  has-patch needs-review  |  
------------------------------------+---------------------------------------
Changes (by nbachiyski):

  * keywords:  needs-patch => has-patch needs-review
  * priority:  normal => low
  * type:  enhancement => defect
  * milestone:  2.7 => 2.5

Comment:

 Replying to [comment:4 mdawaffe]:
 > Actually - the post status strings mentioned ( {{{Published (%s)}}},
 etc. ) are kind of strange.
 >
 > We can move {{{wp_count_posts()}}} up above the {{{$post_stati}}}
 definition (e.g. in wp-admin/edit-pages.php) so that we know how many of
 each there are, but I'm not sure what
 >

 No need to do that. I added {{{__ngettext_noop}}} function, which makes
 sure the strings will get into the POT file and doesn't need number. The
 actual number-matching is done when the string is displayed, then we can
 use {{{__ngettext}}}.


 > {{{__ngettext( 'Published (%s)', 'Published (%s)', $number ); }}}
 >
 > will do.

 If there is no translation, it will return the first string if
 {{{$number}}} is {{{1}}} or the second otherwise. It is completely safe.


 >
 > Are those two identical strings separately addressable during
 translation?

 Yes, they are separately addressable. Translators will just see the same
 string for English plural and English singular, which is fine with them.

 About the string freeze: since we don't expect international versions to
 be released at the same time we release 2.5 it is ok not to have string
 freeze. Translators can catch up in the days after the release, if there
 are lots of changed strings. Usually they just have to update a few
 strings, which costs minutes.

 Back to the ticket topic: the patch is attached, but it's not trivial. I
 have tested it and I am  setting its milestone to 2.5, but if anybody
 thinks it is too complex to get that late into development, it is ok to be
 left for 2.6. I am not really sure if it should stay as an enhancement,
 because in some languages these messages can sound very strange in
 singular.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6261#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list