| 
1 |  | -//! Baked ICU data for eager translation support.  | 
 | 1 | +//! This crate contains pre-baked ICU4X data, generated by `icu4x-datagen`. The tool  | 
 | 2 | +//! fetches locale data from CLDR and transforms them into const code in statics that  | 
 | 3 | +//! ICU4X can load, via databake. `lib.rs` in this crate is manually written, but all  | 
 | 4 | +//! other code is generated.  | 
2 | 5 | //!  | 
 | 6 | +//! This crate can be regenerated when there's a new CLDR version, though that is unlikely  | 
 | 7 | +//! to result in changes in most cases (currently this only covers list formatting data, which  | 
 | 8 | +//! is rather stable). It may need to be regenerated when updating ICU4X versions, especially  | 
 | 9 | +//! across major versions, in case it fails to compile after an update.  | 
 | 10 | +//!  | 
 | 11 | +//! It must be regenerated when adding new locales to Rust, or if Rust's usage of ICU4X  | 
 | 12 | +//! grows to need more kinds of data.  | 
 | 13 | +//!  | 
 | 14 | +//! To regenerate the data, run this command:  | 
 | 15 | +//!  | 
 | 16 | +//! ```text  | 
 | 17 | +//! icu4x-datagen -W --pretty --fingerprint --use-separate-crates \  | 
 | 18 | +//! --format mod -l en es fr it ja pt ru tr zh zh-Hans zh-Hant \  | 
 | 19 | +//! -k list/and@1 fallback/likelysubtags@1 fallback/parents@1 fallback/supplement/co@1 \  | 
 | 20 | +//! --cldr-tag latest --icuexport-tag latest -o src/data  | 
 | 21 | +//! ```  | 
3 | 22 | #![allow(elided_lifetimes_in_paths)]  | 
4 | 23 | 
 
  | 
5 |  | -/* generated with:  | 
6 |  | -```text  | 
7 |  | -icu4x-datagen -W --pretty --fingerprint --use-separate-crates --cldr-tag latest --icuexport-tag latest \  | 
8 |  | ---format mod -l en es fr it ja pt ru tr zh zh-Hans zh-Hant -k list/and@1 fallback/likelysubtags@1 fallback/parents@1 fallback/supplement/co@1 \  | 
9 |  | --o src/data  | 
10 |  | -```  | 
11 |  | -*/  | 
12 |  | - | 
13 |  | -// FIXME: Workaround https://github.com/unicode-org/icu4x/issues/2815  | 
14 | 24 | mod data {  | 
15 |  | -    /*  | 
16 |  | -    use super::data::BakedDataProvider;  | 
17 |  | -    use icu_provider::{  | 
18 |  | -        AnyPayload, AnyProvider, AnyResponse, DataError, DataErrorKind, DataKey, DataRequest,  | 
19 |  | -        KeyedDataMarker,  | 
20 |  | -    };  | 
21 |  | -
  | 
22 |  | -    use crate::data::fallback;  | 
23 |  | -    use crate::data::list;  | 
24 |  | -     */  | 
25 |  | - | 
26 | 25 |     include!("data/mod.rs");  | 
27 | 26 |     include!("data/any.rs");  | 
28 | 27 | }  | 
 | 
0 commit comments