diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -113,7 +113,7 @@ pypats = [ (r'[^+=*!<>&| -](\s=|=\s)[^= ]', "wrong whitespace around ="), (r'raise Exception', "don't raise generic exceptions"), - (r'ui\.(status|progress|write|note)\([\'\"]x', + (r'ui\.(status|progress|write|note|warn)\([\'\"]x', "warning: unwrapped ui message"), ] diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -492,7 +492,7 @@ def _dispatch(ui, args): raise args.insert(0, repo) elif rpath: - ui.warn("warning: --repository ignored\n") + ui.warn(_("warning: --repository ignored\n")) d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) return runcommand(lui, repo, cmd, fullargs, ui, options, d, diff --git a/mercurial/repair.py b/mercurial/repair.py --- a/mercurial/repair.py +++ b/mercurial/repair.py @@ -150,9 +150,10 @@ def strip(ui, repo, node, backup="all"): os.unlink(chgrpfile) except: if backupfile: - ui.warn("strip failed, full bundle stored in '%s'\n" % backupfile) + ui.warn(_("strip failed, full bundle stored in '%s'\n") + % backupfile) elif saveheads: - ui.warn("strip failed, partial bundle stored in '%s'\n" + ui.warn(_("strip failed, partial bundle stored in '%s'\n") % chgrpfile) raise diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -304,7 +304,7 @@ class ui(object): p = self.config('paths', loc) if p: if '%%' in p: - self.warn("(deprecated '%%' in path %s=%s from %s)\n" % + self.warn(_("(deprecated '%%' in path %s=%s from %s)\n") % (loc, p, self.configsource('paths', loc))) p = p.replace('%%', '%') p = util.expandpath(p)