tests: cleanup check-translation deprecated
authortimeless@mozdev.org
Thu, 17 Sep 2015 21:20:17 -0400
changeset 26276 93395bee98ba
parent 26275 3e9d63820cd2
child 26277 ad4d6c7aea6a
tests: cleanup check-translation deprecated
i18n/check-translation.py
--- a/i18n/check-translation.py	Fri Sep 18 14:24:53 2015 +0800
+++ b/i18n/check-translation.py	Thu Sep 17 21:20:17 2015 -0400
@@ -96,11 +96,10 @@
     >>> for e in deprecated(pe): print e
     msgstr inconsistently translated (DEPRECATED)
     """
-    global deprecatedpe
-    if not '(DEPRECATED)' in pe.msgstr:
-        if not (deprecatedpe and deprecatedpe.msgstr
-                and deprecatedpe.msgstr in pe.msgstr):
-            yield "msgstr inconsistently translated (DEPRECATED)"
+    if not ('(DEPRECATED)' in pe.msgstr or
+            (deprecatedpe and deprecatedpe.msgstr and
+             deprecatedpe.msgstr in pe.msgstr)):
+        yield "msgstr inconsistently translated (DEPRECATED)"
 
 ####################