Mercurial > hg
changeset 32254:177742666abd
filemerge: make warning message more i18n friendly
Before this patch, " specified for " part of warning messages
(e.g. "couldn't find merge tool TOOL specified for PAT") isn't
translatable.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sat, 13 May 2017 03:28:36 +0900 |
parents | 7d4ce4b567c5 |
children | 7e35d31b41fd |
files | mercurial/filemerge.py tests/test-merge-tools.t |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/filemerge.py Sat May 13 03:28:36 2017 +0900 +++ b/mercurial/filemerge.py Sat May 13 03:28:36 2017 +0900 @@ -133,7 +133,7 @@ def check(tool, pat, symlink, binary, changedelete): tmsg = tool if pat: - tmsg += " specified for " + pat + tmsg = _("%s (for pattern %s)") % (tool, pat) if not _findtool(ui, tool): if pat: # explicitly requested tool deserves a warning ui.warn(_("couldn't find merge tool %s\n") % tmsg)
--- a/tests/test-merge-tools.t Sat May 13 03:28:36 2017 +0900 +++ b/tests/test-merge-tools.t Sat May 13 03:28:36 2017 +0900 @@ -392,9 +392,9 @@ true.executable=cat # hg update -C 1 $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistentmergetool - couldn't find merge tool true specified for f + couldn't find merge tool true (for pattern f) merging f - couldn't find merge tool true specified for f + couldn't find merge tool true (for pattern f) merging f failed! 0 files updated, 0 files merged, 0 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon @@ -418,9 +418,9 @@ true.executable=cat # hg update -C 1 $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexistent/mergetool - couldn't find merge tool true specified for f + couldn't find merge tool true (for pattern f) merging f - couldn't find merge tool true specified for f + couldn't find merge tool true (for pattern f) merging f failed! 0 files updated, 0 files merged, 0 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon