[PATCH 1 of 2] tests: cleanup check-translation deprecated

timeless at mozdev.org timeless at mozdev.org
Fri Sep 18 01:23:27 UTC 2015


# HG changeset patch
# User timeless at mozdev.org
# Date 1442539217 14400
#      Thu Sep 17 21:20:17 2015 -0400
# Node ID 9d942e7b8147695179a54565c934809b9b190c09
# Parent  a0eff7ebc2aebb32cf4c8da276104102ff37d786
tests: cleanup check-translation deprecated

diff --git a/i18n/check-translation.py b/i18n/check-translation.py
--- a/i18n/check-translation.py
+++ b/i18n/check-translation.py
@@ -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)"
 
 ####################
 


More information about the Mercurial-devel mailing list