-
Notifications
You must be signed in to change notification settings - Fork 185
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
Datagen options around missing locales #3746
Comments
Conclusion: retain 1.2 behavior for the time being; print a log statement for the error cases; revisit in 2.0 |
Proposal:
LGTM: @robertbastian @sffc Discussion:
Conclusion: @sffc/@robertbastian to design an API for this. |
First thing we need is a clear definition of what it means when we say "failed to generate". The main thing is that all data can fall back to root, and this is the expected behavior in many cases. I might propose the following definition: "the requested langid has no ancestors that are in the list in availableLocales.json". Unfortunately this definition only works with DatagenProvider as a data source. A cleaner definition might be to just require that source providers in DatagenDriver return non-und data for all languages they support (i.e. RetainBaseLanguages-like behavior), and we can make sure DatagenProvider does this. Once we decide on the definition, for the API, I think #[non_exhaustive]
pub struct ExportResult {
pub missing_locales: Vec<LanguageIdentifier>
} On the CLI, we just send the list through Feedback? @robertbastian @zbraniecki |
unrelated to missing locales, but I have another use case for |
Proposal:
LGTM: @sffc @robertbastian |
tl;dr, what should we do when a user tries to export a locale from datagen that isn't in CLDR?
At first thought, it seems that we should inform the client by failing datagen. However, this is more nuanced. Some caveats:
Because of caveats 2 and 3, we cannot always simply run fallback and fill in the data based on fallback.
@Manishearth suggested tagging data keys that aren't expected to fall back to root with some extra metadata. This fixes caveats 2 and 3 but not 1.
Related questions:
CC @robertbastian
The text was updated successfully, but these errors were encountered: