i18n/check-translation.py
branchstable
changeset 26838 47dd34f2e727
parent 26837 33894facc180
child 26852 3fb36dec1727
--- a/i18n/check-translation.py	Sun Nov 01 08:38:56 2015 +0900
+++ b/i18n/check-translation.py	Sun Nov 01 08:38:56 2015 +0900
@@ -71,7 +71,9 @@
 deprecatedpe = None
 @scanner()
 def deprecatedsetup(pofile):
-    pes = [p for p in pofile if p.msgid == 'DEPRECATED']
+    pes = [p for p in pofile
+           if ((p.msgid == 'DEPRECATED' or p.msgid == '(DEPRECATED)') and
+               p.msgstr)]
     if len(pes):
         global deprecatedpe
         deprecatedpe = pes[0]
@@ -108,7 +110,7 @@
     >>> match(deprecated, pe)
     """
     if not ('(DEPRECATED)' in pe.msgstr or
-            (deprecatedpe and deprecatedpe.msgstr and
+            (deprecatedpe and
              deprecatedpe.msgstr in pe.msgstr)):
         yield "msgstr inconsistently translated (DEPRECATED)"