linebender / druid

A data-first Rust-native UI design toolkit.
https://linebender.org/druid/
Apache License 2.0
9.45k stars 569 forks source link

L10n example and performance improvements #2313

Open JasperDeSutter opened 1 year ago

JasperDeSutter commented 1 year ago

Adds an example showing how to use fluent to translate text, including a more advanced plural selection. Fixes a couple unneeded String clones in the localization implementation by using a Cow, and prevents the bidi markers from being written by fluent so we don't need to remove them.

xStrom commented 1 year ago

I'll try to take a look at this soon. Meanwhile please rebase on master to fix the clippy errors so we can pass the CI.