b37d9f49b0f8d4047e9baa97cb2b7761f5a27a31
[xonotic/xonotic-data.pk3dir.git] / check-translations.sh
1 #!/bin/sh
2
3 for VM in menu client; do
4         find qcsrc/"$VM" -type f -not -name \*.po -not -name \*.txt | xgettext -LC -k_ -f- --from-code utf-8 -o "$VM".dat.pot >&2
5         for X in "$VM".dat.*.po; do
6                 [ -f "$X" ] || continue
7                 msgmerge -F -U "$X" "$VM".dat.pot >&2
8                 todo=$(
9                         msgattrib --untranslated "$X" | grep -A 2147483647 "^#:"
10                         msgattrib --fuzzy "$X"        | grep -A 2147483647 "^#:"
11                 )
12                 if [ -n "$todo" ]; then
13                         echo "TODO for translation $X:"
14                         echo "$todo"
15                         echo
16                 fi
17         done
18 done