[wp-polyglots] Re: [wp-testers] i18n strings disambiguation

Ryan Boren ryan at boren.nu
Thu Oct 26 06:13:48 GMT 2006


Ryan Boren wrote:
> Nikolay Bachiyski wrote:
>> In my opinion the description should mark the whole string, not just a 
>> part of it. Thus we both won't need long closing tag and also the 
>> description  won't be placed in the middle of a long string and 
>> confusing the translators. I suggest something like:
>>
>> '<i18n:richtext>Editor' or '<i18n:Rich Text>Editor' or
>> '<desc:Rich Text>Editor' or something like that...
>>
>> ...or even better (stolen from gnome) just: 'Rich Text|Editor'
>>
>> I checked - there are no msgid's containing | in wordpress.pot. Also 
>> we could supply a _d(description, msgid) function to easily enter 
>> i18n-ed string with their description.
>>
>> As soon as we decide which way we shall go, you have a patch from me :)
> 
> http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#Q-:CAPS
> 
> "|" is fine.  Do we want a separate Q_() like function for those 
> situations that require context?

New versions of gettext use pgettext.

http://developer.kde.org/documentation/library/cvs-api/kdelibs-apidocs/kdecore/html/gettext_8h.html#a12

Support for this doesn't seem to be very widespread, however.  I don't 
think poedit recognizes the msgctxt fields added to the po file.  Our 
php gettext implementation would probably require some work too.

So, the glib "|" format is probably good enough for now.

Ryan


More information about the wp-polyglots mailing list