[I18n-sig] pygettext question

Barry Warsaw barry at python.org
Sun Jun 6 21:36:46 EDT 2004


On Sun, 2004-06-06 at 18:13, Greg Ward wrote:

> But when I change messages in the code and re-run pygettext, that block
> is clobbered with the default version.  ;-(
> 
> How do I get pygettext to preserve my existing value here?  (Likewise
> for the leading comment block, which has a copyright statement?)

You don't actually.  You're supposed to use msgmerge to combine the
output of successive pygettext runs with your existing message catalogs.

For an example of how I use it, look at MM2.1's messages/Makefile.in. 
We use pygettext to generate a new mailman.pot file, and then msgmerge
those into all the language-specific mailman.po files.  It's those .po
files that contain all the translations.  If you really want those
header block changes to persist, you'll need to edit the pot_header
variable in the pygettext.py file.

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/i18n-sig/attachments/20040606/8adae850/attachment.bin


More information about the I18n-sig mailing list