Modified according to new locale directory layout
This commit is contained in:
parent
560db4d69d
commit
9ece96fcd9
1 changed files with 5 additions and 5 deletions
|
@ -9,7 +9,7 @@ if [ $1 != "updpo" ] && [ $1 != "updmo" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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")
|
basedir=$(dirname "$0")
|
||||||
cd "$basedir"
|
cd "$basedir"
|
||||||
|
@ -19,18 +19,18 @@ if [ $1 == "updpo" ]; then
|
||||||
echo "Aggiorno masthelp.pot con xgettext"
|
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
|
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"
|
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
|
for lang in ${langs[@]}; do
|
||||||
if [ $lang != "en" ]; then
|
if [ $lang != "en_EN" ]; then
|
||||||
echo "Aggiorno masthelp.po per «$lang» con msgmerge"
|
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
|
fi
|
||||||
done
|
done
|
||||||
echo "Fatto! Ora puoi editare i vari masthelp.po."
|
echo "Fatto! Ora puoi editare i vari masthelp.po."
|
||||||
elif [ $1 == "updmo" ]; then
|
elif [ $1 == "updmo" ]; then
|
||||||
for lang in ${langs[@]}; do
|
for lang in ${langs[@]}; do
|
||||||
echo "Aggiorno masthelp.mo per «$lang»"
|
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
|
done
|
||||||
echo "Fatto! :-)"
|
echo "Fatto! :-)"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue