Fixed single language translation update
This commit is contained in:
parent
db66e16f71
commit
713515907a
|
@ -65,14 +65,15 @@ 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
|
||||
|
@ -82,6 +83,7 @@ else
|
|||
echo # newline
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
echo "Writing summary to ${CSVFILE}"
|
||||
|
|
Loading…
Reference in New Issue