forked from 1b-agent/opencadstudio-upstream
feat(i18n): implement translations for block creation window and units
- Localize block description placeholder via BlockDefinitionState field - Add lookup mappings to locale_catalog for block definition dialog, validation messages, on-screen prompts, and insertion units - Add Fluent strings for all 41 keys across all 21 supported locales
This commit is contained in:
1 parent
531ba44faa
commit
5e34796dca
23 files changed
+948
-1
No files matched your search
@@ -72,6 +72,7 @@ pub struct BlockDefinitionState {
|
||||
pub hyperlink_desc: String,
|
||||
pub error_message: Option<String>,
|
||||
pub confirm_redefine: Option<String>,
|
||||
pub desc_placeholder: String,
|
||||
}
|
||||
|
||||
impl Clone for BlockDefinitionState {
|
||||
@@ -98,6 +99,7 @@ impl Clone for BlockDefinitionState {
|
||||
hyperlink_desc: self.hyperlink_desc.clone(),
|
||||
error_message: self.error_message.clone(),
|
||||
confirm_redefine: self.confirm_redefine.clone(),
|
||||
desc_placeholder: self.desc_placeholder.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,6 +128,7 @@ impl BlockDefinitionState {
|
||||
hyperlink_desc: String::new(),
|
||||
error_message: None,
|
||||
confirm_redefine: None,
|
||||
desc_placeholder: crate::t!("Enter block description...").into_owned(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -532,7 +535,7 @@ pub fn view_window<'a>(
|
||||
// ── Group: Description (Column 2 Bottom) ──────────────────────────────────
|
||||
let desc_editor = text_editor(&state.description_content)
|
||||
.on_action(Message::BlockDefDescriptionAction)
|
||||
.placeholder("Enter block description...")
|
||||
.placeholder(&state.desc_placeholder)
|
||||
.size(11)
|
||||
.padding([4, 6])
|
||||
.height(Fill)
|
||||
|
||||
Reference in new issue
Block a user