Move translation files

This commit is contained in:
Guillaume Meunier
2025-01-21 21:34:58 +01:00
committed by Patrick Nicolas
parent f183818daa
commit 59a992b201
11 changed files with 93 additions and 71 deletions
+24 -8
View File
@@ -2,17 +2,33 @@
cd $(dirname $0)/..
echo Generating template
WIVRN_POT=$(mktemp)
xgettext --keyword=_:1,1t --keyword=_S:1,1t --keyword=_F:1,1t $(find client/ -name "*.cpp" | sort) --output=$WIVRN_POT --package-name=WiVRn
sed -i 's/charset=CHARSET/charset=UTF-8/g' $WIVRN_POT
WIVRN_CLIENT_POT=$(mktemp)
for i in $(find client/locale -name wivrn.po)
xgettext \
--c++ --from-code=UTF-8 \
--keyword=_:1,1t \
--keyword=_S:1,1t \
--keyword=_F:1,1t \
--output=$WIVRN_CLIENT_POT \
--package-name=WiVRn \
$(find client/ -name "*.cpp" | sort)
sed -i 's/charset=CHARSET/charset=UTF-8/g' $WIVRN_CLIENT_POT
LANGS="es fr it ja"
for i in $LANGS
do
echo Updating $i
msgmerge --quiet --no-fuzzy-matching --update $i $WIVRN_POT
mkdir -p locale/$i
if [ ! -f locale/$i/wivrn.po ]
then
cp $WIVRN_CLIENT_POT locale/$i/wivrn.po
else
msgmerge --quiet --no-fuzzy-matching --update locale/$i/wivrn.po $WIVRN_CLIENT_POT
fi
done
rm $WIVRN_POT
rm $WIVRN_CLIENT_POT
lupdate dashboard/*.{cpp,ui} -ts dashboard/wivrn_*.ts