feat(locale): localize full interface

This commit is contained in:
Hakan Seven committed 2026-08-02 22:09:25 +03:00
1 parent b90b3e3ecf
commit 3e6693b93f
205 files changed
+32369 -3810

No files matched your search

+19 -15
View File
@@ -11,6 +11,7 @@
use acadrust::Handle;
use glam::DVec3;
use crate::t;
use crate::command::{CadCommand, CmdResult, DynField, EntityTransform};
use crate::modules::draw::defaults;
@@ -71,29 +72,32 @@ impl CadCommand for RotateCommand {
fn prompt(&self) -> String {
match &self.step {
Step::Center => format!(
"ROTATE Specify rotation center [{} objects]:",
self.handles.len()
),
Step::Angle { .. } => format!(
"ROTATE Specify rotation angle <{:.4}>:",
self.default_angle
),
Step::Center => t!(
"ROTATE Specify rotation center [%{count} objects]:",
count = self.handles.len()
)
.into_owned(),
Step::Angle { .. } => {
let a = format!("{:.4}", self.default_angle);
t!("ROTATE Specify rotation angle <%{a}>:", a = a).into_owned()
}
Step::RefFirst { .. } => {
"ROTATE Specify first reference point or type reference angle:".into()
t!("ROTATE Specify first reference point or type reference angle:").into_owned()
}
Step::RefSecond { .. } => {
t!("ROTATE Specify second reference point:").into_owned()
}
Step::RefNew { ref_angle, .. } => {
let a = format!("{:.1}°", ref_angle.to_degrees());
t!("ROTATE Specify new absolute angle [ref=%{a}]:", a = a).into_owned()
}
Step::RefSecond { .. } => "ROTATE Specify second reference point:".into(),
Step::RefNew { ref_angle, .. } => format!(
"ROTATE Specify new absolute angle [ref={:.1}°]:",
ref_angle.to_degrees()
),
}
}
fn options(&self) -> Vec<crate::command::CmdOption> {
use crate::command::CmdOption;
match self.step {
Step::Angle { .. } => vec![CmdOption::new("Reference", "R")],
Step::Angle { .. } => vec![CmdOption::new(t!("Reference").as_ref(), "R")],
_ => vec![],
}
}