You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tasks/bin/a2po

28 lines
1023 B
Bash

#!/bin/bash
###############################################################################
# usage: a2po [command]
# import - reads .po files, imports to .xml
# export - reads .xml files, exports to .po
# concatenate astrid XML files
catxml="`dirname $0`/catxml"
rm -f astrid/res/values/strings.xml
${catxml} astrid/res/values/strings*.xml > astrid/res/values/strings.xml
# invoke a2po
a2po $* --android astrid/res --gettext astrid/locales --groups strings --ignore-fuzzy --template android.pot
a2po $* --android api/res --gettext api/locales --groups strings --ignore-fuzzy --template api.pot
mv astrid/res/values-he/* astrid/res/values-iw 2> /dev/null
mv api/res/values-he/* api/res/values-iw 2> /dev/null
rmdir astrid/res/values-he api/res/values-he
# remove unused lp translations
UNUSED=( ar bg el en-rGB eo et eu fi fo gl hi hr hu id ka lt ml oc ro sk sl ta uk vi )
for LANG in "${UNUSED[@]}"; do
rm -rf astrid/res/values-$LANG api/res/values-$LANG
done
# remove temporary
rm -f astrid/res/values/strings.xml