[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt-listbugs 0.1.9: Please translate the package apt-listbugs

On Tue, 23 Oct 2012 03:25:05 +0900 AYANOKOUZI, Ryuunosuke wrote:

> > > I think msgstr[1] should be removed from ja.po. "nplurals=1" define
> > > allocated msgstr array size and the size is limited to 1. So, contents
> > > of msgstr[1] is not allocated on memory.
> > 
> > That's exactly what I did.
> > Thanks a lot for confirming that it was the Right Thing™ to do!
> Sorry for backtracking my idea.
> After discussion on debian-doc@debian.or.jp, I realized that there is
> not only difference in plural form (1st CASE) but also context (2nd
> CASE). So I recommend you to use
> Plural-Forms: nplurals=2; plural=n != 1;
> configuration as in English and KEEP msgstr[1].

That's very different from what the GNU gettext documentation
recommends for Japanese:

Hence I am a bit puzzled here...

> As you mentioned before, there is no plural form in Japanese. But if
> there is syntax difference between msgid and msgid_plural like 2nd
> case, translated  msgstr[0] must also be distinguished with msgstr[1].
> And msgstr[1] must be used for plural syntax.

Actually, to be more precise, what I did is:

  * I dropped the msgstr[0] strings
  * I renamed the msgstr[1] strings as msgstr[0]

Hence the current situation is:

"Plural-Forms: nplurals=1; plural=0;\n"

#. TRANSLATORS: %{plist} is a comma-separated list of %{npkgs} packages to be pinned or put on hold.
#: lib/apt-listbugs/logic.rb:451
msgid ""
"The following package will be pinned or on hold:\n"
" %{plist}\n"
"Are you sure?"
msgid_plural ""
"The following %{npkgs} packages will be pinned or on hold:\n"
" %{plist}\n"
"Are you sure?"
msgstr[0] ""
"以下の %{npkgs} 個のパッケージがピン止め、または保留されます:\n"
" %{plist}\n"


#. TRANSLATORS: %{nbugs} is the number of bugs found for package %{packg}.
#: lib/apt-listbugs/logic.rb:579
msgid "%{packg}(%{nbugs} bug)"
msgid_plural "%{packg}(%{nbugs} bugs)"
msgstr[0] "%{packg}(%{nbugs} 個)"


I tested this localization (with Japanese locale! lot of fun, as I know
nothing about Japanese!!!) and it seems to work correctly.
It always chooses msgstr[0] strings (of course), but the result is
something like:

以下の 3 個のパッケージがピン止め、または保留されます:
 package_A, package_B, package_C


以下の 1 個のパッケージがピン止め、または保留されます:

which "victory" told me was OK, via private e-mail.

Are the above-quoted examples acceptable?
Since Japanese has no singular/plural distinction, I thought the latter
could be roughly equivalent to:

The following 1 package(s) will be pinned or on hold:
Are you sure?

which would be acceptable in English, if English had no singular/plural
distinction (so that the s-in-parenthesis trick would not be

I hope you can confirm that what I did is OK, since I would like to
follow the recommendations found in the GNU gettext documentation and
thus use "Plural-Forms: nplurals=1; plural=0;\n" for ja.po ...

Please let me know, thanks for your time!

 New GnuPG key, see the transition document!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

Attachment: pgpJ0i1yfcMZ1.pgp
Description: PGP signature

Reply to: