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

login
register
mail settings
Submitter Katsunori FUJIWARA
Date April 25, 2015, 2:49 p.m.
Message ID <f7cb3b9559426621d1ff.1429973350@juju>
Download mbox | patch
Permalink /patch/8791/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - April 25, 2015, 2:49 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@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"

Patch

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()