[PATCH 1 of 3 STABLE] cmdutil: avoid wrapping ctx.phasestr() by _()

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Sat Apr 25 14:49:10 UTC 2015


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1429973093 -32400
#      Sat Apr 25 23:44:53 2015 +0900
# Branch stable
# Node ID f7cb3b9559426621d1ff23acac85ea3b4869c399
# Parent  8015a3cf13805a307b43f22d821cad4824d094ea
cmdutil: avoid wrapping ctx.phasestr() by _()

This wrapping seems meaningless, because:

  - there is no "_()" invocation to prepare for extracting phase names
    to be translated

    "make update-pot" doesn't extract msgids for phase names

  - phase names are kine of reserved keywords like as branch name "default"

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1142,7 +1142,7 @@ class changeset_printer(object):
                               label='log.%s' % ns.colorname)
         if self.ui.debugflag:
             # i18n: column positioning for "hg log"
-            self.ui.write(_("phase:       %s\n") % _(ctx.phasestr()),
+            self.ui.write(_("phase:       %s\n") % ctx.phasestr(),
                           label='log.phase')
         for pctx in self._meaningful_parentrevs(ctx):
             label = 'log.parent changeset.%s' % pctx.phasestr()


More information about the Mercurial-devel mailing list