Marking translatable strings
François Pinard
pinard at iro.umontreal.ca
Sun Sep 19 14:56:08 EDT 1999
bwarsaw at python.org writes:
> There's been discussion on the mailman-developers at python.org list and
> you can peruse the archives for much of the current thinking. [...]
Thanks for the reference. I'll look it up. You keep me busy, guys! :-)
> The first attempts in the Mailman community for marking strings
> followed the reasoning you did. I don't like it because I want to be
> able to use any string spelling as translatable strings.
I followed your advice, and now would like to accept any wild concatenation
of one or more strings as an argument for _(). For the equivalent of N_()
in C, I would rather use ''"... or ""'... The extractor could have an
option for getting module doc strings, call doc strings of def doc strings
(maybe 1, 2 or 3, depending on how inclusive you want to be).
> What I /have/ done is start work on a pygettext.py script [...] it knows
> a lot about Python syntax, including the 9 billion ways to spell `string'.
I'll surely scrutinise it. What I would like is a single program, probably
written in C and Flex, that would handle, C, C++, Python, awk, bash,
other PO files, and maybe Emacs LISP and Scheme as well, Perl maybe, all
in one run. That is, all possibly translatable strings of a whole project.
In my own Makefiles, I do not hesitate to rebuild PO files whenever any
source is modified, so the POT extractor ought to be blazing fast.
> The output is pretty close to .po style, with strings normalized to
> .po format.
Whatever that means! :-) There has been some extra-fuziness in that area
that is not fully resolved in `gettext' 0.10.35. So, until everything
gets corrected, the TP robot patiently normalises everything it handles.
> I'd love to get any comments or patches that you might come up with.
Give me some time, because I'm a slow worker (not to say overwhelmed,
but this is all our case, isn't it? "I'll be back" (just imagine the
voice of Arnold Schwartzeneger, here :-).
--
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list
mailing list