Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

Story Editor: Show/Hide Depth Ruler in Spanish

dotCooCooe1ff9b9ee880
diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rs
index e2a2cbe9c..dbacb86e3 100644
--- a/crates/ui-egui/src/i18n.rs
+++ b/crates/ui-egui/src/i18n.rs
@@ -2249,7 +2249,13 @@ const TABLE: &[(&str, [&str; 5])] = &[
),
(
"Show/Hide Depth Ruler",
- ["Show/Hide Depth Ruler", "Afficher/Masquer la règle de profondeur", "Show/Hide Depth Ruler", "Show/Hide Depth Ruler", "显示/隐藏深度标尺"],
+ [
+ "Show/Hide Depth Ruler",
+ "Afficher/Masquer la règle de profondeur",
+ "Mostrar/ocultar regla de profundidad",
+ "Show/Hide Depth Ruler",
+ "显示/隐藏深度标尺",
+ ],
),
(
"Show/Hide Document Grid",
diff --git a/crates/ui-egui/src/story_editor.rs b/crates/ui-egui/src/story_editor.rs
index 3d8356bf7..ad35b8bcb 100644
--- a/crates/ui-egui/src/story_editor.rs
+++ b/crates/ui-egui/src/story_editor.rs
@@ -467,6 +467,14 @@ mod tests {
assert!(!crate::UiState::from_preferences_json(&saved).unwrap().story_editor_depth_ruler);
}
+ /// The Show/Hide Depth Ruler menu label is translated in every interface language.
+ #[test]
+ fn depth_ruler_menu_label_is_translated_in_every_language() {
+ for (lang, _) in crate::i18n::LANGUAGES.iter().filter(|(code, _)| !code.is_empty()) {
+ assert_ne!(crate::i18n::tr(lang, "Show/Hide Depth Ruler"), "Show/Hide Depth Ruler", "{lang}");
+ }
+ }
+
/// Story ids are counted per document: typing in the editor after switching documents edited
/// the other document's story with the same id.
#[test]