diff options
author | Timofey <t.danshin@corp.mail.ru> | 2016-10-12 17:30:15 +0300 |
---|---|---|
committer | Timofey <t.danshin@corp.mail.ru> | 2016-10-12 17:30:15 +0300 |
commit | 807732d0088a3638b72f2f1ad24be44729fac06e (patch) | |
tree | 4c69ff9cd675f2ab850cf867c1155fe7c257f7c0 /tools | |
parent | ce7a6f82300a8b32c32ee23a7950f970dda3c153 (diff) |
PR Fixes
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/python/find_untranslated_strings.py | 4 | ||||
-rw-r--r-- | tools/python/po_parser.py | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/tools/python/find_untranslated_strings.py b/tools/python/find_untranslated_strings.py index 89fc5bd141..74051f3580 100755 --- a/tools/python/find_untranslated_strings.py +++ b/tools/python/find_untranslated_strings.py @@ -46,9 +46,7 @@ class StringsTxt: self._find_most_similar() - def add_translation(self, translation, key=None, lang=None): - if not key or not lang: - raise UnboundLocalError("You must provide the key and language for the translation") + def add_translation(self, translation, key, lang): if key not in self.keys_in_order: self.keys_in_order.append(key) self.translations[key][lang] = translation diff --git a/tools/python/po_parser.py b/tools/python/po_parser.py index 1d609a8605..6721b69d2a 100644 --- a/tools/python/po_parser.py +++ b/tools/python/po_parser.py @@ -75,6 +75,7 @@ class PoParser: elif not line or line.startswith("#"): string_started = False current_key = None + else: if not string_started: continue @@ -116,4 +117,4 @@ def main(): if __name__ == "__main__": - main()
\ No newline at end of file + main() |