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

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Francesco Poli (wintermute)
On Sun, 21 Oct 2012 00:49:07 +0900 victory wrote:

> On Sun, 30 Sep 2012 18:41:33 +0200
> Francesco Poli (wintermute) wrote:
>
> > The deadline for receiving the updated translation is
> > Sat, 20 Oct 2012 18:39:12 +0200.
>
> here's a ja.po file for apt-listbugs if you haven't received from someone

Many many thanks!   :-)

I am happy to see that the file is UTF-8-encoded, thanks for converting
the old ja.po file into UTF-8, too!

I can view it correctly with a browser (or other graphical
applications), but unfortunately not in my terminal emulator (UXTerm)...
I have never figured out how to obtain East Asian font support in
UXTerm: I am unfortunately very ignorant about this topic, I have to
study more!   ;-)

My current UXTerm setup is described on my website:
http://www.inventati.org/frx/doc/nanodocs/testing_workstation_desktopconf.html#terminal-emulator-configuration

Adding

UXTerm*wideFont: -misc-fixed-medium-*-*-ja-18-*-*-*-*-*-iso10646-*

to my ~/.Xresources file (as written in this old document
http://www.maruko.ca/i18n/ ) seems to help a lot, even though I am not
completely satisfied with the result.

Do you (or does anyone else on the debian-japanese list) have a better
suggestion?

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

attachment0 (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Francesco Poli (wintermute)
On Sat, 20 Oct 2012 18:51:57 +0200 Francesco Poli wrote:

> On Sun, 21 Oct 2012 00:49:07 +0900 victory wrote:
>
> > On Sun, 30 Sep 2012 18:41:33 +0200
> > Francesco Poli (wintermute) wrote:
> >
> > > The deadline for receiving the updated translation is
> > > Sat, 20 Oct 2012 18:39:12 +0200.
> >
> > here's a ja.po file for apt-listbugs if you haven't received from someone
>
> Many many thanks!   :-)
Sorry to bother you again, but I have another question.
The file that you sent me has no Plural-Forms line...

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)?

If this is indeed the case, maybe the following translations


#. 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"
"よろしいですか "

[...]

#. 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} 個)"


should be changed to


#. 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} 個)"




Do you agree?
If not, please elaborate and suggest a better strategy...

Thanks again 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

attachment0 (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

AYANOKOUZI, Ryuunosuke
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.

> If this is indeed the case, maybe the following translations
>
>
> #. 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"
> "よろしいですか "
>
> [...]
>
> #. 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} 個)"
>
>
> should be changed to
>
>
> #. 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} 個)"
>
>
>
>
> 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.

After I removed those msgstr[1] definitions, I checked ja.po by
following command.

$ msgfmt --statistics -c -v -o /dev/null ja.po

It didn't show up any errors or warnings.

Regards,
AYANOKOUZI, Ryuunosuke
--
AYANOKOUZI, Ryuunosuke <[hidden email]>

attachment0 (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Francesco Poli (wintermute)
On Mon, 22 Oct 2012 15:08:35 +0900 AYANOKOUZI, Ryuunosuke wrote:

> Hi,

Hi Ryuunosuke, thanks for your kind reply!

>
> > 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!

Bye.


--
 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

attachment0 (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

AYANOKOUZI, Ryuunosuke
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 [hidden email], 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 <[hidden email]>

attachment0 (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Francesco Poli (wintermute)
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 [hidden email], 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

attachment0 (853 bytes) Download Attachment