On May 19, 2010, at 9:37 AM, Paul McNett wrote:

>> Changed string substitution to work with localization
> 
> I don't understand. You are wanting to translate things like obj.Caption, 
> obj.DefaultButton, obj.Value?


        No; the gettext() stuff doesn't work with multiple unnamed 
substitutions per string. When I run the localization string extraction code, I 
get a ton of lines like:

/Users/ed/projects/demo/samples/dButton.py:32: warning: 'msgid' format string 
with unnamed arguments cannot be properly localized:
        The translator cannot reorder the arguments.
        Please consider using a format string with named arguments,
        and a mapping instead of a tuple for the arguments.


        I don't completely understand why it can't handle such strings, but it 
can't, and those strings will not be localized. So I'm converting all such 
string substitution to named arguments.


-- Ed Leafe




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to