unicode-org / icu4x

Solving i18n for client-side and resource-constrained environments.
https://icu4x.unicode.org
Other
1.38k stars 178 forks source link

LocalePreferences: bikeshed #5786

Open sffc opened 2 weeks ago

sffc commented 2 weeks ago

LocalePreferences landed in #5729. Two things I want to decide about it before it gets shipped:

  1. Name. Not a big fan of the name. These are not preferences for a locale. It is a locale associated with a preference bag. I think PreferencesLocale is a better name, but would also be happy with naming it "what it is" such as LanguageIdentifierWithRegionExtensions, for example.
  2. ~Public fields. I don't consider the design of this type 100% finalized. The CLDR spec it is implementing is still a concept, not yet landed in UTS 35. I would prefer it to have private fields.~ EDIT: Moved to #5785

@zbraniecki @robertbastian

sffc commented 2 weeks ago
#[non_exhaustive]
pub struct ListFormatterPreferences {
    pub locale_prefs: LocalePreferences,
}

Conclusion:

LGTM: @sffc @zbraniecki @robertbastian