hgext/evolve.py
changeset 1624 081605c2e9b6
parent 1623 47a0ce11b4ca
child 1626 0edb545503fe
--- a/hgext/evolve.py	Sat Mar 12 13:45:25 2016 +0800
+++ b/hgext/evolve.py	Sat Mar 12 13:59:07 2016 +0800
@@ -1644,7 +1644,7 @@
 
     def progresscb():
         if revopt or allopt:
-            ui.progress(_('evolve'), seen, unit='changesets', total=count)
+            ui.progress(_('evolve'), seen, unit=_('changesets'), total=count)
 
     # Continuation handling
     if contopt:
@@ -3264,7 +3264,7 @@
         return len(self.getvalue())
 
     def read(self, size=None):
-        obsexcprg(self.ui, self.tell(), unit="bytes", total=self.length)
+        obsexcprg(self.ui, self.tell(), unit=_("bytes"), total=self.length)
         return StringIO.read(self, size)
 
     def __iter__(self):
@@ -3316,11 +3316,11 @@
                                % (len(markers), len(remotedata), totalbytes),
                       True)
             for key, data in remotedata:
-                obsexcprg(repo.ui, sentbytes, item=key, unit="bytes",
+                obsexcprg(repo.ui, sentbytes, item=key, unit=_("bytes"),
                           total=totalbytes)
                 rslts.append(remote.pushkey('obsolete', key, '', data))
                 sentbytes += len(data)
-                obsexcprg(repo.ui, sentbytes, item=key, unit="bytes",
+                obsexcprg(repo.ui, sentbytes, item=key, unit=_("bytes"),
                           total=totalbytes)
             obsexcprg(repo.ui, None)
             if [r for r in rslts if not r]:
@@ -3529,12 +3529,12 @@
     current = 0
     data = StringIO()
     ui = self.ui
-    obsexcprg(ui, current, unit="bytes", total=length)
+    obsexcprg(ui, current, unit=_("bytes"), total=length)
     while current < length:
         readsize = min(length - current, chunk)
         data.write(f.read(readsize))
         current += readsize
-        obsexcprg(ui, current, unit="bytes", total=length)
+        obsexcprg(ui, current, unit=_("bytes"), total=length)
     obsexcprg(ui, None)
     data.seek(0)
     return data