# HG changeset patch # User Martin Geisler # Date 2008-08-16 12:46:56 # Node ID 580d5e6bfc1faf306d9a23267753b730f820df0f # Parent b92baef99ebf17c647b84d10f910a3a164d8a74b move % out of translatable strings The translators need to see the raw format string, not the result of using the format string. diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py --- a/hgext/convert/convcmd.py +++ b/hgext/convert/convcmd.py @@ -52,8 +52,8 @@ def convertsource(ui, path, type, rev): exceptions.append(inst) if not ui.quiet: for inst in exceptions: - ui.write(_("%s\n") % inst) - raise util.Abort('%s: unknown repository type' % path) + ui.write("%s\n" % inst) + raise util.Abort(_('%s: unknown repository type') % path) def convertsink(ui, path, type): for name, sink in sink_converters: @@ -62,7 +62,7 @@ def convertsink(ui, path, type): return sink(ui, path) except NoRepo, inst: ui.note(_("convert: %s\n") % inst) - raise util.Abort('%s: unknown repository type' % path) + raise util.Abort(_('%s: unknown repository type') % path) class converter(object): def __init__(self, ui, source, dest, revmapfile, opts): @@ -274,7 +274,7 @@ class converter(object): # tolocal() because util._encoding conver() use it as # 'utf-8' self.ui.status("%d %s\n" % (num, recode(desc))) - self.ui.note(_("source: %s\n" % recode(c))) + self.ui.note(_("source: %s\n") % recode(c)) self.copy(c) tags = self.source.gettags() diff --git a/hgext/convert/gnuarch.py b/hgext/convert/gnuarch.py --- a/hgext/convert/gnuarch.py +++ b/hgext/convert/gnuarch.py @@ -23,7 +23,7 @@ class gnuarch_source(converter_source, c super(gnuarch_source, self).__init__(ui, path, rev=rev) if not os.path.exists(os.path.join(path, '{arch}')): - raise NoRepo(_("%s does not look like a GNU Arch repo" % path)) + raise NoRepo(_("%s does not look like a GNU Arch repo") % path) # Could use checktool, but we want to check for baz or tla. self.execmd = None @@ -54,7 +54,7 @@ class gnuarch_source(converter_source, c output = self.run0('tree-version', '-d', self.path) self.treeversion = output.strip() - self.ui.status(_('analyzing tree version %s...\n' % self.treeversion)) + self.ui.status(_('analyzing tree version %s...\n') % self.treeversion) # Get name of temporary directory version = self.treeversion.split('/') @@ -80,7 +80,7 @@ class gnuarch_source(converter_source, c self.parents[None] = child def after(self): - self.ui.debug(_('cleaning up %s\n' % self.tmppath)) + self.ui.debug(_('cleaning up %s\n') % self.tmppath) shutil.rmtree(self.tmppath, ignore_errors=True) def getheads(self): @@ -155,7 +155,7 @@ class gnuarch_source(converter_source, c # Initialise 'base-0' revision self._obtainrevision(rev) else: - self.ui.debug(_('applying revision %s...\n' % rev)) + self.ui.debug(_('applying revision %s...\n') % rev) revision = '%s--%s' % (self.treeversion, rev) changeset, status = self.runlines('replay', '-d', self.tmppath, revision) @@ -166,8 +166,8 @@ class gnuarch_source(converter_source, c self._obtainrevision(rev) else: old_rev = self.parents[rev][0] - self.ui.debug(_('computing changeset between %s and %s...\n' \ - % (old_rev, rev))) + self.ui.debug(_('computing changeset between %s and %s...\n') + % (old_rev, rev)) rev_a = '%s--%s' % (self.treeversion, old_rev) rev_b = '%s--%s' % (self.treeversion, rev) self._parsechangeset(changeset, rev) @@ -217,11 +217,11 @@ class gnuarch_source(converter_source, c return changes, copies def _obtainrevision(self, rev): - self.ui.debug(_('obtaining revision %s...\n' % rev)) + self.ui.debug(_('obtaining revision %s...\n') % rev) revision = '%s--%s' % (self.treeversion, rev) output = self._execute('get', revision, self.tmppath) self.checkexit(output) - self.ui.debug(_('analysing revision %s...\n' % rev)) + self.ui.debug(_('analysing revision %s...\n') % rev) files = self._readcontents(self.tmppath) self.changes[rev].add_files += files diff --git a/mercurial/archival.py b/mercurial/archival.py --- a/mercurial/archival.py +++ b/mercurial/archival.py @@ -209,7 +209,7 @@ def archive(repo, dest, node, kind, deco archiver.addfile(name, mode, islink, data) if kind not in archivers: - raise util.Abort(_("unknown archive type '%s'" % kind)) + raise util.Abort(_("unknown archive type '%s'") % kind) ctx = repo[node] archiver = archivers[kind](dest, prefix, mtime or ctx.date()[0]) diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -172,7 +172,7 @@ class hgwebdir(object): try: u.readconfig(os.path.join(path, '.hg', 'hgrc')) except Exception, e: - u.warn(_('error reading %s/.hg/hgrc: %s\n' % (path, e))) + u.warn(_('error reading %s/.hg/hgrc: %s\n') % (path, e)) continue def get(section, name, default=None): return u.config(section, name, default, untrusted=True)