From: Jonathan Nieder Date: Sun, 25 Jul 2010 08:37:08 GMT Subject: Re: [PATCH/WIP] git-svn: tweak log format to match "svn log" output Message-ID: <20100725083708.GB22213@burratino> In-Reply-To: <20100725081057.GA22373@dcvr.yhbt.net> Eric Wong wrote: > @@ -5646,8 +5644,8 @@ sub show_commit_normal { > > if ($can_localize) { > my $d = Locale::gettext->domain("subversion"); > - $sing_fmt = $d->nget(" | %d line", " | %d lines", 1); > - $plur_fmt = $d->nget(" | %d line", " | %d lines", 10); > + $sing_fmt = $d->nget($sing_fmt, $plur_fmt, 1); > + $plur_fmt = $d->nget($sing_fmt, $plur_fmt, 10); This change gives me pause: wouldn’t it be a problem in non-English locales, where $sing_fmt changes before it is used to set $plur_fmt? Of course there is no problem because the code is equivalent to $sing_fmt = $d->get($sing_fmt); $plur_fmt = $d->get($plur_fmt); (or at least Locale::gettext is advertised to work that way.) diff --git i/git-svn.perl w/git-svn.perl index 5252722..75e7165 100755 --- i/git-svn.perl +++ w/git-svn.perl @@ -5644,8 +5644,8 @@ sub show_commit_normal { if ($can_localize) { my $d = Locale::gettext->domain("subversion"); - $sing_fmt = $d->nget($sing_fmt, $plur_fmt, 1); - $plur_fmt = $d->nget($sing_fmt, $plur_fmt, 10); + $sing_fmt = $d->get($sing_fmt); + $plur_fmt = $d->get($plur_fmt); } if (my $l = $c->{l}) { while ($l->[$#$l] eq "\n" && $#$l > 0 --