Skip to content

Commit

Permalink
fluent-bundle 0.13, fluent 0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
zbraniecki committed Sep 25, 2020
1 parent 53522f9 commit 2dc8aa7
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 9 deletions.
10 changes: 10 additions & 0 deletions fluent-bundle/CHANGELOG.md
Expand Up @@ -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<FluentArg>`.
- Introduce `FluentMessage` and `FluentAttributes`.
- Make `FluentArgs` accept `Cow<str>` as keys.


## fluent-bundle 0.12.0 (May 6, 2020)
- Add `Send` to `FluentType::Custom` (#173)
- Update `intl-pluralrules` to 7.0.
Expand Down
6 changes: 3 additions & 3 deletions fluent-bundle/Cargo.toml
Expand Up @@ -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 <gandalf@mozilla.com>",
Expand All @@ -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" }

Expand Down
8 changes: 6 additions & 2 deletions fluent-bundle/benches/resolver.rs
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions fluent-bundle/src/args.rs
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion fluent-fallback/Cargo.toml
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion fluent-resmgr/Cargo.toml
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions fluent/CHANGELOG.md
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions fluent/Cargo.toml
Expand Up @@ -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 <gandalf@mozilla.com>",
Expand All @@ -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 }

0 comments on commit 2dc8aa7

Please sign in to comment.