1
0
mirror of https://github.com/minetest-mods/intllib.git synced 2024-11-15 06:50:29 +01:00
intllib/tools/xgettext.sh
2017-01-24 00:24:57 -03:00

24 lines
391 B
Bash
Executable File

#! /bin/bash
me=$(basename "${BASH_SOURCE[0]}");
if [[ $# -lt 1 ]]; then
echo "Usage: $me FILE..." >&2;
exit 1;
fi
mkdir -p locale;
echo "Generating template..." >&2;
xgettext --from-code=UTF-8 -kS -kNS:1,2 -k_ \
-o locale/template.pot "$@" \
|| exit;
cd locale;
for file in *.po; do
echo "Updating $file..." >&2;
msgmerge --update "$file" template.pot;
done
echo "DONE!" >&2;