[PATCH] pretty-print plural nouns in some status messages
Matt Mackall
mpm at selenic.com
Mon May 5 12:20:50 CDT 2008
On Sun, 2008-05-04 at 11:49 -0700, Chris Peterson wrote:
> Here is a patch (against the hg repo's tip as of yesterday) that uses
> python's translation.ngettext() to pretty-print some ui.status()
> messages that contain nouns that may or may not be plural. For
> example:
I've rejected three or four variants of this already. It's a lot of
extra work/maintenance/headache and creates annoyances for machine
parsers. It's just not worth the trouble. Suppose I should document this
in the code somewhere..
diff -r 8ce64f996f38 mercurial/localrepo.py
--- a/mercurial/localrepo.py Tue Apr 29 15:10:20 2008 -0500
+++ b/mercurial/localrepo.py Mon May 05 12:07:24 2008 -0500
@@ -2020,6 +2020,7 @@
if oldheads and newheads != oldheads:
heads = _(" (%+d heads)") % (newheads - oldheads)
+ # we purposefully ignore pluralization issues here and elsewhere
self.ui.status(_("added %d changesets"
" with %d changes to %d files%s\n")
% (changesets, revisions, files, heads))
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list