зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1662309 - Update fluent-rs to 0.12. r=kamidphish
Differential Revision: https://phabricator.services.mozilla.com/D88942
This commit is contained in:
Родитель
a17ec360a5
Коммит
f8a2cef646
|
@ -1448,9 +1448,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "fluent"
|
||||
version = "0.11.0"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ebe7532e1e5146a909de9e019e31835a84b5dee3eeb234561e525844f3cf3bf"
|
||||
checksum = "3c3b6132d1377d8776409a337c6851d342aee4e85277c96ecd2755c4e0efde1d"
|
||||
dependencies = [
|
||||
"fluent-bundle",
|
||||
"fluent-pseudo",
|
||||
|
@ -1459,9 +1459,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "fluent-bundle"
|
||||
version = "0.11.0"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "27ade33328521266c81cc0924523988f43ccd7359f64689a1b6e818afca3a646"
|
||||
checksum = "01a094d494ab2ed06077e9a95f4e47f446c376de95f6c93045dd88c499bfcd70"
|
||||
dependencies = [
|
||||
"fluent-langneg",
|
||||
"fluent-syntax",
|
||||
|
@ -1486,9 +1486,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "fluent-langneg"
|
||||
version = "0.12.1"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fe5815efd5542e40841cd34ef9003822352b04c67a70c595c6758597c72e1f56"
|
||||
checksum = "2c4ad0989667548f06ccd0e306ed56b61bd4d35458d54df5ec7587c0e8ed5e94"
|
||||
dependencies = [
|
||||
"unic-langid",
|
||||
]
|
||||
|
@ -2371,9 +2371,9 @@ source = "git+https://github.com/mozilla/application-services?rev=9ba519a5739b19
|
|||
|
||||
[[package]]
|
||||
name = "intl-memoizer"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9867e2d65d82936ef34217ed0f87b639a94384e93a0676158142c861c705391f"
|
||||
checksum = "8a0ed58ba6089d49f8a9a7d5e16fc9b9e2019cdf40ef270f3d465fa244d9630b"
|
||||
dependencies = [
|
||||
"type-map",
|
||||
"unic-langid",
|
||||
|
@ -2381,9 +2381,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "intl_pluralrules"
|
||||
version = "6.0.0"
|
||||
version = "7.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d82c14d8eece42c03353e0ce86a4d3f97b1f1cef401e4d962dca6c6214a85002"
|
||||
checksum = "6c271cdb1f12a9feb3a017619c3ee681f971f270f6757341d6abe1f9f7a98bc3"
|
||||
dependencies = [
|
||||
"tinystr",
|
||||
"unic-langid",
|
||||
|
@ -5290,9 +5290,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "unic-langid"
|
||||
version = "0.8.0"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24d81136159f779c35b10655f45210c71cd5ca5a45aadfe9840a61c7071735ed"
|
||||
checksum = "73328fcd730a030bdb19ddf23e192187a6b01cd98be6d3140622a89129459ce5"
|
||||
dependencies = [
|
||||
"unic-langid-impl",
|
||||
]
|
||||
|
@ -5310,9 +5310,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "unic-langid-impl"
|
||||
version = "0.8.0"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c43c61e94492eb67f20facc7b025778a904de83d953d8fcb60dd9adfd6e2d0ea"
|
||||
checksum = "1a4a8eeaf0494862c1404c95ec2f4c33a2acff5076f64314b465e3ddae1b934d"
|
||||
dependencies = [
|
||||
"tinystr",
|
||||
]
|
||||
|
|
|
@ -5,9 +5,9 @@ authors = ["Zibi Braniecki <zibi@braniecki.net>"]
|
|||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
fluent = { version = "0.11" , features = ["fluent-pseudo"] }
|
||||
fluent = { version = "0.12" , features = ["fluent-pseudo"] }
|
||||
fluent-pseudo = "0.2"
|
||||
intl-memoizer = "0.4"
|
||||
unic-langid = "0.8"
|
||||
intl-memoizer = "0.5"
|
||||
unic-langid = "0.9"
|
||||
nsstring = { path = "../../../../xpcom/rust/nsstring" }
|
||||
thin-vec = { version = "0.1.0", features = ["gecko-ffi"] }
|
||||
|
|
|
@ -380,7 +380,7 @@ pub struct FluentDateTime {
|
|||
}
|
||||
|
||||
impl FluentType for FluentDateTime {
|
||||
fn duplicate(&self) -> Box<dyn FluentType> {
|
||||
fn duplicate(&self) -> Box<dyn FluentType + Send> {
|
||||
Box::new(self.clone())
|
||||
}
|
||||
fn as_string(&self, intls: &IntlLangMemoizer) -> Cow<'static, str> {
|
||||
|
|
|
@ -10,6 +10,6 @@ nserror = { path = "../../../../xpcom/rust/nserror" }
|
|||
nsstring = { path = "../../../../xpcom/rust/nsstring" }
|
||||
xpcom = { path = "../../../../xpcom/rust/xpcom" }
|
||||
thin-vec = { version = "0.1.0", features = ["gecko-ffi"] }
|
||||
fluent-langneg = { version = "0.12.1", features = ["cldr"] }
|
||||
unic-langid = "0.8"
|
||||
fluent-langneg = { version = "0.13", features = ["cldr"] }
|
||||
unic-langid = "0.9"
|
||||
unic-langid-ffi = { path = "../unic-langid-ffi" }
|
||||
|
|
|
@ -10,4 +10,4 @@ nserror = { path = "../../../../xpcom/rust/nserror" }
|
|||
nsstring = { path = "../../../../xpcom/rust/nsstring" }
|
||||
xpcom = { path = "../../../../xpcom/rust/xpcom" }
|
||||
thin-vec = { version = "0.1.0", features = ["gecko-ffi"] }
|
||||
unic-langid = { version = "0.8", features = ["likelysubtags"] }
|
||||
unic-langid = { version = "0.9", features = ["likelysubtags"] }
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use nsstring::nsACString;
|
||||
use nsstring::nsCString;
|
||||
use thin_vec::ThinVec;
|
||||
pub use unic_langid::{CharacterDirection, LanguageIdentifier, LanguageIdentifierError};
|
||||
pub use unic_langid::{subtags, CharacterDirection, LanguageIdentifier, LanguageIdentifierError};
|
||||
|
||||
pub fn new_langid_for_mozilla(
|
||||
name: &nsACString,
|
||||
|
@ -62,7 +62,7 @@ pub unsafe extern "C" fn unic_langid_get_language(
|
|||
langid: &LanguageIdentifier,
|
||||
len: *mut u32,
|
||||
) -> *const u8 {
|
||||
let lang = langid.language();
|
||||
let lang = langid.language.as_str();
|
||||
*len = lang.len() as u32;
|
||||
lang.as_bytes().as_ptr()
|
||||
}
|
||||
|
@ -72,12 +72,14 @@ pub unsafe extern "C" fn unic_langid_set_language(
|
|||
langid: &mut LanguageIdentifier,
|
||||
string: &nsACString,
|
||||
) -> bool {
|
||||
langid.set_language(string).is_ok()
|
||||
subtags::Language::from_bytes(string)
|
||||
.map(|lang| langid.language = lang)
|
||||
.is_ok()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn unic_langid_clear_language(langid: &mut LanguageIdentifier) {
|
||||
langid.clear_language()
|
||||
langid.language.clear()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
@ -85,9 +87,14 @@ pub unsafe extern "C" fn unic_langid_get_script(
|
|||
langid: &LanguageIdentifier,
|
||||
len: *mut u32,
|
||||
) -> *const u8 {
|
||||
let script = langid.script().unwrap_or("");
|
||||
*len = script.len() as u32;
|
||||
script.as_bytes().as_ptr()
|
||||
let (ptr, l) = if let Some(script) = langid.script {
|
||||
(script.as_str().as_bytes().as_ptr(), script.as_str().len())
|
||||
} else {
|
||||
(std::ptr::null(), 0)
|
||||
};
|
||||
|
||||
*len = l as u32;
|
||||
ptr
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
@ -95,12 +102,14 @@ pub unsafe extern "C" fn unic_langid_set_script(
|
|||
langid: &mut LanguageIdentifier,
|
||||
string: &nsACString,
|
||||
) -> bool {
|
||||
langid.set_script(string).is_ok()
|
||||
subtags::Script::from_bytes(string)
|
||||
.map(|script| langid.script = Some(script))
|
||||
.is_ok()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn unic_langid_clear_script(langid: &mut LanguageIdentifier) {
|
||||
langid.clear_script()
|
||||
langid.script = None;
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
@ -108,9 +117,14 @@ pub unsafe extern "C" fn unic_langid_get_region(
|
|||
langid: &LanguageIdentifier,
|
||||
len: *mut u32,
|
||||
) -> *const u8 {
|
||||
let region = langid.region().unwrap_or("");
|
||||
*len = region.len() as u32;
|
||||
region.as_bytes().as_ptr()
|
||||
let (ptr, l) = if let Some(region) = langid.region {
|
||||
(region.as_str().as_bytes().as_ptr(), region.as_str().len())
|
||||
} else {
|
||||
(std::ptr::null(), 0)
|
||||
};
|
||||
|
||||
*len = l as u32;
|
||||
ptr
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
@ -118,12 +132,14 @@ pub unsafe extern "C" fn unic_langid_set_region(
|
|||
langid: &mut LanguageIdentifier,
|
||||
string: &nsACString,
|
||||
) -> bool {
|
||||
langid.set_region(string).is_ok()
|
||||
subtags::Region::from_bytes(string)
|
||||
.map(|region| langid.region = Some(region))
|
||||
.is_ok()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn unic_langid_clear_region(langid: &mut LanguageIdentifier) {
|
||||
langid.clear_region()
|
||||
langid.region = None;
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
@ -132,7 +148,7 @@ pub unsafe extern "C" fn unic_langid_get_variants(
|
|||
variants: &mut ThinVec<nsCString>,
|
||||
) {
|
||||
for v in langid.variants() {
|
||||
variants.push(v.into());
|
||||
variants.push(v.as_str().into());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -141,7 +157,12 @@ pub unsafe extern "C" fn unic_langid_set_variants(
|
|||
langid: &mut LanguageIdentifier,
|
||||
variants: &ThinVec<nsCString>,
|
||||
) -> bool {
|
||||
langid.set_variants(variants).is_ok()
|
||||
variants
|
||||
.iter()
|
||||
.map(|v| subtags::Variant::from_bytes(v))
|
||||
.collect::<Result<Vec<_>, _>>()
|
||||
.map(|variants| langid.set_variants(&variants))
|
||||
.is_ok()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1,145 +0,0 @@
|
|||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
|
||||
- …
|
||||
|
||||
## fluent-bundle 0.11.0 (March 10, 2020)
|
||||
- Separate out `concurrent` version of `FluentBundle`.
|
||||
- Switch FluentBundle functions to use function pointers.
|
||||
|
||||
## fluent-bundle 0.10.2 (February 20, 2020)
|
||||
- Update to `intl_memoizer` 0.3.0 to allow for Send+Sync on FluentBundle.
|
||||
|
||||
## fluent-bundle 0.10.1 (February 15, 2020)
|
||||
- Switch RefCell in FluentBundle to Mutex.
|
||||
|
||||
## fluent-bundle 0.10.0 (February 13, 2020)
|
||||
- Update `fluent-langneg` to 0.12.
|
||||
- Update `intl_pluralrules` to 6.0.
|
||||
- Update `unic-langid` to 0.8.
|
||||
- Introduce `intl-memoizer`.
|
||||
- Improve the ergonomics of FluentArgs.
|
||||
- Add `add_resource_overriding`.
|
||||
- Remove dependency on `failure`.
|
||||
- Switch the strategy to mitigate bomb attack to limit the number of placeables.
|
||||
- Introduce `FluentType` for custom types.
|
||||
- Improve ergonomics of `FluentNumber` and bring its features closer to ECMA402 Intl.NumberFormat.
|
||||
|
||||
## fluent-bundle 0.9.0 (November 26, 2019)
|
||||
- Update `unic-langid` to 0.7.
|
||||
- Update `fluent-langneg` to 0.11.
|
||||
- Update `intl_pluralrules` to 5.0.
|
||||
|
||||
## fluent-bundle 0.8.0 (October 3, 2019)
|
||||
|
||||
- Update `unic-langid` to 0.6.
|
||||
- Update `fluent-locale` to 0.10.
|
||||
|
||||
## fluent-bundle 0.7.2 (October 1, 2019)
|
||||
|
||||
- Update `unic-langid` to 0.5.
|
||||
- Update `fluent-locale` to 0.9.
|
||||
- Stop using macros to cut on compilation time and dependencies.
|
||||
|
||||
## fluent-bundle 0.7.1 (August 1, 2019)
|
||||
|
||||
- Fix FluentBundle::default to use isolating by default.
|
||||
|
||||
## fluent-bundle 0.7.0 (August 1, 2019)
|
||||
|
||||
- Turn FluentBundle to be a generic over Borrow<FluentResource> (#114)
|
||||
- Update FluentBundle to the latest API (0.14) (#120)
|
||||
- Switch to unic_langid for Language Identifier Management
|
||||
- Refactor FluentArgs (#130)
|
||||
- Add transform to FluentBundle to enable pseudolocalization (#131)
|
||||
- Refactor resolver errors to provide better fallbacking and return errors out of formatting (#93)
|
||||
- Enable FSI/PDI direction isolation (#116)
|
||||
- Add more convenience From impls for FluentValue (#108)
|
||||
- Fix `bare_trait_objects` warnings (#110)
|
||||
|
||||
## fluent-bundle 0.6.0 (March 26, 2019)
|
||||
|
||||
- Update to fluent-syntax 0.9
|
||||
- Unify benchmark testsuite with fluent.js
|
||||
|
||||
## fluent-bundle 0.5.0 (January 31, 2019)
|
||||
|
||||
- Update to fluent-syntax 0.8
|
||||
- Add unicode escaping
|
||||
- Align with zero-copy parser
|
||||
|
||||
## fluent 0.4.3 (October 13, 2018)
|
||||
|
||||
- Support Sync+Send in Entry (#70)
|
||||
|
||||
## fluent 0.4.2 (October 1, 2018)
|
||||
|
||||
- Separate lifetimes of `FluentBundle::new` and return values. (#68)
|
||||
|
||||
## fluent 0.4.1 (August 31, 2018)
|
||||
|
||||
- Update README to make the example match new API
|
||||
|
||||
## fluent 0.4.0 (August 31, 2018)
|
||||
|
||||
- Rename MessageContext to FluentBundle
|
||||
- Update the FluentBundle API to match fluent.js 0.8
|
||||
- Update intl-pluralrules to 1.0
|
||||
- Add FluentBundle::format_message
|
||||
- Add FluentResource for external resource caching
|
||||
- Update fluent-syntax to 0.1.1
|
||||
- Update the signature of FluentBundle::format and FluentBundle::format_message
|
||||
|
||||
## fluent 0.3.1 (August 6, 2018)
|
||||
|
||||
- Update `fluent-locale` to 0.4.1.
|
||||
- Switch MessageContext::locales to be an owned Vec\<String>
|
||||
- Switch FluentValue::From\<i8> to FluentValue::From\<isize>
|
||||
|
||||
## fluent 0.3.0 (August 3, 2018)
|
||||
|
||||
- Add support for custom functions in MessageContext. (#50)
|
||||
- Switch error handling to `annotate-snippets crate`.
|
||||
- Separate `fluent` and `fluent-syntax` crates.
|
||||
- Handle cyclic references. (#55)
|
||||
- Switch parser binary to use `clap`.
|
||||
- Switch plural rules handling to `intl_pluralrules`. (#56)
|
||||
- Add `FluentValue::as_number`
|
||||
- Move `IntlPluralRules` initialization into `MessageContext::new`
|
||||
- General cleanups in line with `cargo fmt` and `cargo clippy`
|
||||
|
||||
## fluent 0.2.0 (February 11, 2018)
|
||||
|
||||
- Support Rust 1.23 stable
|
||||
- Support Fluent 0.5 syntax
|
||||
- Dual-license Apache 2.0 and MIT
|
||||
|
||||
## fluent 0.1.2 (October 14, 2017)
|
||||
|
||||
- Add more complex PluralRules support
|
||||
|
||||
## fluent 0.1.0 (October 13, 2017)
|
||||
|
||||
- Support parsing Fluent Syntax 0.3.
|
||||
- Support formatting Messages and Attributes alike.
|
||||
- Support string- and Number-typed external arguments
|
||||
- Select expressions:
|
||||
- without a selector.
|
||||
- with literal strings and numbers as selector,
|
||||
- with external arguments as selector,
|
||||
- with message reference as selector (using tags).
|
||||
- Support matching numbers in select expression to plural categories.
|
||||
- Only a single mock plural rule has been implemented for now.
|
||||
- Support Attribute expressions.
|
||||
- Support Variant expressions.
|
||||
- `MessageContext::new` now takes a slice as the `locales` argument.
|
||||
- Added integration with Travis CI and Coveralls.
|
||||
- Expanded module documentation.
|
||||
|
||||
|
||||
## fluent 0.0.1 (January 17, 2017)
|
||||
|
||||
- This is the first release to be listed in the CHANGELOG.
|
||||
- Basic parser support for the FTL syntax.
|
||||
- Message references.
|
|
@ -1,855 +0,0 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||
|
||||
[[package]]
|
||||
name = "bstr"
|
||||
version = "0.2.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "502ae1441a0a5adb8fbd38a5955a6416b9493e92b465de5e4a9bde6a539c2c48"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"memchr",
|
||||
"regex-automata",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f359dc14ff8911330a51ef78022d376f25ed00248912803b58f00cb1c27f742"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
|
||||
|
||||
[[package]]
|
||||
name = "c2-chacha"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb"
|
||||
dependencies = [
|
||||
"ppv-lite86",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cast"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0"
|
||||
dependencies = [
|
||||
"rustc_version",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "2.33.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"textwrap",
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "criterion"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fc755679c12bda8e5523a71e4d654b6bf2e14bd838dfc48cde6559a05caf7d1"
|
||||
dependencies = [
|
||||
"atty",
|
||||
"cast",
|
||||
"clap",
|
||||
"criterion-plot",
|
||||
"csv",
|
||||
"itertools",
|
||||
"lazy_static",
|
||||
"num-traits",
|
||||
"oorandom",
|
||||
"plotters",
|
||||
"rayon",
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"tinytemplate",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "criterion-plot"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a01e15e0ea58e8234f96146b1f91fa9d0e4dd7a38da93ff7a75d42c0b9d3a545"
|
||||
dependencies = [
|
||||
"cast",
|
||||
"itertools",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-deque"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285"
|
||||
dependencies = [
|
||||
"crossbeam-epoch",
|
||||
"crossbeam-utils",
|
||||
"maybe-uninit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-epoch"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cfg-if",
|
||||
"crossbeam-utils",
|
||||
"lazy_static",
|
||||
"maybe-uninit",
|
||||
"memoffset",
|
||||
"scopeguard",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-queue"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cfg-if",
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "csv"
|
||||
version = "1.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"csv-core",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "csv-core"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dtoa"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3"
|
||||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
|
||||
|
||||
[[package]]
|
||||
name = "fluent-bundle"
|
||||
version = "0.11.0"
|
||||
dependencies = [
|
||||
"criterion",
|
||||
"fluent-langneg",
|
||||
"fluent-syntax",
|
||||
"intl-memoizer",
|
||||
"intl_pluralrules",
|
||||
"rand",
|
||||
"rental",
|
||||
"serde",
|
||||
"serde_yaml",
|
||||
"smallvec",
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluent-langneg"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fe5815efd5542e40841cd34ef9003822352b04c67a70c595c6758597c72e1f56"
|
||||
dependencies = [
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluent-syntax"
|
||||
version = "0.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac0f7e83d14cccbf26e165d8881dcac5891af0d85a88543c09dd72ebd31d91ba"
|
||||
|
||||
[[package]]
|
||||
name = "fxhash"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"wasi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1010591b26bbfe835e9faeabeb11866061cc7dcebffd56ad7d0942d0e61aefd8"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "intl-memoizer"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9867e2d65d82936ef34217ed0f87b639a94384e93a0676158142c861c705391f"
|
||||
dependencies = [
|
||||
"type-map",
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "intl_pluralrules"
|
||||
version = "6.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d82c14d8eece42c03353e0ce86a4d3f97b1f1cef401e4d962dca6c6214a85002"
|
||||
dependencies = [
|
||||
"tinystr",
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484"
|
||||
dependencies = [
|
||||
"either",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e"
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1cb931d43e71f560c81badb0191596562bafad2be06a3f9025b845c847c60df5"
|
||||
dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.67"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018"
|
||||
|
||||
[[package]]
|
||||
name = "linked-hash-map"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "maybe-uninit"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9"
|
||||
dependencies = [
|
||||
"rustc_version",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "oorandom"
|
||||
version = "11.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ebcec7c9c2a95cacc7cd0ecb89d8a8454eca13906f6deb55258ffff0adeb9405"
|
||||
|
||||
[[package]]
|
||||
name = "plotters"
|
||||
version = "0.2.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4e3bb8da247d27ae212529352020f3e5ee16e83c0c258061d27b08ab92675eeb"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"num-traits",
|
||||
"wasm-bindgen",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-hack"
|
||||
version = "0.5.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
"libc",
|
||||
"rand_chacha",
|
||||
"rand_core",
|
||||
"rand_hc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_chacha"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853"
|
||||
dependencies = [
|
||||
"c2-chacha",
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_hc"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
|
||||
dependencies = [
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098"
|
||||
dependencies = [
|
||||
"crossbeam-deque",
|
||||
"either",
|
||||
"rayon-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon-core"
|
||||
version = "1.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9"
|
||||
dependencies = [
|
||||
"crossbeam-deque",
|
||||
"crossbeam-queue",
|
||||
"crossbeam-utils",
|
||||
"lazy_static",
|
||||
"num_cpus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8"
|
||||
dependencies = [
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1132f845907680735a84409c3bebc64d1364a5683ffbce899550cd09d5eaefc1"
|
||||
|
||||
[[package]]
|
||||
name = "rental"
|
||||
version = "0.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8545debe98b2b139fb04cad8618b530e9b07c152d99a5de83c860b877d67847f"
|
||||
dependencies = [
|
||||
"rental-impl",
|
||||
"stable_deref_trait",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rental-impl"
|
||||
version = "0.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "475e68978dc5b743f2f40d8e0a8fdc83f1c5e78cbf4b8fa5e74e73beebc340de"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
||||
dependencies = [
|
||||
"semver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
|
||||
|
||||
[[package]]
|
||||
name = "same-file"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
||||
dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
dependencies = [
|
||||
"semver-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver-parser"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.48"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_yaml"
|
||||
version = "0.8.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35"
|
||||
dependencies = [
|
||||
"dtoa",
|
||||
"linked-hash-map",
|
||||
"serde",
|
||||
"yaml-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc"
|
||||
|
||||
[[package]]
|
||||
name = "stable_deref_trait"
|
||||
version = "1.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "123bd9499cfb380418d509322d7a6d52e5315f064fe4b3ad18a53d6b92c07859"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "textwrap"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
||||
dependencies = [
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tinystr"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4bac79c4b51eda1b090b1edebfb667821bbb51f713855164dc7cec2cb8ac2ba3"
|
||||
|
||||
[[package]]
|
||||
name = "tinytemplate"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "57a3c6667d3e65eb1bc3aed6fd14011c6cbc3a0665218ab7f5daf040b9ec371a"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "type-map"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d2741b1474c327d95c1f1e3b0a2c3977c8e128409c572a33af2914e7d636717"
|
||||
dependencies = [
|
||||
"fxhash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24d81136159f779c35b10655f45210c71cd5ca5a45aadfe9840a61c7071735ed"
|
||||
dependencies = [
|
||||
"unic-langid-impl",
|
||||
"unic-langid-macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid-impl"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c43c61e94492eb67f20facc7b025778a904de83d953d8fcb60dd9adfd6e2d0ea"
|
||||
dependencies = [
|
||||
"tinystr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid-macros"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49bd90791278634d57e3ed4a4073108e3f79bfb87ab6a7b8664ba097425703df"
|
||||
dependencies = [
|
||||
"proc-macro-hack",
|
||||
"tinystr",
|
||||
"unic-langid-impl",
|
||||
"unic-langid-macros-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid-macros-impl"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e0098f77bd754f8fb7850cdf4ab143aa821898c4ac6dc16bcb2aa3e62ce858d1"
|
||||
dependencies = [
|
||||
"proc-macro-hack",
|
||||
"quote",
|
||||
"syn",
|
||||
"unic-langid-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
|
||||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
version = "2.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d"
|
||||
dependencies = [
|
||||
"same-file",
|
||||
"winapi",
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.9.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.59"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3557c397ab5a8e347d434782bcd31fc1483d927a6826804cec05cc792ee2519d"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"wasm-bindgen-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.59"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e0da9c9a19850d3af6df1cb9574970b566d617ecfaf36eb0b706b6f3ef9bd2f8"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.59"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0f6fde1d36e75a714b5fe0cffbb78978f222ea6baebb726af13c78869fdb4205"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.59"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "25bda4168030a6412ea8a047e27238cadf56f0e53516e1e83fec0a8b7c786f6d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.59"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc9f36ad51f25b0219a3d4d13b90eb44cd075dff8b6280cca015775d7acaddd8"
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
version = "0.3.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "721c6263e2c66fd44501cc5efbfa2b7dfa775d13e4ea38c46299646ed1f9c70a"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu",
|
||||
"winapi-x86_64-pc-windows-gnu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-util"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
[[package]]
|
||||
name = "yaml-rust"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d"
|
||||
dependencies = [
|
||||
"linked-hash-map",
|
||||
]
|
|
@ -13,8 +13,9 @@
|
|||
[package]
|
||||
edition = "2018"
|
||||
name = "fluent-bundle"
|
||||
version = "0.11.0"
|
||||
version = "0.12.0"
|
||||
authors = ["Zibi Braniecki <gandalf@mozilla.com>", "Staś Małolepszy <stas@mozilla.com>"]
|
||||
include = ["src/**/*", "benches/*.rs", "Cargo.toml", "README.md"]
|
||||
description = "A localization system designed to unleash the entire expressive power of\nnatural language translations.\n"
|
||||
homepage = "http://www.projectfluent.org"
|
||||
readme = "README.md"
|
||||
|
@ -27,16 +28,16 @@ repository = "https://github.com/projectfluent/fluent-rs"
|
|||
name = "resolver"
|
||||
harness = false
|
||||
[dependencies.fluent-langneg]
|
||||
version = "0.12"
|
||||
version = "0.13"
|
||||
|
||||
[dependencies.fluent-syntax]
|
||||
version = "0.9"
|
||||
|
||||
[dependencies.intl-memoizer]
|
||||
version = "0.4"
|
||||
version = "0.5"
|
||||
|
||||
[dependencies.intl_pluralrules]
|
||||
version = "6.0"
|
||||
version = "7.0"
|
||||
|
||||
[dependencies.rental]
|
||||
version = "0.5"
|
||||
|
@ -45,7 +46,7 @@ version = "0.5"
|
|||
version = "1.0"
|
||||
|
||||
[dependencies.unic-langid]
|
||||
version = "0.8"
|
||||
version = "0.9"
|
||||
[dev-dependencies.criterion]
|
||||
version = "0.3"
|
||||
|
||||
|
@ -60,5 +61,5 @@ features = ["derive"]
|
|||
version = "0.8"
|
||||
|
||||
[dev-dependencies.unic-langid]
|
||||
version = "0.8"
|
||||
version = "0.9"
|
||||
features = ["macros"]
|
||||
|
|
|
@ -1,318 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
## browser/locales/en-US/browser/menubar.ftl
|
||||
|
||||
## File menu
|
||||
|
||||
file-menu =
|
||||
.label = File
|
||||
.accesskey = F
|
||||
tab-cmd =
|
||||
.label = New Tab
|
||||
.accesskey = T
|
||||
new-user-context =
|
||||
.label = New Container Tab
|
||||
.accesskey = B
|
||||
new-navigator-cmd =
|
||||
.label = New Window
|
||||
.accesskey = N
|
||||
new-private-window =
|
||||
.label = New Private Window
|
||||
.accesskey = W
|
||||
|
||||
# Only displayed on OS X, and only on windows that aren't main browser windows,
|
||||
# or when there are no windows but Firefox is still running.
|
||||
open-location-cmd =
|
||||
.label = Open Location…
|
||||
open-file-cmd =
|
||||
.label = Open File…
|
||||
.accesskey = O
|
||||
close-cmd =
|
||||
.label = Close
|
||||
.accesskey = C
|
||||
close-window =
|
||||
.label = Close Window
|
||||
.accesskey = d
|
||||
save-page-cmd =
|
||||
.label = Save Page As…
|
||||
.accesskey = A
|
||||
email-page-cmd =
|
||||
.label = Email Link…
|
||||
.accesskey = E
|
||||
print-setup-cmd =
|
||||
.label = Page Setup…
|
||||
.accesskey = u
|
||||
print-preview-cmd =
|
||||
.label = Print Preview
|
||||
.accesskey = v
|
||||
print-cmd =
|
||||
.label = Print…
|
||||
.accesskey = P
|
||||
go-offline-cmd =
|
||||
.label = Work Offline
|
||||
.accesskey = k
|
||||
quit-application-cmd =
|
||||
.label = Quit
|
||||
.accesskey = Q
|
||||
|
||||
## Edit menu
|
||||
|
||||
edit-menu =
|
||||
.label = Edit
|
||||
.accesskey = E
|
||||
undo-cmd =
|
||||
.label = Undo
|
||||
.accesskey = U
|
||||
redo-cmd =
|
||||
.label = Redo
|
||||
.accesskey = R
|
||||
cut-cmd =
|
||||
.label = Cut
|
||||
.accesskey = t
|
||||
copy-cmd =
|
||||
.label = Copy
|
||||
.accesskey = C
|
||||
paste-cmd =
|
||||
.label = Paste
|
||||
.accesskey = P
|
||||
delete-cmd =
|
||||
.label = Delete
|
||||
.accesskey = D
|
||||
select-all-cmd =
|
||||
.label = Select All
|
||||
.accesskey = A
|
||||
find-on-cmd =
|
||||
.label = Find in This Page…
|
||||
.accesskey = F
|
||||
find-again-cmd =
|
||||
.label = Find Again
|
||||
.accesskey = g
|
||||
bidi-switch-text-direction-item =
|
||||
.label = Switch Text Direction
|
||||
.accesskey = w
|
||||
preferences-cmd-unix =
|
||||
.label = Preferences
|
||||
.accesskey = n
|
||||
|
||||
## View menu
|
||||
|
||||
view-menu =
|
||||
.label = View
|
||||
.accesskey = V
|
||||
view-toolbars-menu =
|
||||
.label = Toolbars
|
||||
.accesskey = T
|
||||
view-customize-toolbar =
|
||||
.label = Customize…
|
||||
.accesskey = C
|
||||
view-sidebar-menu =
|
||||
.label = Sidebar
|
||||
.accesskey = e
|
||||
bookmarks-button =
|
||||
.label = Bookmarks
|
||||
history-button =
|
||||
.label = History
|
||||
synced-tabs =
|
||||
.label = Synced Tabs
|
||||
full-zoom =
|
||||
.label = Zoom
|
||||
.accesskey = Z
|
||||
full-zoom-enlarge-cmd =
|
||||
.label = Zoom In
|
||||
.accesskey = I
|
||||
full-zoom-reduce-cmd =
|
||||
.label = Zoom Out
|
||||
.accesskey = O
|
||||
full-zoom-reset-cmd =
|
||||
.label = Reset
|
||||
.accesskey = R
|
||||
full-zoom-toggle-cmd =
|
||||
.label = Zoom Text Only
|
||||
.accesskey = T
|
||||
page-style-menu =
|
||||
.label = Page Style
|
||||
.accesskey = y
|
||||
page-style-no-style =
|
||||
.label = No Style
|
||||
.accesskey = n
|
||||
page-style-persistent-only =
|
||||
.label = Basic Page Style
|
||||
.accesskey = b
|
||||
charset-menu2 =
|
||||
.label = Text Encoding
|
||||
.accesskey = c
|
||||
|
||||
## Full Screen controls
|
||||
## Match what Safari and other Apple applications use on OS X Lion.
|
||||
#
|
||||
enter-full-screen-cmd =
|
||||
.accesskey = F
|
||||
.label = Enter Full Screen
|
||||
exit-full-screen-cmd =
|
||||
.accesskey = F
|
||||
.label = Exit Full Screen
|
||||
full-screen-cmd =
|
||||
.accesskey = F
|
||||
.label = Full Screen
|
||||
show-all-tabs-cmd =
|
||||
.accesskey = A
|
||||
.label = Show All Tabs
|
||||
bidi-switch-page-direction-item =
|
||||
.label = Switch Page Direction
|
||||
.accesskey = D
|
||||
|
||||
## History menu
|
||||
|
||||
history-menu =
|
||||
.label = History
|
||||
.accesskey = s
|
||||
show-all-history-cmd2 =
|
||||
.label = Show All History
|
||||
clear-recent-history =
|
||||
.label = Clear Recent History…
|
||||
sync-tabs-menu3 =
|
||||
.label = Synced Tabs
|
||||
history-restore-last-session =
|
||||
.label = Restore Previous Session
|
||||
hidden-tabs =
|
||||
.label = Hidden Tabs
|
||||
history-undo-menu =
|
||||
.label = Recently Closed Tabs
|
||||
history-undo-window-menu =
|
||||
.label = Recently Closed Windows
|
||||
|
||||
## Bookmarks menu
|
||||
|
||||
bookmarks-menu =
|
||||
.label = Bookmarks
|
||||
.accesskey = B
|
||||
show-all-bookmarks2 =
|
||||
.label = Show All Bookmarks
|
||||
add-cur-pages-cmd =
|
||||
.label = Bookmark All Tabs…
|
||||
personalbar-cmd =
|
||||
.label = Bookmarks Toolbar
|
||||
other-bookmarks-cmd =
|
||||
.label = Other Bookmarks
|
||||
mobile-bookmarks-cmd =
|
||||
.label = Mobile Bookmarks
|
||||
|
||||
## Tools menu
|
||||
|
||||
tools-menu =
|
||||
.label = Tools
|
||||
.accesskey = T
|
||||
downloads =
|
||||
.label = Downloads
|
||||
.accesskey = D
|
||||
addons =
|
||||
.label = Add-ons
|
||||
.accesskey = A
|
||||
sync-sign-in =
|
||||
.label = Sign In To { -sync-brand-short-name }…
|
||||
.accesskey = Y
|
||||
sync-sync-now-item =
|
||||
.label = Sync Now
|
||||
.accesskey = S
|
||||
sync-re-auth-item =
|
||||
.label = Reconnect to { -sync-brand-short-name }…
|
||||
.accesskey = R
|
||||
web-developer-menu =
|
||||
.label = Web Developer
|
||||
.accesskey = W
|
||||
page-source-cmd =
|
||||
.label = Page Source
|
||||
.accesskey = o
|
||||
page-info-cmd =
|
||||
.accesskey = I
|
||||
.label = Page Info
|
||||
preferences-cmd2 =
|
||||
.label = Options
|
||||
.accesskey = O
|
||||
preferences-ldb-cmd =
|
||||
.label = Layout Debugger
|
||||
.accesskey = L
|
||||
preferences-cmd-mac =
|
||||
.label = Preferences…
|
||||
services-menu-mac =
|
||||
.label = Services
|
||||
hide-this-app-cmd-mac2 =
|
||||
.label = Hide { -brand-shorter-name }
|
||||
hide-other-apps-cmd-mac =
|
||||
.label = Hide Others
|
||||
show-all-apps-cmd-mac =
|
||||
.label = Show All
|
||||
window-menu =
|
||||
.label = Window
|
||||
bring-all-to-front =
|
||||
.label = Bring All to Front
|
||||
help-menu =
|
||||
.label = Help
|
||||
.accesskey = H
|
||||
product-help2 =
|
||||
.label = { -brand-shorter-name } Help
|
||||
.accesskey = H
|
||||
help-show-tour2 =
|
||||
.label = { -brand-shorter-name } Tour
|
||||
.accesskey = o
|
||||
help-keyboard-shortcuts =
|
||||
.label = Keyboard Shortcuts
|
||||
.accesskey = K
|
||||
help-troubleshooting-info =
|
||||
.accesskey = T
|
||||
.label = Troubleshooting Information
|
||||
help-feedback-page =
|
||||
.accesskey = S
|
||||
.label = Submit Feedback…
|
||||
help-safe-mode =
|
||||
.accesskey = R
|
||||
.label = Restart with Add-ons Disabled…
|
||||
.stopaccesskey = R
|
||||
.stoplabel = Restart with Add-ons Enabled
|
||||
report-deceptive-site-menu =
|
||||
.label = Report Deceptive Site…
|
||||
.accesskey = D
|
||||
safeb =
|
||||
.label = This isn’t a deceptive site…
|
||||
.accesskey = d
|
||||
about-product2 =
|
||||
.accesskey = A
|
||||
.label = About { -brand-shorter-name }
|
||||
|
||||
# browser/locales/en-US/browser/toolbar.ftl
|
||||
|
||||
urlbar-textbox =
|
||||
.placeholder = Search or enter address
|
||||
.accesskey = d
|
||||
|
||||
|
||||
## Toolbar items
|
||||
|
||||
view-bookmarks-broadcaster =
|
||||
.label = Bookmarks
|
||||
view-bookmarks-key =
|
||||
.key = b
|
||||
view-bookmarks-key-win =
|
||||
.key = i
|
||||
|
||||
view-history-broadcaster =
|
||||
.label = History
|
||||
view-history-key =
|
||||
.key = h
|
||||
view-tabs-broadcaster =
|
||||
.label = Synced Tabs
|
||||
|
||||
|
||||
# browser/branding/official/locales/en-US/brand.ftl
|
||||
|
||||
-brand-shorter-name = Firefox
|
||||
-brand-short-name = Firefox
|
||||
-brand-full-name = Mozilla Firefox
|
||||
-vendor-short-name = Mozilla
|
||||
|
||||
trademark-info =
|
||||
Firefox and the Firefox logos are trademarks of the Mozilla Foundation.
|
||||
|
||||
-sync-brand-short-name = Sync
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,102 +0,0 @@
|
|||
# Artificial testcase with 100 simple Fluent Messages
|
||||
|
||||
key0 = Value 0
|
||||
key1 = Value 1
|
||||
key2 = Value 2
|
||||
key3 = Value 3
|
||||
key4 = Value 4
|
||||
key5 = Value 5
|
||||
key6 = Value 6
|
||||
key7 = Value 7
|
||||
key8 = Value 8
|
||||
key9 = Value 9
|
||||
key10 = Value 10
|
||||
key11 = Value 11
|
||||
key12 = Value 12
|
||||
key13 = Value 13
|
||||
key14 = Value 14
|
||||
key15 = Value 15
|
||||
key16 = Value 16
|
||||
key17 = Value 17
|
||||
key18 = Value 18
|
||||
key19 = Value 19
|
||||
key20 = Value 20
|
||||
key21 = Value 21
|
||||
key22 = Value 22
|
||||
key23 = Value 23
|
||||
key24 = Value 24
|
||||
key25 = Value 25
|
||||
key26 = Value 26
|
||||
key27 = Value 27
|
||||
key28 = Value 28
|
||||
key29 = Value 29
|
||||
key30 = Value 30
|
||||
key31 = Value 31
|
||||
key32 = Value 32
|
||||
key33 = Value 33
|
||||
key34 = Value 34
|
||||
key35 = Value 35
|
||||
key36 = Value 36
|
||||
key37 = Value 37
|
||||
key38 = Value 38
|
||||
key39 = Value 39
|
||||
key40 = Value 40
|
||||
key41 = Value 41
|
||||
key42 = Value 42
|
||||
key43 = Value 43
|
||||
key44 = Value 44
|
||||
key45 = Value 45
|
||||
key46 = Value 46
|
||||
key47 = Value 47
|
||||
key48 = Value 48
|
||||
key49 = Value 49
|
||||
key50 = Value 50
|
||||
key51 = Value 51
|
||||
key52 = Value 52
|
||||
key53 = Value 53
|
||||
key54 = Value 54
|
||||
key55 = Value 55
|
||||
key56 = Value 56
|
||||
key57 = Value 57
|
||||
key58 = Value 58
|
||||
key59 = Value 59
|
||||
key60 = Value 60
|
||||
key61 = Value 61
|
||||
key62 = Value 62
|
||||
key63 = Value 63
|
||||
key64 = Value 64
|
||||
key65 = Value 65
|
||||
key66 = Value 66
|
||||
key67 = Value 67
|
||||
key68 = Value 68
|
||||
key69 = Value 69
|
||||
key70 = Value 70
|
||||
key71 = Value 71
|
||||
key72 = Value 72
|
||||
key73 = Value 73
|
||||
key74 = Value 74
|
||||
key75 = Value 75
|
||||
key76 = Value 76
|
||||
key77 = Value 77
|
||||
key78 = Value 78
|
||||
key79 = Value 79
|
||||
key80 = Value 80
|
||||
key81 = Value 81
|
||||
key82 = Value 82
|
||||
key83 = Value 83
|
||||
key84 = Value 84
|
||||
key85 = Value 85
|
||||
key86 = Value 86
|
||||
key87 = Value 87
|
||||
key88 = Value 88
|
||||
key89 = Value 89
|
||||
key90 = Value 90
|
||||
key91 = Value 91
|
||||
key92 = Value 92
|
||||
key93 = Value 93
|
||||
key94 = Value 94
|
||||
key95 = Value 95
|
||||
key96 = Value 96
|
||||
key97 = Value 97
|
||||
key98 = Value 98
|
||||
key99 = Value 99
|
|
@ -1,9 +0,0 @@
|
|||
face-with-tears-of-joy = 😂
|
||||
tetragram-for-centre = 𝌆
|
||||
|
||||
surrogates-in-text = \uD83D\uDE02
|
||||
surrogates-in-string = {"\uD83D\uDE02"}
|
||||
surrogates-in-adjacent-strings = {"\uD83D"}{"\uDE02"}
|
||||
|
||||
emoji-in-text = A face 😂 with tears of joy.
|
||||
emoji-in-string = {"A face 😂 with tears of joy."}
|
|
@ -1,145 +0,0 @@
|
|||
// This is an example of an application which uses a custom formatter
|
||||
// to format selected types of values.
|
||||
//
|
||||
// This allows users to plug their own number formatter to Fluent.
|
||||
use unic_langid::LanguageIdentifier;
|
||||
|
||||
use fluent_bundle::memoizer::MemoizerKind;
|
||||
use fluent_bundle::types::{FluentNumber, FluentNumberOptions};
|
||||
use fluent_bundle::{FluentArgs, FluentBundle, FluentResource, FluentValue};
|
||||
|
||||
fn custom_formatter<M: MemoizerKind>(num: &FluentValue, _intls: &M) -> Option<String> {
|
||||
match num {
|
||||
FluentValue::Number(n) => Some(format!("CUSTOM({})", n.value).into()),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// 1. Bootstrap a FluentBundle with a number of messages which use
|
||||
// number formatting in different forms.
|
||||
let ftl_string = String::from(
|
||||
"
|
||||
key-implicit = Here is an implicitly encoded number: { 5 }.
|
||||
key-explicit = Here is an explicitly encoded number: { NUMBER(5) }.
|
||||
key-var-implicit = Here is an implicitly encoded variable: { $num }.
|
||||
key-var-explicit = Here is an explicitly encoded variable: { NUMBER($num) }.
|
||||
key-var-with-arg = Here is a variable formatted with an argument { NUMBER($num, minimumFractionDigits: 5) }.
|
||||
",
|
||||
);
|
||||
let res = FluentResource::try_new(ftl_string).expect("Could not parse an FTL string.");
|
||||
|
||||
let lang: LanguageIdentifier = "en".parse().unwrap();
|
||||
let mut bundle = FluentBundle::new(&[lang]);
|
||||
bundle
|
||||
.add_resource(res)
|
||||
.expect("Failed to add FTL resources to the bundle.");
|
||||
bundle
|
||||
.add_function("NUMBER", |positional, named| {
|
||||
match positional.get(0) {
|
||||
Some(FluentValue::Number(n)) => {
|
||||
let mut num = n.clone();
|
||||
// This allows us to merge the arguments provided
|
||||
// as arguments to the function into the new FluentNumber.
|
||||
num.options.merge(named);
|
||||
FluentValue::Number(num)
|
||||
}
|
||||
_ => FluentValue::None,
|
||||
}
|
||||
})
|
||||
.expect("Failed to add a function.");
|
||||
bundle.set_use_isolating(false);
|
||||
|
||||
let mut errors = vec![];
|
||||
|
||||
// 2. First, we're going to format the number using the implicit formatter.
|
||||
// At the moment the number will be formatted in a very dummy way, since
|
||||
// we do not have a locale aware number formatter available yet.
|
||||
let msg = bundle
|
||||
.get_message("key-implicit")
|
||||
.expect("Message doesn't exist.");
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, None, &mut errors);
|
||||
assert_eq!(value, "Here is an implicitly encoded number: 5.");
|
||||
println!("{}", value);
|
||||
|
||||
// 3. Next, we're going to plug our custom formatter.
|
||||
bundle.set_formatter(Some(custom_formatter));
|
||||
|
||||
// 4. Now, when you attempt to format a number, the custom formatter
|
||||
// will be used instead of the default one.
|
||||
let msg = bundle
|
||||
.get_message("key-implicit")
|
||||
.expect("Message doesn't exist.");
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, None, &mut errors);
|
||||
assert_eq!(value, "Here is an implicitly encoded number: CUSTOM(5).");
|
||||
println!("{}", value);
|
||||
|
||||
// 5. The same custom formatter will be used for explicitly formatter numbers,
|
||||
// and variables of type number.
|
||||
let msg = bundle
|
||||
.get_message("key-explicit")
|
||||
.expect("Message doesn't exist.");
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, None, &mut errors);
|
||||
assert_eq!(value, "Here is an explicitly encoded number: CUSTOM(5).");
|
||||
println!("{}", value);
|
||||
|
||||
let msg = bundle
|
||||
.get_message("key-var-implicit")
|
||||
.expect("Message doesn't exist.");
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let mut args = FluentArgs::new();
|
||||
args.insert("num", FluentValue::from(-15));
|
||||
let value = bundle.format_pattern(&pattern, Some(&args), &mut errors);
|
||||
assert_eq!(
|
||||
value,
|
||||
"Here is an implicitly encoded variable: CUSTOM(-15)."
|
||||
);
|
||||
println!("{}", value);
|
||||
|
||||
let msg = bundle
|
||||
.get_message("key-var-explicit")
|
||||
.expect("Message doesn't exist.");
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let mut args = FluentArgs::new();
|
||||
args.insert("num", FluentValue::from(-15));
|
||||
let value = bundle.format_pattern(&pattern, Some(&args), &mut errors);
|
||||
assert_eq!(
|
||||
value,
|
||||
"Here is an explicitly encoded variable: CUSTOM(-15)."
|
||||
);
|
||||
println!("{}", value);
|
||||
|
||||
// 6. The merging operation on FluentNumber options allows the
|
||||
// options provided from the localizer to be merged into the
|
||||
// default ones and ones provided by the developer.
|
||||
let msg = bundle
|
||||
.get_message("key-var-explicit")
|
||||
.expect("Message doesn't exist.");
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let mut args = FluentArgs::new();
|
||||
let num = FluentNumber::new(
|
||||
25.2,
|
||||
FluentNumberOptions {
|
||||
maximum_fraction_digits: Some(8),
|
||||
minimum_fraction_digits: Some(1),
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
args.insert("num", num.into());
|
||||
let value = bundle.format_pattern(&pattern, Some(&args), &mut errors);
|
||||
|
||||
// Notice, that since we specificed minimum and maximum fraction digits options
|
||||
// to be 1 and 8 when construction the argument, and then the minimum fraction
|
||||
// digits option has been overridden in the localization the formatter
|
||||
// will received options:
|
||||
// - minimum_fraction_digits: Some(5)
|
||||
// - maximum_fraction_digits: Some(8)
|
||||
assert_eq!(
|
||||
value,
|
||||
"Here is an explicitly encoded variable: CUSTOM(25.2)."
|
||||
);
|
||||
println!("{}", value);
|
||||
}
|
|
@ -1,190 +0,0 @@
|
|||
// This is an example of an application which adds a custom type of value,
|
||||
// and a function to format it.
|
||||
//
|
||||
// In this example we're going to add a new type - DateTime.
|
||||
//
|
||||
// We're also going to add a built-in function DATETIME to produce that type
|
||||
// out of a number argument (epoch).
|
||||
//
|
||||
// Lastly, we'll also create a new formatter which will be memoizable.
|
||||
//
|
||||
// The type and its options are modelled after ECMA402 Intl.DateTimeFormat.
|
||||
use intl_memoizer::Memoizable;
|
||||
use unic_langid::LanguageIdentifier;
|
||||
|
||||
use fluent_bundle::types::FluentType;
|
||||
use fluent_bundle::{FluentArgs, FluentBundle, FluentResource, FluentValue};
|
||||
|
||||
// First we're going to define what options our new type is going to accept.
|
||||
// For the sake of the example, we're only going to allow two options:
|
||||
// - dateStyle
|
||||
// - timeStyle
|
||||
//
|
||||
// with an enum of allowed values.
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Hash)]
|
||||
enum DateTimeStyleValue {
|
||||
Full,
|
||||
Long,
|
||||
Medium,
|
||||
Short,
|
||||
None,
|
||||
}
|
||||
|
||||
impl std::default::Default for DateTimeStyleValue {
|
||||
fn default() -> Self {
|
||||
Self::None
|
||||
}
|
||||
}
|
||||
|
||||
// This is just a helper to make it easier to convert
|
||||
// a value provided to FluentArgs into an option value.
|
||||
impl<'l> From<&FluentValue<'l>> for DateTimeStyleValue {
|
||||
fn from(input: &FluentValue) -> Self {
|
||||
if let FluentValue::String(s) = input {
|
||||
match s.as_ref() {
|
||||
"full" => Self::Full,
|
||||
"long" => Self::Long,
|
||||
"medium" => Self::Medium,
|
||||
"short" => Self::Short,
|
||||
_ => Self::None,
|
||||
}
|
||||
} else {
|
||||
Self::None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Default, Clone, Hash)]
|
||||
struct DateTimeOptions {
|
||||
pub date_style: DateTimeStyleValue,
|
||||
pub time_style: DateTimeStyleValue,
|
||||
}
|
||||
|
||||
impl DateTimeOptions {
|
||||
// The merge function is going to be used by the Fluent Function
|
||||
// to merge localizer provided options into defaults of values
|
||||
// provided by the developer.
|
||||
//
|
||||
// If you want to limit which options the localizer can override,
|
||||
// here's the right place to do it.
|
||||
pub fn merge(&mut self, input: &FluentArgs) {
|
||||
for (key, value) in input {
|
||||
match *key {
|
||||
"dateStyle" => self.date_style = value.into(),
|
||||
"timeStyle" => self.time_style = value.into(),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'l> From<&FluentArgs<'l>> for DateTimeOptions {
|
||||
fn from(input: &FluentArgs) -> Self {
|
||||
let mut opts = Self::default();
|
||||
opts.merge(input);
|
||||
opts
|
||||
}
|
||||
}
|
||||
|
||||
// Our new custom type will store a value as an epoch number,
|
||||
// and the options.
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
struct DateTime {
|
||||
epoch: usize,
|
||||
options: DateTimeOptions,
|
||||
}
|
||||
|
||||
impl DateTime {
|
||||
pub fn new(epoch: usize, options: DateTimeOptions) -> Self {
|
||||
Self { epoch, options }
|
||||
}
|
||||
}
|
||||
|
||||
impl FluentType for DateTime {
|
||||
fn duplicate(&self) -> Box<dyn FluentType> {
|
||||
Box::new(DateTime::new(self.epoch, DateTimeOptions::default()))
|
||||
}
|
||||
fn as_string(&self, intls: &intl_memoizer::IntlLangMemoizer) -> std::borrow::Cow<'static, str> {
|
||||
intls
|
||||
.with_try_get::<DateTimeFormatter, _, _>((self.options.clone(),), |dtf| {
|
||||
dtf.format(self.epoch).into()
|
||||
})
|
||||
.expect("Failed to format a date.")
|
||||
}
|
||||
fn as_string_threadsafe(
|
||||
&self,
|
||||
_: &intl_memoizer::concurrent::IntlLangMemoizer,
|
||||
) -> std::borrow::Cow<'static, str> {
|
||||
format!("2020-01-20 {}:00", self.epoch).into()
|
||||
}
|
||||
}
|
||||
|
||||
/// Formatter
|
||||
|
||||
struct DateTimeFormatter {
|
||||
lang: LanguageIdentifier,
|
||||
options: DateTimeOptions,
|
||||
}
|
||||
|
||||
impl DateTimeFormatter {
|
||||
pub fn new(lang: LanguageIdentifier, options: DateTimeOptions) -> Result<Self, ()> {
|
||||
Ok(Self { lang, options })
|
||||
}
|
||||
|
||||
pub fn format(&self, epoch: usize) -> String {
|
||||
format!(
|
||||
"My Custom Formatted Date from epoch: {}, in locale: {}, using options: {:#?}",
|
||||
epoch, self.lang, self.options
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl Memoizable for DateTimeFormatter {
|
||||
type Args = (DateTimeOptions,);
|
||||
type Error = ();
|
||||
fn construct(lang: LanguageIdentifier, args: Self::Args) -> Result<Self, Self::Error> {
|
||||
Self::new(lang, args.0)
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// 1. Bootstrap a FluentBundle with a number of messages which use
|
||||
// number formatting in different forms.
|
||||
let ftl_string = String::from(
|
||||
r#"
|
||||
key-date = Today is { DATETIME($epoch, dateStyle: "long", timeStyle: "short") }
|
||||
"#,
|
||||
);
|
||||
let res = FluentResource::try_new(ftl_string).expect("Could not parse an FTL string.");
|
||||
|
||||
let lang: LanguageIdentifier = "en".parse().unwrap();
|
||||
let mut bundle = FluentBundle::new(&[lang]);
|
||||
bundle
|
||||
.add_resource(res)
|
||||
.expect("Failed to add FTL resources to the bundle.");
|
||||
|
||||
bundle
|
||||
.add_function("DATETIME", |positional, named| match positional.get(0) {
|
||||
Some(FluentValue::Number(n)) => {
|
||||
let epoch = n.value as usize;
|
||||
let options = named.into();
|
||||
FluentValue::Custom(Box::new(DateTime::new(epoch, options)))
|
||||
}
|
||||
_ => FluentValue::None,
|
||||
})
|
||||
.expect("Failed to add a function.");
|
||||
bundle.set_use_isolating(false);
|
||||
|
||||
let msg = bundle
|
||||
.get_message("key-date")
|
||||
.expect("Failed to retrieve the message.");
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let mut errors = vec![];
|
||||
|
||||
let mut args = FluentArgs::new();
|
||||
let epoch: u64 = 1580127760093;
|
||||
args.insert("epoch", epoch.into());
|
||||
let value = bundle.format_pattern(pattern, Some(&args), &mut errors);
|
||||
println!("{}", value);
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
use fluent_bundle::{FluentArgs, FluentBundle, FluentResource, FluentValue};
|
||||
use unic_langid::langid;
|
||||
|
||||
fn main() {
|
||||
let ftl_string = String::from(
|
||||
"
|
||||
hello-world = Hello { $name }
|
||||
ref = The previous message says { hello-world }
|
||||
unread-emails =
|
||||
{ $emailCount ->
|
||||
[one] You have { $emailCount } unread email
|
||||
*[other] You have { $emailCount } unread emails
|
||||
}
|
||||
",
|
||||
);
|
||||
let res = FluentResource::try_new(ftl_string).expect("Could not parse an FTL string.");
|
||||
let langid_en = langid!("en");
|
||||
let mut bundle = FluentBundle::new(&[langid_en]);
|
||||
bundle
|
||||
.add_resource(res)
|
||||
.expect("Failed to add FTL resources to the bundle.");
|
||||
|
||||
let mut args = FluentArgs::new();
|
||||
args.insert("name", FluentValue::from("John"));
|
||||
|
||||
let msg = bundle
|
||||
.get_message("hello-world")
|
||||
.expect("Message doesn't exist.");
|
||||
let mut errors = vec![];
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, Some(&args), &mut errors);
|
||||
println!("{}", value);
|
||||
|
||||
let msg = bundle.get_message("ref").expect("Message doesn't exist.");
|
||||
let mut errors = vec![];
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, Some(&args), &mut errors);
|
||||
println!("{}", value);
|
||||
|
||||
let mut args = FluentArgs::new();
|
||||
args.insert("emailCount", 1.into());
|
||||
|
||||
let msg = bundle
|
||||
.get_message("unread-emails")
|
||||
.expect("Message doesn't exist.");
|
||||
let mut errors = vec![];
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, Some(&args), &mut errors);
|
||||
println!("{}", value);
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
use fluent_bundle::{FluentBundle, FluentResource, FluentValue};
|
||||
use unic_langid::langid;
|
||||
|
||||
fn main() {
|
||||
// We define the resources here so that they outlive
|
||||
// the bundle.
|
||||
let ftl_string1 = String::from("hello-world = Hey there! { HELLO() }");
|
||||
let ftl_string2 = String::from("meaning-of-life = { MEANING_OF_LIFE(42) }");
|
||||
let ftl_string3 = String::from("all-your-base = { BASE_OWNERSHIP(hello, ownership: \"us\") }");
|
||||
let res1 = FluentResource::try_new(ftl_string1).expect("Could not parse an FTL string.");
|
||||
let res2 = FluentResource::try_new(ftl_string2).expect("Could not parse an FTL string.");
|
||||
let res3 = FluentResource::try_new(ftl_string3).expect("Could not parse an FTL string.");
|
||||
|
||||
let langid_en_us = langid!("en-US");
|
||||
let mut bundle = FluentBundle::new(&[langid_en_us]);
|
||||
|
||||
// Test for a simple function that returns a string
|
||||
bundle
|
||||
.add_function("HELLO", |_args, _named_args| {
|
||||
return "I'm a function!".into();
|
||||
})
|
||||
.expect("Failed to add a function to the bundle.");
|
||||
|
||||
// Test for a function that accepts unnamed positional arguments
|
||||
bundle
|
||||
.add_function("MEANING_OF_LIFE", |args, _named_args| {
|
||||
if let Some(arg0) = args.get(0) {
|
||||
if *arg0 == 42.into() {
|
||||
return "The answer to life, the universe, and everything".into();
|
||||
}
|
||||
}
|
||||
|
||||
FluentValue::None
|
||||
})
|
||||
.expect("Failed to add a function to the bundle.");
|
||||
|
||||
// Test for a function that accepts named arguments
|
||||
bundle
|
||||
.add_function("BASE_OWNERSHIP", |_args, named_args| {
|
||||
return match named_args.get("ownership") {
|
||||
Some(FluentValue::String(ref string)) => {
|
||||
format!("All your base belong to {}", string).into()
|
||||
}
|
||||
_ => FluentValue::None,
|
||||
};
|
||||
})
|
||||
.expect("Failed to add a function to the bundle.");
|
||||
|
||||
bundle
|
||||
.add_resource(res1)
|
||||
.expect("Failed to add FTL resources to the bundle.");
|
||||
bundle
|
||||
.add_resource(res2)
|
||||
.expect("Failed to add FTL resources to the bundle.");
|
||||
bundle
|
||||
.add_resource(res3)
|
||||
.expect("Failed to add FTL resources to the bundle.");
|
||||
|
||||
let msg = bundle
|
||||
.get_message("hello-world")
|
||||
.expect("Message doesn't exist.");
|
||||
let mut errors = vec![];
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, None, &mut errors);
|
||||
assert_eq!(&value, "Hey there! \u{2068}I'm a function!\u{2069}");
|
||||
|
||||
let msg = bundle
|
||||
.get_message("meaning-of-life")
|
||||
.expect("Message doesn't exist.");
|
||||
let mut errors = vec![];
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, None, &mut errors);
|
||||
assert_eq!(&value, "The answer to life, the universe, and everything");
|
||||
|
||||
let msg = bundle
|
||||
.get_message("all-your-base")
|
||||
.expect("Message doesn't exist.");
|
||||
let mut errors = vec![];
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, None, &mut errors);
|
||||
assert_eq!(&value, "All your base belong to us");
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
use fluent_bundle::{FluentBundle, FluentResource};
|
||||
|
||||
fn main() {
|
||||
let ftl_string = String::from("hello-world = Hello, world!");
|
||||
let res = FluentResource::try_new(ftl_string).expect("Could not parse an FTL string.");
|
||||
let mut bundle = FluentBundle::default();
|
||||
bundle
|
||||
.add_resource(&res)
|
||||
.expect("Failed to add FTL resources to the bundle.");
|
||||
|
||||
let msg = bundle
|
||||
.get_message("hello-world")
|
||||
.expect("Message doesn't exist.");
|
||||
let mut errors = vec![];
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, None, &mut errors);
|
||||
assert_eq!(&value, "Hello, world!");
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
use fluent_bundle::{FluentBundle, FluentResource};
|
||||
|
||||
fn main() {
|
||||
let ftl_string = String::from(
|
||||
"
|
||||
foo = Foo
|
||||
foobar = { foo } Bar
|
||||
bazbar = { baz } Bar
|
||||
",
|
||||
);
|
||||
let res = FluentResource::try_new(ftl_string).expect("Could not parse an FTL string.");
|
||||
|
||||
let mut bundle = FluentBundle::default();
|
||||
bundle
|
||||
.add_resource(res)
|
||||
.expect("Failed to add FTL resources to the bundle.");
|
||||
|
||||
let msg = bundle
|
||||
.get_message("foobar")
|
||||
.expect("Message doesn't exist.");
|
||||
let mut errors = vec![];
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, None, &mut errors);
|
||||
println!("{}", value);
|
||||
|
||||
let msg = bundle
|
||||
.get_message("bazbar")
|
||||
.expect("Message doesn't exist.");
|
||||
let mut errors = vec![];
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, None, &mut errors);
|
||||
println!("{}", value);
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
missing-arg-error = Error: Please provide a number as argument.
|
||||
input-parse-error = Error: Could not parse input `{ $input }`. Reason: { $reason }
|
||||
response-msg =
|
||||
{ $value ->
|
||||
[one] "{ $input }" has one Collatz step.
|
||||
*[other] "{ $input }" has { $value } Collatz steps.
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
missing-arg-error = Erreur : veuillez saisir un nombre en paramètre.
|
||||
input-parse-error = Erreur : impossible d'interpréter le paramètre `{ $input }`. Raison : { $reason }
|
||||
response-msg =
|
||||
{ $value ->
|
||||
[one] La suite de Syracuse du nombre "{ $input }" comporte une valeur.
|
||||
*[other] La suite de Syracuse du nombre "{ $input }" comporte { $value } valeurs.
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
missing-arg-error = Błąd: Proszę wprowadzić liczbę jako argument.
|
||||
input-parse-error = Błąd: Nie udało się sparsować `{ $input }`. Powód: { $reason }
|
||||
response-msg =
|
||||
{ $value ->
|
||||
[one] "{ $input }" ma jeden krok Collatza.
|
||||
[few] "{ $input }" ma { $value } kroki Collatza.
|
||||
*[many] "{ $input }" ma { $value } kroków Collatza.
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
use fluent_bundle::{FluentArgs, FluentBundle, FluentResource, FluentValue};
|
||||
|
||||
fn main() {
|
||||
let ftl_string = String::from(
|
||||
"
|
||||
hello-world = Hello { $missing ->
|
||||
*[one] World
|
||||
[two] Moon
|
||||
}
|
||||
|
||||
hello-world2 = Hello { $name ->
|
||||
*[world] World
|
||||
[moon] Moon
|
||||
}
|
||||
",
|
||||
);
|
||||
let res = FluentResource::try_new(ftl_string).expect("Could not parse an FTL string.");
|
||||
let mut bundle = FluentBundle::default();
|
||||
bundle
|
||||
.add_resource(res)
|
||||
.expect("Failed to add FTL resources to the bundle.");
|
||||
|
||||
let msg = bundle
|
||||
.get_message("hello-world")
|
||||
.expect("Message doesn't exist.");
|
||||
let mut errors = vec![];
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, None, &mut errors);
|
||||
println!("{}", value);
|
||||
|
||||
let mut args = FluentArgs::new();
|
||||
args.insert("name", FluentValue::from("moon"));
|
||||
|
||||
let msg = bundle
|
||||
.get_message("hello-world2")
|
||||
.expect("Message doesn't exist.");
|
||||
let mut errors = vec![];
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, Some(&args), &mut errors);
|
||||
println!("{}", value);
|
||||
}
|
|
@ -1,179 +0,0 @@
|
|||
//! This is an example of a simple application
|
||||
//! which calculates the Collatz conjecture.
|
||||
//!
|
||||
//! The function itself is trivial on purpose,
|
||||
//! so that we can focus on understanding how
|
||||
//! the application can be made localizable
|
||||
//! via Fluent.
|
||||
//!
|
||||
//! To try the app launch `cargo run --example simple-app NUM (LOCALES)`
|
||||
//!
|
||||
//! NUM is a number to be calculated, and LOCALES is an optional
|
||||
//! parameter with a comma-separated list of locales requested by the user.
|
||||
//!
|
||||
//! Example:
|
||||
//!
|
||||
//! cargo run --example simple-app 123 de,pl
|
||||
//!
|
||||
//! If the second argument is omitted, `en-US` locale is used as the
|
||||
//! default one.
|
||||
use fluent_bundle::{FluentArgs, FluentBundle, FluentResource, FluentValue};
|
||||
use fluent_langneg::{negotiate_languages, NegotiationStrategy};
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::fs::File;
|
||||
use std::io;
|
||||
use std::io::prelude::*;
|
||||
use std::path::Path;
|
||||
use std::str::FromStr;
|
||||
use unic_langid::{langid, LanguageIdentifier};
|
||||
|
||||
/// We need a generic file read helper function to
|
||||
/// read the localization resource file.
|
||||
///
|
||||
/// The resource files are stored in
|
||||
/// `./examples/resources/{locale}` directory.
|
||||
fn read_file(path: &Path) -> Result<String, io::Error> {
|
||||
let mut f = File::open(path)?;
|
||||
let mut s = String::new();
|
||||
f.read_to_string(&mut s)?;
|
||||
Ok(s)
|
||||
}
|
||||
|
||||
/// This helper function allows us to read the list
|
||||
/// of available locales by reading the list of
|
||||
/// directories in `./examples/resources`.
|
||||
///
|
||||
/// It is expected that every directory inside it
|
||||
/// has a name that is a valid BCP47 language tag.
|
||||
fn get_available_locales() -> Result<Vec<LanguageIdentifier>, io::Error> {
|
||||
let mut locales = vec![];
|
||||
|
||||
let mut dir = env::current_dir()?;
|
||||
if dir.to_string_lossy().ends_with("fluent-rs") {
|
||||
dir.push("fluent-bundle");
|
||||
}
|
||||
dir.push("examples");
|
||||
dir.push("resources");
|
||||
let res_dir = fs::read_dir(dir)?;
|
||||
for entry in res_dir {
|
||||
if let Ok(entry) = entry {
|
||||
let path = entry.path();
|
||||
if path.is_dir() {
|
||||
if let Some(name) = path.file_name() {
|
||||
if let Some(name) = name.to_str() {
|
||||
let langid = name.parse().expect("Parsing failed.");
|
||||
locales.push(langid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Ok(locales);
|
||||
}
|
||||
|
||||
static L10N_RESOURCES: &[&str] = &["simple.ftl"];
|
||||
|
||||
fn main() {
|
||||
// 1. Get the command line arguments.
|
||||
let args: Vec<String> = env::args().collect();
|
||||
|
||||
// 3. If the argument length is more than 1,
|
||||
// take the second argument as a comma-separated
|
||||
// list of requested locales.
|
||||
let requested = args.get(2).map_or(vec![], |arg| {
|
||||
arg.split(",")
|
||||
.map(|s| -> LanguageIdentifier { s.parse().expect("Parsing locale failed.") })
|
||||
.collect()
|
||||
});
|
||||
|
||||
// 4. Negotiate it against the available ones
|
||||
let default_locale = langid!("en-US");
|
||||
let available = get_available_locales().expect("Retrieving available locales failed.");
|
||||
let resolved_locales = negotiate_languages(
|
||||
&requested,
|
||||
&available,
|
||||
Some(&default_locale),
|
||||
NegotiationStrategy::Filtering,
|
||||
);
|
||||
let current_locale = resolved_locales
|
||||
.get(0)
|
||||
.expect("At least one locale should match.");
|
||||
|
||||
// 5. Create a new Fluent FluentBundle using the
|
||||
// resolved locales.
|
||||
let mut bundle = FluentBundle::new(resolved_locales.clone());
|
||||
|
||||
// 6. Load the localization resource
|
||||
for path in L10N_RESOURCES {
|
||||
let mut full_path = env::current_dir().expect("Failed to retireve current dir.");
|
||||
if full_path.to_string_lossy().ends_with("fluent-rs") {
|
||||
full_path.push("fluent-bundle");
|
||||
}
|
||||
full_path.push("examples");
|
||||
full_path.push("resources");
|
||||
full_path.push(current_locale.to_string());
|
||||
full_path.push(path);
|
||||
let source = read_file(&full_path).expect("Failed to read file.");
|
||||
let resource = FluentResource::try_new(source).expect("Could not parse an FTL string.");
|
||||
bundle
|
||||
.add_resource(resource)
|
||||
.expect("Failed to add FTL resources to the bundle.");
|
||||
}
|
||||
|
||||
// 7. Check if the input is provided.
|
||||
match args.get(1) {
|
||||
Some(input) => {
|
||||
// 7.1. Cast it to a number.
|
||||
match isize::from_str(&input) {
|
||||
Ok(i) => {
|
||||
// 7.2. Construct a map of arguments
|
||||
// to format the message.
|
||||
let mut args = FluentArgs::new();
|
||||
args.insert("input", FluentValue::from(i));
|
||||
args.insert("value", FluentValue::from(collatz(i)));
|
||||
// 7.3. Format the message.
|
||||
let mut errors = vec![];
|
||||
let msg = bundle
|
||||
.get_message("response-msg")
|
||||
.expect("Message doesn't exist.");
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, Some(&args), &mut errors);
|
||||
println!("{}", value);
|
||||
}
|
||||
Err(err) => {
|
||||
let mut args = FluentArgs::new();
|
||||
args.insert("input", FluentValue::from(input.as_str()));
|
||||
args.insert("reason", FluentValue::from(err.to_string()));
|
||||
let mut errors = vec![];
|
||||
let msg = bundle
|
||||
.get_message("input-parse-error")
|
||||
.expect("Message doesn't exist.");
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, Some(&args), &mut errors);
|
||||
println!("{}", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
None => {
|
||||
let mut errors = vec![];
|
||||
let msg = bundle
|
||||
.get_message("missing-arg-error")
|
||||
.expect("Message doesn't exist.");
|
||||
let pattern = msg.value.expect("Message has no value.");
|
||||
let value = bundle.format_pattern(&pattern, None, &mut errors);
|
||||
println!("{}", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Collatz conjecture calculating function.
|
||||
fn collatz(n: isize) -> isize {
|
||||
match n {
|
||||
1 => 0,
|
||||
_ => match n % 2 {
|
||||
0 => 1 + collatz(n / 2),
|
||||
_ => 1 + collatz(n * 3 + 1),
|
||||
},
|
||||
}
|
||||
}
|
|
@ -107,7 +107,7 @@ impl<'source> From<&ast::InlineExpression<'source>> for DisplayableNode<'source>
|
|||
}
|
||||
|
||||
pub trait FluentType: fmt::Debug + AnyEq + 'static {
|
||||
fn duplicate(&self) -> Box<dyn FluentType>;
|
||||
fn duplicate(&self) -> Box<dyn FluentType + Send>;
|
||||
fn as_string(&self, intls: &intl_memoizer::IntlLangMemoizer) -> Cow<'static, str>;
|
||||
fn as_string_threadsafe(
|
||||
&self,
|
||||
|
@ -115,7 +115,7 @@ pub trait FluentType: fmt::Debug + AnyEq + 'static {
|
|||
) -> Cow<'static, str>;
|
||||
}
|
||||
|
||||
impl PartialEq for dyn FluentType {
|
||||
impl PartialEq for dyn FluentType + Send {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.equals(other.as_any())
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ impl<T: Any + PartialEq> AnyEq for T {
|
|||
pub enum FluentValue<'source> {
|
||||
String(Cow<'source, str>),
|
||||
Number(FluentNumber),
|
||||
Custom(Box<dyn FluentType>),
|
||||
Custom(Box<dyn FluentType + Send>),
|
||||
Error(DisplayableNode<'source>),
|
||||
None,
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ impl<'s> Clone for FluentValue<'s> {
|
|||
FluentValue::String(s) => FluentValue::String(s.clone()),
|
||||
FluentValue::Number(s) => FluentValue::Number(s.clone()),
|
||||
FluentValue::Custom(s) => {
|
||||
let new_value: Box<dyn FluentType> = s.duplicate();
|
||||
let new_value: Box<dyn FluentType + Send> = s.duplicate();
|
||||
FluentValue::Custom(new_value)
|
||||
}
|
||||
FluentValue::Error(e) => FluentValue::Error(e.clone()),
|
||||
|
|
|
@ -222,7 +222,7 @@ impl From<&FluentNumber> for PluralOperands {
|
|||
.expect("Failed to generate operands out of FluentNumber");
|
||||
if let Some(mfd) = input.options.minimum_fraction_digits {
|
||||
if mfd > operands.v {
|
||||
operands.f *= 10_usize.pow(mfd as u32 - operands.v as u32);
|
||||
operands.f *= 10_u64.pow(mfd as u32 - operands.v as u32);
|
||||
operands.v = mfd;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
use fluent_bundle::{FluentBundle, FluentResource};
|
||||
use unic_langid::LanguageIdentifier;
|
||||
|
||||
#[test]
|
||||
fn add_resource_override() {
|
||||
let res = FluentResource::try_new("key = Value".to_string()).unwrap();
|
||||
let res2 = FluentResource::try_new("key = Value 2".to_string()).unwrap();
|
||||
|
||||
let en_us: LanguageIdentifier = "en-US"
|
||||
.parse()
|
||||
.expect("Failed to parse a language identifier");
|
||||
let mut bundle = FluentBundle::<&FluentResource>::new(&[en_us]);
|
||||
|
||||
bundle.add_resource(&res).expect("Failed to add a resource");
|
||||
|
||||
assert!(bundle.add_resource(&res2).is_err());
|
||||
|
||||
let mut errors = vec![];
|
||||
|
||||
let value = bundle
|
||||
.get_message("key")
|
||||
.expect("Failed to retireve a message")
|
||||
.value
|
||||
.expect("Failed to retireve a value of a message");
|
||||
assert_eq!(bundle.format_pattern(value, None, &mut errors), "Value");
|
||||
|
||||
bundle.add_resource_overriding(&res2);
|
||||
|
||||
let value = bundle
|
||||
.get_message("key")
|
||||
.expect("Failed to retireve a message")
|
||||
.value
|
||||
.expect("Failed to retireve a value of a message");
|
||||
assert_eq!(bundle.format_pattern(value, None, &mut errors), "Value 2");
|
||||
|
||||
assert!(errors.is_empty());
|
||||
}
|
|
@ -1,230 +0,0 @@
|
|||
use fluent_bundle::memoizer::MemoizerKind;
|
||||
use fluent_bundle::types::FluentType;
|
||||
use fluent_bundle::FluentArgs;
|
||||
use fluent_bundle::FluentBundle;
|
||||
use fluent_bundle::FluentResource;
|
||||
use fluent_bundle::FluentValue;
|
||||
use unic_langid::langid;
|
||||
|
||||
#[test]
|
||||
fn fluent_custom_type() {
|
||||
#[derive(Debug, PartialEq)]
|
||||
struct DateTime {
|
||||
epoch: usize,
|
||||
};
|
||||
|
||||
impl DateTime {
|
||||
pub fn new(epoch: usize) -> Self {
|
||||
Self { epoch }
|
||||
}
|
||||
}
|
||||
|
||||
impl FluentType for DateTime {
|
||||
fn duplicate(&self) -> Box<dyn FluentType> {
|
||||
Box::new(DateTime { epoch: self.epoch })
|
||||
}
|
||||
fn as_string(&self, _: &intl_memoizer::IntlLangMemoizer) -> std::borrow::Cow<'static, str> {
|
||||
format!("{}", self.epoch).into()
|
||||
}
|
||||
fn as_string_threadsafe(
|
||||
&self,
|
||||
_: &intl_memoizer::concurrent::IntlLangMemoizer,
|
||||
) -> std::borrow::Cow<'static, str> {
|
||||
format!("{}", self.epoch).into()
|
||||
}
|
||||
}
|
||||
|
||||
let dt = FluentValue::Custom(Box::new(DateTime::new(10)));
|
||||
let dt2 = FluentValue::Custom(Box::new(DateTime::new(10)));
|
||||
let dt3 = FluentValue::Custom(Box::new(DateTime::new(15)));
|
||||
|
||||
let sv = FluentValue::from("foo");
|
||||
|
||||
assert_eq!(dt == dt2, true);
|
||||
assert_eq!(dt == dt3, false);
|
||||
assert_eq!(dt == sv, false);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fluent_date_time_builtin() {
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
enum DateTimeStyleValue {
|
||||
Full,
|
||||
Long,
|
||||
Medium,
|
||||
Short,
|
||||
None,
|
||||
}
|
||||
|
||||
impl std::default::Default for DateTimeStyleValue {
|
||||
fn default() -> Self {
|
||||
Self::None
|
||||
}
|
||||
}
|
||||
|
||||
impl<'l> From<&FluentValue<'l>> for DateTimeStyleValue {
|
||||
fn from(input: &FluentValue) -> Self {
|
||||
if let FluentValue::String(s) = input {
|
||||
match s.as_ref() {
|
||||
"full" => Self::Full,
|
||||
"long" => Self::Long,
|
||||
"medium" => Self::Medium,
|
||||
"short" => Self::Short,
|
||||
_ => Self::None,
|
||||
}
|
||||
} else {
|
||||
Self::None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Default, Clone)]
|
||||
struct DateTimeOptions {
|
||||
pub date_style: DateTimeStyleValue,
|
||||
pub time_style: DateTimeStyleValue,
|
||||
}
|
||||
|
||||
impl DateTimeOptions {
|
||||
pub fn merge(&mut self, input: &FluentArgs) {
|
||||
for (key, value) in input {
|
||||
match *key {
|
||||
"dateStyle" => self.date_style = value.into(),
|
||||
"timeStyle" => self.time_style = value.into(),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'l> From<&FluentArgs<'l>> for DateTimeOptions {
|
||||
fn from(input: &FluentArgs) -> Self {
|
||||
let mut opts = Self::default();
|
||||
opts.merge(input);
|
||||
opts
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
struct DateTime {
|
||||
epoch: usize,
|
||||
options: DateTimeOptions,
|
||||
};
|
||||
|
||||
impl DateTime {
|
||||
pub fn new(epoch: usize, options: DateTimeOptions) -> Self {
|
||||
Self { epoch, options }
|
||||
}
|
||||
}
|
||||
|
||||
impl FluentType for DateTime {
|
||||
fn duplicate(&self) -> Box<dyn FluentType> {
|
||||
Box::new(DateTime::new(self.epoch, DateTimeOptions::default()))
|
||||
}
|
||||
fn as_string(&self, _: &intl_memoizer::IntlLangMemoizer) -> std::borrow::Cow<'static, str> {
|
||||
format!("2020-01-20 {}:00", self.epoch).into()
|
||||
}
|
||||
fn as_string_threadsafe(
|
||||
&self,
|
||||
_intls: &intl_memoizer::concurrent::IntlLangMemoizer,
|
||||
) -> std::borrow::Cow<'static, str> {
|
||||
format!("2020-01-20 {}:00", self.epoch).into()
|
||||
}
|
||||
}
|
||||
|
||||
let lang = langid!("en");
|
||||
let mut bundle = FluentBundle::new(&[lang]);
|
||||
|
||||
let res = FluentResource::try_new(
|
||||
r#"
|
||||
key-explicit = Hello { DATETIME(12, dateStyle: "full") } World
|
||||
key-ref = Hello { DATETIME($date, dateStyle: "full") } World
|
||||
"#
|
||||
.into(),
|
||||
)
|
||||
.unwrap();
|
||||
bundle.add_resource(res).unwrap();
|
||||
bundle.set_use_isolating(false);
|
||||
|
||||
bundle
|
||||
.add_function("DATETIME", |positional, named| match positional.get(0) {
|
||||
Some(FluentValue::Custom(custom)) => {
|
||||
if let Some(that) = custom.as_ref().as_any().downcast_ref::<DateTime>() {
|
||||
let mut dt = that.clone();
|
||||
dt.options.merge(named);
|
||||
FluentValue::Custom(Box::new(dt))
|
||||
} else {
|
||||
FluentValue::None
|
||||
}
|
||||
}
|
||||
Some(FluentValue::Number(num)) => {
|
||||
let num = num.value as usize;
|
||||
FluentValue::Custom(Box::new(DateTime::new(num, named.into())))
|
||||
}
|
||||
_ => FluentValue::None,
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
let mut errors = vec![];
|
||||
let mut args = FluentArgs::new();
|
||||
args.insert(
|
||||
"date",
|
||||
FluentValue::Custom(Box::new(DateTime::new(10, DateTimeOptions::default()))),
|
||||
);
|
||||
|
||||
let msg = bundle.get_message("key-explicit").unwrap();
|
||||
let val = bundle.format_pattern(msg.value.unwrap(), Some(&args), &mut errors);
|
||||
assert_eq!(val, "Hello 2020-01-20 12:00 World");
|
||||
|
||||
let msg = bundle.get_message("key-ref").unwrap();
|
||||
let val = bundle.format_pattern(msg.value.unwrap(), Some(&args), &mut errors);
|
||||
assert_eq!(val, "Hello 2020-01-20 10:00 World");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fluent_custom_number_format() {
|
||||
fn custom_formatter<M: MemoizerKind>(num: &FluentValue, _intls: &M) -> Option<String> {
|
||||
match num {
|
||||
FluentValue::Number(_) => Some("CUSTOM".into()),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
let res = FluentResource::try_new(
|
||||
r#"
|
||||
key-num-implicit = Hello { 5.000 } World
|
||||
key-num-explicit = Hello { NUMBER(5, minimumFractionDigits: 2) } World
|
||||
"#
|
||||
.into(),
|
||||
)
|
||||
.unwrap();
|
||||
let mut bundle = FluentBundle::default();
|
||||
bundle.add_resource(res).unwrap();
|
||||
bundle.set_use_isolating(false);
|
||||
|
||||
bundle
|
||||
.add_function("NUMBER", |positional, named| match positional.get(0) {
|
||||
Some(FluentValue::Number(n)) => {
|
||||
let mut num = n.clone();
|
||||
num.options.merge(named);
|
||||
FluentValue::Number(num)
|
||||
}
|
||||
_ => FluentValue::None,
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
let mut errors = vec![];
|
||||
|
||||
let msg = bundle.get_message("key-num-explicit").unwrap();
|
||||
let val = bundle.format_pattern(msg.value.unwrap(), None, &mut errors);
|
||||
assert_eq!(val, "Hello 5.00 World");
|
||||
|
||||
let msg = bundle.get_message("key-num-implicit").unwrap();
|
||||
let val = bundle.format_pattern(msg.value.unwrap(), None, &mut errors);
|
||||
assert_eq!(val, "Hello 5.000 World");
|
||||
|
||||
bundle.set_formatter(Some(custom_formatter));
|
||||
|
||||
let msg = bundle.get_message("key-num-implicit").unwrap();
|
||||
let val = bundle.format_pattern(msg.value.unwrap(), None, &mut errors);
|
||||
assert_eq!(val, "Hello CUSTOM World");
|
||||
}
|
|
@ -1,133 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Variables
|
||||
suites:
|
||||
-
|
||||
name: in values
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo { $num }
|
||||
bar = { foo }
|
||||
baz =
|
||||
.attr = Baz Attribute { $num }
|
||||
qux = { "a" ->
|
||||
*[a] Baz Variant A { $num }
|
||||
}
|
||||
tests:
|
||||
-
|
||||
name: can be used in the message value
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
args:
|
||||
num: 3
|
||||
value: Foo 3
|
||||
-
|
||||
name: can be used in the message value which is referenced
|
||||
asserts:
|
||||
-
|
||||
id: bar
|
||||
args:
|
||||
num: 3
|
||||
value: Foo 3
|
||||
-
|
||||
name: can be used in an attribute
|
||||
asserts:
|
||||
-
|
||||
id: baz
|
||||
attribute: attr
|
||||
args:
|
||||
num: 3
|
||||
value: Baz Attribute 3
|
||||
-
|
||||
name: can be used in a variant
|
||||
asserts:
|
||||
-
|
||||
id: qux
|
||||
args:
|
||||
num: 3
|
||||
value: Baz Variant A 3
|
||||
-
|
||||
name: in selectors
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { $num ->
|
||||
*[3] Foo
|
||||
}
|
||||
tests:
|
||||
-
|
||||
name: can be used as a selector
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
args:
|
||||
num: 3
|
||||
value: Foo
|
||||
-
|
||||
name: in function calls
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { NUMBER($num) }
|
||||
bundles:
|
||||
-
|
||||
functions:
|
||||
- NUMBER
|
||||
tests:
|
||||
-
|
||||
name: can be a positional argument
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
args:
|
||||
num: 3
|
||||
value: 3
|
||||
-
|
||||
name: simple errors
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { $arg }
|
||||
tests:
|
||||
-
|
||||
name: falls back to argument's name if it's missing
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: "{$arg}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown variable: $arg"
|
||||
-
|
||||
name: and strings
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { $arg }
|
||||
tests:
|
||||
-
|
||||
name: can be a string
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
args:
|
||||
arg: Argument
|
||||
value: Argument
|
||||
-
|
||||
name: and numbers
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { $arg }
|
||||
tests:
|
||||
-
|
||||
name: can be a number
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
args:
|
||||
arg: 1
|
||||
value: 1
|
|
@ -1,178 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Attributes
|
||||
suites:
|
||||
-
|
||||
name: missing
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo
|
||||
bar = Bar
|
||||
.attr = Bar Attribute
|
||||
baz = { foo } Baz
|
||||
qux = { foo } Qux
|
||||
.attr = Qux Attribute
|
||||
ref-foo = { foo.missing }
|
||||
ref-bar = { bar.missing }
|
||||
ref-baz = { baz.missing }
|
||||
ref-qux = { qux.missing }
|
||||
tests:
|
||||
-
|
||||
name: falls back to id.attr for entities with string values and no attributes
|
||||
asserts:
|
||||
-
|
||||
id: ref-foo
|
||||
value: "{foo.missing}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown attribute: foo.missing"
|
||||
-
|
||||
name: falls back to id.attr for entities with string values and other attributes
|
||||
asserts:
|
||||
-
|
||||
id: ref-bar
|
||||
value: "{bar.missing}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown attribute: bar.missing"
|
||||
-
|
||||
name: falls back to id.attr for entities with pattern values and no attributes
|
||||
asserts:
|
||||
-
|
||||
id: ref-baz
|
||||
value: "{baz.missing}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown attribute: baz.missing"
|
||||
-
|
||||
name: falls back to id.attr for entities with pattern values and other attributes
|
||||
asserts:
|
||||
-
|
||||
id: ref-qux
|
||||
value: "{qux.missing}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown attribute: qux.missing"
|
||||
-
|
||||
name: with string values
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo
|
||||
.attr = Foo Attribute
|
||||
bar = { foo } Bar
|
||||
.attr = Bar Attribute
|
||||
ref-foo = { foo.attr }
|
||||
ref-bar = { bar.attr }
|
||||
tests:
|
||||
-
|
||||
name: can be referenced for entities with string values
|
||||
asserts:
|
||||
-
|
||||
id: ref-foo
|
||||
value: Foo Attribute
|
||||
-
|
||||
name: can be formatted directly for entities with string values
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
attribute: attr
|
||||
value: Foo Attribute
|
||||
-
|
||||
name: can be referenced for entities with pattern values
|
||||
asserts:
|
||||
-
|
||||
id: ref-bar
|
||||
value: Bar Attribute
|
||||
-
|
||||
name: can be formatted directly for entities with pattern values
|
||||
asserts:
|
||||
-
|
||||
id: bar
|
||||
attribute: attr
|
||||
value: Bar Attribute
|
||||
-
|
||||
name: with simple pattern values
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo
|
||||
bar = Bar
|
||||
.attr = { foo } Attribute
|
||||
baz = { foo } Baz
|
||||
.attr = { foo } Attribute
|
||||
qux = Qux
|
||||
.attr = { qux } Attribute
|
||||
ref-bar = { bar.attr }
|
||||
ref-baz = { baz.attr }
|
||||
ref-qux = { qux.attr }
|
||||
tests:
|
||||
-
|
||||
name: can be referenced for entities with string values
|
||||
asserts:
|
||||
-
|
||||
id: ref-bar
|
||||
value: Foo Attribute
|
||||
-
|
||||
name: can be formatted directly for entities with string values
|
||||
asserts:
|
||||
-
|
||||
id: bar
|
||||
attribute: attr
|
||||
value: Foo Attribute
|
||||
-
|
||||
name: can be referenced for entities with simple pattern values
|
||||
asserts:
|
||||
-
|
||||
id: ref-baz
|
||||
value: Foo Attribute
|
||||
-
|
||||
name: can be formatted directly for entities with simple pattern values
|
||||
asserts:
|
||||
-
|
||||
id: baz
|
||||
attribute: attr
|
||||
value: Foo Attribute
|
||||
-
|
||||
name: works with self-references
|
||||
asserts:
|
||||
-
|
||||
id: ref-qux
|
||||
value: Qux Attribute
|
||||
-
|
||||
name: can be formatted directly when it uses a self-reference
|
||||
asserts:
|
||||
-
|
||||
id: qux
|
||||
attribute: attr
|
||||
value: Qux Attribute
|
||||
-
|
||||
name: with values with select expressions
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo
|
||||
.attr = { "a" ->
|
||||
[a] A
|
||||
*[b] B
|
||||
}
|
||||
ref-foo = { foo.attr }
|
||||
tests:
|
||||
-
|
||||
name: can be referenced
|
||||
asserts:
|
||||
-
|
||||
id: ref-foo
|
||||
value: A
|
||||
-
|
||||
name: can be formatted directly
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
attribute: attr
|
||||
value: A
|
|
@ -1,30 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Reference bombs
|
||||
suites:
|
||||
-
|
||||
name: Billion Laughs
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
lol0 = LOL
|
||||
lol1 = {lol0} {lol0} {lol0} {lol0} {lol0} {lol0} {lol0} {lol0} {lol0} {lol0}
|
||||
lol2 = {lol1} {lol1} {lol1} {lol1} {lol1} {lol1} {lol1} {lol1} {lol1} {lol1}
|
||||
lol3 = {lol2} {lol2} {lol2} {lol2} {lol2} {lol2} {lol2} {lol2} {lol2} {lol2}
|
||||
lol4 = {lol3} {lol3} {lol3} {lol3} {lol3} {lol3} {lol3} {lol3} {lol3} {lol3}
|
||||
lol5 = {lol4} {lol4} {lol4} {lol4} {lol4} {lol4} {lol4} {lol4} {lol4} {lol4}
|
||||
lol6 = {lol5} {lol5} {lol5} {lol5} {lol5} {lol5} {lol5} {lol5} {lol5} {lol5}
|
||||
lol7 = {lol6} {lol6} {lol6} {lol6} {lol6} {lol6} {lol6} {lol6} {lol6} {lol6}
|
||||
lol8 = {lol7} {lol7} {lol7} {lol7} {lol7} {lol7} {lol7} {lol7} {lol7} {lol7}
|
||||
lol9 = {lol8} {lol8} {lol8} {lol8} {lol8} {lol8} {lol8} {lol8} {lol8} {lol8}
|
||||
lolz = {lol9}
|
||||
tests:
|
||||
-
|
||||
name: does not expand all placeables
|
||||
asserts:
|
||||
-
|
||||
id: lolz
|
||||
value: "{lol9}"
|
||||
errors:
|
||||
-
|
||||
type: TooManyPlaceables
|
|
@ -1,195 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Bundle
|
||||
suites:
|
||||
-
|
||||
name: addResource
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo
|
||||
-bar = Bar
|
||||
tests:
|
||||
-
|
||||
name: adds messages
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: Foo
|
||||
-
|
||||
id: bar
|
||||
missing: true
|
||||
-
|
||||
name: allowOverrides
|
||||
resources:
|
||||
-
|
||||
source: key = Foo
|
||||
tests:
|
||||
-
|
||||
name: addResource allowOverrides is false
|
||||
resources:
|
||||
-
|
||||
source: key = Bar
|
||||
bundles:
|
||||
-
|
||||
errors:
|
||||
-
|
||||
type: Overriding
|
||||
asserts:
|
||||
-
|
||||
id: key
|
||||
value: Foo
|
||||
-
|
||||
name: addResource allowOverrides is true
|
||||
skip: true
|
||||
resources:
|
||||
-
|
||||
source: key = Bar
|
||||
asserts:
|
||||
-
|
||||
id: key
|
||||
value: Bar
|
||||
-
|
||||
name: hasMessage
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo
|
||||
bar =
|
||||
.attr = Bar Attr
|
||||
-term = Term
|
||||
# ERROR No value.
|
||||
err1 =
|
||||
# ERROR Broken value.
|
||||
err2 = {}
|
||||
# ERROR No attribute value.
|
||||
err3 =
|
||||
.attr =
|
||||
# ERROR Broken attribute value.
|
||||
err4 =
|
||||
.attr1 = Attr
|
||||
.attr2 = {}
|
||||
errors:
|
||||
-
|
||||
type: Parser
|
||||
-
|
||||
type: Parser
|
||||
-
|
||||
type: Parser
|
||||
-
|
||||
type: Parser
|
||||
tests:
|
||||
-
|
||||
name: returns true only for public messages
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
missing: false
|
||||
-
|
||||
name: returns false for terms and missing messages
|
||||
asserts:
|
||||
-
|
||||
id: -term
|
||||
missing: true
|
||||
-
|
||||
id: missing
|
||||
missing: true
|
||||
-
|
||||
id: -missing
|
||||
missing: true
|
||||
-
|
||||
name: returns false for broken messages
|
||||
asserts:
|
||||
-
|
||||
id: err1
|
||||
missing: true
|
||||
-
|
||||
id: err2
|
||||
missing: true
|
||||
-
|
||||
id: err3
|
||||
missing: true
|
||||
-
|
||||
id: err4
|
||||
# XXX: Difference from JS. We handle partial messages
|
||||
missing: false
|
||||
-
|
||||
name: getMessage
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo
|
||||
-bar = Bar
|
||||
tests:
|
||||
-
|
||||
name: returns public messages
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
missing: false
|
||||
-
|
||||
name: returns undefined for terms and missing messages
|
||||
asserts:
|
||||
-
|
||||
id: -bar
|
||||
missing: true
|
||||
-
|
||||
id: baz
|
||||
missing: true
|
||||
-
|
||||
id: -baz
|
||||
missing: true
|
||||
-
|
||||
name: (Rust) Entries
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
-foo = Bar
|
||||
baz = { foo }
|
||||
qux = { -bar }
|
||||
fn = { FN() }
|
||||
tests:
|
||||
-
|
||||
name: Entry mismatch doesn't leak
|
||||
asserts:
|
||||
-
|
||||
id: baz
|
||||
value: "{foo}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown message: foo"
|
||||
-
|
||||
name: Missing term
|
||||
asserts:
|
||||
-
|
||||
id: qux
|
||||
value: "{-bar}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown term: -bar"
|
||||
-
|
||||
name: Missing function
|
||||
asserts:
|
||||
-
|
||||
id: fn
|
||||
value: "{FN()}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown function: FN()"
|
||||
-
|
||||
name: (Rust) FluentBundle construction
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo
|
||||
bundles:
|
||||
-
|
||||
functions:
|
||||
- SUM
|
||||
- SUM
|
||||
errors:
|
||||
-
|
||||
type: Overriding
|
|
@ -1,6 +0,0 @@
|
|||
# Those are default settings for all tests
|
||||
|
||||
bundle:
|
||||
useIsolating: false
|
||||
locales:
|
||||
- en-US
|
|
@ -1,21 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Errors
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = {$one} and {$two}
|
||||
tests:
|
||||
-
|
||||
name: Reporting into an array
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: "{$one} and {$two}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown variable: $one"
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown variable: $two"
|
|
@ -1,85 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Functions
|
||||
suites:
|
||||
-
|
||||
name: missing
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { MISSING("Foo") }
|
||||
tests:
|
||||
-
|
||||
name: falls back to the name of the function
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: "{MISSING()}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown function: MISSING()"
|
||||
-
|
||||
name: arguments
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo
|
||||
.attr = Attribute
|
||||
pass-nothing = { IDENTITY() }
|
||||
pass-string = { IDENTITY("a") }
|
||||
pass-number = { IDENTITY(1) }
|
||||
pass-message = { IDENTITY(foo) }
|
||||
pass-attr = { IDENTITY(foo.attr) }
|
||||
pass-variable = { IDENTITY($var) }
|
||||
pass-function-call = { IDENTITY(IDENTITY(1)) }
|
||||
bundles:
|
||||
-
|
||||
functions:
|
||||
- IDENTITY
|
||||
tests:
|
||||
-
|
||||
name: falls back when arguments don't match the arity
|
||||
asserts:
|
||||
-
|
||||
id: pass-nothing
|
||||
## XXX: Difference from JS
|
||||
value: "???"
|
||||
-
|
||||
name: accepts strings
|
||||
asserts:
|
||||
-
|
||||
id: pass-string
|
||||
value: a
|
||||
-
|
||||
name: accepts numbers
|
||||
asserts:
|
||||
-
|
||||
id: pass-number
|
||||
value: 1
|
||||
-
|
||||
name: accepts entities
|
||||
asserts:
|
||||
-
|
||||
id: pass-message
|
||||
value: Foo
|
||||
-
|
||||
name: accepts attributes
|
||||
asserts:
|
||||
-
|
||||
id: pass-attr
|
||||
value: Attribute
|
||||
-
|
||||
name: accepts variables
|
||||
asserts:
|
||||
-
|
||||
id: pass-variable
|
||||
args:
|
||||
var: Variable
|
||||
value: Variable
|
||||
-
|
||||
name: accepts function calls
|
||||
asserts:
|
||||
-
|
||||
id: pass-function-call
|
||||
value: 1
|
|
@ -1,29 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Runtime-specific functions
|
||||
suites:
|
||||
-
|
||||
name: passing into the constructor
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { CONCAT("Foo", "Bar") }
|
||||
bar = { SUM(1, 2) }
|
||||
bundles:
|
||||
-
|
||||
functions:
|
||||
- CONCAT
|
||||
- SUM
|
||||
tests:
|
||||
-
|
||||
name: works for strings
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: FooBar
|
||||
-
|
||||
name: works for numbers
|
||||
asserts:
|
||||
-
|
||||
id: bar
|
||||
value: 3
|
|
@ -1,100 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Isolating interpolations
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo
|
||||
bar = { foo } Bar
|
||||
baz = { $arg } Baz
|
||||
qux = { bar } { baz }
|
||||
bundles:
|
||||
-
|
||||
useIsolating: true
|
||||
tests:
|
||||
-
|
||||
name: isolates interpolated message references
|
||||
skip: true
|
||||
asserts:
|
||||
-
|
||||
id: bar
|
||||
value: "\u2068Foo\u2069 Bar"
|
||||
-
|
||||
name: isolates interpolated string-typed variables
|
||||
asserts:
|
||||
-
|
||||
id: baz
|
||||
args:
|
||||
arg: Arg
|
||||
value: "\u2068Arg\u2069 Baz"
|
||||
-
|
||||
name: isolates interpolated number-typed variables
|
||||
asserts:
|
||||
-
|
||||
id: baz
|
||||
args:
|
||||
arg: 1
|
||||
value: "\u20681\u2069 Baz"
|
||||
-
|
||||
name: isolates interpolated date-typed variables
|
||||
skip: true
|
||||
asserts:
|
||||
-
|
||||
id: baz
|
||||
args:
|
||||
arg: 1976-07-31
|
||||
value: "\u20681976-07-31\u2069 Baz"
|
||||
-
|
||||
name: isolates complex interpolations
|
||||
skip: true
|
||||
asserts:
|
||||
-
|
||||
id: qux
|
||||
args:
|
||||
arg: Arg
|
||||
value: "\u2068\u2068Foo\u2069 Bar\u2069 \u2068\u2068Arg\u2069 Baz\u2069"
|
||||
-
|
||||
name: Skip isolation cases
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
-brand-short-name = Amaya
|
||||
foo = { -brand-short-name }
|
||||
bundles:
|
||||
-
|
||||
useIsolating: true
|
||||
tests:
|
||||
-
|
||||
name: skips isolation if the only element is a placeable
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: "Amaya"
|
||||
-
|
||||
name: (Rust) Skip isolation of string literals and terms
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
rs-bar = Foo { $foo } { "Bar" } baz
|
||||
-rs-term = My Term
|
||||
rs-baz = Foo { $foo } { -rs-term } baz
|
||||
bundles:
|
||||
-
|
||||
useIsolating: true
|
||||
tests:
|
||||
-
|
||||
name: skip isolation of string literals
|
||||
asserts:
|
||||
-
|
||||
id: rs-bar
|
||||
args:
|
||||
foo: Test
|
||||
value: "Foo \u2068Test\u2069 Bar baz"
|
||||
-
|
||||
name: skip isolation of term references
|
||||
asserts:
|
||||
-
|
||||
id: rs-baz
|
||||
args:
|
||||
foo: Test
|
||||
value: "Foo \u2068Test\u2069 My Term baz"
|
|
@ -1,69 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Literals as selectors
|
||||
tests:
|
||||
-
|
||||
name: a matching string literal selector
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { "a" ->
|
||||
[a] A
|
||||
*[b] B
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: A
|
||||
-
|
||||
name: a non-matching string literal selector
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { "c" ->
|
||||
[a] A
|
||||
*[b] B
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: B
|
||||
-
|
||||
name: a matching number literal selector
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { 0 ->
|
||||
[0] A
|
||||
*[1] B
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: A
|
||||
-
|
||||
name: a non-matching number literal selector
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { 2 ->
|
||||
[0] A
|
||||
*[1] B
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: B
|
||||
-
|
||||
name: a number literal selector matching a plural category
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { 1 ->
|
||||
[one] A
|
||||
*[other] B
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: A
|
|
@ -1,392 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Macros
|
||||
suites:
|
||||
-
|
||||
name: References and calls
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
-bar = Bar
|
||||
term-ref = {-bar}
|
||||
term-call = {-bar()}
|
||||
tests:
|
||||
-
|
||||
name: terms can be referenced without parens
|
||||
asserts:
|
||||
-
|
||||
id: term-ref
|
||||
value: Bar
|
||||
-
|
||||
name: terms can be parameterized
|
||||
asserts:
|
||||
-
|
||||
id: term-call
|
||||
value: Bar
|
||||
-
|
||||
name: Passing arguments
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
-foo = Foo {$arg}
|
||||
ref-foo = {-foo}
|
||||
call-foo-no-args = {-foo()}
|
||||
call-foo-with-expected-arg = {-foo(arg: 1)}
|
||||
call-foo-with-other-arg = {-foo(other: 3)}
|
||||
tests:
|
||||
-
|
||||
name: Not parameterized, no externals
|
||||
asserts:
|
||||
-
|
||||
id: ref-foo
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: Not parameterized but with externals
|
||||
asserts:
|
||||
-
|
||||
id: ref-foo
|
||||
args:
|
||||
arg: 1
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: No arguments, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-foo-no-args
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: No arguments, but with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-foo-no-args
|
||||
args:
|
||||
arg: 1
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: With expected args, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-foo-with-expected-arg
|
||||
value: Foo 1
|
||||
-
|
||||
name: With expected args, and with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-foo-with-expected-arg
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo 1
|
||||
-
|
||||
name: With other args, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-foo-with-other-arg
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: With other args, and with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-foo-with-other-arg
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: Nesting message references
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo {$arg}
|
||||
-bar = {foo}
|
||||
ref-bar = {-bar}
|
||||
call-bar = {-bar()}
|
||||
call-bar-with-arg = {-bar(arg: 1)}
|
||||
tests:
|
||||
-
|
||||
name: No parameterization, no externals
|
||||
asserts:
|
||||
-
|
||||
id: ref-bar
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: No parameterization, but with externals
|
||||
asserts:
|
||||
-
|
||||
id: ref-bar
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: No arguments, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-bar
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: No arguments, but with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-bar
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: With arguments, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-bar-with-arg
|
||||
value: Foo 1
|
||||
-
|
||||
name: With arguments and with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-bar-with-arg
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo 1
|
||||
-
|
||||
name: Nesting term references
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
-foo = Foo {$arg}
|
||||
-bar = {-foo}
|
||||
-baz = {-foo()}
|
||||
-qux = {-foo(arg: 1)}
|
||||
ref-bar = {-bar}
|
||||
ref-baz = {-baz}
|
||||
ref-qux = {-qux}
|
||||
call-bar-no-args = {-bar()}
|
||||
call-baz-no-args = {-baz()}
|
||||
call-qux-no-args = {-qux()}
|
||||
call-bar-with-arg = {-bar(arg: 2)}
|
||||
call-baz-with-arg = {-baz(arg: 2)}
|
||||
call-qux-with-arg = {-qux(arg: 2)}
|
||||
call-qux-with-other = {-qux(other: 3)}
|
||||
tests:
|
||||
-
|
||||
name: No parameterization, no parameterization, no externals
|
||||
asserts:
|
||||
-
|
||||
id: ref-bar
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: No parameterization, no parameterization, with externals
|
||||
asserts:
|
||||
-
|
||||
id: ref-bar
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: No parameterization, no arguments, no externals
|
||||
asserts:
|
||||
-
|
||||
id: ref-baz
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: No parameterization, no arguments, with externals
|
||||
asserts:
|
||||
-
|
||||
id: ref-baz
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: No parameterization, with arguments, no externals
|
||||
asserts:
|
||||
-
|
||||
id: ref-qux
|
||||
value: Foo 1
|
||||
-
|
||||
name: No parameterization, with arguments, with externals
|
||||
asserts:
|
||||
-
|
||||
id: ref-qux
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo 1
|
||||
-
|
||||
name: No arguments, no parametrization, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-bar-no-args
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: No arguments, no parametrization, with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-bar-no-args
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: No arguments, no arguments, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-baz-no-args
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: No arguments, no arguments, with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-baz-no-args
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: No arguments, with arguments, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-qux-no-args
|
||||
value: Foo 1
|
||||
-
|
||||
name: No arguments, with arguments, with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-qux-no-args
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo 1
|
||||
-
|
||||
name: With arguments, no parametrization, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-bar-with-arg
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: With arguments, no parametrization, with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-bar-with-arg
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: With arguments, no arguments, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-baz-with-arg
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: With arguments, no arguments, with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-baz-with-arg
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo {$arg}
|
||||
-
|
||||
name: With arguments, with arguments, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-qux-with-arg
|
||||
value: Foo 1
|
||||
-
|
||||
name: With arguments, with arguments, with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-qux-with-arg
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo 1
|
||||
-
|
||||
name: With unexpected arguments, with arguments, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-qux-with-other
|
||||
value: Foo 1
|
||||
-
|
||||
name: With unexpected arguments, with arguments, with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-qux-with-other
|
||||
args:
|
||||
arg: 5
|
||||
value: Foo 1
|
||||
-
|
||||
name: Parameterized term attributes
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
-ship = Ship
|
||||
.gender = {$style ->
|
||||
*[traditional] neuter
|
||||
[chicago] feminine
|
||||
}
|
||||
ref-attr = {-ship.gender ->
|
||||
*[masculine] He
|
||||
[feminine] She
|
||||
[neuter] It
|
||||
}
|
||||
call-attr-no-args = {-ship.gender() ->
|
||||
*[masculine] He
|
||||
[feminine] She
|
||||
[neuter] It
|
||||
}
|
||||
call-attr-with-expected-arg = {-ship.gender(style: "chicago") ->
|
||||
*[masculine] He
|
||||
[feminine] She
|
||||
[neuter] It
|
||||
}
|
||||
call-attr-with-other-arg = {-ship.gender(other: 3) ->
|
||||
*[masculine] He
|
||||
[feminine] She
|
||||
[neuter] It
|
||||
}
|
||||
tests:
|
||||
-
|
||||
name: Not parameterized, no externals
|
||||
asserts:
|
||||
-
|
||||
id: ref-attr
|
||||
value: It
|
||||
-
|
||||
name: Not parameterized but with externals
|
||||
asserts:
|
||||
-
|
||||
id: ref-attr
|
||||
args:
|
||||
attr: chicago
|
||||
value: It
|
||||
-
|
||||
name: No arguments, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-attr-no-args
|
||||
value: It
|
||||
-
|
||||
name: No arguments, but with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-attr-no-args
|
||||
args:
|
||||
style: chicago
|
||||
value: It
|
||||
-
|
||||
name: With expected args, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-attr-with-expected-arg
|
||||
value: She
|
||||
-
|
||||
name: With expected args, and with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-attr-with-expected-arg
|
||||
args:
|
||||
style: chicago
|
||||
value: She
|
||||
-
|
||||
name: With other args, no externals
|
||||
asserts:
|
||||
-
|
||||
id: call-attr-with-other-arg
|
||||
value: It
|
||||
-
|
||||
name: With other args, and with externals
|
||||
asserts:
|
||||
-
|
||||
id: call-attr-with-other-arg
|
||||
args:
|
||||
style: chicago
|
||||
value: It
|
|
@ -1,218 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Patterns
|
||||
suites:
|
||||
-
|
||||
name: Simple string value
|
||||
resources:
|
||||
-
|
||||
source: foo = Foo
|
||||
tests:
|
||||
-
|
||||
name: returns the value
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: Foo
|
||||
-
|
||||
name: Complex string value
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo
|
||||
-bar = Bar
|
||||
ref-message = { foo }
|
||||
ref-term = { -bar }
|
||||
ref-missing-message = { missing }
|
||||
ref-missing-term = { -missing }
|
||||
ref-malformed = { malformed
|
||||
errors:
|
||||
-
|
||||
type: Parser
|
||||
tests:
|
||||
-
|
||||
name: resolves the reference to a message
|
||||
asserts:
|
||||
-
|
||||
id: ref-message
|
||||
value: Foo
|
||||
-
|
||||
name: resolves the reference to a term
|
||||
asserts:
|
||||
-
|
||||
id: ref-term
|
||||
value: Bar
|
||||
-
|
||||
name: returns the id if a message reference is missing
|
||||
asserts:
|
||||
-
|
||||
id: ref-missing-message
|
||||
value: "{missing}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown message: missing"
|
||||
-
|
||||
name: returns the id if a term reference is missing
|
||||
asserts:
|
||||
-
|
||||
id: ref-missing-term
|
||||
value: "{-missing}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown term: -missing"
|
||||
-
|
||||
name: Complex string referencing a message with null value
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo =
|
||||
.attr = Foo Attr
|
||||
bar = { foo } Bar
|
||||
tests:
|
||||
-
|
||||
name: returns the null value
|
||||
skip: true
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: Foo
|
||||
-
|
||||
name: formats the attribute
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
attribute: attr
|
||||
value: Foo Attr
|
||||
-
|
||||
name: formats ??? when the referenced message has no value and no default
|
||||
asserts:
|
||||
-
|
||||
id: bar
|
||||
# XXX: Difference from JS
|
||||
value: "{foo} Bar"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown message: foo"
|
||||
-
|
||||
name: Cyclic reference
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { bar }
|
||||
bar = { foo }
|
||||
tests:
|
||||
-
|
||||
name: returns ???
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: "{foo}"
|
||||
errors:
|
||||
-
|
||||
type: Cyclic
|
||||
-
|
||||
name: Cyclic self-reference
|
||||
resources:
|
||||
-
|
||||
source: foo = { foo }
|
||||
tests:
|
||||
-
|
||||
name: returns the raw string
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: "{foo}"
|
||||
errors:
|
||||
-
|
||||
type: Cyclic
|
||||
-
|
||||
name: Cyclic self-reference in a member
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo =
|
||||
{ $sel ->
|
||||
*[a] { foo }
|
||||
[b] Bar
|
||||
}
|
||||
bar = { foo }
|
||||
tests:
|
||||
-
|
||||
name: returns ???
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
args:
|
||||
sel: a
|
||||
value: "{foo}"
|
||||
errors:
|
||||
-
|
||||
type: Cyclic
|
||||
-
|
||||
name: returns the other member if requested
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
args:
|
||||
sel: b
|
||||
value: Bar
|
||||
-
|
||||
name: Cyclic reference in a selector
|
||||
skip: true
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
-foo =
|
||||
{ -bar.attr ->
|
||||
*[a] Foo
|
||||
}
|
||||
-bar = Bar
|
||||
.attr = { -foo }
|
||||
foo = { -foo }
|
||||
tests:
|
||||
-
|
||||
name: returns the default variant
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: Foo
|
||||
errors:
|
||||
-
|
||||
type: Cyclic
|
||||
-
|
||||
name: Cyclic self-reference in a selector
|
||||
skip: true
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
-foo =
|
||||
{ -bar.attr ->
|
||||
*[a] Foo
|
||||
}
|
||||
.attr = a
|
||||
-bar =
|
||||
{ -foo.attr ->
|
||||
*[a] Bar
|
||||
}
|
||||
.attr = { -foo }
|
||||
foo = { -foo }
|
||||
bar = { -bar }
|
||||
tests:
|
||||
-
|
||||
name: returns the default variant
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: Foo
|
||||
errors:
|
||||
-
|
||||
type: Cyclic
|
||||
-
|
||||
name: can reference an attribute
|
||||
asserts:
|
||||
-
|
||||
id: bar
|
||||
value: Bar
|
|
@ -1,154 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Primitives
|
||||
suites:
|
||||
-
|
||||
name: Numbers
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
one = { 1 }
|
||||
select = { 1 ->
|
||||
*[0] Zero
|
||||
[1] One
|
||||
}
|
||||
tests:
|
||||
-
|
||||
name: can be used in a placeable
|
||||
asserts:
|
||||
-
|
||||
id: one
|
||||
value: 1
|
||||
-
|
||||
name: can be used as a selector
|
||||
asserts:
|
||||
-
|
||||
id: select
|
||||
value: One
|
||||
-
|
||||
name: Simple string value
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo
|
||||
placeable-literal = { "Foo" } Bar
|
||||
placeable-message = { foo } Bar
|
||||
selector-literal = { "Foo" ->
|
||||
*[Foo] Member 1
|
||||
}
|
||||
bar =
|
||||
.attr = Bar Attribute
|
||||
placeable-attr = { bar.attr }
|
||||
-baz = Baz
|
||||
.attr = BazAttribute
|
||||
selector-attr = { -baz.attr ->
|
||||
*[BazAttribute] Member 3
|
||||
}
|
||||
tests:
|
||||
-
|
||||
name: can be used as a value
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: Foo
|
||||
-
|
||||
name: can be used in a placeable
|
||||
asserts:
|
||||
-
|
||||
id: placeable-literal
|
||||
value: Foo Bar
|
||||
-
|
||||
name: can be a value of a message referenced in a placeable
|
||||
asserts:
|
||||
-
|
||||
id: placeable-message
|
||||
value: Foo Bar
|
||||
-
|
||||
name: can be a selector
|
||||
asserts:
|
||||
-
|
||||
id: selector-literal
|
||||
value: Member 1
|
||||
-
|
||||
name: can be used as an attribute value
|
||||
asserts:
|
||||
-
|
||||
id: bar
|
||||
attribute: attr
|
||||
value: Bar Attribute
|
||||
-
|
||||
name: can be a value of an attribute used in a placeable
|
||||
asserts:
|
||||
-
|
||||
id: placeable-attr
|
||||
value: Bar Attribute
|
||||
-
|
||||
name: can be a value of an attribute used as a selector
|
||||
asserts:
|
||||
-
|
||||
id: selector-attr
|
||||
value: Member 3
|
||||
-
|
||||
name: Complex string value
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Foo
|
||||
bar = { foo }Bar
|
||||
placeable-message = { bar }Baz
|
||||
baz =
|
||||
.attr = { bar }BazAttribute
|
||||
-bazTerm = Value
|
||||
.attr = { bar }BazAttribute
|
||||
placeable-attr = { baz.attr }
|
||||
# XXX: This is different from JS fixture which
|
||||
# illegally uses message attribute as selector.
|
||||
selector-attr = { -bazTerm.attr ->
|
||||
[FooBarBazAttribute] FooBarBaz
|
||||
*[other] Other
|
||||
}
|
||||
tests:
|
||||
-
|
||||
name: can be used as a value
|
||||
asserts:
|
||||
-
|
||||
id: bar
|
||||
value: FooBar
|
||||
-
|
||||
name: can be a value of a message referenced in a placeable
|
||||
asserts:
|
||||
-
|
||||
id: placeable-message
|
||||
value: FooBarBaz
|
||||
-
|
||||
name: can be used as an attribute value
|
||||
asserts:
|
||||
-
|
||||
id: baz
|
||||
attribute: attr
|
||||
value: FooBarBazAttribute
|
||||
-
|
||||
name: can be a value of an attribute used in a placeable
|
||||
asserts:
|
||||
-
|
||||
id: placeable-attr
|
||||
value: FooBarBazAttribute
|
||||
-
|
||||
name: can be a value of an attribute used as a selector
|
||||
asserts:
|
||||
-
|
||||
id: selector-attr
|
||||
value: FooBarBaz
|
||||
-
|
||||
name: (Rust) Placeable
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = { { "Foo" } }
|
||||
tests:
|
||||
-
|
||||
name: Placeable in placable work
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: Foo
|
|
@ -1,151 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Select expressions
|
||||
tests:
|
||||
-
|
||||
name: missing selector
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
select = {$none ->
|
||||
[a] A
|
||||
*[b] B
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: select
|
||||
value: B
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown variable: $none"
|
||||
suites:
|
||||
-
|
||||
name: string selectors
|
||||
tests:
|
||||
-
|
||||
name: matching selector
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
select = {$selector ->
|
||||
[a] A
|
||||
*[b] B
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: select
|
||||
value: A
|
||||
args:
|
||||
selector: a
|
||||
-
|
||||
name: non-matching selector
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
select = {$selector ->
|
||||
[a] A
|
||||
*[b] B
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: select
|
||||
value: B
|
||||
args:
|
||||
selector: c
|
||||
-
|
||||
name: number selectors
|
||||
tests:
|
||||
-
|
||||
name: matching selector
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
select = {$selector ->
|
||||
[0] A
|
||||
*[1] B
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: select
|
||||
value: A
|
||||
args:
|
||||
selector: 0
|
||||
-
|
||||
name: non-matching selector
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
select = {$selector ->
|
||||
[0] A
|
||||
*[1] B
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: select
|
||||
value: B
|
||||
args:
|
||||
selector: 2
|
||||
-
|
||||
name: plural categories
|
||||
tests:
|
||||
-
|
||||
name: matching number selector
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
select = {$selector ->
|
||||
[one] A
|
||||
*[other] B
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: select
|
||||
value: A
|
||||
args:
|
||||
selector: 1
|
||||
-
|
||||
name: matching string selector
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
select = {$selector ->
|
||||
[one] A
|
||||
*[other] B
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: select
|
||||
value: A
|
||||
args:
|
||||
selector: one
|
||||
-
|
||||
name: non-matching number selector
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
select = {$selector ->
|
||||
[one] A
|
||||
*[default] D
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: select
|
||||
value: D
|
||||
args:
|
||||
selector: 2
|
||||
-
|
||||
name: non-matching string selector
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
select = {$selector ->
|
||||
[one] A
|
||||
*[default] D
|
||||
}
|
||||
asserts:
|
||||
-
|
||||
id: select
|
||||
value: D
|
||||
args:
|
||||
selector: other
|
|
@ -1,48 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Transformations
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
foo = Faa
|
||||
.bar = Bar {foo} Baz
|
||||
bar = Bar {"Baz"}
|
||||
qux = {"faa" ->
|
||||
[faa] Faa
|
||||
*[bar] Bar
|
||||
}
|
||||
arg = Faa {$arg}
|
||||
bundles:
|
||||
-
|
||||
transform: example
|
||||
tests:
|
||||
-
|
||||
name: transforms TextElements
|
||||
asserts:
|
||||
-
|
||||
id: foo
|
||||
value: FAA
|
||||
-
|
||||
id: foo
|
||||
attribute: bar
|
||||
value: BAr FAA BAz
|
||||
-
|
||||
name: does not transform StringLiterls
|
||||
asserts:
|
||||
-
|
||||
id: bar
|
||||
value: BAr Baz
|
||||
-
|
||||
name: does not transform VariantKeys
|
||||
asserts:
|
||||
-
|
||||
id: qux
|
||||
value: FAA
|
||||
-
|
||||
name: does not transform Variables
|
||||
asserts:
|
||||
-
|
||||
id: arg
|
||||
args:
|
||||
arg: aaa
|
||||
value: FAA aaa
|
|
@ -1,74 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Formatting values
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
key1 = Value 1
|
||||
key2 = { $sel ->
|
||||
[a] A2
|
||||
*[b] B2
|
||||
}
|
||||
key3 = Value { 3 }
|
||||
key4 = { $sel ->
|
||||
[a] A{ 4 }
|
||||
*[b] B{ 4 }
|
||||
}
|
||||
key5 =
|
||||
.a = A5
|
||||
.b = B5
|
||||
tests:
|
||||
-
|
||||
name: returns the value
|
||||
asserts:
|
||||
-
|
||||
id: key1
|
||||
value: Value 1
|
||||
-
|
||||
name: returns the default variant
|
||||
asserts:
|
||||
-
|
||||
id: key2
|
||||
value: B2
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown variable: $sel"
|
||||
-
|
||||
name: returns the value if it is a pattern
|
||||
asserts:
|
||||
-
|
||||
id: key3
|
||||
value: Value 3
|
||||
-
|
||||
name: returns the default variant if it is a pattern
|
||||
asserts:
|
||||
-
|
||||
id: key4
|
||||
value: B4
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown variable: $sel"
|
||||
-
|
||||
name: returns {???} when trying to format a null value
|
||||
skip: true
|
||||
asserts:
|
||||
-
|
||||
id: key5
|
||||
value: "{???}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown variable: $sel"
|
||||
-
|
||||
name: allows to pass traits directly to bundle.formatPattern
|
||||
asserts:
|
||||
-
|
||||
id: key5
|
||||
attribute: a
|
||||
value: "A5"
|
||||
-
|
||||
id: key5
|
||||
attribute: b
|
||||
value: "B5"
|
|
@ -1,140 +0,0 @@
|
|||
suites:
|
||||
-
|
||||
name: Referencing values
|
||||
resources:
|
||||
-
|
||||
source: |-
|
||||
key1 = Value 1
|
||||
-key2 = { $sel ->
|
||||
[a] A2
|
||||
*[b] B2
|
||||
}
|
||||
key3 = Value { 3 }
|
||||
-key4 = { $sel ->
|
||||
[a] A{ 4 }
|
||||
*[b] B{ 4 }
|
||||
}
|
||||
key5 =
|
||||
.a = A5
|
||||
.b = B5
|
||||
ref1 = { key1 }
|
||||
ref2 = { -key2 }
|
||||
ref3 = { key3 }
|
||||
ref4 = { -key4 }
|
||||
ref5 = { key5 }
|
||||
ref6 = { -key2(sel: "a") }
|
||||
ref7 = { -key2(sel: "b") }
|
||||
ref8 = { -key4(sel: "a") }
|
||||
ref9 = { -key4(sel: "b") }
|
||||
ref10 = { key5.a }
|
||||
ref11 = { key5.b }
|
||||
ref12 = { key5.c }
|
||||
ref13 = { key6 }
|
||||
ref14 = { key6.a }
|
||||
ref15 = { -key6 }
|
||||
ref16 = { -key6.a ->
|
||||
*[a] A
|
||||
}
|
||||
tests:
|
||||
-
|
||||
name: references the value
|
||||
asserts:
|
||||
-
|
||||
id: ref1
|
||||
value: Value 1
|
||||
-
|
||||
name: references the default variant
|
||||
asserts:
|
||||
-
|
||||
id: ref2
|
||||
value: B2
|
||||
-
|
||||
name: references the value if it is a pattern
|
||||
asserts:
|
||||
-
|
||||
id: ref3
|
||||
value: Value 3
|
||||
-
|
||||
name: references the default variant if it is a pattern
|
||||
asserts:
|
||||
-
|
||||
id: ref4
|
||||
value: B4
|
||||
-
|
||||
name: falls back to id if there is no value
|
||||
asserts:
|
||||
-
|
||||
id: ref5
|
||||
value: "{key5}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown message: key5"
|
||||
-
|
||||
name: references the variants
|
||||
asserts:
|
||||
-
|
||||
id: ref6
|
||||
value: A2
|
||||
-
|
||||
id: ref7
|
||||
value: B2
|
||||
-
|
||||
name: references the variants which are patterns
|
||||
asserts:
|
||||
-
|
||||
id: ref8
|
||||
value: A4
|
||||
-
|
||||
id: ref9
|
||||
value: B4
|
||||
-
|
||||
name: references the attributes
|
||||
asserts:
|
||||
-
|
||||
id: ref10
|
||||
value: A5
|
||||
-
|
||||
id: ref11
|
||||
value: B5
|
||||
-
|
||||
id: ref12
|
||||
value: "{key5.c}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown attribute: key5.c"
|
||||
-
|
||||
name: missing message reference
|
||||
asserts:
|
||||
-
|
||||
id: ref13
|
||||
value: "{key6}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown message: key6"
|
||||
-
|
||||
id: ref14
|
||||
value: "{key6.a}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown attribute: key6.a"
|
||||
-
|
||||
name: missing term reference
|
||||
asserts:
|
||||
-
|
||||
id: ref15
|
||||
value: "{-key6}"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown term: -key6"
|
||||
-
|
||||
id: ref16
|
||||
value: "A"
|
||||
errors:
|
||||
-
|
||||
type: Reference
|
||||
desc: "Unknown attribute: -key6.a"
|
|
@ -1,202 +0,0 @@
|
|||
use std::collections::HashMap;
|
||||
use std::fs::File;
|
||||
use std::io;
|
||||
use std::io::Read;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! test {
|
||||
($desc:stmt, $closure:block) => {{
|
||||
$closure
|
||||
}};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! assert_format {
|
||||
($bundle:expr, $id:expr, $args:expr, $expected:expr) => {
|
||||
let msg = $bundle.get_message($id).expect("Message doesn't exist");
|
||||
let mut errors = vec![];
|
||||
assert!(msg.value.is_some());
|
||||
assert_eq!(
|
||||
$bundle.format_pattern(&msg.value.unwrap(), $args, &mut errors),
|
||||
$expected
|
||||
);
|
||||
assert!(errors.is_empty());
|
||||
};
|
||||
($bundle:expr, $id:expr, $args:expr, $expected:expr, $errors:expr) => {
|
||||
let msg = $bundle.get_message($id).expect("Message doesn't exist.");
|
||||
let mut errors = vec![];
|
||||
assert!(msg.value.is_some());
|
||||
assert_eq!(
|
||||
$bundle.format_pattern(&msg.value.unwrap(), $args, &mut errors),
|
||||
$expected
|
||||
);
|
||||
assert_eq!(errors, $errors);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! assert_format_none {
|
||||
($bundle:expr, $id:expr) => {
|
||||
let msg = $bundle.get_message($id).expect("Message doesn't exist");
|
||||
assert!(msg.value.is_none());
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! assert_format_attr {
|
||||
($bundle:expr, $id:expr, $name:expr, $args:expr, $expected:expr) => {
|
||||
let msg = $bundle.get_message($id).expect("Message doesn't exists");
|
||||
let mut errors = vec![];
|
||||
let attr = msg.attributes.get($name).expect("Attribute exists");
|
||||
assert_eq!($bundle.format_pattern(&attr, $args, &mut errors), $expected);
|
||||
assert!(errors.is_empty());
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! assert_get_resource_from_str {
|
||||
($source:expr) => {
|
||||
FluentResource::try_new($source.to_owned()).expect("Failed to parse an FTL resource.")
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! assert_get_bundle {
|
||||
($res:expr) => {{
|
||||
let mut bundle: FluentBundle<&FluentResource> = FluentBundle::new(&["x-testing"]);
|
||||
bundle.set_use_isolating(false);
|
||||
bundle
|
||||
.add_resource($res)
|
||||
.expect("Failed to add FluentResource to FluentBundle.");
|
||||
bundle
|
||||
}};
|
||||
}
|
||||
|
||||
pub fn get_fixture(path: &str) -> Result<TestFixture, io::Error> {
|
||||
let mut f = File::open(path)?;
|
||||
let mut s = String::new();
|
||||
f.read_to_string(&mut s)?;
|
||||
Ok(serde_yaml::from_str(&s).expect("Parsing YAML failed."))
|
||||
}
|
||||
|
||||
pub fn get_defaults(path: &str) -> Result<TestDefaults, io::Error> {
|
||||
let mut f = File::open(path)?;
|
||||
let mut s = String::new();
|
||||
f.read_to_string(&mut s)?;
|
||||
Ok(serde_yaml::from_str(&s).expect("Parsing YAML failed."))
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct TestBundle {
|
||||
pub name: Option<String>,
|
||||
pub locales: Option<Vec<String>>,
|
||||
pub resources: Option<Vec<String>>,
|
||||
#[serde(rename = "useIsolating")]
|
||||
pub use_isolating: Option<bool>,
|
||||
pub functions: Option<Vec<String>>,
|
||||
pub transform: Option<String>,
|
||||
#[serde(skip_serializing_if = "Vec::is_empty", default)]
|
||||
pub errors: Vec<TestError>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct TestResource {
|
||||
pub name: Option<String>,
|
||||
#[serde(skip_serializing_if = "Vec::is_empty", default)]
|
||||
pub errors: Vec<TestError>,
|
||||
pub source: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct TestSetup {
|
||||
#[serde(skip_serializing_if = "Vec::is_empty", default)]
|
||||
pub bundles: Vec<TestBundle>,
|
||||
#[serde(skip_serializing_if = "Vec::is_empty", default)]
|
||||
pub resources: Vec<TestResource>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct TestError {
|
||||
#[serde(rename = "type")]
|
||||
pub error_type: String,
|
||||
pub desc: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
#[serde(untagged)]
|
||||
pub enum TestArgumentValue {
|
||||
String(String),
|
||||
Number(f64),
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct TestAssert {
|
||||
pub bundle: Option<String>,
|
||||
pub id: String,
|
||||
pub attribute: Option<String>,
|
||||
pub value: Option<String>,
|
||||
pub args: Option<HashMap<String, TestArgumentValue>>,
|
||||
#[serde(skip_serializing_if = "Vec::is_empty", default)]
|
||||
pub errors: Vec<TestError>,
|
||||
pub missing: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct Test {
|
||||
pub name: String,
|
||||
pub skip: Option<bool>,
|
||||
|
||||
#[serde(skip_serializing_if = "Vec::is_empty", default)]
|
||||
pub bundles: Vec<TestBundle>,
|
||||
#[serde(skip_serializing_if = "Vec::is_empty", default)]
|
||||
pub resources: Vec<TestResource>,
|
||||
|
||||
pub asserts: Vec<TestAssert>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct TestSuite {
|
||||
pub name: String,
|
||||
pub skip: Option<bool>,
|
||||
|
||||
#[serde(skip_serializing_if = "Vec::is_empty", default)]
|
||||
pub bundles: Vec<TestBundle>,
|
||||
#[serde(skip_serializing_if = "Vec::is_empty", default)]
|
||||
pub resources: Vec<TestResource>,
|
||||
|
||||
#[serde(skip_serializing_if = "Vec::is_empty", default)]
|
||||
pub tests: Vec<Test>,
|
||||
#[serde(skip_serializing_if = "Vec::is_empty", default)]
|
||||
pub suites: Vec<TestSuite>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct TestFixture {
|
||||
pub suites: Vec<TestSuite>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct BundleDefaults {
|
||||
#[serde(rename = "useIsolating")]
|
||||
pub use_isolating: Option<bool>,
|
||||
pub transform: Option<String>,
|
||||
pub locales: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct TestDefaults {
|
||||
pub bundle: BundleDefaults,
|
||||
}
|
|
@ -1,363 +0,0 @@
|
|||
mod helpers;
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::collections::HashMap;
|
||||
use std::fs;
|
||||
use std::iter;
|
||||
use std::path::Path;
|
||||
|
||||
use fluent_bundle::resolve::ResolverError;
|
||||
use fluent_bundle::FluentArgs;
|
||||
use fluent_bundle::FluentError;
|
||||
use fluent_bundle::{FluentBundle as FluentBundleGeneric, FluentResource, FluentValue};
|
||||
use rand::distributions::Alphanumeric;
|
||||
use rand::{thread_rng, Rng};
|
||||
use unic_langid::LanguageIdentifier;
|
||||
|
||||
use helpers::*;
|
||||
|
||||
type FluentBundle = FluentBundleGeneric<FluentResource>;
|
||||
|
||||
fn transform_example(s: &str) -> Cow<str> {
|
||||
s.replace("a", "A").into()
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
struct ScopeLevel {
|
||||
name: String,
|
||||
resources: Vec<TestResource>,
|
||||
bundles: Vec<TestBundle>,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
struct Scope(Vec<ScopeLevel>);
|
||||
|
||||
impl Scope {
|
||||
fn get_path(&self) -> String {
|
||||
self.0
|
||||
.iter()
|
||||
.map(|lvl| lvl.name.as_str())
|
||||
.collect::<Vec<&str>>()
|
||||
.join(" > ")
|
||||
}
|
||||
|
||||
fn get_bundles(&self, defaults: &Option<TestDefaults>) -> HashMap<String, FluentBundle> {
|
||||
let mut bundles = HashMap::new();
|
||||
|
||||
let mut available_resources = vec![];
|
||||
|
||||
for lvl in self.0.iter() {
|
||||
for r in lvl.resources.iter() {
|
||||
available_resources.push(r);
|
||||
}
|
||||
|
||||
for b in lvl.bundles.iter() {
|
||||
let name = b
|
||||
.name
|
||||
.as_ref()
|
||||
.cloned()
|
||||
.unwrap_or_else(|| generate_random_hash());
|
||||
let bundle = create_bundle(Some(b), &defaults, &available_resources);
|
||||
bundles.insert(name, bundle);
|
||||
}
|
||||
}
|
||||
if bundles.is_empty() {
|
||||
let bundle = create_bundle(None, defaults, &available_resources);
|
||||
let name = generate_random_hash();
|
||||
bundles.insert(name.clone(), bundle);
|
||||
}
|
||||
bundles
|
||||
}
|
||||
}
|
||||
|
||||
fn generate_random_hash() -> String {
|
||||
let mut rng = thread_rng();
|
||||
let chars: String = iter::repeat(())
|
||||
.map(|()| rng.sample(Alphanumeric))
|
||||
.take(7)
|
||||
.collect();
|
||||
chars
|
||||
}
|
||||
|
||||
fn test_fixture(fixture: &TestFixture, defaults: &Option<TestDefaults>) {
|
||||
for suite in &fixture.suites {
|
||||
test_suite(&suite, defaults, Scope(vec![]));
|
||||
}
|
||||
}
|
||||
|
||||
fn create_bundle(
|
||||
b: Option<&TestBundle>,
|
||||
defaults: &Option<TestDefaults>,
|
||||
resources: &Vec<&TestResource>,
|
||||
) -> FluentBundle {
|
||||
let mut errors = vec![];
|
||||
|
||||
let locales: Vec<LanguageIdentifier> = b
|
||||
.and_then(|b| b.locales.as_ref())
|
||||
.or_else(|| {
|
||||
defaults
|
||||
.as_ref()
|
||||
.and_then(|defaults| defaults.bundle.locales.as_ref())
|
||||
})
|
||||
.map(|locs| {
|
||||
locs.into_iter()
|
||||
.map(|s| s.parse().expect("Parsing failed."))
|
||||
.collect()
|
||||
})
|
||||
.expect("Failed to calculate locales.");
|
||||
let mut bundle = FluentBundle::new(&locales);
|
||||
let use_isolating = b.and_then(|b| b.use_isolating).or_else(|| {
|
||||
defaults
|
||||
.as_ref()
|
||||
.and_then(|defaults| defaults.bundle.use_isolating)
|
||||
});
|
||||
if let Some(use_isolating) = use_isolating {
|
||||
bundle.set_use_isolating(use_isolating);
|
||||
}
|
||||
let transform = b.and_then(|b| b.transform.as_ref()).or_else(|| {
|
||||
defaults
|
||||
.as_ref()
|
||||
.and_then(|defaults| defaults.bundle.transform.as_ref())
|
||||
});
|
||||
if let Some(transform) = transform {
|
||||
match transform.as_str() {
|
||||
"example" => bundle.set_transform(Some(transform_example)),
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
if let Some(&TestBundle {
|
||||
functions: Some(ref fns),
|
||||
..
|
||||
}) = b
|
||||
{
|
||||
for f in fns {
|
||||
let result = match f.as_str() {
|
||||
"CONCAT" => bundle.add_function(f.as_str(), |args, _name_args| {
|
||||
args.iter()
|
||||
.fold(String::new(), |acc, x| match x {
|
||||
FluentValue::String(s) => acc + &s.to_string(),
|
||||
FluentValue::Number(n) => acc + &n.value.to_string(),
|
||||
_ => acc,
|
||||
})
|
||||
.into()
|
||||
}),
|
||||
"SUM" => bundle.add_function(f.as_str(), |args, _name_args| {
|
||||
args.iter()
|
||||
.fold(0.0, |acc, x| {
|
||||
if let FluentValue::Number(v) = x {
|
||||
acc + v.value
|
||||
} else {
|
||||
panic!("Type cannot be used in SUM");
|
||||
}
|
||||
})
|
||||
.into()
|
||||
}),
|
||||
"IDENTITY" => bundle.add_function(f.as_str(), |args, _name_args| {
|
||||
args.get(0).cloned().unwrap_or(FluentValue::None)
|
||||
}),
|
||||
"NUMBER" => bundle.add_function(f.as_str(), |args, _name_args| {
|
||||
args.get(0).expect("Argument must be passed").clone()
|
||||
}),
|
||||
_ => unimplemented!("No such function."),
|
||||
};
|
||||
if let Err(err) = result {
|
||||
errors.push(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
let res_subset = b.and_then(|b| b.resources.as_ref());
|
||||
|
||||
for res in resources.iter() {
|
||||
if let Some(res_subset) = res_subset {
|
||||
if let Some(ref name) = res.name {
|
||||
if !res_subset.contains(name) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
let res = get_resource(res);
|
||||
if let Err(mut err) = bundle.add_resource(res) {
|
||||
errors.append(&mut err);
|
||||
}
|
||||
}
|
||||
test_errors(&errors, b.map(|b| b.errors.as_ref()));
|
||||
bundle
|
||||
}
|
||||
|
||||
fn get_resource(resource: &TestResource) -> FluentResource {
|
||||
let res = FluentResource::try_new(resource.source.clone());
|
||||
|
||||
if resource.errors.is_empty() {
|
||||
res.expect("Failed to parse an FTL resource.")
|
||||
} else {
|
||||
let (res, errors) = match res {
|
||||
Ok(r) => (r, vec![]),
|
||||
Err((res, err)) => {
|
||||
let err = err.into_iter().map(|err| err.into()).collect();
|
||||
(res, err)
|
||||
}
|
||||
};
|
||||
test_errors(&errors, Some(&resource.errors));
|
||||
res
|
||||
}
|
||||
}
|
||||
|
||||
fn test_suite(suite: &TestSuite, defaults: &Option<TestDefaults>, mut scope: Scope) {
|
||||
if suite.skip == Some(true) {
|
||||
return;
|
||||
}
|
||||
|
||||
scope.0.push(ScopeLevel {
|
||||
name: suite.name.clone(),
|
||||
bundles: suite.bundles.clone(),
|
||||
resources: suite.resources.clone(),
|
||||
});
|
||||
|
||||
for test in &suite.tests {
|
||||
test_test(test, defaults, scope.clone());
|
||||
}
|
||||
|
||||
for sub_suite in &suite.suites {
|
||||
test_suite(sub_suite, defaults, scope.clone());
|
||||
}
|
||||
}
|
||||
|
||||
fn test_test(test: &Test, defaults: &Option<TestDefaults>, mut scope: Scope) {
|
||||
if test.skip == Some(true) {
|
||||
return;
|
||||
}
|
||||
|
||||
scope.0.push(ScopeLevel {
|
||||
name: test.name.clone(),
|
||||
bundles: test.bundles.clone(),
|
||||
resources: test.resources.clone(),
|
||||
});
|
||||
|
||||
for assert in &test.asserts {
|
||||
let bundles = scope.get_bundles(defaults);
|
||||
let bundle = if let Some(ref bundle_name) = assert.bundle {
|
||||
bundles
|
||||
.get(bundle_name)
|
||||
.expect("Failed to retrieve bundle.")
|
||||
} else if bundles.len() == 1 {
|
||||
let name = bundles.keys().into_iter().last().unwrap();
|
||||
bundles.get(name).expect("Failed to retrieve bundle.")
|
||||
} else {
|
||||
panic!();
|
||||
};
|
||||
let mut errors = vec![];
|
||||
|
||||
if let Some(expected_missing) = assert.missing {
|
||||
let missing = if let Some(ref attr) = assert.attribute {
|
||||
if let Some(msg) = bundle.get_message(&assert.id) {
|
||||
msg.attributes.contains_key(attr.as_str())
|
||||
} else {
|
||||
false
|
||||
}
|
||||
} else {
|
||||
!bundle.has_message(&assert.id)
|
||||
};
|
||||
assert_eq!(
|
||||
missing,
|
||||
expected_missing,
|
||||
"Expected pattern to be `missing: {}` for {} in {}",
|
||||
expected_missing,
|
||||
assert.id,
|
||||
scope.get_path()
|
||||
);
|
||||
} else {
|
||||
if let Some(ref expected_value) = assert.value {
|
||||
let msg = bundle.get_message(&assert.id).expect(&format!(
|
||||
"Failed to retrieve message `{}` in {}.",
|
||||
&assert.id,
|
||||
scope.get_path()
|
||||
));
|
||||
let val = if let Some(ref attr) = assert.attribute {
|
||||
msg.attributes.get(attr.as_str()).expect(&format!(
|
||||
"Failed to retrieve an attribute of a message {}.{}.",
|
||||
assert.id, attr
|
||||
))
|
||||
} else {
|
||||
msg.value.expect(&format!(
|
||||
"Failed to retrieve a value of a message {}.",
|
||||
assert.id
|
||||
))
|
||||
};
|
||||
|
||||
let args: Option<FluentArgs> = assert.args.as_ref().map(|args| {
|
||||
args.iter()
|
||||
.map(|(k, v)| {
|
||||
let val = match v {
|
||||
TestArgumentValue::String(s) => s.as_str().into(),
|
||||
TestArgumentValue::Number(n) => n.into(),
|
||||
};
|
||||
(k.as_str(), val)
|
||||
})
|
||||
.collect()
|
||||
});
|
||||
let value = bundle.format_pattern(&val, args.as_ref(), &mut errors);
|
||||
assert_eq!(
|
||||
&value,
|
||||
expected_value,
|
||||
"Values don't match in {}",
|
||||
scope.get_path()
|
||||
);
|
||||
test_errors(&errors, Some(&assert.errors));
|
||||
} else {
|
||||
panic!("Value field expected.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn test_errors(errors: &[FluentError], reference: Option<&[TestError]>) {
|
||||
let reference = reference.unwrap_or(&[]);
|
||||
assert_eq!(errors.len(), reference.len());
|
||||
for (error, reference) in errors.into_iter().zip(reference) {
|
||||
match error {
|
||||
FluentError::ResolverError(err) => match err {
|
||||
ResolverError::Reference(desc) => {
|
||||
assert_eq!(reference.desc.as_ref(), Some(desc));
|
||||
assert_eq!(reference.error_type, "Reference");
|
||||
}
|
||||
ResolverError::Cyclic => {
|
||||
assert_eq!(reference.error_type, "Cyclic");
|
||||
}
|
||||
ResolverError::TooManyPlaceables => {
|
||||
assert_eq!(reference.error_type, "TooManyPlaceables");
|
||||
}
|
||||
_ => unimplemented!(),
|
||||
},
|
||||
FluentError::ParserError(_) => {
|
||||
assert_eq!(reference.error_type, "Parser");
|
||||
}
|
||||
FluentError::Overriding { .. } => {
|
||||
assert_eq!(reference.error_type, "Overriding");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn resolve_fixtures() {
|
||||
let dir = "./tests/fixtures/";
|
||||
let mut defaults_path = String::from(dir);
|
||||
defaults_path.push_str("defaults.yaml");
|
||||
let defaults = if Path::new(&defaults_path).exists() {
|
||||
Some(get_defaults(&defaults_path).expect("Failed to read defaults."))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
for entry in fs::read_dir(dir).expect("Failed to read glob pattern.") {
|
||||
let entry = entry.expect("Entry doesn't exist.");
|
||||
let path = entry.path();
|
||||
let path_str = path.to_str().expect("Failed to convert path to string.");
|
||||
if path_str.contains("defaults.yaml") {
|
||||
continue;
|
||||
}
|
||||
println!("PATH: {:#?}", path_str);
|
||||
let fixture = get_fixture(path_str).expect("Loading fixture failed.");
|
||||
|
||||
test_fixture(&fixture, &defaults);
|
||||
}
|
||||
}
|
|
@ -1,156 +0,0 @@
|
|||
use fluent_bundle::resolve::Scope;
|
||||
use fluent_bundle::types::{
|
||||
FluentNumber, FluentNumberCurrencyDisplayStyle, FluentNumberOptions, FluentNumberStyle,
|
||||
};
|
||||
use fluent_bundle::FluentArgs;
|
||||
use fluent_bundle::FluentBundle;
|
||||
use fluent_bundle::FluentResource;
|
||||
use fluent_bundle::FluentValue;
|
||||
use intl_pluralrules::operands::PluralOperands;
|
||||
use unic_langid::langid;
|
||||
|
||||
#[test]
|
||||
fn fluent_value_try_number() {
|
||||
let value = FluentValue::try_number("invalid");
|
||||
assert_eq!(value, "invalid".into());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fluent_value_matches() {
|
||||
// We'll use `ars` locale since it happens to have all
|
||||
// plural rules categories.
|
||||
let langid_ars = langid!("ars");
|
||||
let bundle: FluentBundle<FluentResource> = FluentBundle::new(&[langid_ars]);
|
||||
let scope = Scope::new(&bundle, None);
|
||||
|
||||
let string_val = FluentValue::from("string1");
|
||||
let string_val_copy = FluentValue::from("string1");
|
||||
let string_val2 = FluentValue::from("23.5");
|
||||
|
||||
let number_val = FluentValue::from(-23.5);
|
||||
let number_val_copy = FluentValue::from(-23.5);
|
||||
let number_val2 = FluentValue::from(23.5);
|
||||
|
||||
assert_eq!(string_val.matches(&string_val_copy, &scope), true);
|
||||
assert_eq!(string_val.matches(&string_val2, &scope), false);
|
||||
|
||||
assert_eq!(number_val.matches(&number_val_copy, &scope), true);
|
||||
assert_eq!(number_val.matches(&number_val2, &scope), false);
|
||||
|
||||
assert_eq!(string_val2.matches(&number_val2, &scope), false);
|
||||
|
||||
assert_eq!(string_val2.matches(&number_val2, &scope), false);
|
||||
|
||||
let string_cat_zero = FluentValue::from("zero");
|
||||
let string_cat_one = FluentValue::from("one");
|
||||
let string_cat_two = FluentValue::from("two");
|
||||
let string_cat_few = FluentValue::from("few");
|
||||
let string_cat_many = FluentValue::from("many");
|
||||
let string_cat_other = FluentValue::from("other");
|
||||
|
||||
let number_cat_zero = 0.into();
|
||||
let number_cat_one = 1.into();
|
||||
let number_cat_two = 2.into();
|
||||
let number_cat_few = 3.into();
|
||||
let number_cat_many = 11.into();
|
||||
let number_cat_other = 101.into();
|
||||
|
||||
assert_eq!(string_cat_zero.matches(&number_cat_zero, &scope), true);
|
||||
assert_eq!(string_cat_one.matches(&number_cat_one, &scope), true);
|
||||
assert_eq!(string_cat_two.matches(&number_cat_two, &scope), true);
|
||||
assert_eq!(string_cat_few.matches(&number_cat_few, &scope), true);
|
||||
assert_eq!(string_cat_many.matches(&number_cat_many, &scope), true);
|
||||
assert_eq!(string_cat_other.matches(&number_cat_other, &scope), true);
|
||||
assert_eq!(string_cat_other.matches(&number_cat_one, &scope), false);
|
||||
|
||||
assert_eq!(string_val2.matches(&number_cat_one, &scope), false);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fluent_value_from() {
|
||||
let value_str = FluentValue::from("my str");
|
||||
let value_string = FluentValue::from(String::from("my string"));
|
||||
let value_f64 = FluentValue::from(23.5);
|
||||
let value_isize = FluentValue::from(-23);
|
||||
|
||||
assert_eq!(value_str, "my str".into());
|
||||
assert_eq!(value_string, "my string".into());
|
||||
|
||||
assert_eq!(value_f64, FluentValue::from(23.5));
|
||||
assert_eq!(value_isize, FluentValue::from(-23));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fluent_number_style() {
|
||||
let fns_decimal: FluentNumberStyle = "decimal".into();
|
||||
let fns_currency: FluentNumberStyle = "currency".into();
|
||||
let fns_percent: FluentNumberStyle = "percent".into();
|
||||
let fns_decimal2: FluentNumberStyle = "other".into();
|
||||
assert_eq!(fns_decimal, FluentNumberStyle::Decimal);
|
||||
assert_eq!(fns_currency, FluentNumberStyle::Currency);
|
||||
assert_eq!(fns_percent, FluentNumberStyle::Percent);
|
||||
assert_eq!(fns_decimal2, FluentNumberStyle::Decimal);
|
||||
|
||||
let fncds_symbol: FluentNumberCurrencyDisplayStyle = "symbol".into();
|
||||
let fncds_code: FluentNumberCurrencyDisplayStyle = "code".into();
|
||||
let fncds_name: FluentNumberCurrencyDisplayStyle = "name".into();
|
||||
let fncds_symbol2: FluentNumberCurrencyDisplayStyle = "other".into();
|
||||
|
||||
assert_eq!(fncds_symbol, FluentNumberCurrencyDisplayStyle::Symbol);
|
||||
assert_eq!(fncds_code, FluentNumberCurrencyDisplayStyle::Code);
|
||||
assert_eq!(fncds_name, FluentNumberCurrencyDisplayStyle::Name);
|
||||
assert_eq!(fncds_symbol2, FluentNumberCurrencyDisplayStyle::Symbol);
|
||||
|
||||
let mut fno = FluentNumberOptions::default();
|
||||
|
||||
let mut args = FluentArgs::new();
|
||||
args.insert("style", "currency".into());
|
||||
args.insert("currency", "EUR".into());
|
||||
args.insert("currencyDisplay", "code".into());
|
||||
args.insert("useGrouping", "true".into());
|
||||
args.insert("minimumIntegerDigits", 3.into());
|
||||
args.insert("minimumFractionDigits", 3.into());
|
||||
args.insert("maximumFractionDigits", 8.into());
|
||||
args.insert("minimumSignificantDigits", 1.into());
|
||||
args.insert("maximumSignificantDigits", 10.into());
|
||||
args.insert("someRandomOption", 10.into());
|
||||
|
||||
fno.merge(&args);
|
||||
|
||||
assert_eq!(fno.style, FluentNumberStyle::Currency);
|
||||
assert_eq!(fno.currency, Some("EUR".to_string()));
|
||||
assert_eq!(fno.currency_display, FluentNumberCurrencyDisplayStyle::Code);
|
||||
assert_eq!(fno.use_grouping, true);
|
||||
|
||||
let num = FluentNumber::new(0.2, FluentNumberOptions::default());
|
||||
assert_eq!(num.as_string(), "0.2");
|
||||
|
||||
let opts = FluentNumberOptions {
|
||||
minimum_fraction_digits: Some(3),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let num = FluentNumber::new(0.2, opts.clone());
|
||||
assert_eq!(num.as_string(), "0.200");
|
||||
|
||||
let num = FluentNumber::new(2.0, opts.clone());
|
||||
assert_eq!(num.as_string(), "2.000");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fluent_number_to_operands() {
|
||||
let num = FluentNumber::new(2.81, FluentNumberOptions::default());
|
||||
let operands: PluralOperands = (&num).into();
|
||||
|
||||
assert_eq!(
|
||||
operands,
|
||||
PluralOperands {
|
||||
n: 2.81,
|
||||
i: 2,
|
||||
v: 2,
|
||||
w: 2,
|
||||
f: 81,
|
||||
t: 81,
|
||||
}
|
||||
);
|
||||
}
|
|
@ -1 +1 @@
|
|||
{"files":{"CHANGELOG.md":"3046888911be793996b56111f1f442a04bac633a8a46a550dc36119e796dd32e","Cargo.lock":"751fc08eafcecddbde11a13249ad0692436c5ef8700a7329319e6af4a386d804","Cargo.toml":"f386505f0fae9a28212fe75a8f69866742b42a9ec8573a05bba0db4c291223a1","LICENSE":"b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1","README.md":"a4f17c795725dcb84cdf1e327a61306e82aaa2ca1908c9ea95c0fbe9d53216fd","benches/negotiate.rs":"f14c49d75413fb4b248f8f586c046340d61f0682eb0860db326f1f415e1bceb9","examples/negotiate.rs":"89b561ad4626ff55c3df989f1e87f45126664924ad43f0ff64097bdafc3d52b7","src/accepted_languages.rs":"74fe73bb8c3f36d3b8b85bfdc55731c234c20e92245b0f89eb1e8b68af47c17c","src/lib.rs":"529e3c9810688c3a5d216c977b968a775f83a85c2da90d669f2cfc5eb6c71361","src/negotiate/likely_subtags.rs":"edd5e2d7412a4cc0d36e096cadddac1976c274d74cda532d833d7de1615fde06","src/negotiate/mod.rs":"cc1e17a399e2279fc07e1b949b812635a33216c7012afbc17b3fcfc1eaf02c6c","tests/fixtures/accepted_languages.json":"f33af32d59335b48cbb190af07000c8dbcd7e5c536b91a727fabab5e1c1047b7","tests/fixtures/locale/options-ext.json":"8b022fe4c7ed2e202235e7bf67efae845732f01dda33177511908db629deca66","tests/fixtures/locale/options.json":"aef3c957435512a3d6b0f47530e30539abdead4de5f0a1241fc3a79cd7adf4b7","tests/fixtures/locale/parsing-ext.json":"222c898e6ee55106f34ff65aea5399f4a67b099466c7d678dcde57a3fbf6aaa5","tests/fixtures/locale/parsing.json":"81b718622d0abd608a4a8952cc61ba47451149f671a08cb49105be91d3858f1f","tests/fixtures/locale/serialize-options.json":"f01a9dc00d46619d79958fe47bafcacb9a3fc4a99c3269bc84d6ec5935daa0c4","tests/fixtures/negotiate/filtering/available-as-range.json":"1c3ef674409052a5aab2ff1c3f53a87b601599a2d6654adb3a44a0b94d8a6ac6","tests/fixtures/negotiate/filtering/cases.json":"b94fff9842e6352f6189d0f8d384a95b078fb31a74a09935b8c8fcd8b09cf465","tests/fixtures/negotiate/filtering/cross-region.json":"944d4817cedbfad69ab014e99dee74bedcaf34f1b95256358b231a3f9d53b1c6","tests/fixtures/negotiate/filtering/cross-variant.json":"231f51da8c3271964724ecf06c70205af52bed4caceb1e377f0a0eed947aa7b2","tests/fixtures/negotiate/filtering/default-locale.json":"413492ebd506da173735460523122a695e20987f8ebbd51993d97ae6a1082b0c","tests/fixtures/negotiate/filtering/errors.json":"87a365f866e67076f78351d96d12671cc2ca5f61644e89efe43daf1cbc7a72ed","tests/fixtures/negotiate/filtering/exact-match.json":"de9b59e73c7ea77f5bc5e971f20fc494b29cf2752228754c3945f101f047ffaf","tests/fixtures/negotiate/filtering/likely-subtag.json":"734c37080d3acbc776e07a9aa59b93ec08a44c8e3b715e1177ce0707a5f46c8b","tests/fixtures/negotiate/filtering/prioritize.json":"f6a44e5b1938686dd8f470a6448db86c3075a8331d7e3bfe115456f46f67eee8","tests/fixtures/negotiate/filtering/requested-und.json":"fba7c30e2fb42a303370a2e40c35723b49b50f2c4f6239a01ac84f783a4a46f7","tests/fixtures/negotiate/lookup/main.json":"2ab3ba1fa1e3fea05d3b3de8ee6b8fef9d8c77d4db69a5c99f580ffd4237727b","tests/fixtures/negotiate/matching/main.json":"30beb916aad0d265265dad73222fc6d680d429d22c4b69ebe2b3f08cdb04aade","tests/lib.rs":"4e9112225009cd0619aa0f02b47bfa84e8a708b6501e19994a67a6d9e94f6d23"},"package":"fe5815efd5542e40841cd34ef9003822352b04c67a70c595c6758597c72e1f56"}
|
||||
{"files":{"Cargo.toml":"1b11d8d30fe978704012e27981f8d50a3462319594b54ed2e71eaf85284d61eb","README.md":"a4f17c795725dcb84cdf1e327a61306e82aaa2ca1908c9ea95c0fbe9d53216fd","benches/negotiate.rs":"f14c49d75413fb4b248f8f586c046340d61f0682eb0860db326f1f415e1bceb9","src/accepted_languages.rs":"74fe73bb8c3f36d3b8b85bfdc55731c234c20e92245b0f89eb1e8b68af47c17c","src/lib.rs":"529e3c9810688c3a5d216c977b968a775f83a85c2da90d669f2cfc5eb6c71361","src/negotiate/likely_subtags.rs":"44531e2bbf3a2155771f197f863dffdce403d3e8dd0e1d4f36f7178e52e5a3a3","src/negotiate/mod.rs":"e8aa5ecf08b866d83c957230586cb9c03880473406d7cca28cadf9e883310a15"},"package":"2c4ad0989667548f06ccd0e306ed56b61bd4d35458d54df5ec7587c0e8ed5e94"}
|
|
@ -1,72 +0,0 @@
|
|||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
|
||||
- …
|
||||
|
||||
## fluent-langneg 0.12.1 (January 29, 2020)
|
||||
|
||||
- Fixing `maximize` calls in negotiation.
|
||||
|
||||
## fluent-langneg 0.12.0 (January 28, 2020)
|
||||
|
||||
- Update `unic-langid` to 0.8.
|
||||
|
||||
## fluent-langneg 0.11.1 (November 17, 2019)
|
||||
|
||||
- Improve handling of `und` in requested to match Unicode TR35.
|
||||
|
||||
## fluent-langneg 0.11.0 (November 7, 2019)
|
||||
|
||||
- Change name to `fluent-langneg` to better reflect the purpose.
|
||||
- Update to `unic-langid` 0.7.
|
||||
- Include feature "cldr" to use full CLDR likely-subtags.
|
||||
- Improved performance by 50% in the default case, and by further 34% when using CLDR feature.
|
||||
- Accept `AsRef<[u8]>` instead of `AsRef<str>`.
|
||||
|
||||
## fluent-locale 0.10.0 (October 3, 2019)
|
||||
|
||||
- Update to `unic-langid` 0.6.
|
||||
|
||||
## fluent-locale 0.9.0 (October 1, 2019)
|
||||
|
||||
- Use AsRef as bounds in negotiation.
|
||||
- Support unic-langid with full CLDR backed likelysubtags behind "cldr" feature.
|
||||
|
||||
## fluent-locale 0.8.0 (September 10, 2019)
|
||||
|
||||
- Update to `unic-langid` 0.5.
|
||||
|
||||
## fluent-locale 0.7.0 (July 30, 2019)
|
||||
|
||||
- Update `unic-langid` to 0.4.
|
||||
- Switch benchmark to criterion.
|
||||
- Update helper functions to be more generic.
|
||||
|
||||
## fluent-locale 0.6.0 (July 24, 2019)
|
||||
|
||||
- Switch to use `unic-langid` (but allow for `unic-locale`).
|
||||
- Refactor the API to handle fallible lists.
|
||||
|
||||
## fluent-locale 0.5.0 (June 16, 2019)
|
||||
|
||||
- Separate out `unic-langid` and `unic-locale` into new crates.
|
||||
- Switch from BCP47 conformance to Unicode Locale Identifier.
|
||||
- Update to Rust 2018.
|
||||
|
||||
## fluent-locale 0.4.1 (August 6, 2018)
|
||||
|
||||
- Separate out requested from available to allow for different mixes of Vec and &[].
|
||||
|
||||
## fluent-locale 0.4.0 (August 6, 2018)
|
||||
|
||||
- Ergonomics improvement - `negotiate_languages` now accepts &[&str], &[String], Vec<&str> and Vec<string>
|
||||
|
||||
## fluent-locale 0.3.2 (July 31, 2018)
|
||||
|
||||
- Make Locale::matches reject matches if privateuse is not empty
|
||||
|
||||
## fluent-locale 0.3.1 (February 12, 2018)
|
||||
|
||||
- Make fluent-locale compliant with rust stable (from 1.23)
|
||||
|
|
@ -1,629 +0,0 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "bstr"
|
||||
version = "0.2.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "cast"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "2.33.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "criterion"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"criterion-plot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"csv 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_os 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_xoshiro 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "criterion-plot"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-deque"
|
||||
version = "0.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-epoch"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-queue"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "csv"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bstr 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "csv-core"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "fluent-langneg"
|
||||
version = "0.12.1"
|
||||
dependencies = [
|
||||
"criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unic-langid 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unic-locale 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.66"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
version = "1.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-hack"
|
||||
version = "0.5.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_os"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_xoshiro"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon-core"
|
||||
version = "1.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "same-file"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver-parser"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.44"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "textwrap"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tinystr"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "tinytemplate"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unic-langid-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unic-langid-macros 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid-impl"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"tinystr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid-macros"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tinystr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unic-langid-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unic-langid-macros-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid-macros-impl"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unic-langid-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-locale"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unic-langid-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unic-locale-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unic-locale-macros 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-locale-impl"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"tinystr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unic-langid-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-locale-macros"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tinystr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unic-locale-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unic-locale-macros-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-locale-macros-impl"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unic-locale-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
version = "2.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.9.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-util"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[metadata]
|
||||
"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||
"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
|
||||
"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
|
||||
"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||
"checksum bstr 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3ede750122d9d1f87919570cb2cccee38c84fbc8c5599b25c289af40625b7030"
|
||||
"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5"
|
||||
"checksum cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0"
|
||||
"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||
"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
|
||||
"checksum criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "938703e165481c8d612ea3479ac8342e5615185db37765162e762ec3523e2fc6"
|
||||
"checksum criterion-plot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eccdc6ce8bbe352ca89025bee672aa6d24f4eb8c53e3a8b5d1bc58011da072a2"
|
||||
"checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca"
|
||||
"checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac"
|
||||
"checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db"
|
||||
"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4"
|
||||
"checksum csv 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "11f8cbd084b9a431d52dfac0b8428a26b68f1061138a7bea18aa56b9cdf55266"
|
||||
"checksum csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c"
|
||||
"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
|
||||
"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
|
||||
"checksum hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772"
|
||||
"checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484"
|
||||
"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f"
|
||||
"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558"
|
||||
"checksum memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223"
|
||||
"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9"
|
||||
"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096"
|
||||
"checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72"
|
||||
"checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
|
||||
"checksum proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0319972dcae462681daf4da1adeeaa066e3ebd29c69be96c6abb1259d2ee2bcc"
|
||||
"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
|
||||
"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
|
||||
"checksum rand_os 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a788ae3edb696cfcba1c19bfd388cc4b8c21f8a408432b199c072825084da58a"
|
||||
"checksum rand_xoshiro 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0e18c91676f670f6f0312764c759405f13afb98d5d73819840cf72a518487bff"
|
||||
"checksum rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098"
|
||||
"checksum rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9"
|
||||
"checksum regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9"
|
||||
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
||||
"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
|
||||
"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
||||
"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
|
||||
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449"
|
||||
"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
|
||||
"checksum serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)" = "48c575e0cc52bdd09b47f330f646cf59afc586e9c4e3ccd6fc1f625b8ea1dad7"
|
||||
"checksum syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1e4ff033220a41d1a57d8125eab57bf5263783dfdcc18688b1dacc6ce9651ef8"
|
||||
"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
||||
"checksum tinystr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4bac79c4b51eda1b090b1edebfb667821bbb51f713855164dc7cec2cb8ac2ba3"
|
||||
"checksum tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "57a3c6667d3e65eb1bc3aed6fd14011c6cbc3a0665218ab7f5daf040b9ec371a"
|
||||
"checksum unic-langid 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24d81136159f779c35b10655f45210c71cd5ca5a45aadfe9840a61c7071735ed"
|
||||
"checksum unic-langid-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c43c61e94492eb67f20facc7b025778a904de83d953d8fcb60dd9adfd6e2d0ea"
|
||||
"checksum unic-langid-macros 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49bd90791278634d57e3ed4a4073108e3f79bfb87ab6a7b8664ba097425703df"
|
||||
"checksum unic-langid-macros-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e0098f77bd754f8fb7850cdf4ab143aa821898c4ac6dc16bcb2aa3e62ce858d1"
|
||||
"checksum unic-locale 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8a0d6e6175e3f8e6d8ba39844a385724fd8b7f4218c783e671c43aaa43526c07"
|
||||
"checksum unic-locale-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe59350daadc2c23e7acec57cf47200187dbf3116819c9d5471d77384f789e93"
|
||||
"checksum unic-locale-macros 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03d300f3892f575a0b7de431f23762c939b38534cd7e11f1cda5966e18ce2e24"
|
||||
"checksum unic-locale-macros-impl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "057bc3abf9dde0b89cf418d5a01596f709a3ecbf94609679042343d655583998"
|
||||
"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"
|
||||
"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
|
||||
"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d"
|
||||
"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
|
||||
"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
|
||||
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
"checksum winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80"
|
||||
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|
@ -13,8 +13,9 @@
|
|||
[package]
|
||||
edition = "2018"
|
||||
name = "fluent-langneg"
|
||||
version = "0.12.1"
|
||||
version = "0.13.0"
|
||||
authors = ["Zibi Braniecki <gandalf@mozilla.com>"]
|
||||
include = ["src/**/*", "benches/*.rs", "Cargo.toml", "README.md"]
|
||||
description = "A library for language and locale negotiation.\n"
|
||||
homepage = "http://projectfluent.org/"
|
||||
readme = "README.md"
|
||||
|
@ -26,7 +27,7 @@ repository = "https://github.com/projectfluent/fluent-langneg-rs"
|
|||
name = "negotiate"
|
||||
harness = false
|
||||
[dependencies.unic-langid]
|
||||
version = "0.8"
|
||||
version = "0.9"
|
||||
[dev-dependencies.criterion]
|
||||
version = "0.3"
|
||||
|
||||
|
@ -38,11 +39,11 @@ features = ["derive"]
|
|||
version = "1.0"
|
||||
|
||||
[dev-dependencies.unic-langid]
|
||||
version = "0.8"
|
||||
version = "0.9"
|
||||
features = ["macros"]
|
||||
|
||||
[dev-dependencies.unic-locale]
|
||||
version = "0.8"
|
||||
version = "0.9"
|
||||
features = ["macros"]
|
||||
|
||||
[features]
|
||||
|
|
|
@ -1,201 +0,0 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -1,11 +0,0 @@
|
|||
use fluent_langneg::negotiate::NegotiationStrategy;
|
||||
use fluent_langneg::{convert_vec_str_to_langids_lossy, negotiate_languages};
|
||||
|
||||
fn main() {
|
||||
let requested = convert_vec_str_to_langids_lossy(&["it", "pl", "ru"]);
|
||||
let available = convert_vec_str_to_langids_lossy(&["fr", "en-GB", "en-US", "ru", "pl"]);
|
||||
let supported =
|
||||
negotiate_languages(&requested, &available, None, NegotiationStrategy::Filtering);
|
||||
|
||||
println!("{:?}", supported);
|
||||
}
|
|
@ -19,11 +19,11 @@ impl MockLikelySubtags for LanguageIdentifier {
|
|||
"zh-GB" => "zh-Hant-GB",
|
||||
"zh-US" => "zh-Hant-US",
|
||||
_ => {
|
||||
let lang = self.language();
|
||||
let lang = self.language;
|
||||
|
||||
for subtag in REGION_MATCHING_KEYS {
|
||||
if lang == *subtag {
|
||||
self.set_region(subtag).unwrap();
|
||||
self.region = Some(subtag.parse().unwrap());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -31,17 +31,9 @@ impl MockLikelySubtags for LanguageIdentifier {
|
|||
}
|
||||
};
|
||||
let langid: LanguageIdentifier = extended.parse().expect("Failed to parse langid.");
|
||||
self.set_language(langid.language()).unwrap();
|
||||
if let Some(subtag) = langid.script() {
|
||||
self.set_script(subtag).unwrap();
|
||||
} else {
|
||||
self.clear_script();
|
||||
}
|
||||
if let Some(subtag) = langid.region() {
|
||||
self.set_region(subtag).unwrap();
|
||||
} else {
|
||||
self.clear_region();
|
||||
}
|
||||
self.language = langid.language;
|
||||
self.script = langid.script;
|
||||
self.region = langid.region;
|
||||
true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ pub fn filter_matches<'a, R: 'a + AsRef<LanguageIdentifier>, A: 'a + AsRef<Langu
|
|||
|
||||
// Per Unicode TR35, 4.4 Locale Matching, we don't add likely subtags to
|
||||
// requested locales, so we'll skip it from the rest of the steps.
|
||||
if req.language() == "und" {
|
||||
if req.language.is_empty() {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -195,13 +195,13 @@ pub fn filter_matches<'a, R: 'a + AsRef<LanguageIdentifier>, A: 'a + AsRef<Langu
|
|||
test_strategy!(true, true);
|
||||
|
||||
// 5) Try to match against the likely subtag without region
|
||||
req.clear_region();
|
||||
req.region = None;
|
||||
if req.maximize() {
|
||||
test_strategy!(true, false);
|
||||
}
|
||||
|
||||
// 6) Try to match against a region as a range
|
||||
req.clear_region();
|
||||
req.region = None;
|
||||
test_strategy!(true, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": "en-US;0.9,pl;0.8,fr;0.5",
|
||||
"output": ["en-US", "pl", "fr"]
|
||||
},
|
||||
{
|
||||
"input": "en-US,pl;0.8,fr;0.5",
|
||||
"output": ["en-US", "pl", "fr"]
|
||||
},
|
||||
{
|
||||
"input": "en-US,pl,fr",
|
||||
"output": ["en-US", "pl", "fr"]
|
||||
},
|
||||
{
|
||||
"input": "en-US,,fr",
|
||||
"output": ["en-US", "fr"]
|
||||
},
|
||||
{
|
||||
"input": "",
|
||||
"output": []
|
||||
},
|
||||
{
|
||||
"input": "pl",
|
||||
"output": ["pl"]
|
||||
}
|
||||
]
|
|
@ -1,34 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": {
|
||||
"string": "en",
|
||||
"options": {
|
||||
"hour-cycle": "h12"
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"language": "en",
|
||||
"extensions": {
|
||||
"unicode": {
|
||||
"hour-cycle": "h12"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "en",
|
||||
"options": {
|
||||
"calendar": "gregory"
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"language": "en",
|
||||
"extensions": {
|
||||
"unicode": {
|
||||
"calendar": "gregory"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
|
@ -1,53 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": {
|
||||
"string": "en",
|
||||
"options": {
|
||||
"language": "pl"
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"language": "pl"
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "en",
|
||||
"options": {
|
||||
"language": "pl",
|
||||
"script": "Cyrl"
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"language": "pl",
|
||||
"script": "Cyrl"
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "en-US",
|
||||
"options": {
|
||||
"language": "pl",
|
||||
"script": "Cyrl"
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"language": "pl",
|
||||
"script": "Cyrl",
|
||||
"region": "US"
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "en-Latn-US",
|
||||
"options": {
|
||||
"region": "GB"
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"language": "en",
|
||||
"script": "Latn",
|
||||
"region": "GB"
|
||||
}
|
||||
}
|
||||
]
|
|
@ -1,44 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": {
|
||||
"string": "en-u-hc-h12"
|
||||
},
|
||||
"output": {
|
||||
"language": "en",
|
||||
"extensions": {
|
||||
"unicode": {
|
||||
"hour-cycle": "h12"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "en-US-u-hc-h23"
|
||||
},
|
||||
"output": {
|
||||
"language": "en",
|
||||
"region": "US",
|
||||
"extensions": {
|
||||
"unicode": {
|
||||
"hour-cycle": "h23"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "en-US-u-hc-h23-ca-gregory"
|
||||
},
|
||||
"output": {
|
||||
"language": "en",
|
||||
"region": "US",
|
||||
"extensions": {
|
||||
"unicode": {
|
||||
"hour-cycle": "h23",
|
||||
"calendar": "gregory"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
|
@ -1,151 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": {
|
||||
"string": "en"
|
||||
},
|
||||
"output": {
|
||||
"language": "en"
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "lij"
|
||||
},
|
||||
"output": {
|
||||
"language": "lij"
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "en-Latn"
|
||||
},
|
||||
"output": {
|
||||
"language": "en",
|
||||
"script": "Latn"
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "lij-Arab"
|
||||
},
|
||||
"output": {
|
||||
"language": "lij",
|
||||
"script": "Arab"
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "en-Latn-US"
|
||||
},
|
||||
"output": {
|
||||
"language": "en",
|
||||
"script": "Latn",
|
||||
"region": "US"
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "lij-Arab-FA"
|
||||
},
|
||||
"output": {
|
||||
"language": "lij",
|
||||
"script": "Arab",
|
||||
"region": "FA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "en-Latn-US-windows"
|
||||
},
|
||||
"output": {
|
||||
"language": "en",
|
||||
"script": "Latn",
|
||||
"region": "US",
|
||||
"variants": ["windows"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "lij-Arab-FA-linux"
|
||||
},
|
||||
"output": {
|
||||
"language": "lij",
|
||||
"script": "Arab",
|
||||
"region": "FA",
|
||||
"variants": ["linux"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "lij-Arab-FA-linux-nedis"
|
||||
},
|
||||
"output": {
|
||||
"language": "lij",
|
||||
"script": "Arab",
|
||||
"region": "FA",
|
||||
"variants": ["linux", "nedis"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "EN-latn-us"
|
||||
},
|
||||
"output": {
|
||||
"language": "en",
|
||||
"script": "Latn",
|
||||
"region": "US"
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "sl-nedis"
|
||||
},
|
||||
"output": {
|
||||
"language": "sl",
|
||||
"variants": ["nedis"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "de-CH-1996"
|
||||
},
|
||||
"output": {
|
||||
"language": "de",
|
||||
"region": "CH",
|
||||
"variants": ["1996"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "sr-Latn"
|
||||
},
|
||||
"output": {
|
||||
"language": "sr",
|
||||
"script": "Latn"
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "es-419"
|
||||
},
|
||||
"output": {
|
||||
"language": "es",
|
||||
"region": "419"
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "und"
|
||||
},
|
||||
"output": {
|
||||
}
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "und-Latn"
|
||||
},
|
||||
"output": {
|
||||
"script": "Latn"
|
||||
}
|
||||
}
|
||||
]
|
|
@ -1,21 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": {
|
||||
"string": "en",
|
||||
"options": {
|
||||
"hour-cycle": "h12"
|
||||
}
|
||||
},
|
||||
"output": "en-u-hc-h12"
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"string": "ar",
|
||||
"options": {
|
||||
"hour-cycle": "h12",
|
||||
"calendar": "buddhist"
|
||||
}
|
||||
},
|
||||
"output": "ar-u-ca-buddhist-hc-h12"
|
||||
}
|
||||
]
|
|
@ -1,26 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": [["en-US"], ["en"]],
|
||||
"output": ["en"]
|
||||
},
|
||||
{
|
||||
"input": [["en-Latn-US"], ["en-US"]],
|
||||
"output": ["en-US"]
|
||||
},
|
||||
{
|
||||
"input": [["en-US-windows"], ["en-US"]],
|
||||
"output": ["en-US"]
|
||||
},
|
||||
{
|
||||
"input": [["fr-CA", "de-DE"], ["fr", "it", "de"]],
|
||||
"output": ["fr", "de"]
|
||||
},
|
||||
{
|
||||
"input": [["ja-JP-windows"], ["ja"]],
|
||||
"output": ["ja"]
|
||||
},
|
||||
{
|
||||
"input": [["en-Latn-GB", "en-Latn-IN"], ["en-IN", "en-GB"]],
|
||||
"output": ["en-GB", "en-IN"]
|
||||
}
|
||||
]
|
|
@ -1,34 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": [["fr_FR"], ["fr-FR"]],
|
||||
"output": ["fr-FR"]
|
||||
},
|
||||
{
|
||||
"input": [["fr_fr"], ["fr-fr"]],
|
||||
"output": ["fr-fr"]
|
||||
},
|
||||
{
|
||||
"input": [["fr_Fr"], ["fr-fR"]],
|
||||
"output": ["fr-fR"]
|
||||
},
|
||||
{
|
||||
"input": [["fr_lAtN_fr"], ["fr-Latn-FR"]],
|
||||
"output": ["fr-Latn-FR"]
|
||||
},
|
||||
{
|
||||
"input": [["fr_FR"], ["fr_FR"]],
|
||||
"output": ["fr_FR"]
|
||||
},
|
||||
{
|
||||
"input": [["fr-FR"], ["fr_FR"]],
|
||||
"output": ["fr_FR"]
|
||||
},
|
||||
{
|
||||
"input": [["fr_Cyrl_FR_macos"], ["fr_Cyrl_fr-macos"]],
|
||||
"output": ["fr_Cyrl_fr-macos"]
|
||||
},
|
||||
{
|
||||
"input": [["fr_Cyrl_FR_mAcOs"], ["fr_Cyrl_fr-MaCoS"]],
|
||||
"output": ["fr_Cyrl_fr-MaCoS"]
|
||||
}
|
||||
]
|
|
@ -1,14 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": [["en"], ["en-US"]],
|
||||
"output": ["en-US"]
|
||||
},
|
||||
{
|
||||
"input": [["en-US"], ["en-GB"]],
|
||||
"output": ["en-GB"]
|
||||
},
|
||||
{
|
||||
"input": [["en-Latn-US"], ["en-Latn-GB"]],
|
||||
"output": ["en-Latn-GB"]
|
||||
}
|
||||
]
|
|
@ -1,6 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": [["en-US-linux"], ["en-US-windows"]],
|
||||
"output": ["en-US-windows"]
|
||||
}
|
||||
]
|
|
@ -1,18 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": [["fr"], ["de", "it"]],
|
||||
"output": []
|
||||
},
|
||||
{
|
||||
"input": [["fr"], ["de", "it"], "en-US"],
|
||||
"output": ["en-US"]
|
||||
},
|
||||
{
|
||||
"input": [["fr"], ["de", "en-US"], "en-US"],
|
||||
"output": ["en-US"]
|
||||
},
|
||||
{
|
||||
"input": [["fr", "de-DE"], ["de-DE", "fr-CA"], "en-US"],
|
||||
"output": ["fr-CA", "de-DE", "en-US"]
|
||||
}
|
||||
]
|
|
@ -1,34 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": [[], []],
|
||||
"output": []
|
||||
},
|
||||
{
|
||||
"input": [[""], []],
|
||||
"output": []
|
||||
},
|
||||
{
|
||||
"input": [[], [""]],
|
||||
"output": []
|
||||
},
|
||||
{
|
||||
"input": [[""], [""]],
|
||||
"output": []
|
||||
},
|
||||
{
|
||||
"input": [["2"], ["ąółż"]],
|
||||
"output": []
|
||||
},
|
||||
{
|
||||
"input": [[""], ["fr-FR"]],
|
||||
"output": []
|
||||
},
|
||||
{
|
||||
"input": [[""], ["2-1"]],
|
||||
"output": []
|
||||
},
|
||||
{
|
||||
"input": [[".-"], ["-2-1"]],
|
||||
"output": []
|
||||
}
|
||||
]
|
|
@ -1,26 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": [["en"], ["en"]],
|
||||
"output": ["en"]
|
||||
},
|
||||
{
|
||||
"input": [["en-US"], ["en-US"]],
|
||||
"output": ["en-US"]
|
||||
},
|
||||
{
|
||||
"input": [["en-Latn-US"], ["en-Latn-US"]],
|
||||
"output": ["en-Latn-US"]
|
||||
},
|
||||
{
|
||||
"input": [["en-Latn-US-windows"], ["en-Latn-US-windows"]],
|
||||
"output": ["en-Latn-US-windows"]
|
||||
},
|
||||
{
|
||||
"input": [["fr-FR"], ["de", "it", "fr-FR"]],
|
||||
"output": ["fr-FR"]
|
||||
},
|
||||
{
|
||||
"input": [["fr", "pl", "de-DE"], ["pl", "en-US", "de-DE"]],
|
||||
"output": ["pl", "de-DE"]
|
||||
}
|
||||
]
|
|
@ -1,42 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": [["en"], ["en-GB", "de", "en-US"]],
|
||||
"output": ["en-US", "en-GB"]
|
||||
},
|
||||
{
|
||||
"input": [["en"], ["en-Latn-GB", "de", "en-Latn-US"]],
|
||||
"output": ["en-Latn-US", "en-Latn-GB"]
|
||||
},
|
||||
{
|
||||
"input": [["fr"], ["fr-CA", "fr-FR"]],
|
||||
"output": ["fr-FR", "fr-CA"]
|
||||
},
|
||||
{
|
||||
"input": [["az-IR"], ["az-Latn", "az-Arab"]],
|
||||
"output": ["az-Arab"]
|
||||
},
|
||||
{
|
||||
"input": [["sr-RU"], ["sr-Cyrl", "sr-Latn"]],
|
||||
"output": ["sr-Latn"]
|
||||
},
|
||||
{
|
||||
"input": [["sr"], ["sr-Latn", "sr-Cyrl"]],
|
||||
"output": ["sr-Cyrl"]
|
||||
},
|
||||
{
|
||||
"input": [["zh-GB"], ["zh-Hans", "zh-Hant"]],
|
||||
"output": ["zh-Hant"]
|
||||
},
|
||||
{
|
||||
"input": [["sr", "ru"], ["sr-Latn", "ru"]],
|
||||
"output": ["ru"]
|
||||
},
|
||||
{
|
||||
"input": [["sr-RU"], ["sr-Latn-RO", "sr-Cyrl"]],
|
||||
"output": ["sr-Latn-RO"]
|
||||
},
|
||||
{
|
||||
"input": [["en-CA"], ["en-ZA", "en-GB", "en-US"]],
|
||||
"output": ["en-US", "en-ZA", "en-GB"]
|
||||
}
|
||||
]
|
|
@ -1,30 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": [["en-US"], ["en-US-windows", "en", "en-US"]],
|
||||
"output": ["en-US", "en", "en-US-windows"]
|
||||
},
|
||||
{
|
||||
"input": [["en-Latn-US"], ["en-GB", "en-US"]],
|
||||
"output": ["en-US", "en-GB"]
|
||||
},
|
||||
{
|
||||
"input": [["en"], ["en-Cyrl-US", "en-Latn-US"]],
|
||||
"output": ["en-Latn-US"]
|
||||
},
|
||||
{
|
||||
"input": [["en-US-macos"], ["en-US-windows", "en-GB-macos"]],
|
||||
"output": ["en-US-windows", "en-GB-macos"]
|
||||
},
|
||||
{
|
||||
"input": [["en-US-macos"], ["en-GB-windows"]],
|
||||
"output": ["en-GB-windows"]
|
||||
},
|
||||
{
|
||||
"input": [["en-US"], ["en-GB", "en"]],
|
||||
"output": ["en", "en-GB"]
|
||||
},
|
||||
{
|
||||
"input": [["fr-CA-macos", "de-DE"], ["de-DE", "fr-FR-windows"]],
|
||||
"output": ["fr-FR-windows", "de-DE"]
|
||||
}
|
||||
]
|
|
@ -1,10 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": [["und"], ["de", "pl-PL", "it", "fr-Latn-CA", "ru"]],
|
||||
"output": []
|
||||
},
|
||||
{
|
||||
"input": [["und"], ["und", "en-US"], "en-US"],
|
||||
"output": ["und", "en-US"]
|
||||
}
|
||||
]
|
|
@ -1,22 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": [["fr-FR", "en"], ["en-US", "fr-FR", "en", "fr"], "en-US"],
|
||||
"strategy": "lookup",
|
||||
"output": ["fr-FR"]
|
||||
},
|
||||
{
|
||||
"input": [["fr", "en"], ["en-US", "fr-FR", "en"], "en-US"],
|
||||
"strategy": "lookup",
|
||||
"output": ["fr-FR"]
|
||||
},
|
||||
{
|
||||
"input": [["en", "de"], ["en-GB", "en-US", "de"], "it"],
|
||||
"strategy": "lookup",
|
||||
"output": ["en-US"]
|
||||
},
|
||||
{
|
||||
"input": [["und"], ["en-GB", "en-US", "de"], "it"],
|
||||
"strategy": "lookup",
|
||||
"output": ["it"]
|
||||
}
|
||||
]
|
|
@ -1,12 +0,0 @@
|
|||
[
|
||||
{
|
||||
"input": [["fr", "en"], ["en-US", "fr-FR", "en", "fr"]],
|
||||
"strategy": "matching",
|
||||
"output": ["fr", "en"]
|
||||
},
|
||||
{
|
||||
"input": [["und"], ["fr", "de", "it", "ru", "pl"]],
|
||||
"strategy": "matching",
|
||||
"output": []
|
||||
}
|
||||
]
|
|
@ -1,214 +0,0 @@
|
|||
use std::error::Error;
|
||||
use std::fs;
|
||||
use std::fs::File;
|
||||
use std::path::Path;
|
||||
|
||||
use fluent_langneg::convert_vec_str_to_langids_lossy;
|
||||
use fluent_langneg::negotiate_languages;
|
||||
use fluent_langneg::parse_accepted_languages;
|
||||
use fluent_langneg::NegotiationStrategy;
|
||||
use unic_langid::langid;
|
||||
use unic_langid::LanguageIdentifier;
|
||||
use unic_locale::locale;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
enum NegotiateTestInput {
|
||||
NoDefault(Vec<String>, Vec<String>),
|
||||
Default(Vec<String>, Vec<String>, String),
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
struct NegotiateTestSet {
|
||||
input: NegotiateTestInput,
|
||||
strategy: Option<String>,
|
||||
output: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
struct AcceptedLanguagesTestSet {
|
||||
input: String,
|
||||
output: Vec<String>,
|
||||
}
|
||||
|
||||
fn read_negotiate_testsets<P: AsRef<Path>>(
|
||||
path: P,
|
||||
) -> Result<Vec<NegotiateTestSet>, Box<dyn Error>> {
|
||||
let file = File::open(path)?;
|
||||
let sets = serde_json::from_reader(file)?;
|
||||
Ok(sets)
|
||||
}
|
||||
|
||||
fn test_negotiate_fixtures(path: &str) {
|
||||
println!("Testing path: {}", path);
|
||||
let tests = read_negotiate_testsets(path).unwrap();
|
||||
|
||||
for test in tests {
|
||||
let strategy = match test.strategy {
|
||||
Some(strategy) => match strategy.as_str() {
|
||||
"filtering" => NegotiationStrategy::Filtering,
|
||||
"matching" => NegotiationStrategy::Matching,
|
||||
"lookup" => NegotiationStrategy::Lookup,
|
||||
_ => NegotiationStrategy::Filtering,
|
||||
},
|
||||
_ => NegotiationStrategy::Filtering,
|
||||
};
|
||||
match test.input {
|
||||
NegotiateTestInput::NoDefault(requested, available) => {
|
||||
let requested = convert_vec_str_to_langids_lossy(requested);
|
||||
let available = convert_vec_str_to_langids_lossy(available);
|
||||
let output = convert_vec_str_to_langids_lossy(test.output);
|
||||
let output2: Vec<&LanguageIdentifier> = output.iter().collect();
|
||||
assert_eq!(
|
||||
negotiate_languages(&requested, &available, None, strategy),
|
||||
output2,
|
||||
"Test in {} failed",
|
||||
path
|
||||
);
|
||||
}
|
||||
NegotiateTestInput::Default(requested, available, default) => {
|
||||
let requested = convert_vec_str_to_langids_lossy(requested);
|
||||
let available = convert_vec_str_to_langids_lossy(available);
|
||||
let output = convert_vec_str_to_langids_lossy(test.output);
|
||||
let output2: Vec<&LanguageIdentifier> = output.iter().collect();
|
||||
assert_eq!(
|
||||
negotiate_languages(
|
||||
&requested,
|
||||
&available,
|
||||
default.parse().ok().as_ref(),
|
||||
strategy
|
||||
),
|
||||
output2,
|
||||
"Test in {} failed",
|
||||
path
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn negotiate_filtering() {
|
||||
let paths = fs::read_dir("./tests/fixtures/negotiate/filtering").unwrap();
|
||||
|
||||
for path in paths {
|
||||
let p = path.unwrap().path().to_str().unwrap().to_owned();
|
||||
test_negotiate_fixtures(p.as_str());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn negotiate_matching() {
|
||||
let paths = fs::read_dir("./tests/fixtures/negotiate/matching").unwrap();
|
||||
|
||||
for path in paths {
|
||||
let p = path.unwrap().path().to_str().unwrap().to_owned();
|
||||
test_negotiate_fixtures(p.as_str());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn negotiate_lookup() {
|
||||
let paths = fs::read_dir("./tests/fixtures/negotiate/lookup").unwrap();
|
||||
|
||||
for path in paths {
|
||||
let p = path.unwrap().path().to_str().unwrap().to_owned();
|
||||
test_negotiate_fixtures(p.as_str());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn accepted_languages() {
|
||||
let file = File::open("./tests/fixtures/accepted_languages.json").unwrap();
|
||||
let tests: Vec<AcceptedLanguagesTestSet> = serde_json::from_reader(file).unwrap();
|
||||
|
||||
for test in tests {
|
||||
let locales = parse_accepted_languages(test.input.as_str());
|
||||
let output = convert_vec_str_to_langids_lossy(test.output);
|
||||
assert_eq!(output, locales);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn langid_matching() {
|
||||
let langid_en_us = langid!("en-US");
|
||||
let langid_de_at = langid!("de-AT");
|
||||
let langid_en = langid!("en");
|
||||
let langid_de = langid!("de");
|
||||
let langid_pl = langid!("pl");
|
||||
|
||||
let requested = &[&langid_en_us, &langid_de_at];
|
||||
let available = &[&langid_pl, &langid_de, &langid_en];
|
||||
assert_eq!(
|
||||
negotiate_languages(requested, available, None, NegotiationStrategy::Matching),
|
||||
&[&&langid_en, &&langid_de],
|
||||
);
|
||||
|
||||
let requested = &[langid_en_us, langid_de_at];
|
||||
let available = &[langid_pl, langid_de.clone(), langid_en.clone()];
|
||||
assert_eq!(
|
||||
negotiate_languages(requested, available, None, NegotiationStrategy::Matching),
|
||||
&[&langid_en, &langid_de],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cldr_feature() {
|
||||
// In this case, the full likelySubtags algorithm knows that `mn` -> `mn-Cyrl`, but
|
||||
// the mock doesn't.
|
||||
#[cfg(feature = "cldr")]
|
||||
assert_eq!(
|
||||
negotiate_languages(
|
||||
&[langid!("mn")],
|
||||
&[langid!("mn-Latn"), langid!("mn-Cyrl")],
|
||||
None,
|
||||
NegotiationStrategy::Filtering
|
||||
),
|
||||
&[&langid!("mn-Cyrl")]
|
||||
);
|
||||
|
||||
// In result, the mock will just return both in undefined
|
||||
// order.
|
||||
#[cfg(not(feature = "cldr"))]
|
||||
assert_eq!(
|
||||
negotiate_languages(
|
||||
&[langid!("mn")],
|
||||
&[langid!("mn-Latn"), langid!("mn-Cyrl")],
|
||||
None,
|
||||
NegotiationStrategy::Filtering
|
||||
)
|
||||
.len(),
|
||||
2
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn locale_matching() {
|
||||
let loc_en_us = locale!("en-US-u-hc-h12");
|
||||
let loc_de_at = locale!("de-AT-u-hc-h24");
|
||||
let loc_en = locale!("en-u-ca-buddhist");
|
||||
let loc_de = locale!("de");
|
||||
let loc_pl = locale!("pl-x-private");
|
||||
|
||||
assert_eq!(
|
||||
negotiate_languages(
|
||||
&[&loc_en_us, &loc_de_at],
|
||||
&[&loc_pl, &loc_de, &loc_en],
|
||||
None,
|
||||
NegotiationStrategy::Matching
|
||||
),
|
||||
&[&&loc_en, &&loc_de],
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
negotiate_languages(
|
||||
&[loc_en_us, loc_de_at],
|
||||
&[loc_pl, loc_de.clone(), loc_en.clone()],
|
||||
None,
|
||||
NegotiationStrategy::Matching
|
||||
),
|
||||
&[&loc_en, &loc_de],
|
||||
);
|
||||
}
|
|
@ -1 +1 @@
|
|||
{"files":{"CHANGELOG.md":"4ec2cdb8887c88d6b4c9ef7cbd1aaf1484b576611e4378c3204b29549df00e87","Cargo.toml":"a1a18e0d3c6cbd2fe76add7d83a2958a07eba72d1dee17450d19d3ae3bf4a303","README.md":"38ca7cc14db1eb9cce03d8690e9476eaf75e0ed07ae65c68af4573a043c75c34","src/lib.rs":"fbf2afed5ccd9a64f07539e1fca2fb9bf1d96794975927b3a958ec44becbfec6","tests/macro.rs":"1bcdd5c02e12081109237bbf684aef59dc730b01b9cc3abec38a3d95da21adc1","tests/pseudo.rs":"a947580a389cf1ce55dd8dc9931472f4cbba60c6562e557dc531d9010f6f2523"},"package":"9ebe7532e1e5146a909de9e019e31835a84b5dee3eeb234561e525844f3cf3bf"}
|
||||
{"files":{"Cargo.toml":"b7785030a8090bb0e4e93f68248b0748530e190f0a6e8440c756ce85baf4aeaa","README.md":"38ca7cc14db1eb9cce03d8690e9476eaf75e0ed07ae65c68af4573a043c75c34","src/lib.rs":"fbf2afed5ccd9a64f07539e1fca2fb9bf1d96794975927b3a958ec44becbfec6"},"package":"3c3b6132d1377d8776409a337c6851d342aee4e85277c96ecd2755c4e0efde1d"}
|
|
@ -1,51 +0,0 @@
|
|||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
|
||||
- …
|
||||
|
||||
## fluent 0.11.0 (March 10, 2020)
|
||||
- Update `fluent-bundle` to 0.11.0.
|
||||
|
||||
## fluent 0.10.2 (February 20, 2020)
|
||||
- Update `fluent-bundle` to 0.10.2.
|
||||
|
||||
## fluent 0.10.1 (February 15, 2020)
|
||||
- Update `fluent-bundle` to 0.10.1.
|
||||
|
||||
## fluent 0.10.0 (February 13, 2020)
|
||||
- Update `fluent-bundle` to 0.10.0.
|
||||
|
||||
## fluent 0.9.1 (December 13, 2019)
|
||||
- Update `fluent-pseudo` to 0.2.0.
|
||||
|
||||
## fluent 0.9.0 (November 26, 2019)
|
||||
- Update `fluent-bundle` to 0.9.0.
|
||||
- Update `fluent-pseudo` to 0.1.0.
|
||||
- Update `unic-langid` to 0.7.0.
|
||||
|
||||
## fluent 0.8.0 (October 3, 2019)
|
||||
|
||||
- Update `fluent-bundle` to 0.8.0.
|
||||
|
||||
## fluent 0.7.2 (October 1, 2019)
|
||||
|
||||
- Update `fluent-bundle` to 0.7.2.
|
||||
|
||||
## fluent 0.7.1 (August 16, 2019)
|
||||
|
||||
- Fix fluent_args to work with crate's FluentBundle
|
||||
|
||||
## fluent 0.7.0 (August 1, 2019)
|
||||
|
||||
- Update to fluent-bundle 0.7.1
|
||||
- Optionally bundle fluent-pseudo 0.0.1
|
||||
|
||||
## fluent 0.6.0 (March 26, 2019)
|
||||
|
||||
- Update to fluent-bundle 0.6.0
|
||||
|
||||
## fluent 0.5.0 (January 31, 2019)
|
||||
|
||||
- Moved fluent-bundle to its own package
|
||||
- Set dependency on fluent-bundle 0.5
|
|
@ -13,8 +13,9 @@
|
|||
[package]
|
||||
edition = "2018"
|
||||
name = "fluent"
|
||||
version = "0.11.0"
|
||||
version = "0.12.0"
|
||||
authors = ["Zibi Braniecki <gandalf@mozilla.com>", "Staś Małolepszy <stas@mozilla.com>"]
|
||||
include = ["src/**/*", "benches/*.rs", "Cargo.toml", "README.md"]
|
||||
description = "A localization system designed to unleash the entire expressive power of\nnatural language translations.\n"
|
||||
homepage = "http://www.projectfluent.org"
|
||||
readme = "README.md"
|
||||
|
@ -23,11 +24,11 @@ categories = ["localization", "internationalization"]
|
|||
license = "Apache-2.0/MIT"
|
||||
repository = "https://github.com/projectfluent/fluent-rs"
|
||||
[dependencies.fluent-bundle]
|
||||
version = "0.11"
|
||||
version = "0.12"
|
||||
|
||||
[dependencies.fluent-pseudo]
|
||||
version = "0.2"
|
||||
optional = true
|
||||
|
||||
[dependencies.unic-langid]
|
||||
version = "0.8"
|
||||
version = "0.9"
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
use fluent::fluent_args;
|
||||
use fluent::FluentValue;
|
||||
use std::borrow::Cow;
|
||||
|
||||
#[test]
|
||||
fn test_fluent_args() {
|
||||
let args = fluent_args![
|
||||
"name" => "John",
|
||||
"emailCount" => 5,
|
||||
"customValue" => FluentValue::from("My Value")
|
||||
];
|
||||
assert_eq!(
|
||||
args.get("name"),
|
||||
Some(&FluentValue::String(Cow::Borrowed("John")))
|
||||
);
|
||||
assert_eq!(args.get("emailCount"), Some(&FluentValue::try_number(5)));
|
||||
assert_eq!(
|
||||
args.get("customValue"),
|
||||
Some(&FluentValue::String(Cow::Borrowed("My Value")))
|
||||
);
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
#[cfg(feature = "fluent-pseudo")]
|
||||
#[test]
|
||||
fn test_pseudo() {
|
||||
use fluent::{FluentBundle, FluentResource};
|
||||
use fluent_pseudo::transform;
|
||||
use std::borrow::Cow;
|
||||
|
||||
fn transform_wrapper(s: &str) -> Cow<str> {
|
||||
transform(s, false, true)
|
||||
}
|
||||
|
||||
let mut bundle = FluentBundle::default();
|
||||
|
||||
let res = FluentResource::try_new(String::from("key = Hello World")).unwrap();
|
||||
bundle.add_resource(res).unwrap();
|
||||
|
||||
{
|
||||
let msg = bundle.get_message("key").unwrap();
|
||||
let mut errors = vec![];
|
||||
let val = bundle.format_pattern(msg.value.unwrap(), None, &mut errors);
|
||||
|
||||
assert_eq!(val, "Hello World");
|
||||
}
|
||||
|
||||
bundle.set_transform(Some(transform_wrapper));
|
||||
|
||||
{
|
||||
let msg = bundle.get_message("key").unwrap();
|
||||
let mut errors = vec![];
|
||||
let val = bundle.format_pattern(msg.value.unwrap(), None, &mut errors);
|
||||
|
||||
assert_eq!(val, "Ħḗḗŀŀǿǿ Ẇǿǿřŀḓ");
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
{"files":{"CHANGELOG.md":"765f6d311c7605c90dc1e961134c046e3dfb0867611400c77bde1698152b2440","Cargo.lock":"990c1e513ab375643acf72421c3e5a96ef9df8085728bdf14580a93ef1e6a288","Cargo.toml":"8358daa9d239918a5167fd55afac7f6a570883112650461ddc19dd3cdd70a3b3","README.md":"c7084646fb85a4a7031e31e917ba510a942f6ec9958b440c29754765e8f417b4","examples/numberformat.rs":"b4f669df13f45a2bd05704f53ec79840d9532a1e0e9e4cab49ba9e77d4338de3","examples/pluralrules.rs":"778bb55db18e8314429181f6c456cc6a50ab2d0c44ba61825db56ed5e4db3560","src/concurrent.rs":"d52dc59d705f1177b311a32032daef09637867c9cae80718fc5d06c5e0a8463e","src/lib.rs":"9cb0ed0f06699ead0416a70868021c32087c7fe085f64cc73dbac395f4b08fc5"},"package":"9867e2d65d82936ef34217ed0f87b639a94384e93a0676158142c861c705391f"}
|
||||
{"files":{"Cargo.toml":"844d2077a77d1b483fcb76035f5e5f0efa4d07f69f0b67a499fce1cb019b393b","README.md":"c7084646fb85a4a7031e31e917ba510a942f6ec9958b440c29754765e8f417b4","src/concurrent.rs":"d52dc59d705f1177b311a32032daef09637867c9cae80718fc5d06c5e0a8463e","src/lib.rs":"9cb0ed0f06699ead0416a70868021c32087c7fe085f64cc73dbac395f4b08fc5"},"package":"8a0ed58ba6089d49f8a9a7d5e16fc9b9e2019cdf40ef270f3d465fa244d9630b"}
|
|
@ -1,14 +0,0 @@
|
|||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
|
||||
- …
|
||||
|
||||
## intl-memoizer 0.4.0 (March 10, 2020)
|
||||
- Separate out `concurrent` version of `IntlLangMemoizer`.
|
||||
|
||||
## intl-memoizer 0.3.0 (February 20, 2020)
|
||||
- Switch to `type_map::concurrent` to allow for Send+Sync.
|
||||
|
||||
## intl-memoizer 0.2.0 (February 13, 2020)
|
||||
- Initial release.
|
|
@ -1,78 +0,0 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
|
||||
|
||||
[[package]]
|
||||
name = "fluent-langneg"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fe5815efd5542e40841cd34ef9003822352b04c67a70c595c6758597c72e1f56"
|
||||
dependencies = [
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fxhash"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "intl-memoizer"
|
||||
version = "0.4.0"
|
||||
dependencies = [
|
||||
"fluent-langneg",
|
||||
"intl_pluralrules",
|
||||
"type-map",
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "intl_pluralrules"
|
||||
version = "6.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d82c14d8eece42c03353e0ce86a4d3f97b1f1cef401e4d962dca6c6214a85002"
|
||||
dependencies = [
|
||||
"tinystr",
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tinystr"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4bac79c4b51eda1b090b1edebfb667821bbb51f713855164dc7cec2cb8ac2ba3"
|
||||
|
||||
[[package]]
|
||||
name = "type-map"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d2741b1474c327d95c1f1e3b0a2c3977c8e128409c572a33af2914e7d636717"
|
||||
dependencies = [
|
||||
"fxhash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24d81136159f779c35b10655f45210c71cd5ca5a45aadfe9840a61c7071735ed"
|
||||
dependencies = [
|
||||
"unic-langid-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid-impl"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c43c61e94492eb67f20facc7b025778a904de83d953d8fcb60dd9adfd6e2d0ea"
|
||||
dependencies = [
|
||||
"tinystr",
|
||||
]
|
|
@ -13,8 +13,9 @@
|
|||
[package]
|
||||
edition = "2018"
|
||||
name = "intl-memoizer"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
authors = ["Zibi Braniecki <gandalf@mozilla.com>", "Manish Goregaokar <manishsmail@gmail.com>"]
|
||||
include = ["src/**/*", "benches/*.rs", "Cargo.toml", "README.md"]
|
||||
description = "A memoizer specifically tailored for storing lazy-initialized\nintl formatters.\n"
|
||||
homepage = "http://www.projectfluent.org"
|
||||
readme = "README.md"
|
||||
|
@ -26,9 +27,9 @@ repository = "https://github.com/projectfluent/fluent-rs"
|
|||
version = "0.3"
|
||||
|
||||
[dependencies.unic-langid]
|
||||
version = "0.8"
|
||||
version = "0.9"
|
||||
[dev-dependencies.fluent-langneg]
|
||||
version = "0.12"
|
||||
version = "0.13"
|
||||
|
||||
[dev-dependencies.intl_pluralrules]
|
||||
version = "6.0"
|
||||
version = "7.0"
|
||||
|
|
|
@ -1,78 +0,0 @@
|
|||
use intl_memoizer::{IntlMemoizer, Memoizable};
|
||||
use unic_langid::LanguageIdentifier;
|
||||
|
||||
#[derive(Clone, Hash, PartialEq, Eq)]
|
||||
struct NumberFormatOptions {
|
||||
minimum_fraction_digits: usize,
|
||||
maximum_fraction_digits: usize,
|
||||
}
|
||||
|
||||
struct NumberFormat {
|
||||
lang: LanguageIdentifier,
|
||||
options: NumberFormatOptions,
|
||||
}
|
||||
|
||||
impl NumberFormat {
|
||||
pub fn new(lang: LanguageIdentifier, options: NumberFormatOptions) -> Result<Self, ()> {
|
||||
Ok(Self { lang, options })
|
||||
}
|
||||
|
||||
pub fn format(&self, input: isize) -> String {
|
||||
format!(
|
||||
"{}: {}, MFD: {}",
|
||||
self.lang, input, self.options.minimum_fraction_digits
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl Memoizable for NumberFormat {
|
||||
type Args = (NumberFormatOptions,);
|
||||
type Error = ();
|
||||
fn construct(lang: LanguageIdentifier, args: Self::Args) -> Result<Self, Self::Error> {
|
||||
Self::new(lang, args.0)
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut memoizer = IntlMemoizer::default();
|
||||
|
||||
let lang: LanguageIdentifier = "en-US".parse().unwrap();
|
||||
{
|
||||
// Create an en-US memoizer
|
||||
let lang_memoizer = memoizer.get_for_lang(lang.clone());
|
||||
let options = NumberFormatOptions {
|
||||
minimum_fraction_digits: 3,
|
||||
maximum_fraction_digits: 5,
|
||||
};
|
||||
let result = lang_memoizer
|
||||
.with_try_get::<NumberFormat, _, _>((options,), |nf| nf.format(2))
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(&result, "en-US: 2, MFD: 3");
|
||||
|
||||
// Reuse the same en-US memoizer
|
||||
let lang_memoizer = memoizer.get_for_lang(lang.clone());
|
||||
let options = NumberFormatOptions {
|
||||
minimum_fraction_digits: 3,
|
||||
maximum_fraction_digits: 5,
|
||||
};
|
||||
let result = lang_memoizer
|
||||
.with_try_get::<NumberFormat, _, _>((options,), |nf| nf.format(1))
|
||||
.unwrap();
|
||||
assert_eq!(&result, "en-US: 1, MFD: 3");
|
||||
}
|
||||
|
||||
{
|
||||
// Here, we will construct a new lang memoizer
|
||||
let lang_memoizer = memoizer.get_for_lang(lang.clone());
|
||||
let options = NumberFormatOptions {
|
||||
minimum_fraction_digits: 3,
|
||||
maximum_fraction_digits: 5,
|
||||
};
|
||||
let result = lang_memoizer
|
||||
.with_try_get::<NumberFormat, _, _>((options,), |nf| nf.format(7))
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(&result, "en-US: 7, MFD: 3");
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
use intl_memoizer::{IntlMemoizer, Memoizable};
|
||||
use intl_pluralrules::{PluralCategory, PluralRuleType, PluralRules as IntlPluralRules};
|
||||
use unic_langid::LanguageIdentifier;
|
||||
|
||||
struct PluralRules(pub IntlPluralRules);
|
||||
|
||||
impl PluralRules {
|
||||
pub fn new(lang: LanguageIdentifier, pr_type: PluralRuleType) -> Result<Self, &'static str> {
|
||||
Ok(Self(IntlPluralRules::create(lang, pr_type)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl Memoizable for PluralRules {
|
||||
type Args = (PluralRuleType,);
|
||||
type Error = &'static str;
|
||||
fn construct(lang: LanguageIdentifier, args: Self::Args) -> Result<Self, Self::Error> {
|
||||
Self::new(lang, args.0)
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut memoizer = IntlMemoizer::default();
|
||||
|
||||
let lang: LanguageIdentifier = "en".parse().unwrap();
|
||||
let lang_memoizer = memoizer.get_for_lang(lang.clone());
|
||||
let result = lang_memoizer
|
||||
.with_try_get::<PluralRules, _, _>((PluralRuleType::CARDINAL,), |pr| pr.0.select(5))
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(result, Ok(PluralCategory::OTHER));
|
||||
}
|
|
@ -1 +1 @@
|
|||
{"files":{"CHANGELOG.md":"bd3fa43e17933d166cd18e6b6d2017c1450a9a7676f9f1badf18182b068ee14e","Cargo.toml":"766565f9381784df443f5d9886da9697f47c7bbce5fbc62411b329e2b3637f43","README.md":"4dad9bc033a67101bc318662c055318457f0b91e12fdc0a566495b455ceeb4b8","benches/pluralrules.rs":"9c80009fa94a8dbf31bdba489f320d92a40f482c37149030fbba53cd62b5435f","cldr_data/cldr_pluralrules_cardinals.json":"1756d5e4e73343c26a3257597d0d17a5a8fa0d208801ec572c232d792df31f56","cldr_data/cldr_pluralrules_ordinals.json":"35c6573cc59ec1e69e1f0e893e7dbbd32cb59e64717fb16c2e501c80672cc67e","src/lib.rs":"c83aefd97da4cdcc3286173f090c45049669b7ea7a5e06d20b6247de1f1d246c","src/operands.rs":"02461c4820398ff6606e55b3db95571f740c589494cf56f370a650f9828f1eab","src/rules.rs":"de67ce1f8b2ac60aa30e42d07abc986530f51ffa73f6969933c7adf55e85a56e","tests/operands.rs":"ae4274473b1d397104b51c65cb4ebdfa1c84690b06df4c45ecc91b8339c51688"},"package":"d82c14d8eece42c03353e0ce86a4d3f97b1f1cef401e4d962dca6c6214a85002"}
|
||||
{"files":{"Cargo.toml":"fc6b94bccbe543c92858eb40b6538155aa73e85096843bf6b01a38f99c642112","README.md":"4dad9bc033a67101bc318662c055318457f0b91e12fdc0a566495b455ceeb4b8","benches/pluralrules.rs":"9c80009fa94a8dbf31bdba489f320d92a40f482c37149030fbba53cd62b5435f","src/lib.rs":"732bde12e3f83b193bf07fb3528e46decb11d2ce5bb442190df0530b48888013","src/operands.rs":"b58c9f8f0f7ce4622ccc685f08b15ede09591b628deffa3b14abde873d26c44a","src/rules.rs":"7b3f0c12e0722401efbdb54873e8545f943bf4a34cba9f894ead9dc955112aaf"},"package":"6c271cdb1f12a9feb3a017619c3ee681f971f270f6757341d6abe1f9f7a98bc3"}
|
|
@ -1,87 +0,0 @@
|
|||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
|
||||
- …
|
||||
|
||||
## intl_pluralrules 6.0.0 (January 28, 2020)
|
||||
|
||||
- Switch to use `TryFrom`/`TryInto` for `PluralOperands`.
|
||||
- Update `unic-langid` to 0.8.
|
||||
- Optimize `PluralOperands` struct memory layout.
|
||||
|
||||
## intl_pluralrules 5.0.2 (December 19, 2019)
|
||||
|
||||
- Make `PluralRuleType` derive `Hash` and `Eq`.
|
||||
|
||||
## intl_pluralrules 5.0.1 (November 20, 2019)
|
||||
|
||||
- The `rules.rs` grew too big, so use macro to shrink it.
|
||||
|
||||
## intl_pluralrules 5.0.0 (November 13, 2019)
|
||||
|
||||
- Renamed `IntlPluralRules` to `PluralRules` in line with
|
||||
other internationalization naming conventions.
|
||||
- Use updated generated tables which operate on sorted
|
||||
vectors of `(LanguageIdentifier, PluralRule)` tuples.
|
||||
- Improved performance of construction of `PluralRules` by 66%.
|
||||
- Removed dependency on `phf`.
|
||||
|
||||
## intl_pluralrules 4.0.1 (October 15, 2019)
|
||||
|
||||
- Update CLDR to 36.
|
||||
|
||||
## intl_pluralrules 4.0.0 (October 3, 2019)
|
||||
|
||||
- Upgrade to unic-langid 0.6.
|
||||
|
||||
## intl_pluralrules 3.0.0 (September 10, 2019)
|
||||
|
||||
- Upgrade to unic-langid 0.5.
|
||||
|
||||
## intl_pluralrules 2.0.0 (July 26, 2019)
|
||||
|
||||
- Switch to unic_langid for Language Identifiers.
|
||||
|
||||
## intl_pluralrules 1.0.3 (March 29, 2019)
|
||||
|
||||
- Update CLDR to 35
|
||||
|
||||
## intl_pluralrules 1.0.2 (January 7, 2019)
|
||||
|
||||
- Update to Rust 2018.
|
||||
|
||||
## intl_pluralrules 1.0.1 (October 26, 2018)
|
||||
|
||||
- Update CLDR to 34
|
||||
- Update rules to pass enums by reference
|
||||
|
||||
## intl_pluralrules 1.0.0 (August 15, 2018)
|
||||
|
||||
- Add dedicated impls for PluralOperands::from
|
||||
- New trait extends impls to custom types
|
||||
- Other minor optimizations
|
||||
|
||||
## intl_pluralrules 0.9.1 (August 6, 2018)
|
||||
|
||||
- Updates to docs for PluralRuleType.
|
||||
- Move PluralRuleType from rules.rs to lib.rs.
|
||||
- Fix lib.rs doc.
|
||||
|
||||
## intl_pluralrules 0.9.0 (August 3, 2018)
|
||||
|
||||
- Updates to docs.
|
||||
|
||||
## intl_pluralrules 0.8.2 (July 31, 2018)
|
||||
|
||||
- Optimization for operands.rs.
|
||||
|
||||
## intl_pluralrules 0.8.1 (July 30, 2018)
|
||||
|
||||
- Locale field.
|
||||
- Locale field getter function.
|
||||
- Update rules.rs.
|
||||
|
||||
## intl_pluralrules 0.8.0 (July 30, 2018)
|
||||
|
||||
- Initial release.
|
|
@ -13,8 +13,9 @@
|
|||
[package]
|
||||
edition = "2018"
|
||||
name = "intl_pluralrules"
|
||||
version = "6.0.0"
|
||||
version = "7.0.0"
|
||||
authors = ["Kekoa Riggin <kekoariggin@gmail.com>", "Zibi Braniecki <zbraniecki@mozilla.com>"]
|
||||
include = ["src/**/*", "benches/*.rs", "Cargo.toml", "README.md"]
|
||||
description = "Unicode Plural Rules categorizer for numeric input."
|
||||
readme = "README.md"
|
||||
keywords = ["localization", "l10n", "i18n", "intl", "internationalization"]
|
||||
|
@ -29,12 +30,12 @@ harness = false
|
|||
version = "0.3.2"
|
||||
|
||||
[dependencies.unic-langid]
|
||||
version = "0.8"
|
||||
version = "0.9"
|
||||
[dev-dependencies.criterion]
|
||||
version = "0.3"
|
||||
|
||||
[dev-dependencies.unic-langid]
|
||||
version = "0.8"
|
||||
version = "0.9"
|
||||
features = ["macros"]
|
||||
[badges.coveralls]
|
||||
branch = "master"
|
||||
|
|
|
@ -1,893 +0,0 @@
|
|||
{
|
||||
"supplemental": {
|
||||
"version": {
|
||||
"_unicodeVersion": "12.1.0",
|
||||
"_cldrVersion": "36"
|
||||
},
|
||||
"plurals-type-cardinal": {
|
||||
"af": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ak": {
|
||||
"pluralRule-count-one": "n = 0..1 @integer 0, 1 @decimal 0.0, 1.0, 0.00, 1.00, 0.000, 1.000, 0.0000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"am": {
|
||||
"pluralRule-count-one": "i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"an": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ar": {
|
||||
"pluralRule-count-zero": "n = 0 @integer 0 @decimal 0.0, 0.00, 0.000, 0.0000",
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-two": "n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000",
|
||||
"pluralRule-count-few": "n % 100 = 3..10 @integer 3~10, 103~110, 1003, … @decimal 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 103.0, 1003.0, …",
|
||||
"pluralRule-count-many": "n % 100 = 11..99 @integer 11~26, 111, 1011, … @decimal 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 111.0, 1011.0, …",
|
||||
"pluralRule-count-other": " @integer 100~102, 200~202, 300~302, 400~402, 500~502, 600, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.1, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ars": {
|
||||
"pluralRule-count-zero": "n = 0 @integer 0 @decimal 0.0, 0.00, 0.000, 0.0000",
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-two": "n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000",
|
||||
"pluralRule-count-few": "n % 100 = 3..10 @integer 3~10, 103~110, 1003, … @decimal 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 103.0, 1003.0, …",
|
||||
"pluralRule-count-many": "n % 100 = 11..99 @integer 11~26, 111, 1011, … @decimal 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 111.0, 1011.0, …",
|
||||
"pluralRule-count-other": " @integer 100~102, 200~202, 300~302, 400~402, 500~502, 600, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.1, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"as": {
|
||||
"pluralRule-count-one": "i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"asa": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ast": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"az": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"be": {
|
||||
"pluralRule-count-one": "n % 10 = 1 and n % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 1.0, 21.0, 31.0, 41.0, 51.0, 61.0, 71.0, 81.0, 101.0, 1001.0, …",
|
||||
"pluralRule-count-few": "n % 10 = 2..4 and n % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, … @decimal 2.0, 3.0, 4.0, 22.0, 23.0, 24.0, 32.0, 33.0, 102.0, 1002.0, …",
|
||||
"pluralRule-count-many": "n % 10 = 0 or n % 10 = 5..9 or n % 100 = 11..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …",
|
||||
"pluralRule-count-other": " @decimal 0.1~0.9, 1.1~1.7, 10.1, 100.1, 1000.1, …"
|
||||
},
|
||||
"bem": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"bez": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"bg": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"bho": {
|
||||
"pluralRule-count-one": "n = 0..1 @integer 0, 1 @decimal 0.0, 1.0, 0.00, 1.00, 0.000, 1.000, 0.0000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"bm": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"bn": {
|
||||
"pluralRule-count-one": "i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"bo": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"br": {
|
||||
"pluralRule-count-one": "n % 10 = 1 and n % 100 != 11,71,91 @integer 1, 21, 31, 41, 51, 61, 81, 101, 1001, … @decimal 1.0, 21.0, 31.0, 41.0, 51.0, 61.0, 81.0, 101.0, 1001.0, …",
|
||||
"pluralRule-count-two": "n % 10 = 2 and n % 100 != 12,72,92 @integer 2, 22, 32, 42, 52, 62, 82, 102, 1002, … @decimal 2.0, 22.0, 32.0, 42.0, 52.0, 62.0, 82.0, 102.0, 1002.0, …",
|
||||
"pluralRule-count-few": "n % 10 = 3..4,9 and n % 100 != 10..19,70..79,90..99 @integer 3, 4, 9, 23, 24, 29, 33, 34, 39, 43, 44, 49, 103, 1003, … @decimal 3.0, 4.0, 9.0, 23.0, 24.0, 29.0, 33.0, 34.0, 103.0, 1003.0, …",
|
||||
"pluralRule-count-many": "n != 0 and n % 1000000 = 0 @integer 1000000, … @decimal 1000000.0, 1000000.00, 1000000.000, …",
|
||||
"pluralRule-count-other": " @integer 0, 5~8, 10~20, 100, 1000, 10000, 100000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, …"
|
||||
},
|
||||
"brx": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"bs": {
|
||||
"pluralRule-count-one": "v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …",
|
||||
"pluralRule-count-few": "v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, … @decimal 0.2~0.4, 1.2~1.4, 2.2~2.4, 3.2~3.4, 4.2~4.4, 5.2, 10.2, 100.2, 1000.2, …",
|
||||
"pluralRule-count-other": " @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 0.5~1.0, 1.5~2.0, 2.5~2.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ca": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ce": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ceb": {
|
||||
"pluralRule-count-one": "v = 0 and i = 1,2,3 or v = 0 and i % 10 != 4,6,9 or v != 0 and f % 10 != 4,6,9 @integer 0~3, 5, 7, 8, 10~13, 15, 17, 18, 20, 21, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.3, 0.5, 0.7, 0.8, 1.0~1.3, 1.5, 1.7, 1.8, 2.0, 2.1, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …",
|
||||
"pluralRule-count-other": " @integer 4, 6, 9, 14, 16, 19, 24, 26, 104, 1004, … @decimal 0.4, 0.6, 0.9, 1.4, 1.6, 1.9, 2.4, 2.6, 10.4, 100.4, 1000.4, …"
|
||||
},
|
||||
"cgg": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"chr": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ckb": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"cs": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-few": "i = 2..4 and v = 0 @integer 2~4",
|
||||
"pluralRule-count-many": "v != 0 @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …",
|
||||
"pluralRule-count-other": " @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"cy": {
|
||||
"pluralRule-count-zero": "n = 0 @integer 0 @decimal 0.0, 0.00, 0.000, 0.0000",
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-two": "n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000",
|
||||
"pluralRule-count-few": "n = 3 @integer 3 @decimal 3.0, 3.00, 3.000, 3.0000",
|
||||
"pluralRule-count-many": "n = 6 @integer 6 @decimal 6.0, 6.00, 6.000, 6.0000",
|
||||
"pluralRule-count-other": " @integer 4, 5, 7~20, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"da": {
|
||||
"pluralRule-count-one": "n = 1 or t != 0 and i = 0,1 @integer 1 @decimal 0.1~1.6",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 2.0~3.4, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"de": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"dsb": {
|
||||
"pluralRule-count-one": "v = 0 and i % 100 = 1 or f % 100 = 1 @integer 1, 101, 201, 301, 401, 501, 601, 701, 1001, … @decimal 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …",
|
||||
"pluralRule-count-two": "v = 0 and i % 100 = 2 or f % 100 = 2 @integer 2, 102, 202, 302, 402, 502, 602, 702, 1002, … @decimal 0.2, 1.2, 2.2, 3.2, 4.2, 5.2, 6.2, 7.2, 10.2, 100.2, 1000.2, …",
|
||||
"pluralRule-count-few": "v = 0 and i % 100 = 3..4 or f % 100 = 3..4 @integer 3, 4, 103, 104, 203, 204, 303, 304, 403, 404, 503, 504, 603, 604, 703, 704, 1003, … @decimal 0.3, 0.4, 1.3, 1.4, 2.3, 2.4, 3.3, 3.4, 4.3, 4.4, 5.3, 5.4, 6.3, 6.4, 7.3, 7.4, 10.3, 100.3, 1000.3, …",
|
||||
"pluralRule-count-other": " @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 0.5~1.0, 1.5~2.0, 2.5~2.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"dv": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"dz": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ee": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"el": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"en": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"eo": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"es": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"et": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"eu": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"fa": {
|
||||
"pluralRule-count-one": "i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ff": {
|
||||
"pluralRule-count-one": "i = 0,1 @integer 0, 1 @decimal 0.0~1.5",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 2.0~3.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"fi": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"fil": {
|
||||
"pluralRule-count-one": "v = 0 and i = 1,2,3 or v = 0 and i % 10 != 4,6,9 or v != 0 and f % 10 != 4,6,9 @integer 0~3, 5, 7, 8, 10~13, 15, 17, 18, 20, 21, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.3, 0.5, 0.7, 0.8, 1.0~1.3, 1.5, 1.7, 1.8, 2.0, 2.1, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …",
|
||||
"pluralRule-count-other": " @integer 4, 6, 9, 14, 16, 19, 24, 26, 104, 1004, … @decimal 0.4, 0.6, 0.9, 1.4, 1.6, 1.9, 2.4, 2.6, 10.4, 100.4, 1000.4, …"
|
||||
},
|
||||
"fo": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"fr": {
|
||||
"pluralRule-count-one": "i = 0,1 @integer 0, 1 @decimal 0.0~1.5",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 2.0~3.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"fur": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"fy": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ga": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-two": "n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000",
|
||||
"pluralRule-count-few": "n = 3..6 @integer 3~6 @decimal 3.0, 4.0, 5.0, 6.0, 3.00, 4.00, 5.00, 6.00, 3.000, 4.000, 5.000, 6.000, 3.0000, 4.0000, 5.0000, 6.0000",
|
||||
"pluralRule-count-many": "n = 7..10 @integer 7~10 @decimal 7.0, 8.0, 9.0, 10.0, 7.00, 8.00, 9.00, 10.00, 7.000, 8.000, 9.000, 10.000, 7.0000, 8.0000, 9.0000, 10.0000",
|
||||
"pluralRule-count-other": " @integer 0, 11~25, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.1, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"gd": {
|
||||
"pluralRule-count-one": "n = 1,11 @integer 1, 11 @decimal 1.0, 11.0, 1.00, 11.00, 1.000, 11.000, 1.0000",
|
||||
"pluralRule-count-two": "n = 2,12 @integer 2, 12 @decimal 2.0, 12.0, 2.00, 12.00, 2.000, 12.000, 2.0000",
|
||||
"pluralRule-count-few": "n = 3..10,13..19 @integer 3~10, 13~19 @decimal 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 3.00",
|
||||
"pluralRule-count-other": " @integer 0, 20~34, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.1, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"gl": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"gsw": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"gu": {
|
||||
"pluralRule-count-one": "i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"guw": {
|
||||
"pluralRule-count-one": "n = 0..1 @integer 0, 1 @decimal 0.0, 1.0, 0.00, 1.00, 0.000, 1.000, 0.0000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"gv": {
|
||||
"pluralRule-count-one": "v = 0 and i % 10 = 1 @integer 1, 11, 21, 31, 41, 51, 61, 71, 101, 1001, …",
|
||||
"pluralRule-count-two": "v = 0 and i % 10 = 2 @integer 2, 12, 22, 32, 42, 52, 62, 72, 102, 1002, …",
|
||||
"pluralRule-count-few": "v = 0 and i % 100 = 0,20,40,60,80 @integer 0, 20, 40, 60, 80, 100, 120, 140, 1000, 10000, 100000, 1000000, …",
|
||||
"pluralRule-count-many": "v != 0 @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …",
|
||||
"pluralRule-count-other": " @integer 3~10, 13~19, 23, 103, 1003, …"
|
||||
},
|
||||
"ha": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"haw": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"he": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-two": "i = 2 and v = 0 @integer 2",
|
||||
"pluralRule-count-many": "v = 0 and n != 0..10 and n % 10 = 0 @integer 20, 30, 40, 50, 60, 70, 80, 90, 100, 1000, 10000, 100000, 1000000, …",
|
||||
"pluralRule-count-other": " @integer 0, 3~17, 101, 1001, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"hi": {
|
||||
"pluralRule-count-one": "i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"hr": {
|
||||
"pluralRule-count-one": "v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …",
|
||||
"pluralRule-count-few": "v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, … @decimal 0.2~0.4, 1.2~1.4, 2.2~2.4, 3.2~3.4, 4.2~4.4, 5.2, 10.2, 100.2, 1000.2, …",
|
||||
"pluralRule-count-other": " @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 0.5~1.0, 1.5~2.0, 2.5~2.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"hsb": {
|
||||
"pluralRule-count-one": "v = 0 and i % 100 = 1 or f % 100 = 1 @integer 1, 101, 201, 301, 401, 501, 601, 701, 1001, … @decimal 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …",
|
||||
"pluralRule-count-two": "v = 0 and i % 100 = 2 or f % 100 = 2 @integer 2, 102, 202, 302, 402, 502, 602, 702, 1002, … @decimal 0.2, 1.2, 2.2, 3.2, 4.2, 5.2, 6.2, 7.2, 10.2, 100.2, 1000.2, …",
|
||||
"pluralRule-count-few": "v = 0 and i % 100 = 3..4 or f % 100 = 3..4 @integer 3, 4, 103, 104, 203, 204, 303, 304, 403, 404, 503, 504, 603, 604, 703, 704, 1003, … @decimal 0.3, 0.4, 1.3, 1.4, 2.3, 2.4, 3.3, 3.4, 4.3, 4.4, 5.3, 5.4, 6.3, 6.4, 7.3, 7.4, 10.3, 100.3, 1000.3, …",
|
||||
"pluralRule-count-other": " @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 0.5~1.0, 1.5~2.0, 2.5~2.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"hu": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"hy": {
|
||||
"pluralRule-count-one": "i = 0,1 @integer 0, 1 @decimal 0.0~1.5",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 2.0~3.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ia": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"id": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ig": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ii": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"in": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"io": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"is": {
|
||||
"pluralRule-count-one": "t = 0 and i % 10 = 1 and i % 100 != 11 or t != 0 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1~1.6, 10.1, 100.1, 1000.1, …",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"it": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"iu": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-two": "n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000",
|
||||
"pluralRule-count-other": " @integer 0, 3~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"iw": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-two": "i = 2 and v = 0 @integer 2",
|
||||
"pluralRule-count-many": "v = 0 and n != 0..10 and n % 10 = 0 @integer 20, 30, 40, 50, 60, 70, 80, 90, 100, 1000, 10000, 100000, 1000000, …",
|
||||
"pluralRule-count-other": " @integer 0, 3~17, 101, 1001, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ja": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"jbo": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"jgo": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ji": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"jmc": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"jv": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"jw": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ka": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"kab": {
|
||||
"pluralRule-count-one": "i = 0,1 @integer 0, 1 @decimal 0.0~1.5",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 2.0~3.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"kaj": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"kcg": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"kde": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"kea": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"kk": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"kkj": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"kl": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"km": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"kn": {
|
||||
"pluralRule-count-one": "i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ko": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ks": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ksb": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ksh": {
|
||||
"pluralRule-count-zero": "n = 0 @integer 0 @decimal 0.0, 0.00, 0.000, 0.0000",
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ku": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"kw": {
|
||||
"pluralRule-count-zero": "n = 0 @integer 0 @decimal 0.0, 0.00, 0.000, 0.0000",
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-two": "n % 100 = 2,22,42,62,82 or n % 1000 = 0 and n % 100000 = 1000..20000,40000,60000,80000 or n != 0 and n % 1000000 = 100000 @integer 2, 22, 42, 62, 82, 102, 122, 142, 1000, 10000, 100000, … @decimal 2.0, 22.0, 42.0, 62.0, 82.0, 102.0, 122.0, 142.0, 1000.0, 10000.0, 100000.0, …",
|
||||
"pluralRule-count-few": "n % 100 = 3,23,43,63,83 @integer 3, 23, 43, 63, 83, 103, 123, 143, 1003, … @decimal 3.0, 23.0, 43.0, 63.0, 83.0, 103.0, 123.0, 143.0, 1003.0, …",
|
||||
"pluralRule-count-many": "n != 1 and n % 100 = 1,21,41,61,81 @integer 21, 41, 61, 81, 101, 121, 141, 161, 1001, … @decimal 21.0, 41.0, 61.0, 81.0, 101.0, 121.0, 141.0, 161.0, 1001.0, …",
|
||||
"pluralRule-count-other": " @integer 4~19, 100, 1004, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.1, 1000000.0, …"
|
||||
},
|
||||
"ky": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"lag": {
|
||||
"pluralRule-count-zero": "n = 0 @integer 0 @decimal 0.0, 0.00, 0.000, 0.0000",
|
||||
"pluralRule-count-one": "i = 0,1 and n != 0 @integer 1 @decimal 0.1~1.6",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 2.0~3.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"lb": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"lg": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"lkt": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ln": {
|
||||
"pluralRule-count-one": "n = 0..1 @integer 0, 1 @decimal 0.0, 1.0, 0.00, 1.00, 0.000, 1.000, 0.0000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"lo": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"lt": {
|
||||
"pluralRule-count-one": "n % 10 = 1 and n % 100 != 11..19 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 1.0, 21.0, 31.0, 41.0, 51.0, 61.0, 71.0, 81.0, 101.0, 1001.0, …",
|
||||
"pluralRule-count-few": "n % 10 = 2..9 and n % 100 != 11..19 @integer 2~9, 22~29, 102, 1002, … @decimal 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 22.0, 102.0, 1002.0, …",
|
||||
"pluralRule-count-many": "f != 0 @decimal 0.1~0.9, 1.1~1.7, 10.1, 100.1, 1000.1, …",
|
||||
"pluralRule-count-other": " @integer 0, 10~20, 30, 40, 50, 60, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"lv": {
|
||||
"pluralRule-count-zero": "n % 10 = 0 or n % 100 = 11..19 or v = 2 and f % 100 = 11..19 @integer 0, 10~20, 30, 40, 50, 60, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …",
|
||||
"pluralRule-count-one": "n % 10 = 1 and n % 100 != 11 or v = 2 and f % 10 = 1 and f % 100 != 11 or v != 2 and f % 10 = 1 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1, 1.0, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …",
|
||||
"pluralRule-count-other": " @integer 2~9, 22~29, 102, 1002, … @decimal 0.2~0.9, 1.2~1.9, 10.2, 100.2, 1000.2, …"
|
||||
},
|
||||
"mas": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"mg": {
|
||||
"pluralRule-count-one": "n = 0..1 @integer 0, 1 @decimal 0.0, 1.0, 0.00, 1.00, 0.000, 1.000, 0.0000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"mgo": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"mk": {
|
||||
"pluralRule-count-one": "v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 0.2~1.0, 1.2~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ml": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"mn": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"mo": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-few": "v != 0 or n = 0 or n % 100 = 2..19 @integer 0, 2~16, 102, 1002, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …",
|
||||
"pluralRule-count-other": " @integer 20~35, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"mr": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ms": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"mt": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-few": "n = 0 or n % 100 = 2..10 @integer 0, 2~10, 102~107, 1002, … @decimal 0.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 10.0, 102.0, 1002.0, …",
|
||||
"pluralRule-count-many": "n % 100 = 11..19 @integer 11~19, 111~117, 1011, … @decimal 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 111.0, 1011.0, …",
|
||||
"pluralRule-count-other": " @integer 20~35, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.1, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"my": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"nah": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"naq": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-two": "n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000",
|
||||
"pluralRule-count-other": " @integer 0, 3~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"nb": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"nd": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ne": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"nl": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"nn": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"nnh": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"no": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"nqo": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"nr": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"nso": {
|
||||
"pluralRule-count-one": "n = 0..1 @integer 0, 1 @decimal 0.0, 1.0, 0.00, 1.00, 0.000, 1.000, 0.0000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ny": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"nyn": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"om": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"or": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"os": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"osa": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"pa": {
|
||||
"pluralRule-count-one": "n = 0..1 @integer 0, 1 @decimal 0.0, 1.0, 0.00, 1.00, 0.000, 1.000, 0.0000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"pap": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"pl": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-few": "v = 0 and i % 10 = 2..4 and i % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …",
|
||||
"pluralRule-count-many": "v = 0 and i != 1 and i % 10 = 0..1 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 12..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …",
|
||||
"pluralRule-count-other": " @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"prg": {
|
||||
"pluralRule-count-zero": "n % 10 = 0 or n % 100 = 11..19 or v = 2 and f % 100 = 11..19 @integer 0, 10~20, 30, 40, 50, 60, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …",
|
||||
"pluralRule-count-one": "n % 10 = 1 and n % 100 != 11 or v = 2 and f % 10 = 1 and f % 100 != 11 or v != 2 and f % 10 = 1 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1, 1.0, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …",
|
||||
"pluralRule-count-other": " @integer 2~9, 22~29, 102, 1002, … @decimal 0.2~0.9, 1.2~1.9, 10.2, 100.2, 1000.2, …"
|
||||
},
|
||||
"ps": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"pt": {
|
||||
"pluralRule-count-one": "i = 0..1 @integer 0, 1 @decimal 0.0~1.5",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 2.0~3.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"pt-PT": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"rm": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ro": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-few": "v != 0 or n = 0 or n % 100 = 2..19 @integer 0, 2~16, 102, 1002, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …",
|
||||
"pluralRule-count-other": " @integer 20~35, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"rof": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"root": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ru": {
|
||||
"pluralRule-count-one": "v = 0 and i % 10 = 1 and i % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
|
||||
"pluralRule-count-few": "v = 0 and i % 10 = 2..4 and i % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …",
|
||||
"pluralRule-count-many": "v = 0 and i % 10 = 0 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 11..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …",
|
||||
"pluralRule-count-other": " @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"rwk": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"sah": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"saq": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"sc": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"scn": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"sd": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"sdh": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"se": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-two": "n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000",
|
||||
"pluralRule-count-other": " @integer 0, 3~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"seh": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ses": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"sg": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"sh": {
|
||||
"pluralRule-count-one": "v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …",
|
||||
"pluralRule-count-few": "v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, … @decimal 0.2~0.4, 1.2~1.4, 2.2~2.4, 3.2~3.4, 4.2~4.4, 5.2, 10.2, 100.2, 1000.2, …",
|
||||
"pluralRule-count-other": " @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 0.5~1.0, 1.5~2.0, 2.5~2.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"shi": {
|
||||
"pluralRule-count-one": "i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04",
|
||||
"pluralRule-count-few": "n = 2..10 @integer 2~10 @decimal 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 2.00, 3.00, 4.00, 5.00, 6.00, 7.00, 8.00",
|
||||
"pluralRule-count-other": " @integer 11~26, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~1.9, 2.1~2.7, 10.1, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"si": {
|
||||
"pluralRule-count-one": "n = 0,1 or i = 0 and f = 1 @integer 0, 1 @decimal 0.0, 0.1, 1.0, 0.00, 0.01, 1.00, 0.000, 0.001, 1.000, 0.0000, 0.0001, 1.0000",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.2~0.9, 1.1~1.8, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"sk": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-few": "i = 2..4 and v = 0 @integer 2~4",
|
||||
"pluralRule-count-many": "v != 0 @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …",
|
||||
"pluralRule-count-other": " @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"sl": {
|
||||
"pluralRule-count-one": "v = 0 and i % 100 = 1 @integer 1, 101, 201, 301, 401, 501, 601, 701, 1001, …",
|
||||
"pluralRule-count-two": "v = 0 and i % 100 = 2 @integer 2, 102, 202, 302, 402, 502, 602, 702, 1002, …",
|
||||
"pluralRule-count-few": "v = 0 and i % 100 = 3..4 or v != 0 @integer 3, 4, 103, 104, 203, 204, 303, 304, 403, 404, 503, 504, 603, 604, 703, 704, 1003, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …",
|
||||
"pluralRule-count-other": " @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"sma": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-two": "n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000",
|
||||
"pluralRule-count-other": " @integer 0, 3~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"smi": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-two": "n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000",
|
||||
"pluralRule-count-other": " @integer 0, 3~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"smj": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-two": "n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000",
|
||||
"pluralRule-count-other": " @integer 0, 3~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"smn": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-two": "n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000",
|
||||
"pluralRule-count-other": " @integer 0, 3~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"sms": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-two": "n = 2 @integer 2 @decimal 2.0, 2.00, 2.000, 2.0000",
|
||||
"pluralRule-count-other": " @integer 0, 3~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"sn": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"so": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"sq": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"sr": {
|
||||
"pluralRule-count-one": "v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …",
|
||||
"pluralRule-count-few": "v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, … @decimal 0.2~0.4, 1.2~1.4, 2.2~2.4, 3.2~3.4, 4.2~4.4, 5.2, 10.2, 100.2, 1000.2, …",
|
||||
"pluralRule-count-other": " @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 0.5~1.0, 1.5~2.0, 2.5~2.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ss": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ssy": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"st": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"su": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"sv": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"sw": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"syr": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ta": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"te": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"teo": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"th": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ti": {
|
||||
"pluralRule-count-one": "n = 0..1 @integer 0, 1 @decimal 0.0, 1.0, 0.00, 1.00, 0.000, 1.000, 0.0000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"tig": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"tk": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"tl": {
|
||||
"pluralRule-count-one": "v = 0 and i = 1,2,3 or v = 0 and i % 10 != 4,6,9 or v != 0 and f % 10 != 4,6,9 @integer 0~3, 5, 7, 8, 10~13, 15, 17, 18, 20, 21, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.3, 0.5, 0.7, 0.8, 1.0~1.3, 1.5, 1.7, 1.8, 2.0, 2.1, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …",
|
||||
"pluralRule-count-other": " @integer 4, 6, 9, 14, 16, 19, 24, 26, 104, 1004, … @decimal 0.4, 0.6, 0.9, 1.4, 1.6, 1.9, 2.4, 2.6, 10.4, 100.4, 1000.4, …"
|
||||
},
|
||||
"tn": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"to": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"tr": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ts": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"tzm": {
|
||||
"pluralRule-count-one": "n = 0..1 or n = 11..99 @integer 0, 1, 11~24 @decimal 0.0, 1.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0",
|
||||
"pluralRule-count-other": " @integer 2~10, 100~106, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ug": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"uk": {
|
||||
"pluralRule-count-one": "v = 0 and i % 10 = 1 and i % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
|
||||
"pluralRule-count-few": "v = 0 and i % 10 = 2..4 and i % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …",
|
||||
"pluralRule-count-many": "v = 0 and i % 10 = 0 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 11..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …",
|
||||
"pluralRule-count-other": " @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ur": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"uz": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"ve": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"vi": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"vo": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"vun": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"wa": {
|
||||
"pluralRule-count-one": "n = 0..1 @integer 0, 1 @decimal 0.0, 1.0, 0.00, 1.00, 0.000, 1.000, 0.0000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 0.1~0.9, 1.1~1.7, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"wae": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"wo": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"xh": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"xog": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1 @decimal 1.0, 1.00, 1.000, 1.0000",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"yi": {
|
||||
"pluralRule-count-one": "i = 1 and v = 0 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"yo": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"yue": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"zh": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
},
|
||||
"zu": {
|
||||
"pluralRule-count-one": "i = 0 or n = 1 @integer 0, 1 @decimal 0.0~1.0, 0.00~0.04",
|
||||
"pluralRule-count-other": " @integer 2~17, 100, 1000, 10000, 100000, 1000000, … @decimal 1.1~2.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,373 +0,0 @@
|
|||
{
|
||||
"supplemental": {
|
||||
"version": {
|
||||
"_unicodeVersion": "12.1.0",
|
||||
"_cldrVersion": "36"
|
||||
},
|
||||
"plurals-type-ordinal": {
|
||||
"af": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"am": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"an": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ar": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"as": {
|
||||
"pluralRule-count-one": "n = 1,5,7,8,9,10 @integer 1, 5, 7~10",
|
||||
"pluralRule-count-two": "n = 2,3 @integer 2, 3",
|
||||
"pluralRule-count-few": "n = 4 @integer 4",
|
||||
"pluralRule-count-many": "n = 6 @integer 6",
|
||||
"pluralRule-count-other": " @integer 0, 11~25, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"az": {
|
||||
"pluralRule-count-one": "i % 10 = 1,2,5,7,8 or i % 100 = 20,50,70,80 @integer 1, 2, 5, 7, 8, 11, 12, 15, 17, 18, 20~22, 25, 101, 1001, …",
|
||||
"pluralRule-count-few": "i % 10 = 3,4 or i % 1000 = 100,200,300,400,500,600,700,800,900 @integer 3, 4, 13, 14, 23, 24, 33, 34, 43, 44, 53, 54, 63, 64, 73, 74, 100, 1003, …",
|
||||
"pluralRule-count-many": "i = 0 or i % 10 = 6 or i % 100 = 40,60,90 @integer 0, 6, 16, 26, 36, 40, 46, 56, 106, 1006, …",
|
||||
"pluralRule-count-other": " @integer 9, 10, 19, 29, 30, 39, 49, 59, 69, 79, 109, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"be": {
|
||||
"pluralRule-count-few": "n % 10 = 2,3 and n % 100 != 12,13 @integer 2, 3, 22, 23, 32, 33, 42, 43, 52, 53, 62, 63, 72, 73, 82, 83, 102, 1002, …",
|
||||
"pluralRule-count-other": " @integer 0, 1, 4~17, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"bg": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"bn": {
|
||||
"pluralRule-count-one": "n = 1,5,7,8,9,10 @integer 1, 5, 7~10",
|
||||
"pluralRule-count-two": "n = 2,3 @integer 2, 3",
|
||||
"pluralRule-count-few": "n = 4 @integer 4",
|
||||
"pluralRule-count-many": "n = 6 @integer 6",
|
||||
"pluralRule-count-other": " @integer 0, 11~25, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"bs": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ca": {
|
||||
"pluralRule-count-one": "n = 1,3 @integer 1, 3",
|
||||
"pluralRule-count-two": "n = 2 @integer 2",
|
||||
"pluralRule-count-few": "n = 4 @integer 4",
|
||||
"pluralRule-count-other": " @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ce": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"cs": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"cy": {
|
||||
"pluralRule-count-zero": "n = 0,7,8,9 @integer 0, 7~9",
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-two": "n = 2 @integer 2",
|
||||
"pluralRule-count-few": "n = 3,4 @integer 3, 4",
|
||||
"pluralRule-count-many": "n = 5,6 @integer 5, 6",
|
||||
"pluralRule-count-other": " @integer 10~25, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"da": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"de": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"dsb": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"el": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"en": {
|
||||
"pluralRule-count-one": "n % 10 = 1 and n % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
|
||||
"pluralRule-count-two": "n % 10 = 2 and n % 100 != 12 @integer 2, 22, 32, 42, 52, 62, 72, 82, 102, 1002, …",
|
||||
"pluralRule-count-few": "n % 10 = 3 and n % 100 != 13 @integer 3, 23, 33, 43, 53, 63, 73, 83, 103, 1003, …",
|
||||
"pluralRule-count-other": " @integer 0, 4~18, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"es": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"et": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"eu": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"fa": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"fi": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"fil": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"fr": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"fy": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ga": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"gd": {
|
||||
"pluralRule-count-one": "n = 1,11 @integer 1, 11",
|
||||
"pluralRule-count-two": "n = 2,12 @integer 2, 12",
|
||||
"pluralRule-count-few": "n = 3,13 @integer 3, 13",
|
||||
"pluralRule-count-other": " @integer 0, 4~10, 14~21, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"gl": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"gsw": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"gu": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-two": "n = 2,3 @integer 2, 3",
|
||||
"pluralRule-count-few": "n = 4 @integer 4",
|
||||
"pluralRule-count-many": "n = 6 @integer 6",
|
||||
"pluralRule-count-other": " @integer 0, 5, 7~20, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"he": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"hi": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-two": "n = 2,3 @integer 2, 3",
|
||||
"pluralRule-count-few": "n = 4 @integer 4",
|
||||
"pluralRule-count-many": "n = 6 @integer 6",
|
||||
"pluralRule-count-other": " @integer 0, 5, 7~20, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"hr": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"hsb": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"hu": {
|
||||
"pluralRule-count-one": "n = 1,5 @integer 1, 5",
|
||||
"pluralRule-count-other": " @integer 0, 2~4, 6~17, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"hy": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ia": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"id": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"in": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"is": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"it": {
|
||||
"pluralRule-count-many": "n = 11,8,80,800 @integer 8, 11, 80, 800",
|
||||
"pluralRule-count-other": " @integer 0~7, 9, 10, 12~17, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"iw": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ja": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ka": {
|
||||
"pluralRule-count-one": "i = 1 @integer 1",
|
||||
"pluralRule-count-many": "i = 0 or i % 100 = 2..20,40,60,80 @integer 0, 2~16, 102, 1002, …",
|
||||
"pluralRule-count-other": " @integer 21~36, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"kk": {
|
||||
"pluralRule-count-many": "n % 10 = 6 or n % 10 = 9 or n % 10 = 0 and n != 0 @integer 6, 9, 10, 16, 19, 20, 26, 29, 30, 36, 39, 40, 100, 1000, 10000, 100000, 1000000, …",
|
||||
"pluralRule-count-other": " @integer 0~5, 7, 8, 11~15, 17, 18, 21, 101, 1001, …"
|
||||
},
|
||||
"km": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"kn": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ko": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"kw": {
|
||||
"pluralRule-count-one": "n = 1..4 or n % 100 = 1..4,21..24,41..44,61..64,81..84 @integer 1~4, 21~24, 41~44, 61~64, 101, 1001, …",
|
||||
"pluralRule-count-many": "n = 5 or n % 100 = 5 @integer 5, 105, 205, 305, 405, 505, 605, 705, 1005, …",
|
||||
"pluralRule-count-other": " @integer 0, 6~20, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ky": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"lo": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"lt": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"lv": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"mk": {
|
||||
"pluralRule-count-one": "i % 10 = 1 and i % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
|
||||
"pluralRule-count-two": "i % 10 = 2 and i % 100 != 12 @integer 2, 22, 32, 42, 52, 62, 72, 82, 102, 1002, …",
|
||||
"pluralRule-count-many": "i % 10 = 7,8 and i % 100 != 17,18 @integer 7, 8, 27, 28, 37, 38, 47, 48, 57, 58, 67, 68, 77, 78, 87, 88, 107, 1007, …",
|
||||
"pluralRule-count-other": " @integer 0, 3~6, 9~19, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ml": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"mn": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"mo": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"mr": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-two": "n = 2,3 @integer 2, 3",
|
||||
"pluralRule-count-few": "n = 4 @integer 4",
|
||||
"pluralRule-count-other": " @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ms": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"my": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"nb": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ne": {
|
||||
"pluralRule-count-one": "n = 1..4 @integer 1~4",
|
||||
"pluralRule-count-other": " @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"nl": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"or": {
|
||||
"pluralRule-count-one": "n = 1,5,7..9 @integer 1, 5, 7~9",
|
||||
"pluralRule-count-two": "n = 2,3 @integer 2, 3",
|
||||
"pluralRule-count-few": "n = 4 @integer 4",
|
||||
"pluralRule-count-many": "n = 6 @integer 6",
|
||||
"pluralRule-count-other": " @integer 0, 10~24, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"pa": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"pl": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"prg": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ps": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"pt": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ro": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"root": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ru": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"sc": {
|
||||
"pluralRule-count-many": "n = 11,8,80,800 @integer 8, 11, 80, 800",
|
||||
"pluralRule-count-other": " @integer 0~7, 9, 10, 12~17, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"scn": {
|
||||
"pluralRule-count-many": "n = 11,8,80,800 @integer 8, 11, 80, 800",
|
||||
"pluralRule-count-other": " @integer 0~7, 9, 10, 12~17, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"sd": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"sh": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"si": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"sk": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"sl": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"sq": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-many": "n % 10 = 4 and n % 100 != 14 @integer 4, 24, 34, 44, 54, 64, 74, 84, 104, 1004, …",
|
||||
"pluralRule-count-other": " @integer 0, 2, 3, 5~17, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"sr": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"sv": {
|
||||
"pluralRule-count-one": "n % 10 = 1,2 and n % 100 != 11,12 @integer 1, 2, 21, 22, 31, 32, 41, 42, 51, 52, 61, 62, 71, 72, 81, 82, 101, 1001, …",
|
||||
"pluralRule-count-other": " @integer 0, 3~17, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"sw": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ta": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"te": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"th": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"tk": {
|
||||
"pluralRule-count-few": "n % 10 = 6,9 or n = 10 @integer 6, 9, 10, 16, 19, 26, 29, 36, 39, 106, 1006, …",
|
||||
"pluralRule-count-other": " @integer 0~5, 7, 8, 11~15, 17, 18, 20, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"tl": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"tr": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"uk": {
|
||||
"pluralRule-count-few": "n % 10 = 3 and n % 100 != 13 @integer 3, 23, 33, 43, 53, 63, 73, 83, 103, 1003, …",
|
||||
"pluralRule-count-other": " @integer 0~2, 4~16, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"ur": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"uz": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"vi": {
|
||||
"pluralRule-count-one": "n = 1 @integer 1",
|
||||
"pluralRule-count-other": " @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"yue": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"zh": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
},
|
||||
"zu": {
|
||||
"pluralRule-count-other": " @integer 0~15, 100, 1000, 10000, 100000, 1000000, …"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -212,7 +212,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn version_test() {
|
||||
assert_eq!(CLDR_VERSION, 36);
|
||||
assert_eq!(CLDR_VERSION, 37);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -59,15 +59,15 @@ pub struct PluralOperands {
|
|||
/// Absolute value of input
|
||||
pub n: f64,
|
||||
/// Integer value of input
|
||||
pub i: usize,
|
||||
pub i: u64,
|
||||
/// Number of visible fraction digits with trailing zeros
|
||||
pub v: usize,
|
||||
/// Number of visible fraction digits without trailing zeros
|
||||
pub w: usize,
|
||||
/// Visible fraction digits with trailing zeros
|
||||
pub f: usize,
|
||||
pub f: u64,
|
||||
/// Visible fraction digits without trailing zeros
|
||||
pub t: usize,
|
||||
pub t: u64,
|
||||
}
|
||||
|
||||
impl<'a> TryFrom<&'a str> for PluralOperands {
|
||||
|
@ -93,17 +93,17 @@ impl<'a> TryFrom<&'a str> for PluralOperands {
|
|||
let dec_str = &abs_str[(dec_pos + 1)..];
|
||||
|
||||
integer_digits =
|
||||
usize::from_str(&int_str).map_err(|_| "Could not convert string to integer!")?;
|
||||
u64::from_str(&int_str).map_err(|_| "Could not convert string to integer!")?;
|
||||
|
||||
let backtrace = dec_str.trim_end_matches('0');
|
||||
|
||||
num_fraction_digits0 = dec_str.len() as usize;
|
||||
num_fraction_digits = backtrace.len() as usize;
|
||||
fraction_digits0 =
|
||||
usize::from_str(dec_str).map_err(|_| "Could not convert string to integer!")?;
|
||||
fraction_digits = usize::from_str(backtrace).unwrap_or(0);
|
||||
u64::from_str(dec_str).map_err(|_| "Could not convert string to integer!")?;
|
||||
fraction_digits = u64::from_str(backtrace).unwrap_or(0);
|
||||
} else {
|
||||
integer_digits = absolute_value as usize;
|
||||
integer_digits = absolute_value as u64;
|
||||
num_fraction_digits0 = 0;
|
||||
num_fraction_digits = 0;
|
||||
fraction_digits0 = 0;
|
||||
|
@ -128,7 +128,7 @@ macro_rules! impl_integer_type {
|
|||
// XXXManishearth converting from u32 or u64 to isize may wrap
|
||||
PluralOperands {
|
||||
n: input as f64,
|
||||
i: input as usize,
|
||||
i: input as u64,
|
||||
v: 0,
|
||||
w: 0,
|
||||
f: 0,
|
||||
|
@ -151,7 +151,7 @@ macro_rules! impl_signed_integer_type {
|
|||
let x = (input as isize).checked_abs().ok_or("Number too big")?;
|
||||
Ok(PluralOperands {
|
||||
n: x as f64,
|
||||
i: x as usize,
|
||||
i: x as u64,
|
||||
v: 0,
|
||||
w: 0,
|
||||
f: 0,
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,133 +0,0 @@
|
|||
// Still want to test
|
||||
// Non-numeric input
|
||||
// Empty Input
|
||||
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
|
||||
use intl_pluralrules::{operands::*, PluralRuleType, PluralRules};
|
||||
use unic_langid::LanguageIdentifier;
|
||||
|
||||
#[test]
|
||||
fn test_operands_from_str() {
|
||||
let tests = vec![
|
||||
((0_f64, 0, 0, 0, 0, 0), "0"),
|
||||
((2_f64, 2, 0, 0, 0, 0), "2"),
|
||||
((57_f64, 57, 0, 0, 0, 0), "57"),
|
||||
((987_f64, 987, 0, 0, 0, 0), "987"),
|
||||
((1234567_f64, 1234567, 0, 0, 0, 0), "1234567"),
|
||||
((10_f64, 10, 0, 0, 0, 0), "-10"),
|
||||
((1000000_f64, 1000000, 0, 0, 0, 0), "-1000000"),
|
||||
((0.23_f64, 0, 2, 2, 23, 23), "0.23"),
|
||||
((0.230_f64, 0, 3, 2, 230, 23), "0.230"),
|
||||
((23.00_f64, 23, 2, 0, 00, 0), "23.00"),
|
||||
((0.0203000_f64, 0, 7, 4, 203000, 203), "0.0203000"),
|
||||
((123.45_f64, 123, 2, 2, 45, 45), "123.45"),
|
||||
((1234.567_f64, 1234, 3, 3, 567, 567), "-1234.567"),
|
||||
];
|
||||
|
||||
for test in tests {
|
||||
assert_eq!(
|
||||
Ok(PluralOperands {
|
||||
n: (test.0).0,
|
||||
i: (test.0).1,
|
||||
v: (test.0).2,
|
||||
w: (test.0).3,
|
||||
f: (test.0).4,
|
||||
t: (test.0).5,
|
||||
}),
|
||||
PluralOperands::try_from(test.1)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_operands_from_int() {
|
||||
let tests = vec![
|
||||
((0_f64, 0, 0, 0, 0, 0), 0),
|
||||
((2_f64, 2, 0, 0, 0, 0), 2),
|
||||
((57_f64, 57, 0, 0, 0, 0), 57),
|
||||
((987_f64, 987, 0, 0, 0, 0), 987),
|
||||
((1234567_f64, 1234567, 0, 0, 0, 0), 1234567),
|
||||
((10_f64, 10, 0, 0, 0, 0), -10),
|
||||
((1000000_f64, 1000000, 0, 0, 0, 0), -1000000),
|
||||
];
|
||||
|
||||
for test in tests {
|
||||
assert_eq!(
|
||||
Ok(PluralOperands {
|
||||
n: (test.0).0,
|
||||
i: (test.0).1,
|
||||
v: (test.0).2,
|
||||
w: (test.0).3,
|
||||
f: (test.0).4,
|
||||
t: (test.0).5,
|
||||
}),
|
||||
PluralOperands::try_from(test.1)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_operands_from_float() {
|
||||
let tests = vec![
|
||||
((0.23_f64, 0, 2, 2, 23, 23), 0.23),
|
||||
((0.230_f64, 0, 2, 2, 23, 23), 0.230),
|
||||
((0.0203000_f64, 0, 4, 4, 203, 203), 0.0203000),
|
||||
((123.45_f64, 123, 2, 2, 45, 45), 123.45),
|
||||
((1234.567_f64, 1234, 3, 3, 567, 567), -1234.567),
|
||||
];
|
||||
|
||||
for test in tests {
|
||||
assert_eq!(
|
||||
Ok(PluralOperands {
|
||||
n: (test.0).0,
|
||||
i: (test.0).1,
|
||||
v: (test.0).2,
|
||||
w: (test.0).3,
|
||||
f: (test.0).4,
|
||||
t: (test.0).5,
|
||||
}),
|
||||
PluralOperands::try_from(test.1)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_incorrect_operand() {
|
||||
assert_eq!(PluralOperands::try_from("foo").is_err(), true);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_locale() {
|
||||
let langid: LanguageIdentifier = "naq".parse().expect("Parsing failed.");
|
||||
let pr_naq = PluralRules::create(langid.clone(), PluralRuleType::CARDINAL).unwrap();
|
||||
assert_eq!(pr_naq.get_locale(), &langid);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn custom_type() {
|
||||
use intl_pluralrules::{PluralCategory, PluralRuleType, PluralRules};
|
||||
struct MyType {
|
||||
value: isize,
|
||||
}
|
||||
|
||||
impl TryInto<PluralOperands> for MyType {
|
||||
type Error = &'static str;
|
||||
fn try_into(self) -> Result<PluralOperands, Self::Error> {
|
||||
Ok(PluralOperands {
|
||||
n: self.value as f64,
|
||||
i: self.value as usize,
|
||||
v: 0,
|
||||
w: 0,
|
||||
f: 0,
|
||||
t: 0,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
let langid: LanguageIdentifier = "en".parse().expect("Parsing failed.");
|
||||
let pr = PluralRules::create(langid, PluralRuleType::CARDINAL).unwrap();
|
||||
let v = MyType { value: 5 };
|
||||
|
||||
assert_eq!(pr.select(v), Ok(PluralCategory::OTHER));
|
||||
}
|
|
@ -1 +1 @@
|
|||
{"files":{"Cargo.lock":"980c61883246a9d25408a3169b6c26c04b2f7da8de59d257554028106e366a65","Cargo.toml":"c2a408683e4da250c26db70cd4f8716956001e324e61e08e839d11eddc041971","README.md":"1ce686b1ba46e7fff771db934d1e8905e3d96c73d9e6712ca85011cf63cf4157","benches/canonicalize.rs":"c843af6b55c94dfd3233375435870e05c6c4090afffb3ec2901fb0d9e9b93800","benches/langid.rs":"096ab3acc302fa4f075b0a9df867f1d4434bc616d8eaf1a31643364610b6f375","benches/likely_subtags.rs":"672b47687d20d4294e2de78dc6eb1d36400a4b4c672082d15415fb18faf2e508","benches/parser.rs":"f9cf158bf5d146ef413e63e952c0a866269ba2be0db44a0aa88a5e61fdf53b4a","src/bin/generate_layout.rs":"a73c15b4997d4475298f6ff20a043e3e19bdbaa409b678442de7e2f949f18731","src/bin/generate_likelysubtags.rs":"17b94d689d6634cda7a169f54beef456540389148f036890fece63cf5c23835f","src/errors.rs":"091525fd3d704cc4698bab82af9fff1f2e6fc793910700790ec3ef943b3eddfe","src/layout_table.rs":"9e9baf9fb59516c4a55058a5ee7703c87e604bfc07b3b54b157557eef2f93bf4","src/lib.rs":"9649494f95f171179f7c5fc28a777a5f7e2c8a24a98d4d1b3751c84b7f386237","src/likelysubtags/mod.rs":"e9c670628274a7a8e7e5dda32aa52e610e8500054c28beea7f87296d9850a4bc","src/likelysubtags/tables.rs":"47ab40497145adc553f9f585d1ec79d01028495a57b1907392642afd26986e89","src/parser/errors.rs":"2dacf5bf388499c9fbecf64ef950038f123335e87b6691bcdb88d185678f38d5","src/parser/mod.rs":"55ce8c0444841b67c5c4e376ae0d2867859805752a0ed6bfe07593715695bc2e","src/subtags.rs":"2436c8492a7360cd8a5552973ed3a8521baa1e9f94760f03b56881f0703d1cac","tests/canonicalize_test.rs":"5ca005223ae159c15f8809c28c1cc950dc4d69063d9de70b885f18ef8e6cca28","tests/fixtures.rs":"f169a7b7aaeaf0a4611bdb24491f2033461ee21b8e405528e3b5fa91a4d73658","tests/fixtures/parsing.json":"7e0736376d8642d6eb16a451914ec7cff105d11640aa245efa92d9082e2be75b","tests/language_identifier_test.rs":"fadf326a8072324be4e74366ab57d0d6d20a0f4830bf122676d3448946304381","tests/likelysubtags.rs":"2f38668132de720af9769837010101127ed27d27d19b0bc74635b5caa94196b4"},"package":"c43c61e94492eb67f20facc7b025778a904de83d953d8fcb60dd9adfd6e2d0ea"}
|
||||
{"files":{"Cargo.lock":"7a6bb71d558693114436f11f7089237447a936cc8365f8afe0305e0b68dae07b","Cargo.toml":"0495636d8071b0d804764190a2daa3f6f780336d80bd8712ef7c197963fd5ce4","README.md":"1ce686b1ba46e7fff771db934d1e8905e3d96c73d9e6712ca85011cf63cf4157","benches/canonicalize.rs":"1bc9db6454ed711c1c1d58a9236d1ed02c40645782338697812dc21b26c2295f","benches/langid.rs":"46dc68e1ee1c998fe957035c11c373cc5d2c2993dd3058aeb36014028618a46e","benches/likely_subtags.rs":"672b47687d20d4294e2de78dc6eb1d36400a4b4c672082d15415fb18faf2e508","benches/parser.rs":"f9cf158bf5d146ef413e63e952c0a866269ba2be0db44a0aa88a5e61fdf53b4a","data/cldr-misc-full/README.md":"b4bbc8e56b8c9f5d482d2dd211e53720cdca27b0e98eec274e56577d41906b92","src/bin/generate_layout.rs":"e1df742c318ba4de09a25edad082a398da1d5591ac24074f9eadf3f40d677a9a","src/bin/generate_likelysubtags.rs":"c38ef8e59044578e51681723dbaf7f9669ccb7c7487f24ef6a430aad194f160f","src/errors.rs":"091525fd3d704cc4698bab82af9fff1f2e6fc793910700790ec3ef943b3eddfe","src/layout_table.rs":"c311b5399a22efd69f14decb00aee7dfb2943a090832e2aef127e2853ad1ce0b","src/lib.rs":"75b5e8958ba0139ef60139e61441d29c80bde8552d1adead3905165c11ed97cd","src/likelysubtags/mod.rs":"66889568b883675465faa445e257b4b70e9dcba98c6c523eb34a08ebb50377c0","src/likelysubtags/tables.rs":"47ab40497145adc553f9f585d1ec79d01028495a57b1907392642afd26986e89","src/parser/errors.rs":"2dacf5bf388499c9fbecf64ef950038f123335e87b6691bcdb88d185678f38d5","src/parser/mod.rs":"30f9ff487ab7b023ec7e6cfbfe4f4ebc41ca524cef0eba96a6b77ad624c9f6b8","src/serde.rs":"2ce1fdea1217c4f72b2c8e00f333902ff496c54eef5b4534adb289375c50aef0","src/subtags/language.rs":"1f7dbc4a10b58a6d1b729dc986a20396ce75558dfb1f9be223d5723a5e241e73","src/subtags/mod.rs":"ba23712d7ce5e0fa896c97ddc91d7eacbf21a99d62c15f5cf19a6653876bf56b","src/subtags/region.rs":"8cfd794f41f48fdf9742c9149b7360ea7cbd84c93abd13fe5a5317c46b4c48fc","src/subtags/script.rs":"94760b06f50f8f32c45af4f238b66e32428e5710ce4eabab4c943b5ebda3b0fe","src/subtags/variant.rs":"a8647d82c49df0d8df7fda33033d0df7a235beecfb35f459122675ab16b2dd8e"},"package":"1a4a8eeaf0494862c1404c95ec2f4c33a2acff5076f64314b465e3ddae1b934d"}
|
|
@ -1,676 +1,602 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||
dependencies = [
|
||||
"hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||
|
||||
[[package]]
|
||||
name = "bstr"
|
||||
version = "0.2.10"
|
||||
version = "0.2.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2889e6d50f394968c8bf4240dc3f2a7eb4680844d27308f798229ac9d4725f41"
|
||||
dependencies = [
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static",
|
||||
"memchr",
|
||||
"regex-automata",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.1.2"
|
||||
version = "3.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.3.2"
|
||||
version = "1.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
|
||||
|
||||
[[package]]
|
||||
name = "cast"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0"
|
||||
dependencies = [
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "2.33.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
|
||||
dependencies = [
|
||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags",
|
||||
"textwrap",
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "criterion"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "63f696897c88b57f4ffe3c69d8e1a0613c7d0e6c4833363c8560fbde9c47b966"
|
||||
dependencies = [
|
||||
"atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"criterion-plot 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"oorandom 11.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"plotters 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"atty",
|
||||
"cast",
|
||||
"clap",
|
||||
"criterion-plot",
|
||||
"csv",
|
||||
"itertools",
|
||||
"lazy_static",
|
||||
"num-traits",
|
||||
"oorandom",
|
||||
"plotters",
|
||||
"rayon",
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"tinytemplate",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "criterion-plot"
|
||||
version = "0.4.1"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ddeaf7989f00f2e1d871a26a110f3ed713632feac17f65f03ca938c542618b60"
|
||||
dependencies = [
|
||||
"cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cast",
|
||||
"itertools",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-deque"
|
||||
version = "0.7.2"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285"
|
||||
dependencies = [
|
||||
"crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-epoch",
|
||||
"crossbeam-utils",
|
||||
"maybe-uninit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-epoch"
|
||||
version = "0.8.0"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"
|
||||
dependencies = [
|
||||
"autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"autocfg",
|
||||
"cfg-if",
|
||||
"crossbeam-utils",
|
||||
"lazy_static",
|
||||
"maybe-uninit",
|
||||
"memoffset",
|
||||
"scopeguard",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-queue"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if",
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.7.0"
|
||||
version = "0.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
|
||||
dependencies = [
|
||||
"autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"autocfg",
|
||||
"cfg-if",
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "csv"
|
||||
version = "1.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279"
|
||||
dependencies = [
|
||||
"bstr 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bstr",
|
||||
"csv-core",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "csv-core"
|
||||
version = "0.1.6"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
|
||||
dependencies = [
|
||||
"memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.1.6"
|
||||
version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4"
|
||||
dependencies = [
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.8.2"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
|
||||
dependencies = [
|
||||
"either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"either",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e"
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.35"
|
||||
version = "0.3.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fa5a448de267e7358beaf4a5d849518fe9a0c13fce7afd44b06e68550e5562a7"
|
||||
dependencies = [
|
||||
"wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.66"
|
||||
version = "0.2.69"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "maybe-uninit"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.3.0"
|
||||
version = "2.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.5.3"
|
||||
version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8"
|
||||
dependencies = [
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "4.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096"
|
||||
dependencies = [
|
||||
"autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
version = "1.12.0"
|
||||
version = "1.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
|
||||
dependencies = [
|
||||
"hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "oorandom"
|
||||
version = "11.1.0"
|
||||
version = "11.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94af325bc33c7f60191be4e2c984d48aaa21e2854f473b85398344b60c9b6358"
|
||||
|
||||
[[package]]
|
||||
name = "plotters"
|
||||
version = "0.2.12"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f9b1d9ca091d370ea3a78d5619145d1b59426ab0c9eedbad2514a4cee08bf389"
|
||||
dependencies = [
|
||||
"js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"js-sys",
|
||||
"num-traits",
|
||||
"wasm-bindgen",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.8"
|
||||
version = "1.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8872cf6f48eee44265156c111456a700ab3483686b3f96df4cf5481c89157319"
|
||||
dependencies = [
|
||||
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.2"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c1f4b0efa5fc5e8ceb705136bfee52cfdb6a4e3509f770b478cd6ed434232a7"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098"
|
||||
dependencies = [
|
||||
"crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-deque",
|
||||
"either",
|
||||
"rayon-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon-core"
|
||||
version = "1.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9"
|
||||
dependencies = [
|
||||
"crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-deque",
|
||||
"crossbeam-queue",
|
||||
"crossbeam-utils",
|
||||
"lazy_static",
|
||||
"num_cpus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.3.3"
|
||||
version = "1.3.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692"
|
||||
dependencies = [
|
||||
"regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.1.8"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4"
|
||||
dependencies = [
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.13"
|
||||
version = "0.6.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
||||
dependencies = [
|
||||
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"semver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.2"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1"
|
||||
|
||||
[[package]]
|
||||
name = "same-file"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
||||
dependencies = [
|
||||
"winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.0.0"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
dependencies = [
|
||||
"semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"semver-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver-parser"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.104"
|
||||
version = "1.0.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399"
|
||||
dependencies = [
|
||||
"serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.104"
|
||||
version = "1.0.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.45"
|
||||
version = "1.0.52"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a7894c8ed05b7a3a279aeb79025fdec1d3158080b75b98a08faf2806bb799edd"
|
||||
dependencies = [
|
||||
"itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sourcefile"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.14"
|
||||
version = "1.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "410a7488c0a728c7ceb4ad59b9567eb4053d02e8cc7f5c0e0eeeb39518369213"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "textwrap"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
||||
dependencies = [
|
||||
"unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tinystr"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4bac79c4b51eda1b090b1edebfb667821bbb51f713855164dc7cec2cb8ac2ba3"
|
||||
|
||||
[[package]]
|
||||
name = "tinytemplate"
|
||||
version = "1.0.3"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "45e4bc5ac99433e0dcb8b9f309dd271a165ae37dde129b9e0ce1bfdd8bfe4891"
|
||||
dependencies = [
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid-impl"
|
||||
version = "0.8.0"
|
||||
version = "0.9.0"
|
||||
dependencies = [
|
||||
"criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tinystr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"criterion",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tinystr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
|
||||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
version = "2.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d"
|
||||
dependencies = [
|
||||
"same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"same-file",
|
||||
"winapi",
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.58"
|
||||
version = "0.2.62"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e3c7d40d09cdbf0f4895ae58cf57d92e1e57a9dd8ed2e8390514b54a47cc5551"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if",
|
||||
"wasm-bindgen-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.58"
|
||||
version = "0.2.62"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3972e137ebf830900db522d6c8fd74d1900dcfc733462e9a12e942b00b4ac94"
|
||||
dependencies = [
|
||||
"bumpalo 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bumpalo",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.58"
|
||||
version = "0.2.62"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2cd85aa2c579e8892442954685f0d801f9129de24fa2136b2c6a539c76b65776"
|
||||
dependencies = [
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.58"
|
||||
version = "0.2.62"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8eb197bd3a47553334907ffd2f16507b4f4f01bbec3ac921a7719e0decdfe72a"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.58"
|
||||
version = "0.2.62"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-webidl"
|
||||
version = "0.2.58"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
checksum = "a91c2916119c17a8e316507afaaa2dd94b47646048014bbdf6bef098c1bb58ad"
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
version = "0.3.35"
|
||||
version = "0.3.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8bc359e5dd3b46cb9687a051d50a2fdd228e4ba7cf6fcf861a5365c3d671a642"
|
||||
dependencies = [
|
||||
"anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "weedle"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-i686-pc-windows-gnu",
|
||||
"winapi-x86_64-pc-windows-gnu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-util"
|
||||
version = "0.1.3"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
|
||||
dependencies = [
|
||||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[metadata]
|
||||
"checksum anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c"
|
||||
"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||
"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
|
||||
"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
|
||||
"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||
"checksum bstr 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "fe8a65814ca90dfc9705af76bb6ba3c6e2534489a72270e797e603783bb4990b"
|
||||
"checksum bumpalo 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb8038c1ddc0a5f73787b130f4cc75151e96ed33e417fde765eb5a81e3532f4"
|
||||
"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5"
|
||||
"checksum cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0"
|
||||
"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||
"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
|
||||
"checksum criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc755679c12bda8e5523a71e4d654b6bf2e14bd838dfc48cde6559a05caf7d1"
|
||||
"checksum criterion-plot 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a01e15e0ea58e8234f96146b1f91fa9d0e4dd7a38da93ff7a75d42c0b9d3a545"
|
||||
"checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca"
|
||||
"checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac"
|
||||
"checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db"
|
||||
"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4"
|
||||
"checksum csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279"
|
||||
"checksum csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c"
|
||||
"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
|
||||
"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
|
||||
"checksum hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772"
|
||||
"checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484"
|
||||
"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e"
|
||||
"checksum js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9"
|
||||
"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558"
|
||||
"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
|
||||
"checksum memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223"
|
||||
"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9"
|
||||
"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6"
|
||||
"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096"
|
||||
"checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6"
|
||||
"checksum oorandom 11.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebcec7c9c2a95cacc7cd0ecb89d8a8454eca13906f6deb55258ffff0adeb9405"
|
||||
"checksum plotters 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "4e3bb8da247d27ae212529352020f3e5ee16e83c0c258061d27b08ab92675eeb"
|
||||
"checksum proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548"
|
||||
"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
|
||||
"checksum rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098"
|
||||
"checksum rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9"
|
||||
"checksum regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5508c1941e4e7cb19965abef075d35a9a8b5cdf0846f30b4050e9b55dc55e87"
|
||||
"checksum regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9"
|
||||
"checksum regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e734e891f5b408a29efbf8309e656876276f49ab6a6ac208600b4419bd893d90"
|
||||
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
||||
"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
|
||||
"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
||||
"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
|
||||
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449"
|
||||
"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
|
||||
"checksum serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "eab8f15f15d6c41a154c1b128a22f2dfabe350ef53c40953d84e36155c91192b"
|
||||
"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3"
|
||||
"checksum syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5"
|
||||
"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
||||
"checksum tinystr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4bac79c4b51eda1b090b1edebfb667821bbb51f713855164dc7cec2cb8ac2ba3"
|
||||
"checksum tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "57a3c6667d3e65eb1bc3aed6fd14011c6cbc3a0665218ab7f5daf040b9ec371a"
|
||||
"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0"
|
||||
"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"
|
||||
"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
|
||||
"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
|
||||
"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d"
|
||||
"checksum wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c"
|
||||
"checksum wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45"
|
||||
"checksum wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3"
|
||||
"checksum wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668"
|
||||
"checksum wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601"
|
||||
"checksum wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d"
|
||||
"checksum web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b"
|
||||
"checksum weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164"
|
||||
"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
|
||||
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
"checksum winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80"
|
||||
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
[package]
|
||||
edition = "2018"
|
||||
name = "unic-langid-impl"
|
||||
version = "0.8.0"
|
||||
version = "0.9.0"
|
||||
authors = ["Zibi Braniecki <gandalf@mozilla.com>"]
|
||||
exclude = ["data/*"]
|
||||
include = ["src/**/*", "benches/*.rs", "Cargo.toml", "README.md"]
|
||||
description = "API for managing Unicode Language Identifiers"
|
||||
readme = "README.md"
|
||||
categories = ["internationalization"]
|
||||
|
|
|
@ -7,6 +7,20 @@ use unic_langid_impl::canonicalize;
|
|||
|
||||
fn langid_canonicalize_bench(c: &mut Criterion) {
|
||||
let strings = &[
|
||||
"En_uS",
|
||||
"EN-GB",
|
||||
"ES-aR",
|
||||
"iT",
|
||||
"zH_HaNs_cN",
|
||||
"dE-aT",
|
||||
"Pl",
|
||||
"FR-FR",
|
||||
"de_AT",
|
||||
"sR-CyrL_sr",
|
||||
"NB-NO",
|
||||
"fr_fr",
|
||||
"Mk",
|
||||
"uK",
|
||||
"en-us",
|
||||
"en_gb",
|
||||
"ES-AR",
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче