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

"AYANOKOUZI, Ryuunosuke" <[email protected]> Tue, 23 Oct 2012 03:25:05 +0900
Newsgroups gmane.linux.debian.user.japanese
Message-ID <87k3uis6ta.wl%[email protected]>
Hi,

> > > According to
> > > http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#Plural-forms
> > > it seems that Japanese has no distinction between singular and plural
> > > form.
> > > The correct Plural-Forms should therefore be:
> > >
> > >   "Plural-Forms: nplurals=1; plural=0;\n"
> > >
> > > However, do I understand correctly that, if I add this Plural-Forms
> > > line to the ja.po file, only msgstr[0] translations will be selected
> > > (and msgstr[1] will never be used)?
> > 
> > Because of "plural=0" configuration, msgstr[0] is used and msgstr[1]
> > never be used.
> 
> Yes, that's clear now: thanks for explaining.
> 
> > 
> > > If this is indeed the case, maybe the following translations
> [...]
> > > should be changed to
> [...]
> > > Do you agree?
> > 
> > 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 [email protected], 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].

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.

1st CASE:

#. 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} 個)"
msgstr[1] "%{packg}(%{nbugs} 個)"

2nd CASE:

#. 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] ""
"以下のパッケージがピン止め、または保留されます:\n"
" %{plist}\n"
"よろしいですか "
msgstr[1] ""
"以下の %{npkgs} 個のパッケージがピン止め、または保留されます:\n"
" %{plist}\n"
"よろしいですか "

Regards,
AYANOKOUZI, Ryuunosuke
-- 
AYANOKOUZI, Ryuunosuke <[email protected]>
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAABAgAGBQJQhY9+AAoJEOXYFX3PnHDoAcwP/jwys5CbQuAi7L9bX2LMGAbL
HUMWD7KsQnpC2qsGaK3/YLmtw/fUpGwypHM1Tdy+nDG+tQ77wuyKC97KGwZhyWbo
F22Jt3LmqaP7rbHImH24/pkJ6Ptq8J5QDAsFtVewpcDYVhA/VXhCa0QfVRwIpJkz
elC1LuUmHLExiiyQpwR4+2BKa7J95GkcMFx+Ih18F1iqGXRxUASxSd3R1kIw63fQ
OHddFONiZHg1Y98NXUrCM/MRrwTVHZvdkJ4OFpmh7anSEl5qx7pEPDWJUgWEFWfJ
qZwLIUktJCwVRenz1LqmT1iM9Hh6owlDUua2sjN/PmFqwL6tjrpev6ATgS0aDscy
/rmSuZ9wPDE4F8v0d4hZktKdB3A4g17b0nRN7+ag08DjnHNQIOl0gcYUZ/aChlSk
8+5r4NMTRaInBaHS43relOEzOt1UDNXbXYaASYQ8WOXn8L7rlGG2ss8sLVDkpKCB
2DH51tCvE1Vd9rA6tiXFXhO8kuVgBzHQLmmLRmAMOnihrtLIVZFiUecAXfQApa9b
shKfcHhzoiCOpfiaH1+3O8qkklNrizSbG8rpEnpx8znOFAD/f5T8+L2sQHO7F0DO
f2h37CsqdueakJltTTlvLpi1KvH753f1Jmnf/Ziy9dp7KLMBX9ZL24WahPlV5+mg
VY0r27ZCBsV1dmrBzZIx
=NE69
-----END PGP SIGNATURE-----