Skip to content
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

Refine locale filtering in data exporter #2072

Closed
sffc opened this issue Jun 16, 2022 · 1 comment
Closed

Refine locale filtering in data exporter #2072

sffc opened this issue Jun 16, 2022 · 1 comment
Assignees
Labels
A-design Area: Architecture or design C-data-infra Component: provider, datagen, fallback, adapters duplicate This issue or pull request already exists S-large Size: A few weeks (larger feature, major refactoring) T-core Type: Required functionality

Comments

@sffc
Copy link
Member

sffc commented Jun 16, 2022

ICU4C's data build tool has a really nice algorithm for selecting locales to be included in the data file. We should implement this algorithm in ICU4X. (Disclaimer: I wrote the ICU4C tool in 2019.)

The algorithm is based on the idea that the space of all locales forms a DAG (almost a Tree but not quite). When the user requests that we add a certain locale, we add the full parent chain for that locale, and we also add all children for that locale that have data. This algorithm balances the need to reduce data size with the i18n quality that comes with including regional variants, which are cheap if their parents are being included.

As part of this project, we should also refine the way we handle fully resolved locales. The list of requested locales should become our list of fully resolved locales, and we should pre-compute the fallback data for them and store those pointers in the data provider.

@sffc sffc added T-core Type: Required functionality C-data-infra Component: provider, datagen, fallback, adapters A-design Area: Architecture or design S-large Size: A few weeks (larger feature, major refactoring) labels Jun 16, 2022
@sffc sffc added this to the ICU4X 1.x Untriaged milestone Jun 16, 2022
@sffc sffc self-assigned this Jun 16, 2022
@sffc sffc added the duplicate This issue or pull request already exists label Jun 26, 2022
@sffc
Copy link
Member Author

sffc commented Jun 26, 2022

Duplicate of #834

@sffc sffc marked this as a duplicate of #834 Jun 26, 2022
@sffc sffc closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2022
@sffc sffc removed this from the ICU4X 1.x Untriaged milestone Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-design Area: Architecture or design C-data-infra Component: provider, datagen, fallback, adapters duplicate This issue or pull request already exists S-large Size: A few weeks (larger feature, major refactoring) T-core Type: Required functionality
Projects
None yet
Development

No branches or pull requests

1 participant