Skip to content

Commit

Permalink
Merge pull request #1772 from r-ml/fluent-update
Browse files Browse the repository at this point in the history
Update fluent
  • Loading branch information
maan2003 committed May 11, 2021
2 parents 1bd2245 + a681fc2 commit a2b9fe9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ You can find its changes [documented below](#070---2021-01-01).
### Maintenance

- Updated to x11rb 0.8.0. ([#1519] by [@psychon])
- Updated fluent-bundle to 0.15.1 and fluent syntax to 0.11.0 ([#1772] by [@r-ml])

### Outside News

Expand Down Expand Up @@ -715,6 +716,7 @@ Last release without a changelog :(
[#1755]: https://github.com/linebender/druid/pull/1755
[#1756]: https://github.com/linebender/druid/pull/1756
[#1761]: https://github.com/linebender/druid/pull/1761
[#1772]: https://github.com/linebender/druid/pull/1772

[Unreleased]: https://github.com/linebender/druid/compare/v0.7.0...master
[0.7.0]: https://github.com/linebender/druid/compare/v0.6.0...v0.7.0
Expand Down
4 changes: 2 additions & 2 deletions druid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ druid-derive = { version = "0.4.0", path = "../druid-derive" }

tracing = { version = "0.1.22" }
tracing-subscriber = { version = "0.2.15", features = ["fmt", "ansi"], default-features = false }
fluent-bundle = "0.12.0"
fluent-bundle = "0.15.1"
fluent-langneg = "0.13.0"
fluent-syntax = "0.9.3"
fluent-syntax = "0.11.0"
unic-langid = "0.9.0"
unicode-segmentation = "1.6.0"
xi-unicode = "0.3.0"
Expand Down
6 changes: 3 additions & 3 deletions druid/src/localization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl BundleStack {
fn format_pattern(
&self,
id: &str,
pattern: &FluentPattern,
pattern: &FluentPattern<&str>,
args: Option<&FluentArgs>,
errors: &mut Vec<FluentError>,
) -> String {
Expand Down Expand Up @@ -154,7 +154,7 @@ impl ResourceManager {
debug!("resolved: {}", PrintLocales(resolved_locales.as_slice()));
let mut stack = Vec::new();
for locale in &resolved_locales {
let mut bundle = FluentBundle::new(&resolved_locales);
let mut bundle = FluentBundle::new(resolved_locales.clone());
for res_id in resource_ids {
let res = self.get_resource(&res_id, &locale.to_string());
bundle.add_resource(res).unwrap();
Expand Down Expand Up @@ -254,7 +254,7 @@ impl L10nManager {
let value = match self
.current_bundle
.get_message(key)
.and_then(|msg| msg.value)
.and_then(|msg| msg.value())
{
Some(v) => v,
None => return None,
Expand Down

0 comments on commit a2b9fe9

Please sign in to comment.