feat(locale): localize full interface

This commit is contained in:
Hakan Seven 2026-08-02 22:09:25 +03:00
commit 3e6693b93f
205 changed files with 32367 additions and 3808 deletions

View file

@ -5,6 +5,7 @@
// Props: position, scales, rotation, contrast, fade, flags.
use acadrust::entities::{Underlay, UnderlayDisplayFlags};
use crate::t;
use crate::command::EntityTransform;
use crate::entities::common::{center_grip, edit_angle_prop as edit_angle, edit_prop as edit, ro_prop as ro, square_grip};
@ -224,26 +225,26 @@ impl PropertyEditable for Underlay {
vec![
PropSection {
title: "Geometry".into(),
title: t!("Geometry").into_owned(),
props: vec![
edit("Position X", "ul_ix", self.insertion_point.x),
edit("Position Y", "ul_iy", self.insertion_point.y),
edit("Position Z", "ul_iz", self.insertion_point.z),
edit("Scale X", "ul_sx", self.x_scale),
edit("Scale Y", "ul_sy", self.y_scale),
edit("Scale Z", "ul_sz", self.z_scale),
ro("Width", "ul_width", format!("{:.4}", width)),
ro("Height", "ul_height", format!("{:.4}", height)),
edit_angle("Rotation", "ul_rot", self.rotation.to_degrees()),
edit(t!("Position X").as_ref(), "ul_ix", self.insertion_point.x),
edit(t!("Position Y").as_ref(), "ul_iy", self.insertion_point.y),
edit(t!("Position Z").as_ref(), "ul_iz", self.insertion_point.z),
edit(t!("Scale X").as_ref(), "ul_sx", self.x_scale),
edit(t!("Scale Y").as_ref(), "ul_sy", self.y_scale),
edit(t!("Scale Z").as_ref(), "ul_sz", self.z_scale),
ro(t!("Width").as_ref(), "ul_width", format!("{:.4}", width)),
ro(t!("Height").as_ref(), "ul_height", format!("{:.4}", height)),
edit_angle(t!("Rotation").as_ref(), "ul_rot", self.rotation.to_degrees()),
],
},
PropSection {
title: "Underlay Adjust".into(),
title: t!("Underlay Adjust").into_owned(),
props: vec![
edit("Contrast", "ul_contrast", self.contrast as f64),
edit("Fade", "ul_fade", self.fade as f64),
edit(t!("Contrast").as_ref(), "ul_contrast", self.contrast as f64),
edit(t!("Fade").as_ref(), "ul_fade", self.fade as f64),
Property {
label: "Monochrome".into(),
label: t!("Monochrome").into_owned(),
field: "ul_mono",
value: PropValue::BoolToggle {
field: "ul_mono",
@ -251,7 +252,7 @@ impl PropertyEditable for Underlay {
},
},
Property {
label: "Adjust Colors for Background".into(),
label: t!("Adjust Colors for Background").into_owned(),
field: "ul_adjust_bg",
value: PropValue::BoolToggle {
field: "ul_adjust_bg",
@ -261,14 +262,14 @@ impl PropertyEditable for Underlay {
],
},
PropSection {
title: "Misc".into(),
title: t!("Misc").into_owned(),
props: vec![
// Underlay name/path/layers live on the separate
// UnderlayDefinition object, not reachable from the entity.
ro("Underlay name", "ul_name", String::new()),
ro("Underlay path", "ul_path", String::new()),
ro(t!("Underlay name").as_ref(), "ul_name", String::new()),
ro(t!("Underlay path").as_ref(), "ul_path", String::new()),
Property {
label: "Show underlay".into(),
label: t!("Show underlay").into_owned(),
field: "ul_on",
value: PropValue::BoolToggle {
field: "ul_on",
@ -276,7 +277,7 @@ impl PropertyEditable for Underlay {
},
},
Property {
label: "Clipping".into(),
label: t!("Clipping").into_owned(),
field: "ul_clip",
value: PropValue::BoolToggle {
field: "ul_clip",
@ -284,14 +285,14 @@ impl PropertyEditable for Underlay {
},
},
Property {
label: "Show clipped".into(),
label: t!("Show clipped").into_owned(),
field: "ul_clip_inverted",
value: PropValue::BoolToggle {
field: "ul_clip_inverted",
value: self.clip_inverted,
},
},
ro("Underlay layers", "ul_layers", String::new()),
ro(t!("Underlay layers").as_ref(), "ul_layers", String::new()),
],
},
]