How to translate plural forms in zanata online editor?

Alex Eng aeng at redhat.com
Mon Nov 2 01:24:05 UTC 2015


Just for your information, the plural forms used in Zanata:

http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html?id=l10n/pluralforms


---------------------------------------------

Alex Eng
Globalisation Tools Engineering
DID: +61 3514 8262 <callto:+61+3514+8262>
Mobile: +614 2335 3457 <callto:+614+2335+3457>

Red Hat, Asia-Pacific Pty Ltd
Level 1, 193 North Quay
Brisbane 4000
Office: +61 7 3514 8100 <callto:+61+7+3514+8100>
Fax: +61 7 3514 8199 <callto:+61+7+3514+8199>
Website: www.redhat.com

On Mon, Nov 2, 2015 at 2:56 AM, Alick Zhao <alick9188 at gmail.com> wrote:

> Hi,
>
> I reported it to gnome-abrt upstream with a comment on a relevant issue:
>
> https://github.com/abrt/gnome-abrt/issues/112
>
> However, it seems to me what they have done with `ngettext` is
> correct. Here in this case, we do not need to worry the number is 0
> since it will not happen:
>
> https://github.com/abrt/gnome-abrt/pull/118/files
>
> The real problem I face is I cannot find how to translate these
> strings with singular/plural forms on zanata's online editor. Is it
> only possible with offline po editor?
>
>
> On Tue, Oct 27, 2015 at 12:52 AM, Ding Yi Chen <dchen at redhat.com> wrote:
> >
> >
> > ----- Original Message -----
> >> On Mon, Oct 26, 2015 at 11:05 PM, Ding Yi Chen <dchen at redhat.com>
> wrote:
> >> >
> >> >
> >> > ----- Original Message -----
> >> >> On Sun, Oct 25, 2015 at 1:02 PM, Jérôme Fenal <jfenal at gmail.com>
> wrote:
> >> >> > 2015-10-24 18:32 GMT+02:00 Alick Zhao <alick9188 at gmail.com>:
> >> >> >> Howdy,
> >> >> >>
> >> >> >> I have not looked close at fedora.zanata.org lately, and it
> seems now
> >> >> >> zanata shows strings with singular/plural forms in *one* textbox
> in
> >> >> >> its online editor, as in screenshot [1]. I am wondering what is
> the
> >> >> >> right way to translate them? I tried to search through the zanata
> >> >> >> docs, but cannot find it. Hope someone can point out for me.
> Thanks!
> >> >> >>
> >> >> >> [1] http://susepaste.org/83191113
> >> >> >
> >> >> > Hi Alick,
> >> >> >
> >> >> > You'd need to actually check in the source if the mix of singular
> and
> >> >> > plural form are handled.
> >> >> >
> >> >> > Zanata does present the two alternatives when the code for the
> >> >> > translated messages does handle it.
> >> >> >
> >> >>
> >> >> Yes, I do see the two alternatives with two radio buttons. My
> question
> >> >> is: How to translate both two strings in one entry box? Should I
> first
> >> >> translate the first one, then press the second radio button, and then
> >> >> translate the second one? The warning messages appear when I tried to
> >> >> do these, so I am not quite sure what is the right thing to do...
> >> >
> >> > If you translates string from the language with plural (e.g. English)
> >> > to the language without plural (e.g. Chinese).
> >> >
> >> > Normally you only need to translate the singular (the first) string.
> >> > The radio buttons there are merely for copy from source string.
> >>
> >> Well, I guess Chinese do have singular/plural differences in a sense.
> >> For example,
> >>
> >> Last week --> 上周
> >>
> >> {0:d} weeks ago --> (数字)周前
> >
> > Please warn the gnome-abrt upstream the way they handle plural will
> break the languages where
> > the first form is not one. [1]
> >
> > For example, French's "singular" form includes 0 and 1 (while in
> English, 0 is plural).
> > So if function outputs 0, the French equivalent of "Last Week" will be
> used, which may be wrong.
> >
> > And as for Chinese, the thing you translated become
> > msgstr[0] "上周\n"
> > "\n"
> > "{0:d} 周前"
> >
> > a three-lined string no matter what function returned.
> >
> > If the function returns 1, user will see:
> > 上周
> >
> > 1 周前
> >
> > If the function return 3, user will see:
> > 上周
> >
> > 3 周前
> >
> >
> > If the upstream does not fix it in time, I suggest you go with
> >
> > {0:d} weeks ago --> {0:d} 周前
> >
> >
> > Reference:
> > 1.
> http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html
> >
> >>
> >> --
> >> Regards,
> >> Alick
> >> --
> >> trans mailing list
> >> trans at lists.fedoraproject.org
> >> https://admin.fedoraproject.org/mailman/listinfo/trans
> >
> > --
> > Ding-Yi Chen
> > Software Engineer
> > Globalization Group
> > DID: +61 7 3514 8239
> > Email: dchen at redhat.com
> >
> > Red Hat, Asia-Pacific Pty Ltd
> > Level 1, 193 North Quay
> > Brisbane 4000
> > Office: +61 7 3514 8100
> > Fax: +61 7 3514 8199
> > Website: www.redhat.com
> >
> > Red Hat, Inc.
> > Facebook: Red Hat APAC | Red Hat Japan | Red Hat Korea | JBoss APAC
> > Twitter: Red Hat APAC | Red Hat ANZ
> > LinkedIn: Red Hat APAC | JBoss APAC
> > --
> > trans mailing list
> > trans at lists.fedoraproject.org
> > https://admin.fedoraproject.org/mailman/listinfo/trans
>
>
>
> --
> Regards,
> Alick
> --
> trans mailing list
> trans at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/trans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/trans/attachments/20151102/64b0aeb1/attachment-0001.html>


More information about the trans mailing list