| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
|
|
| |
Both xgettext(1) and msgmerge(1) break messages by default. Since we
currently do not have particularly long strings marked for translation,
turn this particular behaviour off by passing --no-wrap. It would
otherwise lead to spurious breaks in the PO and POT files that are not
particularly nice.
|
|
|
|
|
|
|
| |
Currently po/update-pot.sh assumes English strings and translator
comments cannot contain characters outside of ASCII, and throws an error
upon encountering any. Since we are actually using UTF-8 and not ASCII,
tell xgettext so.
|
|
|
|
|
|
|
|
| |
This commit enables 'errexit' for both shell scripts in po/, ensuring
that no further action is taken should one of the commands fail.
init-po.sh now tests for the presence of a language code and refuses to
continue if none is given.
|
|
meson's tooling for gettext introduces a couple of issues. Firstly, it
is currently not possible [1] to specify per-language keywords. We need
this in order to ignore the 'Name' record in the desktop file.
Secondly, every invocation of 'update-po' also updates the pot file [2],
inadvertently recording the updated creation date in all translations.
Since we recommended the use of 'update-po' to translators in TRANSLATE,
this will lead to lots of unrelated changes every time a new translation
is added, even if no msgids change.
Thirdly, people who do not have meson installed are currently not able
to use the tooling it provides.
To fix these issues, this commit adds custom tooling around gettext: The
'update-pot.sh' script updates the pot and po files using xgettext(1)
and msgmerge(1), and 'init-po.sh' makes the necessary changes to LINGUAS
whilst also creating the relevant po file(s) with msginit(1).
We no longer need to refer to meson at all in TRANSLATE. Make sure to
mention the new scripts as well.
[1] https://github.com/mesonbuild/meson/issues/1739
[2] https://github.com/mesonbuild/meson/blob/a9e9b7c7501a3c8a5984a93879d1f309bf8c72aa/mesonbuild/scripts/gettext.py#L112
|