From: Jens Seidel <jensseidel@users.sf.net>
To: Eric Wong <normalperson@yhbt.net>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
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 11:09:46 +0200 [thread overview]
Message-ID: <20100725090943.GA1998@merkur.sol.de> (raw)
In-Reply-To: <20100725084057.GA23621@dcvr.yhbt.net>
On Sun, Jul 25, 2010 at 08:40:57AM +0000, Eric Wong wrote:
> Jonathan Nieder <jrnieder@gmail.com> wrote:
> > 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
>
> Thanks Jonathan, that looks much better. I'll squash that on top
> Jens' first patch.
No, this is still wrong, we have to use $d->nget as some languages can have
multiple plural forms. Russian e.g. has two: one if the last digit ends with
2-4 and a second one if it ends with 5-9. Exact rule:
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 &&
n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
That's why it's wrong to use $plur_fmt at all (and also "10" from above
makes no sense). Let's use:
$d->nget(" | %d line", " | %d lines", $nr_line), $nr_line)
where $nr_line is the variable.
Sorry for not providing a patch now but I need more time ... I suggest one
of you try it again and I check it :-)
Jens
next prev parent reply other threads:[~2010-07-25 9:10 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 ` [PATCH/WIP] git-svn: tweak log format to match "svn log" output Jonathan Nieder
2010-07-25 8:40 ` Eric Wong
2010-07-25 9:09 ` Jens Seidel [this message]
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=20100725090943.GA1998@merkur.sol.de \
--to=jensseidel@users.sf.net \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.