Shane F. Carr
Shane F. Carr
As far as functionality goes, I can still see the desire to add modes that include ancestors but not descendants, although @robertbastian pointed out that they can be modeled by...
How about 1. CompactSelective 2. CompactExhaustive 3. BaselineSelective 4. BaselineExhaustive 5. RedundantSelective 6. RedundantExhaustive 7. Explicit Or maybe we just go back to toggle switches 1. Deduplicate: always, except-base, or...
New draft: ```rust #[non_exhaustive] pub enum RuntimeFallbackLocation { Internal, External, } #[non_exhaustive] pub enum DeduplicationStrategy { Maximal, #[default] RetainBaseLanguages, NoDeduplication, } #[non_exhaustive] enum Locales { WithFallback(LocalesWithFallback), WithoutFallback(LocalesWithoutFallback), } #[non_exhaustive] pub...
I'd still like `LanguageWithExpansion` to be an enum if possible. Brainstorm: ```rust pub enum LocaleFamily { Maximal(LanguageIdentifier), Minimal(LanguageIdentifier), Preresolved(LanguageIdentifier), } ```
Suggestion from @robertbastian: in the output, print clearly that how the DeduplicationStrategy and RuntimeFallbackLocation are being determined. Make it a `log::warn` to encourage users to be explicit. Note that the...
Current: ```rust pub struct LocaleWithExpansion { langid: LanguageIdentifier, include_ancestors: bool, include_descendants: bool, } impl LocaleWithExpansion { /// en-US pub fn with_variants(langid: LanguageIdentifier) -> Self /// ^en-US pub fn without_variants(langid: LanguageIdentifier)...
@robertbastian Currently, passing `--locales und` results in `und` being included in the output, but it does not imply descendants. This is incompatible with the proposal for `--locales und` to start...
The new API is more verbose. Old: ```rust DatagenDriver::new() .with_keys([HelloWorldV1Marker::KEY]) .with_locales(SELECTED_LOCALES) .with_fallback_mode(FallbackMode::Hybrid) ``` New: ```rust DatagenDriver::new() .with_keys([HelloWorldV1Marker::KEY]) .with_locales_and_fallback( SELECTED_LOCALES .into_iter() .map(LocaleFamily::with_descendants), { let mut options = FallbackOptions::default(); options.deduplication_strategy = Some(DeduplicationStrategy::NoDeduplication);...
How about ```rust impl DatagenDriver { pub fn with_langids_and_fallback(self, impl IntoIterator, options: FallbackOptions) { ... } pub fn with_locale_families_and_fallback(self, impl IntoIterator, options: FallbackOptions) { ... } pub fn with_langids_no_fallback(self, impl...
> If we have the langid -> locale family conversion implementations Can you clarify how you envision accomplishing this? Without overloading, I can't define a function that takes "either a...