]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
add a translation checker tool
authorRudolf Polzer <divVerent@xonotic.org>
Tue, 18 Jan 2011 10:10:02 +0000 (11:10 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Tue, 18 Jan 2011 10:10:02 +0000 (11:10 +0100)
apply-eol-style.sh [deleted file]
check-translations.sh [new file with mode: 0755]

diff --git a/apply-eol-style.sh b/apply-eol-style.sh
deleted file mode 100755 (executable)
index 6c6c997..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-while read -r EXT EOLSTYLE; do
-       echo "Fixing $EXT..."
-       find . -name .svn -prune -o -type f \( -name "*.$EXT" -o -name "$EXT" \) -print0 | \
-               case "$EOLSTYLE" in
-                       1)
-                               xargs -0 svn propset svn:eol-style native
-                               ;;
-                       0)
-                               xargs -0 svn propdel svn:eol-style
-                               ;;
-               esac
-done <eol-style.txt
diff --git a/check-translations.sh b/check-translations.sh
new file mode 100755 (executable)
index 0000000..c57b647
--- /dev/null
@@ -0,0 +1,14 @@
+find qcsrc/menu -type f -not -name \*.po -not -name \*.txt | xgettext -LC -k_ -f- --from-code utf-8 -o menu.dat.pot >&2
+
+for X in menu.dat.*.po; do
+       msgmerge -U "$X" menu.dat.pot >&2
+       todo=$(
+               msgattrib --untranslated "$X" | grep -A 2147483647 "^#:"
+               msgattrib --fuzzy "$X"        | grep -A 2147483647 "^#:"
+       )
+       if [ -n "$todo" ]; then
+               echo "TODO for translation $X:"
+               echo "$todo"
+               echo
+       fi
+done