aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/po/meson.build (follow)
Commit message (Collapse)AuthorAgeLines
* Use custom scripts instead of meson's gettext toolingWolfgang Müller2021-06-29-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* po: Specify UTF-8 for all potential input to xgettextWolfgang Müller2021-06-28-1/+1
| | | | | Since the default setting of ASCII-only could potentially bite us in the long run, make sure to have xgettext interpret files as UTF-8.
* po: Specify comment tag for xgettextWolfgang Müller2021-06-27-1/+3
| | | | | | | | | For some translatable strings we need to provide more context to the translators. Conveniently, xgettext [1] provides the '-c[tag]' flag for this. Make sure to pass along any comment containing "TRANSLATORS" preceding a gettext call to the .pot file. [1] https://www.gnu.org/software/gettext/manual/html_node/xgettext-Invocation.html
* Prepare for internationalizationWolfgang Müller2021-06-27-0/+7
weltschmerz currently does not allow for translation and exists in English only. This is a serious defect for people who do not speak that language. The following series of commits aims to remedy this by adding the necessary infrastructure and build steps to enable easy translation. To do this we use GNU gettext[1]; its tooling is widely supported and a de-facto standard. Since we need to tell gettext where to find the compiled .mo translation files, have both the Makefile and meson pass the locale directory to weltschmerz in form of a LOCALEDIR macro. The translation domain will be "weltschmerz". Not only will any strings in the Vala code have to be translated, we need to make sure to translate terminal.ui and weltschmerz.desktop as well. The former will be taken care of through POTFILES only, but for the latter we have to define an intermediary build step. To ensure compatibility with the Makefile, we suffix the desktop file with '.in'. For now, LINGUAS and POTFILES remain empty. A future commit will document all files needing translation. LINGUAS will be updated as translations are completed. [1] https://www.gnu.org/software/gettext