Patchwork [1,of,5] l10n: use %d instead of %s for numbers

login
register
mail settings
Submitter timeless@mozdev.org
Date Oct. 15, 2015, 8:45 p.m.
Message ID <85a8a9690f6c7af40f4d.1444941912@waste.org>
Download mbox | patch
Permalink /patch/11114/
State Accepted
Commit a95c975f42e33b67a42c9245229aff88ec8db3e5
Headers show

Comments

timeless@mozdev.org - Oct. 15, 2015, 8:45 p.m.
# HG changeset patch
# User timeless@mozdev.org
# Date 1444876143 14400
#      Wed Oct 14 22:29:03 2015 -0400
# Node ID 85a8a9690f6c7af40f4d01ac1790f13410862541
# Parent  07db7e95c464537aeb2dd7aba39de0813eaffd04
l10n: use %d instead of %s for numbers

Patch

diff --git a/hgext/relink.py b/hgext/relink.py
--- a/hgext/relink.py
+++ b/hgext/relink.py
@@ -84,7 +84,7 @@ 
     total = live * 3 // 2
     src = src.store.path
     pos = 0
-    ui.status(_("tip has %d files, estimated total number of files: %s\n")
+    ui.status(_("tip has %d files, estimated total number of files: %d\n")
               % (live, total))
     for dirpath, dirnames, filenames in os.walk(src):
         dirnames.sort()
diff --git a/mercurial/mail.py b/mercurial/mail.py
--- a/mercurial/mail.py
+++ b/mercurial/mail.py
@@ -131,7 +131,7 @@ 
     else:
         defaultport = 25
     mailport = util.getport(ui.config('smtp', 'port', defaultport))
-    ui.note(_('sending mail: smtp host %s, port %s\n') %
+    ui.note(_('sending mail: smtp host %s, port %d\n') %
             (mailhost, mailport))
     s.connect(host=mailhost, port=mailport)
     if starttls:
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2692,7 +2692,7 @@ 
             l = getlist(tree[2])
             if len(l) != len(alias.args):
                 raise error.ParseError(
-                    _('invalid number of arguments: %s') % len(l))
+                    _('invalid number of arguments: %d') % len(l))
             l = [_expandaliases(aliases, a, [], cache) for a in l]
             result = _expandargs(result, dict(zip(alias.args, l)))
     else:
diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -404,7 +404,7 @@ 
             fp.seek(0)
             for n, line in enumerate(fp):
                 if not line.rstrip('\n'):
-                    t = _('invalid entry in fncache, line %s') % (n + 1)
+                    t = _('invalid entry in fncache, line %d') % (n + 1)
                     raise error.Abort(t)
         fp.close()