Open shihaohong opened 3 years ago
I am not sure I understand this correctly, but this is quoting the LDML rules for CLDR data - intl
supports the ICU MessageFormat, which explicitly states
Note: In a plural argument like in the example above, if the English message has both =0 and =1 (up to =offset+1) then it does not need a “one” variant because that would never be selected. It does always need an “other” variant.
Also, while =1
and one
are semantically different, there is are no differences in the result. The only benefit I see is the ease of use for translators, who may be used to one
, two
etc. Am I missing something?
See https://github.com/dart-lang/i18n/issues/215 , although that's also talking about formatting of the plural parameter.
These can have different semantics. =1 means exactly one. 'one', means singular, which can be different, with Russian as a particularly tricky example. And they also mention formatting fractional values as plurals, though I don't think this package really supports that. The handling of this is confusing, since we have named parameters zero/one, but emit =0 and =1. On parsing, I think we treat them specially as well, though the details are fuzzy. But it's a long-standing pain point.
On Thu, Oct 20, 2022 at 4:33 AM Moritz @.***> wrote:
I am not sure I understand this correctly, but this is quoting the LDML rules for CLDR data - intl supports the ICU MessageFormat, which explicitly states https://unicode-org.github.io/icu/userguide/format_parse/messages/
Note: In a plural argument like in the example above, if the English message has both =0 and =1 (up to =offset+1) then it does not need a “one” variant because that would never be selected. It does always need an “other” variant.
Also, while =1 and one are semantically different, there is are no differences in the result. The only benefit I see is the ease of use for translators, who may be used to one, two etc. Am I missing something?
— Reply to this email directly, view it on GitHub https://github.com/dart-lang/i18n/issues/21, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2QU6FEIKRIJDA3BFK5UD3WED7UVANCNFSM47CRFXOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Original Flutter issue: https://github.com/flutter/flutter/issues/84291 Taken directly from https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#Explicit_0_1_rules: