aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/po (follow)
Commit message (Collapse)AuthorAgeLines
* Clarify warning on duplicate keysWolfgang Müller2021-11-27-18/+18
| | | | | | | | | | | | | | | | | | | | | In order to alert the user to any potential errors in the configuration files, we keep track of configuration entries that we have not accessed and print them out. These might include misspellings or otherwise malformed strings. To collect those unparsed configuration entries, we remove the ones that have been successfully parsed from our in-memory KeyFile. The remaining keys are the offending ones. Unfortunately, because KeyFile.remove_key() removes only one matching key, we might also be left with any duplicates that would otherwise be valid entries. So, if the entry misc.font is specified twice, we currently warn about an "unknown" key, the second misc.font entry. This could potentially be misleading to the user. Since it is too expensive to fix this issue in the code, make sure we warn instead about "unknown or duplicate" keys. This way we say the correct thing without incurring a big complexity cost.
* po: Do not break long message linesWolfgang Müller2021-11-27-2/+2
| | | | | | | | 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.
* po: Update German translationWolfgang Müller2021-11-27-6/+6
|
* po: Update Finnish translationJuhani Krekelä2021-11-27-4/+4
|
* Add ability to specify additional URI handlersJuhani Krekelä2021-11-27-37/+85
| | | | | | | | | This commit adds a new section, open-with, to the configuration file. The options specified there will be added as "Open with …" menu items in the URI context menu. This is to make it easier to perform other actions on the URI than opening it in the system default browser; a user might for example add another browser, media player, or a script that preprocesses the URI before opening it.
* po: Fix update-pot.sh breaking on non-ASCIIJuhani Krekelä2021-11-27-1/+1
| | | | | | | 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.
* Unify context menus for URLs and OSC 8 hyperlinksJuhani Krekelä2021-07-24-74/+50
| | | | | | | | | | | Currently weltschmerz has separate context menus for the two types of URIs one can interact with, even though they contain the same option with only a little different phrasing. This makes both use the same context menu, and standardizes terminology to "URI". This unification is in preparation for an upcoming "Open with …" feature which will programmatically add items to context menu for URIs. Without this, we would need to duplicate logic for each of the separate menus.
* po: Introduce more robust error handlingWolfgang Müller2021-07-02-0/+6
| | | | | | | | 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.
* Use custom scripts instead of meson's gettext toolingWolfgang Müller2021-06-29-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add Finnish translationJuhani Krekelä2021-06-28-0/+114
|
* po: Add German translationWolfgang Müller2021-06-28-0/+114
|
* 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: Add portable object templateWolfgang Müller2021-06-28-0/+113
| | | | | | | This is the mail .pot file that all future translations will use as a base. Since the header is supposed to be filled out by translators in the .po file, we can leave it as-is. This also makes subsequent updates to this file easier, since it is generated by a tool.
* po: Add translatable files to POTFILESWolfgang Müller2021-06-27-0/+4
|
* 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