Wanted: po file extract-merge script
Francesco
scrutinizer at gmx.at
Sun Mar 14 05:06:44 EST 2004
Hello Python- Ng,
I'm looking for a special script
(I don't want to reinvent the wheel; have anyone written such a thing?
I've looked in google (and groups), but I didn't find anything
it such one doesn't exist yet,
I will write it myself, or someone is so good to support me:))
I would call it pomerge.py
example
pomerge.py it_collection.po my.po
I made a collection of strings, (i merged poedit po files and
wxwindows distribution po files into on)
BTW: Does there anyone exist a big collection file of all possible
strings?
(collection.po)
(I would extract msgid as keys and msgstr as values into a
dictionary.)
example (collection.pot)
msgid " Preview"
msgstr " Anteprima"
msgid "Envelope"
msgstr " busta"
msgid "&Close"
msgstr "&Chiudi"
....
my.po
(filter out msgid's)
msgid "Exit"
msgstr ""
msgid "Envelope"
msgstr ""
msgid "Next"
msgstr ""
-----------
output should be:
msgid "Exit"
msgstr ""
msgid "Envelope"
msgstr " busta"
msgid "Next"
msgstr ""
Great would be to ignore the '&' and the '\tctrl' characters, so a
translation is easier to find, and append then again in the output
file.
Also I think for multiline string, there is a special procedure
necessary.
Or do you have better suggestions?
Many thanks in advance for your answer!
--
Franz St.
More information about the Python-list
mailing list