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 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]. 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 <i38w7i3@yahoo.co.jp>
Attachment:
pgpt71Ogefn2I.pgp
Description: PGP signature