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

Allow for custom candidate viability considerations #8

Open
zbraniecki opened this issue Jan 19, 2021 · 0 comments
Open

Allow for custom candidate viability considerations #8

zbraniecki opened this issue Jan 19, 2021 · 0 comments

Comments

@zbraniecki
Copy link
Contributor

Current JS based L10nRegistry rejects any candidate that has any file missing. This is a blunt strategy and it results in user perceivable experience degradation in cases where the user is loading a UI that has a lot of sources and one is missing (because it's new).

In such case L10nRegistry will reject such bundle and potentially flip to the next language which means that 1/13 of files missing result in 100% rejection of the locale.

One avenue to improve that is to fine-tune our problem solver to be more subtle about deciding when to reject a candidate. For example, the solver could consider a candidate viable if the number of resources is larger than 3, and the number of missing resources is lower than 2.

This would allow for a single missing file in L10nRegistry not to reject the whole candidate.

Alternatively, we could somehow mark which resources in a bundle are "critical" and bail when one of them is missing, while accepting missing non-critical resources. Or reverse - mark resources as "optional".
But that approach seems more manual and requires more maintenance over time.

My hope is that some simple heuristic will give us a good experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant