Skip to content

Commit a681fc2

Browse files
committed
Update fluent
1 parent 1bd2245 commit a681fc2

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ You can find its changes [documented below](#070---2021-01-01).
9090
### Maintenance
9191

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

9495
### Outside News
9596

@@ -715,6 +716,7 @@ Last release without a changelog :(
715716
[#1755]: https://github.com/linebender/druid/pull/1755
716717
[#1756]: https://github.com/linebender/druid/pull/1756
717718
[#1761]: https://github.com/linebender/druid/pull/1761
719+
[#1772]: https://github.com/linebender/druid/pull/1772
718720

719721
[Unreleased]: https://github.com/linebender/druid/compare/v0.7.0...master
720722
[0.7.0]: https://github.com/linebender/druid/compare/v0.6.0...v0.7.0

druid/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ druid-derive = { version = "0.4.0", path = "../druid-derive" }
5454

5555
tracing = { version = "0.1.22" }
5656
tracing-subscriber = { version = "0.2.15", features = ["fmt", "ansi"], default-features = false }
57-
fluent-bundle = "0.12.0"
57+
fluent-bundle = "0.15.1"
5858
fluent-langneg = "0.13.0"
59-
fluent-syntax = "0.9.3"
59+
fluent-syntax = "0.11.0"
6060
unic-langid = "0.9.0"
6161
unicode-segmentation = "1.6.0"
6262
xi-unicode = "0.3.0"

druid/src/localization.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl BundleStack {
107107
fn format_pattern(
108108
&self,
109109
id: &str,
110-
pattern: &FluentPattern,
110+
pattern: &FluentPattern<&str>,
111111
args: Option<&FluentArgs>,
112112
errors: &mut Vec<FluentError>,
113113
) -> String {
@@ -154,7 +154,7 @@ impl ResourceManager {
154154
debug!("resolved: {}", PrintLocales(resolved_locales.as_slice()));
155155
let mut stack = Vec::new();
156156
for locale in &resolved_locales {
157-
let mut bundle = FluentBundle::new(&resolved_locales);
157+
let mut bundle = FluentBundle::new(resolved_locales.clone());
158158
for res_id in resource_ids {
159159
let res = self.get_resource(&res_id, &locale.to_string());
160160
bundle.add_resource(res).unwrap();
@@ -254,7 +254,7 @@ impl L10nManager {
254254
let value = match self
255255
.current_bundle
256256
.get_message(key)
257-
.and_then(|msg| msg.value)
257+
.and_then(|msg| msg.value())
258258
{
259259
Some(v) => v,
260260
None => return None,

0 commit comments

Comments
 (0)