diff options
author | Federico Mena Quintero <federico@gnome.org> | 2021-05-18 18:44:40 -0500 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2021-05-21 20:27:36 -0500 |
commit | 56f3218a738f568f59705bcb41098fa78ca2d294 (patch) | |
tree | 31dbabe51d5b513b841b50257f38e2e2c0e93058 /src/structure.rs | |
parent | 0e7b35f7288c8a07d82a2a16f67d08ed9ecb2ca3 (diff) | |
download | librsvg-56f3218a738f568f59705bcb41098fa78ca2d294.tar.gz |
Store LanguageTags inside SystemLanguage and really evaluate them at rendering time
Instead of storing the result of evaluating the systemLanguage
attribute at loading time, SystemLanguage is now a newtype around a
set of LanguageTags. It is matched against the environment's language
tags at rendering time.
And at rendering time, it is now DrawingCtx which generates the list
of the user's language tags from the environment.
I remove the Lazy<Locale> - the tests started failing with the
shuffling above. The result of g_get_language_names() will only be
converted once per render, anyway, because now it is done in DrawingCtx.
Diffstat (limited to 'src/structure.rs')
-rw-r--r-- | src/structure.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/structure.rs b/src/structure.rs index 47fc9de5..8a386f1b 100644 --- a/src/structure.rs +++ b/src/structure.rs @@ -87,7 +87,7 @@ impl Draw for Switch { &mut |an, dc| { if let Some(child) = node.children().filter(|c| c.is_element()).find(|c| { let elt = c.borrow_element(); - elt.get_cond() && !elt.is_in_error() + elt.get_cond(&dc.locale_tags()) && !elt.is_in_error() }) { child.draw(an, &CascadedValues::new(cascaded, &child), dc, clipping) } else { |