forked from 1b-agent/opencadstudio-upstream
feat(locale): localize full interface
This commit is contained in:
1 parent
b90b3e3ecf
commit
3e6693b93f
205 files changed
+32369
-3810
No files matched your search
+23
-33
@@ -1,4 +1,5 @@
|
||||
use acadrust::entities::{SectionSymbol, ViewBorder};
|
||||
use crate::t;
|
||||
|
||||
use crate::command::EntityTransform;
|
||||
use crate::entities::common::{edit_angle_prop, edit_prop, parse_f64, ro_prop, square_grip};
|
||||
@@ -83,37 +84,31 @@ impl PropertyEditable for SectionSymbol {
|
||||
.join("\n");
|
||||
vec![
|
||||
PropSection {
|
||||
title: "Section Symbol".into(),
|
||||
title: t!("Section Symbol").into_owned(),
|
||||
props: vec![
|
||||
edit_prop("Symbol Scale", "section_scale", self.symbol_scale),
|
||||
ro_prop(
|
||||
"View Symbol Version",
|
||||
edit_prop(t!("Symbol Scale").as_ref(), "section_scale", self.symbol_scale),
|
||||
ro_prop(t!("View Symbol Version").as_ref(),
|
||||
"section_view_version",
|
||||
self.view_symbol_version.to_string(),
|
||||
),
|
||||
ro_prop("Version", "section_version", self.version.to_string()),
|
||||
ro_prop(
|
||||
"Style",
|
||||
ro_prop(t!("Version").as_ref(), "section_version", self.version.to_string()),
|
||||
ro_prop(t!("Style").as_ref(),
|
||||
"section_style",
|
||||
handle_text(self.style_handle),
|
||||
),
|
||||
ro_prop(
|
||||
"View Representation",
|
||||
ro_prop(t!("View Representation").as_ref(),
|
||||
"section_view_rep",
|
||||
handle_text(self.view_rep_handle),
|
||||
),
|
||||
ro_prop(
|
||||
"View Symbol Flags",
|
||||
ro_prop(t!("View Symbol Flags").as_ref(),
|
||||
"section_view_flags",
|
||||
self.raw_view_symbol_70.to_string(),
|
||||
),
|
||||
ro_prop(
|
||||
"Point Count",
|
||||
ro_prop(t!("Point Count").as_ref(),
|
||||
"section_point_count",
|
||||
self.points.len().to_string(),
|
||||
),
|
||||
ro_prop(
|
||||
"Stored Point Counts",
|
||||
ro_prop(t!("Stored Point Counts").as_ref(),
|
||||
"section_raw_counts",
|
||||
format!(
|
||||
"{}, {}, flags {}",
|
||||
@@ -122,12 +117,12 @@ impl PropertyEditable for SectionSymbol {
|
||||
self.raw_flags_90
|
||||
),
|
||||
),
|
||||
ro_prop("Identifier", "section_label", self.label.clone()),
|
||||
ro_prop(t!("Identifier").as_ref(), "section_label", self.label.clone()),
|
||||
],
|
||||
},
|
||||
PropSection {
|
||||
title: "Section Points".into(),
|
||||
props: vec![ro_prop("Records", "section_points", point_data)],
|
||||
title: t!("Section Points").into_owned(),
|
||||
props: vec![ro_prop(t!("Records").as_ref(), "section_points", point_data)],
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -197,34 +192,29 @@ impl Grippable for ViewBorder {
|
||||
impl PropertyEditable for ViewBorder {
|
||||
fn geometry_properties(&self, _text_style_names: &[String]) -> Vec<PropSection> {
|
||||
vec![PropSection {
|
||||
title: "Drawing View".into(),
|
||||
title: t!("Drawing View").into_owned(),
|
||||
props: vec![
|
||||
edit_prop("Center X", "view_border_x", self.center[0]),
|
||||
edit_prop("Center Y", "view_border_y", self.center[1]),
|
||||
ro_prop(
|
||||
"Width",
|
||||
edit_prop(t!("Center X").as_ref(), "view_border_x", self.center[0]),
|
||||
edit_prop(t!("Center Y").as_ref(), "view_border_y", self.center[1]),
|
||||
ro_prop(t!("Width").as_ref(),
|
||||
"view_border_width",
|
||||
format!("{:.6}", self.max[0] - self.min[0]),
|
||||
),
|
||||
ro_prop(
|
||||
"Height",
|
||||
ro_prop(t!("Height").as_ref(),
|
||||
"view_border_height",
|
||||
format!("{:.6}", self.max[1] - self.min[1]),
|
||||
),
|
||||
edit_prop("Scale", "view_border_scale", self.scale),
|
||||
edit_angle_prop(
|
||||
"Rotation",
|
||||
edit_prop(t!("Scale").as_ref(), "view_border_scale", self.scale),
|
||||
edit_angle_prop(t!("Rotation").as_ref(),
|
||||
"view_border_rotation",
|
||||
self.rotation_angle.to_degrees(),
|
||||
),
|
||||
ro_prop("Version", "view_border_version", self.version.to_string()),
|
||||
ro_prop(
|
||||
"Active Viewport",
|
||||
ro_prop(t!("Version").as_ref(), "view_border_version", self.version.to_string()),
|
||||
ro_prop(t!("Active Viewport").as_ref(),
|
||||
"view_border_viewport",
|
||||
handle_text(self.active_viewport),
|
||||
),
|
||||
ro_prop(
|
||||
"Scale Object",
|
||||
ro_prop(t!("Scale Object").as_ref(),
|
||||
"view_border_scale_handle",
|
||||
handle_text(self.scale_handle),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user