Marking translatable strings

Bernhard Herzog herzog at online.de
Wed Sep 29 06:40:15 EDT 1999


François Pinard <pinard at IRO.UMontreal.CA> writes:

> Would you foresee any difficulty while writing a _simple_ tool, to be
> integrated in `xgettext' (or `xpot':-) that would properly identify unary
> `+' operators before strings, I mean, never mistaking a binary `+' as unary?

Using ~ instead would probably help with that. It's only a unary
operator and not defined for strings either. You'd just have to scan the
sources for a ~ immediately followed by a string literal. 

For convenience, it should also be allowed to put the string literals in
parens to allow for automatic string concatenation before the ~ is
applied (like ~("wink wink" "nudge nudge")). But this basically looks
like a function call and should therefore be easy to integrate with
xgettext (once it handles Python syntax).


-- 
Bernhard Herzog	  | Sketch, a drawing program for Unix
herzog at online.de  | http://www.online.de/home/sketch/




More information about the Python-list mailing list