Unwanted addGrammar for units
Description
Activity
🛬 Merged PR
@macchiati merged a PR to unicode-org/cldr:main
CLDR-18712 Fix beaufort (#4785) https://github.com/unicode-org/cldr/pull/4785 https://github.com/unicode-org/cldr/commit/67668a93c6984ccd121d6cb9f50e95d273b22284
I’m still seeing inflected forms for Beaufort which was added in a previous cycle but didn’t have inflected forms previously. Is that expected, or will we need to remove those as well?
🛬 Merged PR
@macchiati merged a PR to unicode-org/cldr:main
CLDR-18712 Don't include grammar for new units (#4784) https://github.com/unicode-org/cldr/pull/4784 https://github.com/unicode-org/cldr/commit/5025948e356b999f5cd0933d84ee4c58b779a5ec
Right, I found that fixing the currencies unmasked an error: that the grammar should not have been generated for the v47 units. Mea culpa; I checked manually that the grammar (case=) paths were not being generated, but should have added a unit test case.
I think this is a side-effect of this recently merged PR: https://github.com/unicode-org/cldr/pull/4772
That PR fixed a bug involving currencies and the method addCurrencies
called here in ExtraPaths.java:
The bug was that pluralCounts
was only available (non-empty) in addUnitPlurals
, not in addCurrencies
. A side-effect of the change is that pluralCounts
is now available (non-empty) in addGrammar
. Presumably it’s a good thing that addGrammar
gets pluralCounts
but it needs to be used in a more limited way?
I’ve compared addGrammar
with the code in CLDRFile.java from which it was derived (see https://github.com/unicode-org/cldr/commit/fbbee500f37 ), and found no significant differences.
Maybe something related to grammatical forms changed elsewhere, and its effect on extra paths was masked by the bug fixed by https://github.com/unicode-org/cldr/pull/4772 .
“Elsewhere” might be in code called by`ExtraPaths.addGrammar`, such as in the GrammarInfo
class, like:
However, that class hasn’t changed this year.
Since the last push to production, in locales with inflection such as Czech, new paths appear such as
They may be added by
addGrammar
here in ExtraPaths.java: