Marking translatable strings
Barry A. Warsaw
bwarsaw at cnri.reston.va.us
Mon Oct 11 12:13:41 EDT 1999
>> What about a t'translated string literal', like r'raw string'?
The problem is string-prefix explosion: you'd have to also support
tr'', rt'', and of course all the double, single-triple, and
double-triple variants. Uck. Plus, it would require changes to
Python which means it'll be a long while before you ever see this in
common enough use.
Writing it _('translate') is, I think the best approach, and the one I
plan to take when I (eventually) get time to internationalize Mailman.
pinard> Also worth noting and little known, Ulrich has released a
pinard> snapshot of `gettext' which is not encumbered by the GPL,
pinard> for the Danish UUG or Danish national standardisation
pinard> groups, I do not remember exactly. The precise double
pinard> hashing is part of this special release, and the algorithm
pinard> did not change since, so far that I know. This could be
pinard> useful if Python proper was to provide string translation
pinard> services independently of `gettext'.
Cool, that's good to know!
-Barry
More information about the Python-list
mailing list