# HG changeset patch # User Matt Harbison # Date 1526957717 14400 # Node ID 16463278e7f47a280b3c4e0cf494f2a4e4308739 # Parent ee96458afdb6edd333959cbf4eacb221ddc67b31 githelp: make several strings localizable diff -r ee96458afdb6 -r 16463278e7f4 hgext/githelp.py --- a/hgext/githelp.py Mon May 21 22:41:55 2018 -0400 +++ b/hgext/githelp.py Mon May 21 22:55:17 2018 -0400 @@ -67,7 +67,7 @@ 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 @@ 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: @@ -336,7 +336,7 @@ cmd = Command('revert') cmd['--all'] = None else: - raise error.Abort("a commit must be specified") + raise error.Abort(_("a commit must be specified")) ui.status((bytes(cmd)), "\n") @@ -386,7 +386,7 @@ args, opts = parseoptions(ui, cmdoptions, args) if len(args) == 0: - raise error.Abort("a repository to clone must be specified") + raise error.Abort(_("a repository to clone must be specified")) cmd = Command('clone') cmd.append(args[0]) @@ -776,7 +776,7 @@ "\n\n")) cmd['-d'] = convert(opts.get('onto')) if len(args) < 2: - raise error.Abort("Expected format: git rebase --onto X Y Z") + raise error.Abort(_("Expected format: git rebase --onto X Y Z")) cmd['-s'] = "'::%s - ::%s'" % (convert(args[1]), convert(args[0])) else: if len(args) == 1: