[PATCH 2 of 2 evolve-ext] evolve: mark progress units for translation
Anton Shestakov
av6 at dwimlabs.net
Mon Mar 14 09:05:37 EDT 2016
# HG changeset patch
# User Anton Shestakov <av6 at dwimlabs.net>
# Date 1457762347 -28800
# Sat Mar 12 13:59:07 2016 +0800
# Node ID d5abcb47d4ada8e27ae8910125ea90453aa2fe6b
# Parent d6da1b74e4520055e39765fb74ae8ae2090a3ed0
evolve: mark progress units for translation
diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -1644,7 +1644,7 @@ def evolve(ui, repo, **opts):
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 @@ class pushobsmarkerStringIO(StringIO):
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 @@ def _pushobsolete(orig, pushop):
% (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 @@ def client_pullobsmarkers(self, heads=No
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
More information about the Mercurial-devel
mailing list