From 9ece96fcd9899ec25af73a21520b78e70b0772d7 Mon Sep 17 00:00:00 2001 From: pezcurrel Date: Fri, 29 Dec 2023 10:02:03 +0100 Subject: [PATCH] Modified according to new locale directory layout --- web/clitools/updtrans.bash | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/clitools/updtrans.bash b/web/clitools/updtrans.bash index 6667cfd..3630f62 100755 --- a/web/clitools/updtrans.bash +++ b/web/clitools/updtrans.bash @@ -9,7 +9,7 @@ if [ $1 != "updpo" ] && [ $1 != "updmo" ]; then exit 1 fi -langs=("ar" "ars" "ca" "cs" "de" "en" "es" "fa" "fr" "gl" "id" "it" "nl" "pl" "pt" "pt_BR" "ru" "tr" "uk") +langs=("ar_AE" "be_BY" "ca_ES" "cs_CZ" "de_DE" "en_EN" "es_ES" "fa_IR" "fr_FR" "gl_ES" "id_ID" "it_IT" "nl_NL" "pl_PL" "pt_BR" "pt_PT" "ru_RU" "tr_TR" "uk_UA") basedir=$(dirname "$0") cd "$basedir" @@ -19,18 +19,18 @@ if [ $1 == "updpo" ]; then echo "Aggiorno masthelp.pot con xgettext" xgettext --no-wrap --from-code utf-8 --add-comments --copyright-holder masthelp@insicuri.net --package-name mastodon.help --package-version 1.1 --msgid-bugs-address masthelp@insicuri.net web/site/*.php web/lib/*.php -o - | sed -e 's/^"Language: \\n"$/"Language: en\\n"/' > web/site/locale/masthelp.pot echo "Aggiorno masthelp.po per «en» con msgen" - msgen --no-wrap web/site/locale/masthelp.pot -o - | sed -e 's/msgstr "Not available{singular}"/msgstr "Not available"/' -e 's/msgstr "Not available{plural}"/msgstr "Not available"/' > web/site/locale/en/en_US.UTF-8/LC_MESSAGES/masthelp.po + msgen --no-wrap web/site/locale/masthelp.pot -o - | sed -e 's/msgstr "Not available{singular}"/msgstr "Not available"/' -e 's/msgstr "Not available{plural}"/msgstr "Not available"/' > web/site/locale/en_EN/LC_MESSAGES/masthelp.po for lang in ${langs[@]}; do - if [ $lang != "en" ]; then + if [ $lang != "en_EN" ]; then echo "Aggiorno masthelp.po per «$lang» con msgmerge" - msgmerge --update --no-wrap web/site/locale/$lang/en_US.UTF-8/LC_MESSAGES/masthelp.po web/site/locale/masthelp.pot + msgmerge --update --no-wrap web/site/locale/$lang/LC_MESSAGES/masthelp.po web/site/locale/masthelp.pot fi done echo "Fatto! Ora puoi editare i vari masthelp.po." elif [ $1 == "updmo" ]; then for lang in ${langs[@]}; do echo "Aggiorno masthelp.mo per «$lang»" - msgfmt web/site/locale/$lang/en_US.UTF-8/LC_MESSAGES/masthelp.po -o web/site/locale/$lang/en_US.UTF-8/LC_MESSAGES/masthelp.mo + msgfmt web/site/locale/$lang/LC_MESSAGES/masthelp.po -o web/site/locale/$lang/LC_MESSAGES/masthelp.mo done echo "Fatto! :-)" else