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