-
Notifications
You must be signed in to change notification settings - Fork 178
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
Add an example for accessing the resolved locale #3928
Conversation
The local |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The local icu_testdata does not export an any() function unless you have the icu_locid_transform feature enabled. This is a breaking change. In 1.2, the required functionality lived in icu_provider_adapters which is non-optional. So I guess we should either make icu_locid_transform be non-optional, or do the crate split now (splitting icu_locid_transform into two crates, one more core than the other).
icu_locid_transform
is a default feature, semver doesn't apply with default-features = false
docs/tutorials/data_provider.md
Outdated
// we consider the "resolved locale". | ||
if key == DecimalSymbolsV1Marker::KEY { | ||
let mut w = self.resolved_locale.write().unwrap(); | ||
*w = any_res.metadata.locale.clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this could be take
instead of clone
? The FixedDecimalFormatter
should not need the locale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd really prefer if this would take
. This would demonstrate that the locale is not actually used later, and it's only there to allow writing this specific wrapper.
The tutorials test is failing because the legacy_testdata crate only exposes what is needed for tutorials, and |
OK, so I should just go to the tutorials test Cargo.toml and enable the required feature.
Suggestion?
I don't know how to do this in a scalable way without using In general, this is a power user feature, so I'm okay forcing users who need this feature to use a custom manual data build. |
You have to add the actual function, it's a custom We're deprecating |
I hear you. I'm second-guessing that decision to deprecate now. We still use |
I guess I could just use |
Co-authored-by: Manish Goregaokar <[email protected]>
I think I need to add fallbacker data to the tutorials testdata crate
|
Co-authored-by: Robert Bastian <[email protected]>
Co-authored-by: Robert Bastian <[email protected]>
In relation to #3906 and #58