[PATCH 2 of 6] mark more strings for translation

Martin Geisler mg at daimi.au.dk
Sat Aug 23 08:37:21 CDT 2008


# HG changeset patch
# User Martin Geisler <mg at daimi.au.dk>
# Date 1219498339 -7200
# Node ID 7ea3303bff81955423ffc2f985b77d21bd192484
# Parent  afff2e12e1932bc99b6ed0e7d35f8a608363d401
mark more strings for translation

diff -r afff2e12e193 -r 7ea3303bff81 mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Sat Aug 23 15:32:15 2008 +0200
+++ b/mercurial/cmdutil.py	Sat Aug 23 15:32:19 2008 +0200
@@ -936,7 +936,7 @@
                 results[rev] = d
         elif st == 'iter':
             if rev in results:
-                ui.status("Found revision %s from %s\n" %
+                ui.status(_("Found revision %s from %s\n") %
                           (rev, util.datestr(results[rev])))
                 return str(rev)
 
diff -r afff2e12e193 -r 7ea3303bff81 mercurial/commands.py
--- a/mercurial/commands.py	Sat Aug 23 15:32:15 2008 +0200
+++ b/mercurial/commands.py	Sat Aug 23 15:32:19 2008 +0200
@@ -2124,7 +2124,7 @@
     cmdutil.setremoteconfig(ui, opts)
 
     other = hg.repository(ui, dest)
-    ui.status('pushing to %s\n' % util.hidepassword(dest))
+    ui.status(_('pushing to %s\n') % util.hidepassword(dest))
     if revs:
         revs = [repo.lookup(rev) for rev in revs]
     r = repo.push(other, opts['force'], revs=revs)
diff -r afff2e12e193 -r 7ea3303bff81 mercurial/localrepo.py
--- a/mercurial/localrepo.py	Sat Aug 23 15:32:15 2008 +0200
+++ b/mercurial/localrepo.py	Sat Aug 23 15:32:19 2008 +0200
@@ -2022,7 +2022,7 @@
             except ValueError, TypeError:
                 raise util.UnexpectedOutput(
                     _('Unexpected response from remote server:'), l)
-            self.ui.debug('adding %s (%s)\n' % (name, util.bytecount(size)))
+            self.ui.debug(_('adding %s (%s)\n') % (name, util.bytecount(size)))
             ofp = self.sopener(name, 'w')
             for chunk in util.filechunkiter(fp, limit=size):
                 ofp.write(chunk)
diff -r afff2e12e193 -r 7ea3303bff81 mercurial/patch.py
--- a/mercurial/patch.py	Sat Aug 23 15:32:15 2008 +0200
+++ b/mercurial/patch.py	Sat Aug 23 15:32:19 2008 +0200
@@ -229,7 +229,7 @@
                 return internalpatch(patchname, ui, strip, cwd, files)
             except NoHunks:
                 patcher = util.find_exe('gpatch') or util.find_exe('patch')
-                ui.debug('no valid hunks found; trying with %r instead\n' %
+                ui.debug(_('no valid hunks found; trying with %r instead\n') %
                          patcher)
                 if util.needbinarypatch():
                     args.append('--binary')
diff -r afff2e12e193 -r 7ea3303bff81 mercurial/repair.py
--- a/mercurial/repair.py	Sat Aug 23 15:32:15 2008 +0200
+++ b/mercurial/repair.py	Sat Aug 23 15:32:19 2008 +0200
@@ -8,6 +8,7 @@
 
 import changegroup, os
 from node import nullrev, short
+from i18n import _
 
 def _bundle(repo, bases, heads, node, suffix, extranodes=None):
     """create a bundle with the specified revisions as a backup"""
@@ -125,7 +126,7 @@
         f.strip(striprev)
 
     if saveheads or extranodes:
-        ui.status("adding branch\n")
+        ui.status(_("adding branch\n"))
         f = open(chgrpfile, "rb")
         gen = changegroup.readbundle(f, chgrpfile)
         repo.addchangegroup(gen, 'strip', 'bundle:' + chgrpfile, True)
diff -r afff2e12e193 -r 7ea3303bff81 mercurial/sshrepo.py
--- a/mercurial/sshrepo.py	Sat Aug 23 15:32:15 2008 +0200
+++ b/mercurial/sshrepo.py	Sat Aug 23 15:32:19 2008 +0200
@@ -42,7 +42,7 @@
             cmd = '%s %s "%s init %s"'
             cmd = cmd % (sshcmd, args, remotecmd, self.path)
 
-            ui.note('running %s\n' % cmd)
+            ui.note(_('running %s\n') % cmd)
             res = util.system(cmd)
             if res != 0:
                 self.raise_(repo.RepoError(_("could not create remote repo")))
@@ -60,7 +60,7 @@
         cmd = cmd % (sshcmd, args, remotecmd, self.path)
 
         cmd = util.quotecommand(cmd)
-        ui.note('running %s\n' % cmd)
+        ui.note(_('running %s\n') % cmd)
         self.pipeo, self.pipei, self.pipee = os.popen3(cmd, 'b')
 
         # skip any noise generated by remote shell
diff -r afff2e12e193 -r 7ea3303bff81 mercurial/streamclone.py
--- a/mercurial/streamclone.py	Sat Aug 23 15:32:15 2008 +0200
+++ b/mercurial/streamclone.py	Sat Aug 23 15:32:19 2008 +0200
@@ -6,6 +6,7 @@
 # of the GNU General Public License, incorporated herein by reference.
 
 import util, lock
+from i18n import _
 
 class StreamException(Exception):
     def __init__(self, code):
@@ -42,7 +43,7 @@
     try:
         l = None
         try:
-            repo.ui.debug('scanning\n')
+            repo.ui.debug(_('scanning\n'))
             # get consistent snapshot of repo, lock during scan
             l = repo.lock()
             for name, ename, size in repo.store.walk():
@@ -54,11 +55,11 @@
         raise StreamException(2)
 
     yield '0\n'
-    repo.ui.debug('%d files, %d bytes to transfer\n' %
+    repo.ui.debug(_('%d files, %d bytes to transfer\n') %
                   (len(entries), total_bytes))
     yield '%d %d\n' % (len(entries), total_bytes)
     for name, size in entries:
-        repo.ui.debug('sending %s (%d bytes)\n' % (name, size))
+        repo.ui.debug(_('sending %s (%d bytes)\n') % (name, size))
         yield '%s\0%d\n' % (name, size)
         for chunk in util.filechunkiter(repo.sopener(name), limit=size):
             yield chunk


More information about the Mercurial-devel mailing list