-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n: use locale for all numeric formatting in the report #10786
Comments
I'm not sure I understand this one @exterkamp, could you explain a tad more? Isn't it the role of the translators to author the appropriate translated plurals and we're only writing the english ones? Based on my understanding, EDIT: I'm also not clear what were we supposed to write instead :) |
It should say "١ element found"; however the ICU plural for I think we will need to use the replacement for displayValue: `{nodeCount, plural,
=0 {No elements found}
=1 {# element found}
other {# elements found}
}`, That said, I don't think this is high priority, since our numeric i18n story is all over the place... |
I got that part, what I was asking is why does it matter? For
I think this answers my real question, but let me double check. I am understanding this correctly that the concern is translators will use whatever numeral we write in the english string and not use whatever numeral is appropriate for the locale they are translating to and/or appropriating substitute |
Correct. In the same way that our markdown was getting ruined by some translators replacing " ` " with " ' ". Translating is not as consistent as we want it to be. I think if we try to become more consistent with numerals of other languages, then we should probably look into this as an issue. Is it an issue now? meh |
can we add a test asserting there is no:
maybe not an assert, since we couldn't easily fix it (unless you can just edit it in TC?) maybe just autofix and warn |
This seems unrelated. Is there a problem with markdown now? I was talking prior to the ICU escaping & CTC files. |
ok well the numerics are translated properly for other languages in the metrics table. arabic isn't getting localized numbers because We are on an old version of that package, perhaps upgrading is in order. anyway if we want arabic numerals we should use a different locale code. |
FWIW, this comes from the browser's formatting which Reading about this today, I believe this may be intentional. Basically there are multiple types of digits depending on the region (ar-eg, ar-tn, etc), and the decision was made that This CLDR thread gives some background, though I haven't found the follow up yet that moved it from testing to default. |
I agree, it seems the expectation is that "ar" alone is latin numerals. LH is doing things correctly here already. |
Some of this code was recently modified via #13830 We should make sure we are using the number formatter for all numbers in the report. Some places we're (probably) missing today: the gauge, the score legend. stuff in the meta block / tooltips |
The titles for the new diagnostics (although I predict any ICU plural we use with an explicit "1") are not rendered properly with non-standard numeric representations.
This is because the ICU decleration for the "1" case is explicitly an
en
"1".The text was updated successfully, but these errors were encountered: