Since translations are valuable assets as well as the source code, it would make sense to put them under version control. The GNU gettext infrastructure supports two ways to deal with translations in the context of a version controlled repository.
If a POT file is absent when building, it will be generated by
scanning the source files with
xgettext, and then the PO files
are regenerated as a dependency. On the other hand, some maintainers
want to keep the POT file unchanged during the development phase. So,
even if a POT file is present and older than the source code, it won’t
be updated automatically. You can manually update it with
$(DOMAIN).pot-update, and commit it at certain point.
Special advices for particular version control systems:
noin the Makevars file and do
#: lib/error.c:116are sometimes annoying, since these comments are volatile and may introduce unwanted change to the working copy when building. To mitigate this, you can decide to omit those comments from the PO files in the repository.
This is possible with the
--no-location option of the
msgmerge command 6. The drawback is
that, if the location information is needed, translators have to
recover the location comments by running
you can also use it through the ‘MSGMERGE_OPTIONS’ option from Makevars