aboutsummaryrefslogtreecommitdiffstats
path: root/main/project/localization
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-04-27 11:58:25 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-04-27 11:59:40 +0200
commit5954ca6eda29fd8c1f20e0c17d68aa04fa87419f (patch)
treeda0c09f19e8d2f8439e6629561b964adcb983a03 /main/project/localization
parentf24830a8aea75717d8151c009539991c036bcbc5 (diff)
downloadcgeo-5954ca6eda29fd8c1f20e0c17d68aa04fa87419f.zip
cgeo-5954ca6eda29fd8c1f20e0c17d68aa04fa87419f.tar.gz
cgeo-5954ca6eda29fd8c1f20e0c17d68aa04fa87419f.tar.bz2
Include plurals strings in missing translations
Diffstat (limited to 'main/project/localization')
-rwxr-xr-xmain/project/localization/findmissingtranslations.sh4
-rw-r--r--main/project/localization/funcs.sh2
2 files changed, 3 insertions, 3 deletions
diff --git a/main/project/localization/findmissingtranslations.sh b/main/project/localization/findmissingtranslations.sh
index 4c47cbd..420f6f9 100755
--- a/main/project/localization/findmissingtranslations.sh
+++ b/main/project/localization/findmissingtranslations.sh
@@ -9,11 +9,11 @@ finddiffs () {
diff -y en.str $1.str > tmp.str
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\""
+ egrep "<(string|plurals)" ../../res/values/strings.xml | grep "name=\"$s\""
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\""
+ egrep "<(string|plurals)" ../../res/values-$1/strings.xml | grep "name=\"$s\""
done >> $1.missing
rm tmp.str
}
diff --git a/main/project/localization/funcs.sh b/main/project/localization/funcs.sh
index f54dccd..198fbae 100644
--- a/main/project/localization/funcs.sh
+++ b/main/project/localization/funcs.sh
@@ -1,5 +1,5 @@
# Utility functions for location-aware programs
getnames () {
- sed -ne 's/^.*<string\s*name\s*=\s*"\([^\"]*\)".*$/\1/p' $1
+ sed -ne 's/^.*<\(string\|plurals\)\s*name\s*=\s*"\([^\"]*\)".*$/\2/p' $1
}