summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-04-12 18:07:06 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-04-12 18:07:06 (GMT)
commit6731fbd5fb5f334569395b4e434b3ba374c64fee (patch)
tree1c3de3db9765927dac94fdeec099f57ad904dac7 /BuildTools
parent572f5fd7af0c0a59440e215d7cc074fd637ef32a (diff)
downloadswift-contrib-6731fbd5fb5f334569395b4e434b3ba374c64fee.zip
swift-contrib-6731fbd5fb5f334569395b4e434b3ba374c64fee.tar.bz2
Updated check translations script.
Diffstat (limited to 'BuildTools')
-rwxr-xr-xBuildTools/CheckTranslations.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/BuildTools/CheckTranslations.py b/BuildTools/CheckTranslations.py
index 8dcf414..95c7e91 100755
--- a/BuildTools/CheckTranslations.py
+++ b/BuildTools/CheckTranslations.py
@@ -10,6 +10,18 @@ def getText(nodelist):
return text
+desktop_generic_names = set()
+desktop_comments = set()
+f = open("Swift/resources/swift.desktop", "r")
+for l in f.readlines() :
+ m = re.match("GenericName\[(\w+)\].*", l)
+ if m :
+ desktop_generic_names.add(m.group(1))
+ m = re.match("Comment\[(\w+)\].*", l)
+ if m :
+ desktop_comments.add(m.group(1))
+f.close()
+
for filename in os.listdir("Swift/Translations") :
m = re.match("swift_(.*)\.ts", filename)
if m :
@@ -32,3 +44,7 @@ for filename in os.listdir("Swift/Translations") :
print "[Error] " + filename + ": Placeholder mismatch in translation '" + sourceText + "'"
if not finished :
print "[Warning] " + filename + ": Unfinished"
+ if language not in desktop_generic_names :
+ print "[Warning] GenericName field missing in desktop entry for " + language
+ if language not in desktop_comments :
+ print "[Warning] Comment field missing in desktop entry for " + language