-
Notifications
You must be signed in to change notification settings - Fork 182
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
Fallback behavior for extension keywords and auxiliary keys #3867
Comments
My commentary:
I therefore think I prefer option 3. |
Discuss with: |
Conclusion: Use either 2 or 3 on a component-by-component basis. Different components have different needs. LGTM: @sffc @Manishearth @echeran |
We still need to discuss the part about Unicode extension keyword fallback priority. Discuss with: Optional: |
How do DataKeyAttributes behave in fallback?// exhaustive
struct DataRequest<'a> {
pub langid: &'a LanguageIdentifier,
pub attributes: &'a DataKeyAttributes,
pub metadata: DataRequestMetadata,
}
pub struct DataKeyAttributes(DataKeyAttributesInner)
// Bump this if there's a need for more space.
// 8 is currently needed by components that use BCP subtags as attributes
// (collator, transliterator).
const DATA_KEY_ATTRIBUTES_RUNTIME_SIZE: usize = 8;
enum DataKeyAttributesInner {
Static(&'static [&'static str]),
Runtime(ShortVec<TinyAsciiStr<DATA_KEY_ATTRIBUTES_RUNTIME_SIZE>>),
} The data key attributes need not participate in fallback. They can be resolved in datagen. The constructor is allowed to fall back from one attribute to another, such as when the langid reaches Segmentation model fallback can be data-driven in the segmenter constructor. Notes for collation fallback order:
The locales that are populated with data:
This uses a new script fallback mode:
The same mode will be usable for transliterator. LGTM: @robertbastian @sffc |
The rewriting of this code should incorporate the new CLDR 45 fallback rules. #4782 |
tl;dr, which of the following is the correct fallbacking order, assuming "short" is fallback for "long" in the aux key?
There are probably more orderings.
The text was updated successfully, but these errors were encountered: