1#![allow(elided_lifetimes_in_paths)]
24#![allow(unreachable_pub)] pub struct BakedDataProvider;
29
30include!("data/mod.rs");
31const _: () = {
32 #[clippy::msrv = "1.82"]
impl BakedDataProvider {
#[allow(dead_code)]
pub(crate) const MUST_USE_MAKE_PROVIDER_MACRO: () = ();
}
impl<Y> ::icu_provider::DataProvider<::icu_provider::marker::NeverMarker<Y>>
for BakedDataProvider where
for<'a> Y: ::icu_provider::prelude::yoke::Yokeable<'a> {
fn load(&self, req: ::icu_provider::DataRequest)
->
Result<::icu_provider::DataResponse<::icu_provider::marker::NeverMarker<Y>>,
::icu_provider::DataError> {
Err(::icu_provider::DataErrorKind::MarkerNotFound.with_req(<::icu_provider::marker::NeverMarker<Y>
as ::icu_provider::DataMarker>::INFO, req))
}
}
#[clippy::msrv = "1.82"]
const _: () = <BakedDataProvider>::MUST_USE_MAKE_PROVIDER_MACRO;
#[clippy::msrv = "1.82"]
impl BakedDataProvider {
const DATA_LIST_AND_V1:
icu_provider::baked::zerotrie::Data<icu_list::provider::ListAndV1> =
{
const TRIE:
icu_provider::baked::zerotrie::ZeroTrieSimpleAscii<&'static [u8]>
=
icu_provider::baked::zerotrie::ZeroTrieSimpleAscii {
store: b"\xC8efijprtz\x18#.9DOZ\xC2ns\n\x1E\xC3NSW\x01\x02\x80\x85\x8A\x1E\xC3NSW\x01\x02\x81\x81\x81r\x1E\xC3NSW\x01\x02\x80\x86\x86t\x1E\xC3NSW\x01\x02\x82\x82\x82a\x1E\xC3NSW\x01\x02\x83\x83\x83t\x1E\xC3NSW\x01\x02\x80\x82\x82u\x1E\xC3NSW\x01\x02\x80\x87\x87r\x1E\xC3NSW\x01\x02\x80\x88\x88h\xC2\x1E-\t\xC3NSW\x01\x02\x83\x89\x89Han\xC2st\n\x1E\xC3NSW\x01\x02\x83\x89\x89\x1E\xC3NSW\x01\x02\x84\x89\x89",
};
const VALUES:
&'static [<icu_list::provider::ListAndV1 as
icu_provider::baked::zerotrie::DynamicDataMarker>::DataStruct]
=
&[icu_list::provider::ListFormatterPatterns {
start: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
}, 2u8),
middle: unsafe {
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
},
end: icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
}, 2u8),
special_case: None,
},
pair: None,
},
icu_list::provider::ListFormatterPatterns {
start: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
}, 2u8),
middle: unsafe {
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
},
end: icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b" y ")
}, 3u8),
special_case: Some(icu_list::provider::SpecialCasePattern {
condition: unsafe {
icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(if true
{
b"rust-regex-automata-dfa-sparse\0\0\xFF\xFE\0\0\x02\0\0\0\0\0\0\0\x02\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B(\x01\0\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xD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0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\0\0\x01(\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\x80\x01\0\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\x05\x05\x05\x06\x06\x0C\x0C\r\r\0\0\0\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\x02\0\x1B\0\0\0\0\0\x12\0\0\0\x12\0\0\x03\x06\x06\r\r\0\0\0\0\0h\0\0\0h\0\0\0\0\0\0\x0E\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0\0\0\0D\0\0\0D\0\0\0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0\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\x12\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
})
},
pattern: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b" e ")
}, 3u8),
}),
},
pair: None,
},
icu_list::provider::ListFormatterPatterns {
start: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
}, 2u8),
middle: unsafe {
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
},
end: icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b" e ")
}, 3u8),
special_case: None,
},
pair: None,
},
icu_list::provider::ListFormatterPatterns {
start: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b"\xE3\x80\x81")
}, 3u8),
middle: unsafe {
zerovec::VarZeroCow::from_bytes_unchecked(b"\xE3\x80\x81")
},
end: icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b"\xE3\x80\x81")
}, 3u8),
special_case: None,
},
pair: None,
},
icu_list::provider::ListFormatterPatterns {
start: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b"\xE3\x80\x81")
}, 3u8),
middle: unsafe {
zerovec::VarZeroCow::from_bytes_unchecked(b"\xE3\x80\x81")
},
end: icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b"\xE5\x92\x8C")
}, 3u8),
special_case: None,
},
pair: Some(icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b"\xE3\x80\x81")
}, 3u8),
special_case: None,
}),
},
icu_list::provider::ListFormatterPatterns {
start: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
}, 2u8),
middle: unsafe {
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
},
end: icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b", & ")
}, 4u8),
special_case: None,
},
pair: Some(icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b" & ")
}, 3u8),
special_case: None,
}),
},
icu_list::provider::ListFormatterPatterns {
start: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
}, 2u8),
middle: unsafe {
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
},
end: icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b" et ")
}, 4u8),
special_case: None,
},
pair: None,
},
icu_list::provider::ListFormatterPatterns {
start: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
}, 2u8),
middle: unsafe {
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
},
end: icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b" \xD0\xB8 ")
}, 4u8),
special_case: None,
},
pair: None,
},
icu_list::provider::ListFormatterPatterns {
start: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
}, 2u8),
middle: unsafe {
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
},
end: icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b" ve ")
}, 4u8),
special_case: None,
},
pair: None,
},
icu_list::provider::ListFormatterPatterns {
start: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b"\xE3\x80\x81")
}, 3u8),
middle: unsafe {
zerovec::VarZeroCow::from_bytes_unchecked(b"\xE3\x80\x81")
},
end: icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b"\xE5\x92\x8C")
}, 3u8),
special_case: None,
},
pair: None,
},
icu_list::provider::ListFormatterPatterns {
start: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
}, 2u8),
middle: unsafe {
zerovec::VarZeroCow::from_bytes_unchecked(b", ")
},
end: icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b", and ")
}, 6u8),
special_case: None,
},
pair: Some(icu_list::provider::ConditionalListJoinerPattern {
default: icu_list::provider::ListJoinerPattern::from_parts(unsafe
{
zerovec::VarZeroCow::from_bytes_unchecked(b" and ")
}, 5u8),
special_case: None,
}),
}];
unsafe {
icu_provider::baked::zerotrie::Data::from_trie_and_values_unchecked(TRIE,
VALUES)
}
};
}
#[clippy::msrv = "1.82"]
impl icu_provider::DataProvider<icu_list::provider::ListAndV1> for
BakedDataProvider {
fn load(&self, req: icu_provider::DataRequest)
->
Result<icu_provider::DataResponse<icu_list::provider::ListAndV1>,
icu_provider::DataError> {
let mut metadata = icu_provider::DataResponseMetadata::default();
let payload =
if let Some(payload) =
icu_provider::baked::DataStore::get(&Self::DATA_LIST_AND_V1,
req.id, req.metadata.attributes_prefix_match) {
payload
} else {
const FALLBACKER:
icu_locale::fallback::LocaleFallbackerWithConfig<'static> =
icu_locale::fallback::LocaleFallbacker::new().for_config(<icu_list::provider::ListAndV1
as icu_provider::DataMarker>::INFO.fallback_config);
let mut fallback_iterator =
FALLBACKER.fallback_for(req.id.locale.clone());
loop {
if let Some(payload) =
icu_provider::baked::DataStore::get(&Self::DATA_LIST_AND_V1,
icu_provider::DataIdentifierBorrowed::for_marker_attributes_and_locale(req.id.marker_attributes,
fallback_iterator.get()),
req.metadata.attributes_prefix_match) {
metadata.locale = Some(fallback_iterator.take());
break payload;
}
if fallback_iterator.get().is_unknown() {
return Err(icu_provider::DataErrorKind::IdentifierNotFound.with_req(<icu_list::provider::ListAndV1
as icu_provider::DataMarker>::INFO, req));
}
fallback_iterator.step();
}
};
Ok(icu_provider::DataResponse { payload, metadata })
}
}impl_data_provider!(BakedDataProvider);
33};
34
35pub const fn baked_data_provider() -> BakedDataProvider {
36 BakedDataProvider
37}
38
39pub mod supported_locales {
40 pub const EN: icu_locale::Locale = const {
match ::icu_locale_core::Locale::try_from_utf8_with_single_variant_single_keyword_unicode_extension("en".as_bytes())
{
Ok((language, script, region, variant, keyword)) =>
::icu_locale_core::Locale {
id: ::icu_locale_core::LanguageIdentifier {
language,
script,
region,
variants: match variant {
Some(v) =>
::icu_locale_core::subtags::Variants::from_variant(v),
None => ::icu_locale_core::subtags::Variants::new(),
},
},
extensions: match keyword {
Some(k) =>
::icu_locale_core::extensions::Extensions::from_unicode(::icu_locale_core::extensions::unicode::Unicode {
keywords: ::icu_locale_core::extensions::unicode::Keywords::new_single(k.0,
::icu_locale_core::extensions::unicode::Value::from_subtag(k.1)),
attributes: ::icu_locale_core::extensions::unicode::Attributes::new(),
}),
None => ::icu_locale_core::extensions::Extensions::new(),
},
},
_ => {
::core::panicking::panic_fmt(format_args!("Invalid language code: en . Note the locale! macro only supports up to one variant tag; and one unicode keyword, other extension are not supported. Use runtime parsing instead."));
}
}
}icu_locale::locale!("en");
41 pub const ES: icu_locale::Locale = const {
match ::icu_locale_core::Locale::try_from_utf8_with_single_variant_single_keyword_unicode_extension("es".as_bytes())
{
Ok((language, script, region, variant, keyword)) =>
::icu_locale_core::Locale {
id: ::icu_locale_core::LanguageIdentifier {
language,
script,
region,
variants: match variant {
Some(v) =>
::icu_locale_core::subtags::Variants::from_variant(v),
None => ::icu_locale_core::subtags::Variants::new(),
},
},
extensions: match keyword {
Some(k) =>
::icu_locale_core::extensions::Extensions::from_unicode(::icu_locale_core::extensions::unicode::Unicode {
keywords: ::icu_locale_core::extensions::unicode::Keywords::new_single(k.0,
::icu_locale_core::extensions::unicode::Value::from_subtag(k.1)),
attributes: ::icu_locale_core::extensions::unicode::Attributes::new(),
}),
None => ::icu_locale_core::extensions::Extensions::new(),
},
},
_ => {
::core::panicking::panic_fmt(format_args!("Invalid language code: es . Note the locale! macro only supports up to one variant tag; and one unicode keyword, other extension are not supported. Use runtime parsing instead."));
}
}
}icu_locale::locale!("es");
42 pub const FR: icu_locale::Locale = const {
match ::icu_locale_core::Locale::try_from_utf8_with_single_variant_single_keyword_unicode_extension("fr".as_bytes())
{
Ok((language, script, region, variant, keyword)) =>
::icu_locale_core::Locale {
id: ::icu_locale_core::LanguageIdentifier {
language,
script,
region,
variants: match variant {
Some(v) =>
::icu_locale_core::subtags::Variants::from_variant(v),
None => ::icu_locale_core::subtags::Variants::new(),
},
},
extensions: match keyword {
Some(k) =>
::icu_locale_core::extensions::Extensions::from_unicode(::icu_locale_core::extensions::unicode::Unicode {
keywords: ::icu_locale_core::extensions::unicode::Keywords::new_single(k.0,
::icu_locale_core::extensions::unicode::Value::from_subtag(k.1)),
attributes: ::icu_locale_core::extensions::unicode::Attributes::new(),
}),
None => ::icu_locale_core::extensions::Extensions::new(),
},
},
_ => {
::core::panicking::panic_fmt(format_args!("Invalid language code: fr . Note the locale! macro only supports up to one variant tag; and one unicode keyword, other extension are not supported. Use runtime parsing instead."));
}
}
}icu_locale::locale!("fr");
43 pub const IT: icu_locale::Locale = const {
match ::icu_locale_core::Locale::try_from_utf8_with_single_variant_single_keyword_unicode_extension("it".as_bytes())
{
Ok((language, script, region, variant, keyword)) =>
::icu_locale_core::Locale {
id: ::icu_locale_core::LanguageIdentifier {
language,
script,
region,
variants: match variant {
Some(v) =>
::icu_locale_core::subtags::Variants::from_variant(v),
None => ::icu_locale_core::subtags::Variants::new(),
},
},
extensions: match keyword {
Some(k) =>
::icu_locale_core::extensions::Extensions::from_unicode(::icu_locale_core::extensions::unicode::Unicode {
keywords: ::icu_locale_core::extensions::unicode::Keywords::new_single(k.0,
::icu_locale_core::extensions::unicode::Value::from_subtag(k.1)),
attributes: ::icu_locale_core::extensions::unicode::Attributes::new(),
}),
None => ::icu_locale_core::extensions::Extensions::new(),
},
},
_ => {
::core::panicking::panic_fmt(format_args!("Invalid language code: it . Note the locale! macro only supports up to one variant tag; and one unicode keyword, other extension are not supported. Use runtime parsing instead."));
}
}
}icu_locale::locale!("it");
44 pub const JA: icu_locale::Locale = const {
match ::icu_locale_core::Locale::try_from_utf8_with_single_variant_single_keyword_unicode_extension("ja".as_bytes())
{
Ok((language, script, region, variant, keyword)) =>
::icu_locale_core::Locale {
id: ::icu_locale_core::LanguageIdentifier {
language,
script,
region,
variants: match variant {
Some(v) =>
::icu_locale_core::subtags::Variants::from_variant(v),
None => ::icu_locale_core::subtags::Variants::new(),
},
},
extensions: match keyword {
Some(k) =>
::icu_locale_core::extensions::Extensions::from_unicode(::icu_locale_core::extensions::unicode::Unicode {
keywords: ::icu_locale_core::extensions::unicode::Keywords::new_single(k.0,
::icu_locale_core::extensions::unicode::Value::from_subtag(k.1)),
attributes: ::icu_locale_core::extensions::unicode::Attributes::new(),
}),
None => ::icu_locale_core::extensions::Extensions::new(),
},
},
_ => {
::core::panicking::panic_fmt(format_args!("Invalid language code: ja . Note the locale! macro only supports up to one variant tag; and one unicode keyword, other extension are not supported. Use runtime parsing instead."));
}
}
}icu_locale::locale!("ja");
45 pub const PT: icu_locale::Locale = const {
match ::icu_locale_core::Locale::try_from_utf8_with_single_variant_single_keyword_unicode_extension("pt".as_bytes())
{
Ok((language, script, region, variant, keyword)) =>
::icu_locale_core::Locale {
id: ::icu_locale_core::LanguageIdentifier {
language,
script,
region,
variants: match variant {
Some(v) =>
::icu_locale_core::subtags::Variants::from_variant(v),
None => ::icu_locale_core::subtags::Variants::new(),
},
},
extensions: match keyword {
Some(k) =>
::icu_locale_core::extensions::Extensions::from_unicode(::icu_locale_core::extensions::unicode::Unicode {
keywords: ::icu_locale_core::extensions::unicode::Keywords::new_single(k.0,
::icu_locale_core::extensions::unicode::Value::from_subtag(k.1)),
attributes: ::icu_locale_core::extensions::unicode::Attributes::new(),
}),
None => ::icu_locale_core::extensions::Extensions::new(),
},
},
_ => {
::core::panicking::panic_fmt(format_args!("Invalid language code: pt . Note the locale! macro only supports up to one variant tag; and one unicode keyword, other extension are not supported. Use runtime parsing instead."));
}
}
}icu_locale::locale!("pt");
46 pub const RU: icu_locale::Locale = const {
match ::icu_locale_core::Locale::try_from_utf8_with_single_variant_single_keyword_unicode_extension("ru".as_bytes())
{
Ok((language, script, region, variant, keyword)) =>
::icu_locale_core::Locale {
id: ::icu_locale_core::LanguageIdentifier {
language,
script,
region,
variants: match variant {
Some(v) =>
::icu_locale_core::subtags::Variants::from_variant(v),
None => ::icu_locale_core::subtags::Variants::new(),
},
},
extensions: match keyword {
Some(k) =>
::icu_locale_core::extensions::Extensions::from_unicode(::icu_locale_core::extensions::unicode::Unicode {
keywords: ::icu_locale_core::extensions::unicode::Keywords::new_single(k.0,
::icu_locale_core::extensions::unicode::Value::from_subtag(k.1)),
attributes: ::icu_locale_core::extensions::unicode::Attributes::new(),
}),
None => ::icu_locale_core::extensions::Extensions::new(),
},
},
_ => {
::core::panicking::panic_fmt(format_args!("Invalid language code: ru . Note the locale! macro only supports up to one variant tag; and one unicode keyword, other extension are not supported. Use runtime parsing instead."));
}
}
}icu_locale::locale!("ru");
47 pub const TR: icu_locale::Locale = const {
match ::icu_locale_core::Locale::try_from_utf8_with_single_variant_single_keyword_unicode_extension("tr".as_bytes())
{
Ok((language, script, region, variant, keyword)) =>
::icu_locale_core::Locale {
id: ::icu_locale_core::LanguageIdentifier {
language,
script,
region,
variants: match variant {
Some(v) =>
::icu_locale_core::subtags::Variants::from_variant(v),
None => ::icu_locale_core::subtags::Variants::new(),
},
},
extensions: match keyword {
Some(k) =>
::icu_locale_core::extensions::Extensions::from_unicode(::icu_locale_core::extensions::unicode::Unicode {
keywords: ::icu_locale_core::extensions::unicode::Keywords::new_single(k.0,
::icu_locale_core::extensions::unicode::Value::from_subtag(k.1)),
attributes: ::icu_locale_core::extensions::unicode::Attributes::new(),
}),
None => ::icu_locale_core::extensions::Extensions::new(),
},
},
_ => {
::core::panicking::panic_fmt(format_args!("Invalid language code: tr . Note the locale! macro only supports up to one variant tag; and one unicode keyword, other extension are not supported. Use runtime parsing instead."));
}
}
}icu_locale::locale!("tr");
48 pub const ZH_HANS: icu_locale::Locale = const {
match ::icu_locale_core::Locale::try_from_utf8_with_single_variant_single_keyword_unicode_extension("zh-Hans".as_bytes())
{
Ok((language, script, region, variant, keyword)) =>
::icu_locale_core::Locale {
id: ::icu_locale_core::LanguageIdentifier {
language,
script,
region,
variants: match variant {
Some(v) =>
::icu_locale_core::subtags::Variants::from_variant(v),
None => ::icu_locale_core::subtags::Variants::new(),
},
},
extensions: match keyword {
Some(k) =>
::icu_locale_core::extensions::Extensions::from_unicode(::icu_locale_core::extensions::unicode::Unicode {
keywords: ::icu_locale_core::extensions::unicode::Keywords::new_single(k.0,
::icu_locale_core::extensions::unicode::Value::from_subtag(k.1)),
attributes: ::icu_locale_core::extensions::unicode::Attributes::new(),
}),
None => ::icu_locale_core::extensions::Extensions::new(),
},
},
_ => {
::core::panicking::panic_fmt(format_args!("Invalid language code: zh-Hans . Note the locale! macro only supports up to one variant tag; and one unicode keyword, other extension are not supported. Use runtime parsing instead."));
}
}
}icu_locale::locale!("zh-Hans");
49 pub const ZH_HANT: icu_locale::Locale = const {
match ::icu_locale_core::Locale::try_from_utf8_with_single_variant_single_keyword_unicode_extension("zh-Hant".as_bytes())
{
Ok((language, script, region, variant, keyword)) =>
::icu_locale_core::Locale {
id: ::icu_locale_core::LanguageIdentifier {
language,
script,
region,
variants: match variant {
Some(v) =>
::icu_locale_core::subtags::Variants::from_variant(v),
None => ::icu_locale_core::subtags::Variants::new(),
},
},
extensions: match keyword {
Some(k) =>
::icu_locale_core::extensions::Extensions::from_unicode(::icu_locale_core::extensions::unicode::Unicode {
keywords: ::icu_locale_core::extensions::unicode::Keywords::new_single(k.0,
::icu_locale_core::extensions::unicode::Value::from_subtag(k.1)),
attributes: ::icu_locale_core::extensions::unicode::Attributes::new(),
}),
None => ::icu_locale_core::extensions::Extensions::new(),
},
},
_ => {
::core::panicking::panic_fmt(format_args!("Invalid language code: zh-Hant . Note the locale! macro only supports up to one variant tag; and one unicode keyword, other extension are not supported. Use runtime parsing instead."));
}
}
}icu_locale::locale!("zh-Hant");
50}