From 6731fbd5fb5f334569395b4e434b3ba374c64fee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Tue, 12 Apr 2011 20:07:06 +0200 Subject: Updated check translations script. 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 -- cgit v0.10.2-6-g49f6