diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-04-12 18:07:06 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-04-12 18:07:06 (GMT) |
commit | 6731fbd5fb5f334569395b4e434b3ba374c64fee (patch) | |
tree | 1c3de3db9765927dac94fdeec099f57ad904dac7 /BuildTools | |
parent | 572f5fd7af0c0a59440e215d7cc074fd637ef32a (diff) | |
download | swift-contrib-6731fbd5fb5f334569395b4e434b3ba374c64fee.zip swift-contrib-6731fbd5fb5f334569395b4e434b3ba374c64fee.tar.bz2 |
Updated check translations script.
Diffstat (limited to 'BuildTools')
-rwxr-xr-x | BuildTools/CheckTranslations.py | 16 |
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 |