git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Eric Wong <normalperson@yhbt.net>
Cc: Jens Seidel <jensseidel@users.sf.net>, git@vger.kernel.org
Subject: Re: [PATCH/WIP] git-svn: tweak log format to match "svn log" output
Date: Sun, 25 Jul 2010 03:37:08 -0500	[thread overview]
Message-ID: <20100725083708.GB22213@burratino> (raw)
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
-- 

  parent reply	other threads:[~2010-07-25  8:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100423134611.GA3440@merkur.sol.de>
     [not found] ` <20100426132710.GA9930@progeny.tock>
     [not found]   ` <20100427112656.GB16323@merkur.sol.de>
2010-07-25  2:31     ` [PATCH/WIP] git-svn: tweak log format to match "svn log" output Jonathan Nieder
2010-07-25  8:10       ` Eric Wong
2010-07-25  8:13         ` [PATCH 2/1] git svn: remove extraneous newline from log output Eric Wong
2010-07-25 17:35           ` Jens Seidel
2010-07-26 19:09             ` Eric Wong
2010-07-25  8:37         ` Jonathan Nieder [this message]
2010-07-25  8:40           ` [PATCH/WIP] git-svn: tweak log format to match "svn log" output Eric Wong
2010-07-25  9:09             ` Jens Seidel
2010-07-25 17:52               ` Jens Seidel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100725083708.GB22213@burratino \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jensseidel@users.sf.net \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).