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()