Skip to content

Commit

Permalink
Remove unicode extensions fallback logic (#5290)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Jul 25, 2024
1 parent e9be2fe commit 007c2df
Show file tree
Hide file tree
Showing 49 changed files with 72 additions and 980 deletions.
9 changes: 5 additions & 4 deletions components/collator/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ fn data_ce_to_primary(data_ce: u64, c: char) -> u32 {
#[icu_provider::data_struct(marker(
CollationDataV1Marker,
"collator/data@1",
fallback_by = "collation",
// TODO(#3867): Use script fallback
fallback_by = "language",
))]
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_collator::provider))]
Expand Down Expand Up @@ -231,7 +232,7 @@ impl<'data> CollationDataV1<'data> {
#[icu_provider::data_struct(marker(
CollationDiacriticsV1Marker,
"collator/dia@1",
fallback_by = "collation",
fallback_by = "language",
))]
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_collator::provider))]
Expand Down Expand Up @@ -273,7 +274,7 @@ pub struct CollationJamoV1<'data> {
#[icu_provider::data_struct(marker(
CollationReorderingV1Marker,
"collator/reord@1",
fallback_by = "collation",
fallback_by = "language",
))]
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_collator::provider))]
Expand Down Expand Up @@ -361,7 +362,7 @@ impl<'data> CollationReorderingV1<'data> {
#[icu_provider::data_struct(marker(
CollationMetadataV1Marker,
"collator/meta@1",
fallback_by = "collation",
fallback_by = "language",
))]
#[derive(Debug, PartialEq, Clone, Copy)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake), databake(path = icu_collator::provider))]
Expand Down
4 changes: 1 addition & 3 deletions components/experimental/src/personnames/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ impl PersonNamesFormatter {
+ DataProvider<icu_properties::provider::ScriptWithExtensionsPropertyV1Marker>
+ DataProvider<icu_properties::provider::ScriptValueToShortNameV1Marker>
+ DataProvider<icu_locale::provider::LocaleFallbackLikelySubtagsV1Marker>
+ DataProvider<icu_locale::provider::LocaleFallbackParentsV1Marker>
// TODO: We shouldn't need the collation supplement here
+ DataProvider<icu_locale::provider::CollationFallbackSupplementV1Marker>,
+ DataProvider<icu_locale::provider::LocaleFallbackParentsV1Marker>,
{
let swe = icu_properties::script::load_script_with_extensions_unstable(provider)?;
let scripts = icu_properties::Script::get_enum_to_short_name_mapper(provider)?;
Expand Down
1 change: 0 additions & 1 deletion components/experimental/tests/personnames/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const _: () = {
impl_person_names_format_v1_marker!(TestingProvider);
icu_locale_data::impl_locale_fallback_likely_subtags_v1_marker!(TestingProvider);
icu_locale_data::impl_locale_fallback_parents_v1_marker!(TestingProvider);
icu_locale_data::impl_collation_fallback_supplement_v1_marker!(TestingProvider);
icu_properties_data::impl_script_value_to_short_name_v1_marker!(TestingProvider);
icu_properties_data::impl_script_with_extensions_property_v1_marker!(TestingProvider);
};
Expand Down
Loading

0 comments on commit 007c2df

Please sign in to comment.