Hi Axel,

Actually, the problem is that plural rules for relative dates are
> different for those from integers.
>
> In a good localization for Russian and German, you had 2 days offsets
> like "Vorgestern", too.
>

Special cases like "yesterday" or "the day before yesterday" do have
designated words
in certain languages, that's correct, but I probably wouldn't even call
them "plural rules for relative dates"
to avoid further confusion. These are just special cases which better not
be tied to the conventional
notion of "plurals" as both gettext and CLDR understands them.

I don't think good old gettext approach to plurals needs to be discarded
right away, since integers constitute
the absolute majority of parameters in messages where pluralization is
required. The issue reported
by the original topic starter can be quickly fixed with native gettext
approach to plurals; the only thing
to remember for anyone providing source plural forms is to never use any
special cases for the singular form.
It's pretty easy to remember: *all plural forms need to have a placeholder*,
for example:

*%s* day ago
*%s* days ago

But I think we're on the same page that if one wants to have support for
special cases without complicating
the business logic of the app, it's better to use some helper
libraries/formatters, be it l20n or something else
<https://github.com/iafan/Plurr>.


--Igor



>
> At mozilla, we'll convert our abuses in this area to ICU/CLDR for the
> most part. Also one of the reasons to go for l20n for us, which in its
> current version allows for overrides for specific values of input
> parameters.
>
> We're also pushing APIs for this to JS,
> https://github.com/tc39/ecma402/issues/35.
>
> The gettext plural forms don't only struggle with relative dates, too.
> They're also failing for floats, and things with trailing digits. Which
> is why the plural forms in CLDR look really awkward for some languages.
> Even things like trailing zeros (5 vs 5.0) matter in some languages.
>
> Axel
>
>
> On 20/07/16 01:17, Igor Afanasyev wrote:
> > I think there's a mix of issues:
> >
> > 1) The server uses incorrect plural formula for Turkish whereas there
> needs
> > to be only one plural form available (nplurals=1; plural=0;)
> >
> > 2) Units presented in the list above hijack plurals where they shouldn't,
> > as they use special cases for N = 1, which won't work universally with
> all
> > plural formulas. From what I see, Russian translations there are also
> > broken. For example, the translation for the word "Yesterday", if Russian
> > plural formula is applied, will also be used for N=21, 31, and so on
> > (instead of "21 days ago", "31 days ago", ...). This is a common mistake
> > when English is used as a source, since its plural formula incidentally
> > makes people believe that there are always two cases: literally "one" (1)
> > and "many" (n > 1). But this is not the case in many other languages,
> where
> > "one" can be used for different values of N. So this has nothing to do
> with
> > Turkish — it is an i18n issue that needs to be filed against Pootle.
> > Special cases for N = 1 need to be exposed as separate units for
> > translation to avoid any confusion and allow for proper natural
> translation
> > of such special cases.
> >
> >
> > --Igor
> >
> > Best regards,
> > Igor Afanasyev
> >
> > On Tue, Jul 19, 2016 at 10:59 AM, Leandro Regueiro <
> > leandro.regue...@gmail.com> wrote:
> >
> >> 2016-07-19 11:10 GMT+02:00 ßouЯock™ ღ <hitowerdi...@hotmail.com>:
> >>> Hello Leandro,
> >> Hi
> >>
> >>> Of course I can tell. First of all you right there is no plurals in
> >> Turkish.
> >>>
> >>> So, these are shown in turkish like;
> >>>
> >>>
> >>> 0 kitap
> >>>
> >>> 1 kitap
> >>>
> >>> 2 kitap
> >>>
> >>> 3 kitap
> >>>
> >>>
> >>> But there are some strings in pootle translation, these are differents
> >>> between singul and plural fields.
> >>>
> >>> Some of them are:
> >>>
> >>>
> >>
> http://pootle.locamotion.org/tr/pootle/translate/#filter=all&unit=1791528
> >>>
> >>
> http://pootle.locamotion.org/tr/pootle/translate/#filter=all&unit=1738775
> >>>
> >>
> http://pootle.locamotion.org/tr/pootle/translate/#filter=all&unit=1738735
> >>>
> >>
> http://pootle.locamotion.org/tr/pootle/translate/pootle_js.po#filter=all&unit=1624894
> >>>
> >>
> http://pootle.locamotion.org/tr/pootle/translate/pootle_js.po#filter=all&unit=1624897
> >>
> >> I am not sure these examples actually require to allow plurals for
> >> Turkish. For example you don't necessarily need to translate
> >> "Yesterday" if "1 day ago" is equally good.
> >>
> >> Do you oppose reverting the plural back to no plurals ("Plural-Forms:
> >> nplurals=2; plural=(n > 1);") as it is supposed to be?
> >>
> >>
> >> Bye
> >>
> >>> Regards,
> >>>
> >>> Burak
> >>>
> >>> ________________________________
> >>> Gönderen: Leandro Regueiro <leandro.regue...@gmail.com>
> >>> Gönderildi: 18 Temmuz 2016 Pazartesi 22:49:30
> >>> Kime: ßouЯock™ ღ
> >>>
> >>> Konu: Re: [translate-pootle] Plural strings have single translation
> field
> >>>
> >>> 2016-07-18 8:51 GMT+02:00 ßouЯock™ ღ <hitowerdi...@hotmail.com>:
> >>>> Thank you for your interest Leandro.
> >>>>
> >>>> Yes plural forms and permissions are OK.
> >>> Hi again,
> >>> I just have been told that Turkish doesn't have any plurals, so the
> >>> formula was correct in first instance. Can you please tell why you
> >>> found it to be wrong? Please provide specific examples where you had
> >>> trouble translating.
> >>>
> >>>
> >>> How are the following phrases translated into Turkish?
> >>>
> >>> 0 books
> >>> 1 book
> >>> 2 books
> >>> 3 books
> >>>
> >>>
> >>> Thanks in advance,
> >>>
> >>> Bye
> >>>
> >>>> Regards,
> >>>>
> >>>> Burak
> >>>>
> >>>> ________________________________
> >>>> Gönderen: Leandro Regueiro <leandro.regue...@gmail.com>
> >>>> Gönderildi: 17 Temmuz 2016 Pazar 23:24:52
> >>>> Kime: ßou?ockT ?
> >>>> Bilgi: translate-pootle@lists.sourceforge.net
> >>>> Konu: Re: [translate-pootle] Plural strings have single translation
> >> field
> >>>> 2016-07-17 12:24 GMT+02:00 ßou?ockT ? <hitowerdi...@hotmail.com>:
> >>>>> Hello,
> >>>>>
> >>>>> In Turkish translation, plural strings has one field for translation
> >> so I
> >>>>> can not translate these single and plural forms separately.
> >>>>> I think it can be fix with changing plural forms format in language
> >> file
> >>>>> as;
> >>>>> "Plural-Forms: nplurals=2; plural=(n > 1);" instead of "Plural-Forms:
> >>>>> nplurals=1; plural=0;"
> >>>>> What do you think?
> >>>> Yes, that formula is wrong. But we would use "Plural-Forms:
> >>>> nplurals=2; plural=(n != 1);" instead, as reported in
> >>>> https://github.com/translate/l10n-guide/issues/23
> >>>>
> >>>>
> >>>>> Also could you please give me a permission for pootle translation
> site
> >> to
> >>>>> approve or disapprove the comments which comes from users?
> >>>> You have it now.
> >>>>
> >>>>
> >>>> Bye
> >>>>
> >>>>> Best Regards,
> >>>>> Burak Yavuz
> >>
> >>
> ------------------------------------------------------------------------------
> >> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> >> traffic
> >> patterns at an interface-level. Reveals which users, apps, and protocols
> >> are
> >> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> >> J-Flow, sFlow and other flows. Make informed decisions using capacity
> >> planning
> >> reports.http://sdm.link/zohodev2dev
> >> _______________________________________________
> >> Translate-pootle mailing list
> >> Translate-pootle@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/translate-pootle
> >>
> >
> ------------------------------------------------------------------------------
> > What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> > patterns at an interface-level. Reveals which users, apps, and protocols
> are
> > consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> > J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning
> > reports.http://sdm.link/zohodev2dev
> > _______________________________________________
> > Translate-pootle mailing list
> > Translate-pootle@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/translate-pootle
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning
> reports.http://sdm.link/zohodev2dev
> _______________________________________________
> Translate-pootle mailing list
> Translate-pootle@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/translate-pootle
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to