[XML-SIG] on gettext maintenance

Martin v. Loewis martin@mira.cs.tu-berlin.de
Wed, 31 Jan 2001 00:41:53 +0100


> "So you'd first produce 4Suite.de.po, send it to me, and I send it
> back to you filled with German translations."
>
> BTW, the "4Suite.de.po" part confuses me.  Based on this and the
> msgid/msgstr combos in the code, I'm guessing each language has a
> .po.  Fine, but again, how does this feed into msgfmt.py?  Is a
> single .mo file created, or one for each language?  I see no fields
> that specify the localization for each .po file.

msgfmt.py will transform <foo>.po into <foo>.mo, as does GNU msgfmt.

I suggest that you download the sources of, say, GNU fileutils, and
have a look at the directory structure. There is a lot of automake
magic as well which you probably want to ignore - just consider the
'po' directory.

> Anyway, so what happens when I change or add messages and all that.
> Do I simply send brand new .po files to each translation, maybe
> sending a diff as well to make the changes clear?  This seems
> cumbersome.  Of course, I'm not sure what scheme would be smoother.

For that, GNU gettext offers the "msgmerge" utility. It will find
messages that didn't change and keep the translation, find messages
that changed slightly and mark the translations as "fuzzy", find new
messages and put empty translation into them, and find messages that
disappeared and put their translations as "obsolete" into comments.

Emacs po-mode then offers to navigate between fuzzy and untranslated
messages. It *is* common to clearly label a version of the message
catalog (e.g. 0.10.1a, 0.10.1b, etc), so translators can use diff to
find differences - a good xgettext utility will spit out the msgids in
the same order each time.

Unfortunately, there is no msgfmt.py, yet - so you have to use the GNU
tool, or off-load merging with previous revisions to the translators.
Contribution of such a tool would be welcome, of course (I know we are
deep in i18n-sig stuff now).

> BTW, what's the difference between a .po and .pot file?  If none, why does 
> msgfmt.py insist on ".po" when the docs just talk about ".pot"?

There always is a file with just the msgids, and no translations -
that is called .pot, and no .mo file is created from it.

So what you extract is .pot (or, .po template), what translators
produce is .po.

Regards,
Martin