From 8e3d7d003a3e29b9cd23e8a4554b6d8e7860792f Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Sun, 22 Jan 2023 20:37:07 +0100 Subject: [PATCH] Add link to weblate --- README.md | 3 ++- update-translation.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 886f492..52f462a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ TODO Translating: ------------ -The scrip `update-translations.sh` can be used to update the language template and translation files from source. +Translations are managed in [Weblate](https://weblate.danwin1210.de/projects/DanWin/mail-hosting). +If you prefer manually submitting translations, the script `update-translations.sh` can be used to update the language template and translation files from source. It will generate the file `locale/mail-hosting.pot` which you can then use as basis to create a new language file in `YOUR_LANG_CODE/LC_MESSAGES/mail-hosting.po` and edit it with a translation program, such as [Poedit](https://poedit.net/). Once you are done, you can open a pull request, or [email me](mailto:daniel@danwin1210.de), to include the translation. diff --git a/update-translation.sh b/update-translation.sh index ce1e95c..e51fb68 100755 --- a/update-translation.sh +++ b/update-translation.sh @@ -1,3 +1,3 @@ #!/bin/bash -xgettext -o locale/mail-hosting.pot `find . -iname '*.php'` +xgettext --from-code UTF-8 -o locale/mail-hosting.pot `find . -iname '*.php'` for translation in `find locale -iname '*.po'`; do msgmerge -U "$translation" locale/mail-hosting.pot; msgfmt -o ${translation:0:-2}mo "$translation"; done