icu4x
icu4x copied to clipboard
Custom variants for icu_preferences
Spinning out of #4996
In the initial PR I'm introducing closed enums for keys such as Collation
. The motivator is that we only need key variants for values we have divergent code or data for, and we control influx of new data and code, so we can start with a key that has 2 variants, and then when a new CLDR drops, or we extend our code to handle a new variant, we just add it to that enum.
@sffc pointed out that there are multiple reasons we may want to support key variants that we do not know about, including custom overrides, and "new data old code" scenarios. This particularly brings up that we should not exclude ability to select data for a key that our code doesn't know about.
I'll use this issue to discuss solution to that.