Mercurial > evolve
changeset 3582:8d93f76aa04d
evolvecmd: show some internationalization love
Some outputs are not internationalized because I doubt that they are gonna stay
here for long.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 21 Mar 2018 17:04:41 +0530 |
parents | 846f7d4fe47e |
children | 944a8c27d27b |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 20 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Wed Mar 21 16:52:46 2018 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Wed Mar 21 17:04:41 2018 +0530 @@ -134,14 +134,14 @@ roots = repo.revs('roots(%ld)', targetrevs) heads = repo.revs('heads(%ld)', targetrevs) if len(roots) > 1 or len(heads) > 1: - cheader = "ancestor '%s' split over multiple topological branches."\ - "\nchoose an evolve destination:" % orig + cheader = _("ancestor '%s' split over multiple topological" + " branches.\nchoose an evolve destination:") % orig selectedrev = utility.revselectionprompt(ui, repo, list(heads), cheader) if selectedrev is None: - msg = ("could not solve instability, " - "ambiguous destination: " - "parent split across two branches\n") + msg = _("could not solve instability, " + "ambiguous destination: " + "parent split across two branches\n") ui.write_err(msg) return (False, '') target = repo[selectedrev] @@ -656,8 +656,8 @@ newer = [n for n in newer if n and ctx.node() not in n] if newer: return base, tuple(ctx._repo[o] for o in newer[0]) - raise error.Abort("base of divergent changeset %s not found" % ctx, - hint='this case is not yet handled') + raise error.Abort(_("base of divergent changeset %s not found") % ctx, + hint=_('this case is not yet handled')) def _aspiringdescendant(repo, revs): """Return a list of changectx which can be stabilized on top of pctx or @@ -908,27 +908,28 @@ if opts['continue']: if opts['any']: - raise error.Abort('cannot specify both "--any" and "--continue"') + raise error.Abort(_('cannot specify both "--any" and "--continue"')) if opts['all']: - raise error.Abort('cannot specify both "--all" and "--continue"') + raise error.Abort(_('cannot specify both "--all" and "--continue"')) if opts['rev']: - raise error.Abort('cannot specify both "--rev" and "--continue"') + raise error.Abort(_('cannot specify both "--rev" and "--continue"')) if opts['stop']: - raise error.Abort('cannot specify both "--stop" and "--continue"') + raise error.Abort(_('cannot specify both "--stop" and' + ' "--continue"')) if opts['stop']: if opts['any']: - raise error.Abort('cannot specify both "--any" and "--stop"') + raise error.Abort(_('cannot specify both "--any" and "--stop"')) if opts['all']: - raise error.Abort('cannot specify both "--all" and "--stop"') + raise error.Abort(_('cannot specify both "--all" and "--stop"')) if opts['rev']: - raise error.Abort('cannot specify both "--rev" and "--stop"') + raise error.Abort(_('cannot specify both "--rev" and "--stop"')) if opts['rev']: if opts['any']: - raise error.Abort('cannot specify both "--rev" and "--any"') + raise error.Abort(_('cannot specify both "--rev" and "--any"')) if opts['all']: - raise error.Abort('cannot specify both "--rev" and "--all"') + raise error.Abort(_('cannot specify both "--rev" and "--all"')) # Backward compatibility if opts['unstable']: @@ -1113,7 +1114,8 @@ try: ctx = repo[utility._singlesuccessor(repo, repo['.'])] except utility.MultipleSuccessorsError as exc: - repo.ui.write_err('parent is obsolete with multiple successors:\n') + repo.ui.write_err(_('parent is obsolete with multiple' + ' successors:\n')) for ln in exc.successorssets: for n in ln: displayer.show(repo[n]) @@ -1146,7 +1148,7 @@ # Continuation handling if contopt: if not evolvestate: - raise error.Abort('no evolve to continue') + raise error.Abort(_('no interrupted evolve to continue')) evolvestate.load() continueevolve(ui, repo, evolvestate, progresscb) if evolvestate['command'] != 'evolve':