aboutsummaryrefslogtreecommitdiffstats
path: root/main/project
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2011-09-27 23:22:32 +0200
committerSamuel Tardieu <sam@rfc1149.net>2011-09-27 23:22:32 +0200
commit7ab4677f19a38590f6de1d3d6a3ed452aeeffd3f (patch)
treec1ced6170642c65131df4028c81f05a50112f0aa /main/project
parentf54f502b224934babb983f6ff6c633b6a1a02c86 (diff)
downloadcgeo-7ab4677f19a38590f6de1d3d6a3ed452aeeffd3f.zip
cgeo-7ab4677f19a38590f6de1d3d6a3ed452aeeffd3f.tar.gz
cgeo-7ab4677f19a38590f6de1d3d6a3ed452aeeffd3f.tar.bz2
Exclude contributors and changelog from missing strings
Diffstat (limited to 'main/project')
-rwxr-xr-xmain/project/localization/findmissingtranslations.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/project/localization/findmissingtranslations.sh b/main/project/localization/findmissingtranslations.sh
index 0cf6336..e8fb1a8 100755
--- a/main/project/localization/findmissingtranslations.sh
+++ b/main/project/localization/findmissingtranslations.sh
@@ -7,17 +7,17 @@ getnames () {
finddiffs () {
echo "Missing translations for language '$1':" > $1.missing
diff -y en.str $1.str > tmp.str
- echo "Only in values/strings.xml (this doesn't mean, that everything has to be translated):" >> $1.missing
+ echo "Only in values/strings.xml:" >> $1.missing
grep "<\||" tmp.str | cut -d " " -f 1 | while read s; do
grep "<string" ../../res/values/strings.xml | grep "name=\"$s\""
- done >> $1.missing
+ done | egrep -v '<string name="(contributors|changelog)">'>> $1.missing
echo "Only in values-$1/strings.xml:" >> $1.missing
grep ">\||" tmp.str | sed "s/^/x/;s/\s\s*/ /g" | cut -d " " -f 3 | while read s; do
grep "<string" ../../res/values-$1/strings.xml | grep "name=\"$s\""
done >> $1.missing
rm tmp.str
- # 5 lines means 3 comments + contributors + changelog
- [ `cat $1.missing | wc -l` -lt 6 ] && rm $1.missing
+ # 3 comments
+ [ `cat $1.missing | wc -l` -lt 4 ] && rm $1.missing
}
cd `dirname "$0"`
@@ -31,5 +31,5 @@ for l in `find ../../res/values-* -name "strings.xml" | sed "s/^.*values-\(..\).
done
rm *.str
echo "missing translations:"
-# Do not count 3 comments + contributors + changelog
-wc -l *.missing | sed "s/\.missing//" | awk '{print $1-5" "$2}'
+# Do not count 3 comments
+wc -l *.missing | sed "s/\.missing//" | awk '{print $1-3" "$2}'