mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-28 01:10:54 +01:00
Translate the Swatch Libraries footer button name
This commit is contained in:
1 parent
5c7bbeecaa
commit
883f34b490
2 files changed
+16
-1
No files matched your search
@@ -14,6 +14,21 @@ fn app() -> VectorcraftApp {
|
||||
app
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_swatch_libraries_footer_button_uses_the_interface_language() {
|
||||
use craft::ui::testing::Fixture;
|
||||
|
||||
for (locale, label) in [("en", "Swatch Libraries Menu"), ("de", "Menü „Farbfeldbibliotheken“"), ("ja", "スウォッチライブラリメニュー")]
|
||||
{
|
||||
let mut app = app();
|
||||
app.session.prefs.interface_language = locale.into();
|
||||
crate::i18n::set_current(app.ui_language());
|
||||
let mut fixture = Fixture::new(move |ui| crate::panels::swatches::show(&mut app, ui));
|
||||
fixture.settle();
|
||||
assert!(fixture.by_label(label).is_some(), "missing {locale} Swatch Libraries button name: {label}");
|
||||
}
|
||||
}
|
||||
|
||||
/// A context whose frames report their accessibility tree, so rows are found by their names.
|
||||
pub(crate) fn context() -> egui::Context {
|
||||
let ctx = crate::testing::ui_context();
|
||||
|
||||
@@ -777,7 +777,7 @@ fn footer(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
// Libraries, Show Swatch Kinds and the edit action sit at the start edge; Delete at the end edge, then New Swatch
|
||||
// and New Color Group before it.
|
||||
let actions = [
|
||||
FooterAction::new(icon("library"), SwatchLibraries::MENU).pressed(library_panel::any_open::<SwatchLibraries>(&app.ui)),
|
||||
FooterAction::new(icon("library"), tl!(SwatchLibraries::MENU)).pressed(library_panel::any_open::<SwatchLibraries>(&app.ui)),
|
||||
FooterAction::new(icon("dc-swatch-kinds"), tl!("Show Swatch Kinds")).pressed(kind != Kind::All),
|
||||
edit,
|
||||
FooterAction::new(icon("trash-2"), tl!("Delete Swatch"))
|
||||
|
||||
Reference in new issue
Block a user