[wp-trac] Re: [WordPress Trac] #8128: Some plural strings need contextual disambiguation for translation purposes

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 25 14:13:43 GMT 2008


#8128: Some plural strings need contextual disambiguation for translation purposes
------------------------------+---------------------------------------------
 Reporter:  hervada           |        Owner:  anonymous
     Type:  defect            |       Status:  reopened 
 Priority:  normal            |    Milestone:  2.7      
Component:  i18n              |      Version:  2.7      
 Severity:  normal            |   Resolution:           
 Keywords:  i18n needs-patch  |  
------------------------------+---------------------------------------------
Comment (by nbachiyski):

 Replying to [comment:1 hervada]:
 > I have found 2 problems trying to solve this:
 >
 > 1. The {{{__ngettext()}}} function, which is used to give the
 singular/plural form for most of the above strings, does not know about
 context pipes. I think we must create a new function e.g. {{{_nc()}}}
 which does the combination of {{{_c()}}} and {{{__ngettext()}}}, that is,
 it gives the singular/plural form according to amount and stripes out
 everything from the pipe | character.
 >

 See {{{contextual-ngettext.diff}}}.

 > 2. At edit-pages.php:76 there is no direct call to {{{__ngettext}}} but
 an array such as:
 >{{{array(__('Published'), __('Published pages'),
 __ngettext_noop('Published...}}}
 Later {{{__ngettext()}}} is called on the computed values, not the literal
 strings. See {{{plural-context-part-0.diff}}}

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


More information about the wp-trac mailing list