unicode-org / icu4x

Solving i18n for client-side and resource-constrained environments.
https://icu4x.unicode.org
Other
1.37k stars 176 forks source link

Transliterator fallback #3950

Open skius opened 1 year ago

skius commented 1 year ago

The inheritance section in UTS#35 does not mention how to fallback a transliterator such as de-ASCII, or more specifically, de-t-de-d0-ascii.

I assume the chain for the source this should follow is just the chain for the non-special part of de_ASCII (i.e., de) with the special modifier ASCII appended, plus in the end a last fallback option of just ASCII (und_ASCII), because the root locale is not accessed in de's fallback chain.

So it would look like this:

  1. de_ASCII (start here)
  2. Latn_ASCII (maximized script)
  3. und_ASCII (dropped the non-special part)

(note that the usage of - and _ in this issue is deliberate)

It could also be that we never want any associated locales to special locales, i.e., the BCP47 for this transliterator is incorrect and should be und-t-de-d0-ascii instead.

Thoughts?

robertbastian commented 1 year ago

In general the transliterator spec seems to not think much about fallback, to the point where the example is inconsistent with the paragraph describing it. We should think about maybe coming up with a good consistent scheme and then implement and upstream that.

sffc commented 1 year ago

Needs a design.