Fixed single language translation update

This commit is contained in:
Marco Ciampa 2020-10-22 20:45:56 +02:00 committed by Seth Hillbrand
parent db66e16f71
commit 713515907a
1 changed files with 14 additions and 12 deletions

View File

@ -65,22 +65,24 @@ find $POTDIRS -name '*.cpp' -or -name '*.h' |
sort |
xgettext -f- -k_ -k_HKI -kwxPLURAL:1,2 --force-po --from-code utf-8 -o $LOCALDIR/kicad.pot
LINGUAS=`cat $LOCALDIR/LINGUAS|grep -v '^#'|grep -v '^\s*$'` #Read file without comment and empty lines
#check if present in locale list
validate() { echo $LINGUAS | grep -F -q -w "$1"; }
if [ "$SINGLE_LANG" != "all" ] ; then
#If supplied, update only the specified locale
if [ "$SINGLE_LANG" = "" ] ; then
display_help
elif [ "$SINGLE_LANG" = "all" ] ; then
LINGUAS=`cat $LOCALDIR/LINGUAS|grep -v '^#'|grep -v '^\s*$'` #Read file without comment and empty lines
elif validate "$SINGLE_LANG"; then
LINGUAS="$SINGLE_LANG"
else
echo "Error!"
echo "Locale argument \"$1\" not present in current locale list:"
for i in $LINGUAS; do echo -n "$i "; done
echo # newline
exit 1
if [ "$SINGLE_LANG" = "" ] ; then
display_help
elif validate "$SINGLE_LANG"; then
LINGUAS="$SINGLE_LANG"
else
echo "Error!"
echo "Locale argument \"$1\" not present in current locale list:"
for i in $LINGUAS; do echo -n "$i "; done
echo # newline
exit 1
fi
fi