[PATCH 3 of 5] githelp: make several strings localizable

Pulkit Goyal 7895pulkit at gmail.com
Tue May 22 05:09:34 EDT 2018


On Tue, May 22, 2018 at 8:47 AM Matt Harbison <mharbison72 at gmail.com> wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1526957717 14400
> #      Mon May 21 22:55:17 2018 -0400
> # Node ID d00bfbf24df05e8b8e21acf1444ea24f265a6123
> # Parent  c137053c30e3a477d9f27aa72f0f791d5bcbe5b2
> githelp: make several strings localizable
>

> diff --git a/hgext/githelp.py b/hgext/githelp.py
> --- a/hgext/githelp.py
> +++ b/hgext/githelp.py
> @@ -67,7 +67,7 @@ def githelp(ui, repo, *args, **kwargs):
>
>      cmd = args[0]
>      if not cmd in gitcommands:
> -        raise error.Abort("error: unknown git command %s" % (cmd))
> +        raise error.Abort(_("error: unknown git command %s") % (cmd))
>
>      ui.pager('githelp')
>      args = args[1:]
> @@ -90,7 +90,7 @@ def parseoptions(ui, cmdoptions, args):
>              elif ('-' + ex.opt) in ex.msg:
>                  flag = '-' + ex.opt
>              else:
> -                raise error.Abort("unknown option %s" % ex.opt)
> +                raise error.Abort(_("unknown option %s") % ex.opt)
>              try:
>                  args.remove(flag)
>              except Exception:
>

​Below this one, there is one more occurrence which needs this love.​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20180522/9fd4f0dc/attachment.html>


More information about the Mercurial-devel mailing list