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: http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#Plural-forms 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 よろしいですか? or 以下の 1 個のパッケージがピン止め、または保留されます: package_A よろしいですか? 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: package_A 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 necessary...). 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! -- http://www.inventati.org/frx/frx-gpg-key-transition-2010.txt 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