icu4x icon indicating copy to clipboard operation
icu4x copied to clipboard

Custom variants for icu_preferences

Open zbraniecki opened this issue 1 month ago • 1 comments

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.

zbraniecki avatar Jun 06 '24 18:06 zbraniecki