Add localization resources.

This commit is contained in:
SET
2022-10-17 18:50:49 +02:00
parent 6b37b9b9f7
commit 4aca5126c3
7 changed files with 232 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
#!/bin/bash
if [ ! -x 0_getstrings.sh ]
then
echo "Wrong working directory. Please cd to the directory containing this script."
exit 0
fi
APPNAME=T7
SRC=../../
DOMAIN=fr
DEST=$DOMAIN/$APPNAME.po
[ ! -d $DOMAIN ] && mkdir $DOMAIN
[ -f $DEST ] && JOIN="-j"
[ -f $DEST ] && cp $DEST $DEST.bak-$(date +%F-%T)
xgettext --keyword=_ -d $DOMAIN $JOIN -o $DEST --c++ --from-code=UTF-8 $(find $SRC -maxdepth 1 -type f -name "*.cpp")
xgettext --keyword=_ -d $DOMAIN -j -o $DEST --c++ --from-code=UTF-8 $(find $SRC -maxdepth 1 -type f -name "*.h")
xgettext --keyword=_ -d $DOMAIN -j -o $DEST --c++ --from-code=UTF-8 $(find $SRC/Resources/UI -maxdepth 1 -type f -name "*.cpp")
xgettext --keyword=_ -d $DOMAIN -j -o $DEST --c++ --from-code=UTF-8 $(find $SRC/Resources/UI -maxdepth 1 -type f -name "*.h")
exit 0