From 1be1194b6225d16f8b53661cf87c0cc52180f42e Mon Sep 17 00:00:00 2001 From: pezcurrel Date: Thu, 2 Nov 2023 20:58:56 +0100 Subject: [PATCH] =?UTF-8?q?Automatically=20add=20language=20code=20in=20ma?= =?UTF-8?q?sthelp.pot=20and=20fix=20=E2=80=9C{singular}=E2=80=9D=20and=20?= =?UTF-8?q?=E2=80=9C{plural}=E2=80=9D=20in=20en.masthelp.po?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/clitools/updtrans.bash | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/web/clitools/updtrans.bash b/web/clitools/updtrans.bash index 88b9edb..13a1deb 100755 --- a/web/clitools/updtrans.bash +++ b/web/clitools/updtrans.bash @@ -17,17 +17,16 @@ cd ../../ if [ $1 == "updpo" ]; then echo "Aggiorno masthelp.pot con xgettext" - xgettext --no-wrap --from-code utf-8 --add-comments --package-name masthelp --package-version 1.1 --msgid-bugs-address masthelp@insicuri.net web/site/*.php -o web/site/locale/masthelp.pot + 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 -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 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_US.UTF-8/LC_MESSAGES/masthelp.po for lang in ${langs[@]}; do if [ $lang != "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 fi done - echo "Fatto! Ora puoi editare i vari masthelp.po. Ricordati di editare anche" - echo "quello per «en» rimuovendo \"{singular}\" e \"{plural}\" ;-)" + echo "Fatto! Ora puoi editare i vari masthelp.po." elif [ $1 == "updmo" ]; then for lang in ${langs[@]}; do echo "Aggiorno masthelp.mo per «$lang»"