changeset 6913:580d5e6bfc1f

move % out of translatable strings The translators need to see the raw format string, not the result of using the format string.
author Martin Geisler <mg@daimi.au.dk>
date Sat, 16 Aug 2008 14:46:56 +0200
parents b92baef99ebf
children 95f35b553ae6
files hgext/convert/convcmd.py hgext/convert/gnuarch.py mercurial/archival.py mercurial/hgweb/hgwebdir_mod.py
diffstat 4 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/convcmd.py	Tue Aug 12 13:45:48 2008 +0200
+++ b/hgext/convert/convcmd.py	Sat Aug 16 14:46:56 2008 +0200
@@ -52,8 +52,8 @@
             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 @@
                 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 @@
                 # 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()
--- a/hgext/convert/gnuarch.py	Tue Aug 12 13:45:48 2008 +0200
+++ b/hgext/convert/gnuarch.py	Sat Aug 16 14:46:56 2008 +0200
@@ -23,7 +23,7 @@
         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 @@
             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 @@
         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 @@
             # 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 @@
                 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 @@
         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
 
--- a/mercurial/archival.py	Tue Aug 12 13:45:48 2008 +0200
+++ b/mercurial/archival.py	Sat Aug 16 14:46:56 2008 +0200
@@ -209,7 +209,7 @@
         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])
--- a/mercurial/hgweb/hgwebdir_mod.py	Tue Aug 12 13:45:48 2008 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	Sat Aug 16 14:46:56 2008 +0200
@@ -172,7 +172,7 @@
                 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)