Move `l10n_embed` re-exports into `macro_prelude` module
Dependencies
- [2]
RUCC2HKZRename from `fluent_embed` to `l10n_embed` - [3]
BFL2Y7GNAdd relative timestamps using `jiff` and `icu_relativetime` - [4]
KZLFC7OWRename `fluent_embed_runtime` to `fluent_embed` - [5]
EAPOUW73Fix compilation error with `fluent-syntax` span PR - [6]
CESJ4CTOMove macro-specific code into `macro_impl` module - [7]
QSK7JRBAAdd simple `attribute_path` function - [8]
73C6NOJ7Fix minimal `Localize` implementation on errors - [9]
S26YOXQIUpdate `Cargo.toml` in workspace and packages - [10]
X6AMFX3NTemporarily remove automatic language detection - [11]
7U2DXFMPRefactor `fluent_embed::Localize` to support overriding locales - [12]
C6W7N6N5Implement `Localize` for `FixedDecimal` and primitive number types - [13]
4MRF5E76Generate simple locale matching code in `localize()` - [14]
5TEX4MNUSplit `fluent_embed` into `group` and `parse` modules - [15]
UN2XEIEUMigrate from `locale_select` to `env_preferences` - [16]
CFJKYXUXRemove newtype wrapper `RelativeTime` for `jiff::Timestamp` - [17]
3NMKD6I5Refactor `Localize` trait to use `std::io::Write` - [18]
K3G4HK2JTrack Fluent files using `include!` - [19]
7JPOCQEIAdd explicit error handling for macro parsing - [20]
MWN4CAOZUpdate `LocalizationError` in `fluent_embed` - [21]
6XEMHUGSUse full `Locale` instead of `LanguageIdentifier` subset - [22]
OWXLFLRMMerge `cli_macros` shim into `fluent_embed` - [23]
QJC4IQITRefactor `Localize` functions to infallibly return `String` - [24]
RUFPE6OOInclude canonical locale in list of available locales - [25]
HHJDRLLNCreate `fluent_embed_runtime` crate - [26]
LU6IFZFGRemove `std::io::Write` trait bound from `Localize` - [27]
7M4UI3TWUpdate dependencies to latest versions - [28]
QFPQZR4KRefactor `fluent_embed` - [29]
NO3PDO7PRefactor `fluent_embed` to support structs - [30]
EKXWNEPKRename `Localize::message_for_locale` to `Localize::localize_for` - [31]
5I5NR4DQMake `Localize::CANONICAL_LOCALE` a function instead of associated constant - [*]
XGNME3WRMove `Group::derive_enum` to new `crate::parse_macro` module - [*]
O77KA6C4Create `fluent_embed` crate
Change contents
- replacement in l10n_embed_derive/src/macro_impl/mod.rs at line 169
fn canonical_locale(&self) -> ::l10n_embed::icu_locale::Locale {::l10n_embed::icu_locale::locale!(#canonical_locale)fn canonical_locale(&self) -> ::l10n_embed::macro_prelude::icu_locale::Locale {::l10n_embed::macro_prelude::icu_locale::locale!(#canonical_locale) - replacement in l10n_embed_derive/src/macro_impl/mod.rs at line 173
fn available_locales(&self) -> Vec<::l10n_embed::icu_locale::Locale> {fn available_locales(&self) -> Vec<::l10n_embed::macro_prelude::icu_locale::Locale> { - replacement in l10n_embed_derive/src/macro_impl/mod.rs at line 179
locale: &::l10n_embed::icu_locale::Locale,locale: &::l10n_embed::macro_prelude::icu_locale::Locale, - replacement in l10n_embed_derive/src/macro_impl/derive.rs at line 45
const PLURAL_RULE_TYPE: ::l10n_embed::PluralRuleType =::l10n_embed::PluralRuleType::Cardinal;let plural_options = ::l10n_embed::PluralRulesOptions::default().with_type(PLURAL_RULE_TYPE);let plural_rules = ::l10n_embed::PluralRules::try_new(locale.into(), plural_options).unwrap();const PLURAL_RULE_TYPE: ::l10n_embed::macro_prelude::icu_plurals::PluralRuleType =::l10n_embed::macro_prelude::icu_plurals::PluralRuleType::Cardinal;let plural_options = ::l10n_embed::macro_prelude::icu_plurals::PluralRulesOptions::default().with_type(PLURAL_RULE_TYPE);let plural_rules = ::l10n_embed::macro_prelude::icu_plurals::PluralRules::try_new(locale.into(),plural_options,).unwrap(); - edit in l10n_embed_derive/src/macro_impl/derive.rs at line 55
- replacement in l10n_embed_derive/src/macro_impl/derive.rs at line 93
quote!(vec![self.canonical_locale(), #(::l10n_embed::locale!(#locale_literals)),*])quote!(vec![self.canonical_locale(), #(::l10n_embed::macro_prelude::icu_locale::locale!(#locale_literals)),*]) - replacement in l10n_embed_derive/src/lib.rs at line 48
locale: &::l10n_embed::icu_locale::Locale,locale: &::l10n_embed::macro_prelude::icu_locale::Locale, - replacement in l10n_embed_derive/src/fluent/ast.rs at line 37
parse_quote!(::l10n_embed::icu_plurals::PluralCategory::#ident_pascal_case)parse_quote!(::l10n_embed::macro_prelude::icu_plurals::PluralCategory::#ident_pascal_case) - replacement in l10n_embed_derive/src/fluent/ast.rs at line 101
parse_quote!(::l10n_embed::Decimal::try_from_f64(#float_literal, ::l10n_embed::FloatPrecision::RoundTrip).unwrap())parse_quote!(::l10n_embed::macro_prelude::fixed_decimal::Decimal::try_from_f64(#float_literal,::l10n_embed::macro_prelude::fixed_decimal::FloatPrecision::RoundTrip,).unwrap();) - edit in l10n_embed/src/lib.rs at line 1[3.924]→[3.114:269](∅→∅),[3.114]→[3.114:269](∅→∅),[3.269]→[3.2686:2736](∅→∅),[3.2736]→[3.2078:2122](∅→∅),[3.56]→[3.2792:2870](∅→∅),[3.2122]→[3.2792:2870](∅→∅),[3.2792]→[3.2792:2870](∅→∅),[3.2870]→[3.107:132](∅→∅),[3.382]→[3.107:132](∅→∅),[3.405]→[3.4361:4362](∅→∅)
// Public re-exports of dependencies required at runtime, so macro-generated code// can find all the dependencies it expects as long as this crate existspub use fixed_decimal::{Decimal, FloatPrecision};pub use icu_locale::{self, Locale, locale};pub use icu_plurals::{self, PluralRuleType, PluralRules, PluralRulesOptions};pub use jiff::Timestamp; - edit in l10n_embed/src/lib.rs at line 5
use icu_locale::{Locale, locale};// Public re-exports of dependencies required at runtime, so macro-generated code// can find all the dependencies it expects as long as this crate existspub mod macro_prelude {pub use icu_locale;pub use icu_plurals;}