Commit Graph

8 Commits

Author SHA1 Message Date
Lasse Collin a0eecc9eb2
po/Makevars: Add --keyword=W_:... to XGETTEXT_OPTIONS
The text was copied from tuklib_gettext.h.

Also rearrange the --keyword options to be last on the line.
2024-12-18 17:09:31 +02:00
Lasse Collin 9284f1aea3 Build: Update po/*.po files only when needed
When po/xz.pot doesn't exist, running "make" or "make dist" will
create it. Then the .po files will be updated but only if they
actually would change more than the POT-Creation-Date line.
Then the .gmo files would be generated from the .po files.
This is the case before and after this commit.

However, "make dist" and thus "make mydist" did a forced update
to the files, updating them even if the only change was the
POT-Creation-Date line. This had pros and cons: It made it clear
that the .po file really is in sync with the recent strings in
the package. On the other hand, it added noise in form of changed
files in the source tree and distribution tarballs. It can be
ignored with something like "diff -I'^"POT-Creation-Date: '" but
it's still a minor annoyance *if* there's not enough value in
having the most recent timestamp.

Setting DIST_DEPENDS_ON_UPDATE_PO = no means that such forced
update won't happen in "make dist" anymore. However, the "mydist"
target will use xz.pot-update target which is the same target that
is run when xz.pot doesn't exist at all yet. Thus "mydist" will
ensure that the translations are up to date, without noise from
changes that would affect only the POT-Creation-Date line.

Note that po4a always uses msgmerge with --update, so POT-Creation-Date
in the man page translations is never the only change in .po files.
In that sense this commit makes the message translations behave more
similarly to the man page translations.

Distribution tarballs will still have non-reproducible POT-Creation-Date
in po/xz.pot and po4a/xz-man.pot but those are just two files. Even they
could be made reproducible from a Git timestamp if desired.
2024-05-29 16:33:24 +03:00
Lasse Collin eb217d016c Translations: Omit --package-name from po/Makevars
This is closer to the reality in the po/*.po files.
2024-05-28 13:03:40 +03:00
Lasse Collin 093490b582 Translations: Use the xgettext option --add-location=file 2024-05-28 01:06:30 +03:00
Lasse Collin fccebe2b4f Translations: Use the msgmerge option --add-location=file
This way the PO file diffs are less noisy but the locations of the
strings are still present at file level, just without line numbers.

The option is available since gettext 0.19 (2014).
configure.ac requires 0.19.6.
2024-05-28 00:43:53 +03:00
Lasse Collin 40f36da226 Translations: Change po/Makevars to add a copyright notice to po/xz.pot. 2024-02-14 18:31:16 +02:00
Lasse Collin 24192854e2 Translations: Update po/Makevars to use the template from gettext 0.22.4.
Also add SPDX license identifier now that there is a known license.
2024-02-14 18:31:16 +02:00
Lasse Collin 5d018dc035 Imported to git. 2007-12-09 00:42:33 +02:00