diff --git a/fluent-bundle/CHANGELOG.md b/fluent-bundle/CHANGELOG.md index 245ba778..b26d4355 100644 --- a/fluent-bundle/CHANGELOG.md +++ b/fluent-bundle/CHANGELOG.md @@ -4,6 +4,16 @@ - … +## fluent-bundle 0.13.0 (September 24, 2020) + - Update to `fluent-syntax` 0.10. + - Add `FluentBundle::write_pattern` which can write to pre-allocated buffer. + - Get rid of `DisplayableNode` and simplify `FluentValue`. + - Reorganize `Resolver` around `impl Write`. + - Introduce `FluentArgs` as a struct over `Vec`. + - Introduce `FluentMessage` and `FluentAttributes`. + - Make `FluentArgs` accept `Cow` as keys. + + ## fluent-bundle 0.12.0 (May 6, 2020) - Add `Send` to `FluentType::Custom` (#173) - Update `intl-pluralrules` to 7.0. diff --git a/fluent-bundle/Cargo.toml b/fluent-bundle/Cargo.toml index 55fe58d0..86451bf3 100644 --- a/fluent-bundle/Cargo.toml +++ b/fluent-bundle/Cargo.toml @@ -4,7 +4,7 @@ description = """ A localization system designed to unleash the entire expressive power of natural language translations. """ -version = "0.12.0" +version = "0.13.0" edition = "2018" authors = [ "Zibi Braniecki ", @@ -25,10 +25,10 @@ include = [ [dependencies] fluent-langneg = "0.13" -fluent-syntax = { version = "0.9", path = "../fluent-syntax" } +fluent-syntax = { version = "0.10", path = "../fluent-syntax" } intl_pluralrules = "7.0" rental = "0.5" -smallvec = "1.0" +smallvec = "1" unic-langid = "0.9" intl-memoizer = { version = "0.5", path = "../intl-memoizer" } diff --git a/fluent-bundle/benches/resolver.rs b/fluent-bundle/benches/resolver.rs index e550e327..2ca4a009 100644 --- a/fluent-bundle/benches/resolver.rs +++ b/fluent-bundle/benches/resolver.rs @@ -88,7 +88,9 @@ fn resolver_bench(c: &mut Criterion) { let ftl_strings = get_strings(tests); let mut group = c.benchmark_group("resolve"); - for (name, source) in &ftl_strings { + for name in tests { + let source = ftl_strings.get(name) + .expect("Failed to find the source."); group.bench_with_input(BenchmarkId::from_parameter(name), &source, |b, source| { let (bundle, ids) = get_bundle(name, source); let args = get_args(name); @@ -113,7 +115,9 @@ fn resolver_bench(c: &mut Criterion) { group.finish(); let mut group = c.benchmark_group("resolve_to_str"); - for (name, source) in &ftl_strings { + for name in tests { + let source = ftl_strings.get(name) + .expect("Failed to find the source."); group.bench_with_input(BenchmarkId::from_parameter(name), &source, |b, source| { let (bundle, ids) = get_bundle(name, source); let args = get_args(name); diff --git a/fluent-bundle/src/args.rs b/fluent-bundle/src/args.rs index 837785d6..2ba991ca 100644 --- a/fluent-bundle/src/args.rs +++ b/fluent-bundle/src/args.rs @@ -13,6 +13,10 @@ impl<'args> FluentArgs<'args> { Self(vec![]) } + pub fn with_capacity(capacity: usize) -> Self { + Self(Vec::with_capacity(capacity)) + } + pub fn get(&self, key: &str) -> Option<&FluentValue<'args>> { self.0.iter().find(|(k, _)| key == *k).map(|(_, v)| v) } diff --git a/fluent-fallback/Cargo.toml b/fluent-fallback/Cargo.toml index 4e5a1edf..a869b67a 100644 --- a/fluent-fallback/Cargo.toml +++ b/fluent-fallback/Cargo.toml @@ -18,7 +18,7 @@ keywords = ["localization", "l10n", "i18n", "intl", "internationalization"] categories = ["localization", "internationalization"] [dependencies] -fluent-bundle = { version = "0.12", path = "../fluent-bundle" } +fluent-bundle = { version = "0.13", path = "../fluent-bundle" } reiterate = "0.1.3" [dev-dependencies] diff --git a/fluent-resmgr/Cargo.toml b/fluent-resmgr/Cargo.toml index 49d73862..97d52095 100644 --- a/fluent-resmgr/Cargo.toml +++ b/fluent-resmgr/Cargo.toml @@ -17,7 +17,7 @@ keywords = ["localization", "l10n", "i18n", "intl", "internationalization"] categories = ["localization", "internationalization"] [dependencies] -fluent-bundle = { version = "0.12", path = "../fluent-bundle" } +fluent-bundle = { version = "0.13", path = "../fluent-bundle" } unic-langid = "0.9" fluent-fallback = { version = "0.0.4", path = "../fluent-fallback" } elsa = "1.3.2" diff --git a/fluent/CHANGELOG.md b/fluent/CHANGELOG.md index adf95d34..39b2982a 100644 --- a/fluent/CHANGELOG.md +++ b/fluent/CHANGELOG.md @@ -4,6 +4,9 @@ - … +## fluent 0.13.0 (May 6, 2020) + - Update `fluent-bundle` to 0.13.0. + ## fluent 0.12.0 (May 6, 2020) - Update `fluent-bundle` to 0.12.0. - Update `unic-langid` to 0.9.0. diff --git a/fluent/Cargo.toml b/fluent/Cargo.toml index 4659df2b..bab9f212 100644 --- a/fluent/Cargo.toml +++ b/fluent/Cargo.toml @@ -4,7 +4,7 @@ description = """ A localization system designed to unleash the entire expressive power of natural language translations. """ -version = "0.12.0" +version = "0.13.0" edition = "2018" authors = [ "Zibi Braniecki ", @@ -24,6 +24,6 @@ include = [ ] [dependencies] -fluent-bundle = { version = "0.12", path = "../fluent-bundle" } +fluent-bundle = { version = "0.13", path = "../fluent-bundle" } unic-langid = "0.9" fluent-pseudo = { version = "0.2", optional = true }