Android translation scripts

This commit is contained in:
Sergii Pylypenko
2016-03-28 20:42:43 +03:00
committed by pelya
parent 74c1382675
commit 090a8f3f16
3 changed files with 26 additions and 1 deletions

12
android-extract-strings.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
mkdir -p ../translations/lang
git diff 1.6/master -- src/lang/english.txt | tail -n +5 | grep '^+' | cut -b 2- > ../translations/lang/english.txt
for f in src/lang/*.txt; do
[ "$f" = src/lang/english.txt ] && continue
rm -f ../translations/lang/`basename $f`
cat ../translations/lang/english.txt | grep '^STR' | while read name text; do
grep "^$name\b" $f >> ../translations/lang/`basename $f`
done
done