diff mercurial/help.py @ 26370:44cc9f63a2f1

help: include parens in DEPRECATED/EXPERIMENTAL keywords In some languages that have no caps, "DEPRECATED" and "deprecated" can be translated to the same byte sequence. So it is too wild to exclude messages by _("DEPRECATED").
author Yuya Nishihara <yuya@tcha.org>
date Sat, 26 Sep 2015 11:38:39 +0900
parents 4799b5c4aaf4
children 51b309ce6c7d
line wrap: on
line diff
--- a/mercurial/help.py	Sat Sep 26 11:25:38 2015 +0900
+++ b/mercurial/help.py	Sat Sep 26 11:38:39 2015 +0900
@@ -15,10 +15,12 @@
 import hgweb.webcommands as webcommands
 
 _exclkeywords = [
-    "DEPRECATED",
-    "EXPERIMENTAL",
-    _("DEPRECATED"),
-    _("EXPERIMENTAL"),
+    "(DEPRECATED)",
+    "(EXPERIMENTAL)",
+    # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
+    _("(DEPRECATED)"),
+    # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
+    _("(EXPERIMENTAL)"),
     ]
 
 def listexts(header, exts, indent=1, showdeprecated=False):
@@ -339,7 +341,7 @@
             if not ui.debugflag and f.startswith("debug") and name != "debug":
                 continue
             doc = e[0].__doc__
-            if doc and 'DEPRECATED' in doc and not ui.verbose:
+            if doc and '(DEPRECATED)' in doc and not ui.verbose:
                 continue
             doc = gettext(doc)
             if not doc: