Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fluent #1772

Merged
merged 1 commit into from
May 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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