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

login
register
mail settings
Submitter timeless@mozdev.org
Date Sept. 18, 2015, 1:23 a.m.
Message ID <9d942e7b8147695179a5.1442539407@waste.org>
Download mbox | patch
Permalink /patch/10536/
State Accepted
Headers show

Comments

timeless@mozdev.org - Sept. 18, 2015, 1:23 a.m.
# HG changeset patch
# User timeless@mozdev.org
# Date 1442539217 14400
#      Thu Sep 17 21:20:17 2015 -0400
# Node ID 9d942e7b8147695179a54565c934809b9b190c09
# Parent  a0eff7ebc2aebb32cf4c8da276104102ff37d786
tests: cleanup check-translation deprecated

Patch

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)"
 
 ####################