Commit Graph

2 Commits

Author SHA1 Message Date
Alexander Bokovoy
b4722f3917 Update translation infrastructure
1. Build po/ipa.pot every time we update PO files (each build)

2. Drop any rebuilt PO changes if the only difference is in the
   translation file's header in a timestamp or timestamp+bug report
   link.

3. Only apply the logic for dropping the changes if we are operating on
   a git tree checkout because there is no otherwise an easy way to
   detect the changes.

4. Hook strip-po target to the cleanup target to allow dropping unneeded
   translation changes automatically.

5. Finally, strip ipaclient/remote_plugins/* locations from the ipa.pot
   template. This saves us around 23,000 lines from the ipa.pot file and
   reduces visual clutter in the translation files.

This approach allows to avoid unneccesary commits because even when
there are no changes to translation files, po/ipa.pot header would be
updated with a new translation update timestamp.

Fixes: https://pagure.io/freeipa/issue/8159
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
2020-03-24 13:40:06 +01:00
Petr Spacek
4842231074 Build: use standard infrastructure for translations
We now use standard framework generatedby "gettextize" utility.

It has two limitations which I do not consider sufficiently important
to invest into hand-made solution:

1. It can automatically gather strings only from files which have some
   file extension like .c or .py. Right now we do not have any
   translatable strings in Python files without extensions. Given that these
   files will be removed from source tree and replaced with entry points
   from setuptools I do not see a reason to invest into supporting this.

2. It does not automatically strip untranslated strings from po files.
   This is a manual step in mainteiner's in workflow anyway so I will
   add separate Makefile target for it later on.

This commit contains gettextize instrastructure + filled-in files
Makevars and POTFILES.in.

https://fedorahosted.org/freeipa/ticket/6418

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
2016-11-22 16:14:50 +01:00