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
+28
-27
@@ -1,4 +1,5 @@
|
||||
use acadrust::entities::Spline;
|
||||
use crate::t;
|
||||
use truck_modeling::{
|
||||
base::{BoundedCurve, ParametricCurve, Vector4},
|
||||
builder, BSplineCurve, Curve, Edge, KnotVec, NurbsCurve, Point3, Wire,
|
||||
@@ -383,58 +384,58 @@ fn properties(spline: &Spline) -> Vec<PropSection> {
|
||||
|
||||
vec![
|
||||
PropSection {
|
||||
title: "Data Points".into(),
|
||||
title: t!("Data Points").into_owned(),
|
||||
props: vec![
|
||||
ro("Show", "show", show),
|
||||
ro("Degree", "degree", spline.degree.to_string()),
|
||||
ro(t!("Show").as_ref(), "show", show),
|
||||
ro(t!("Degree").as_ref(), "degree", spline.degree.to_string()),
|
||||
ro(
|
||||
"Control Point Count",
|
||||
t!("Control Point Count").as_ref(),
|
||||
"ctrl_pt_count",
|
||||
spline.control_points.len().to_string(),
|
||||
),
|
||||
ro("Control Point", "ctrl_pt_index", "0"),
|
||||
ro(t!("Control Point").as_ref(), "ctrl_pt_index", "0"),
|
||||
edit(
|
||||
"Control Point X",
|
||||
t!("Control Point X").as_ref(),
|
||||
"ctrl_pt_x",
|
||||
cp0.map(|p| p.x).unwrap_or(0.0),
|
||||
),
|
||||
edit(
|
||||
"Control Point Y",
|
||||
t!("Control Point Y").as_ref(),
|
||||
"ctrl_pt_y",
|
||||
cp0.map(|p| p.y).unwrap_or(0.0),
|
||||
),
|
||||
edit(
|
||||
"Control Point Z",
|
||||
t!("Control Point Z").as_ref(),
|
||||
"ctrl_pt_z",
|
||||
cp0.map(|p| p.z).unwrap_or(0.0),
|
||||
),
|
||||
edit("Weight", "weight", w0.unwrap_or(1.0)),
|
||||
ro("Knot Parameterization", "knot_param", knot_param),
|
||||
edit(t!("Weight").as_ref(), "weight", w0.unwrap_or(1.0)),
|
||||
ro(t!("Knot Parameterization").as_ref(), "knot_param", knot_param),
|
||||
ro(
|
||||
"Fit Point Count",
|
||||
t!("Fit Point Count").as_ref(),
|
||||
"fit_pt_count",
|
||||
spline.fit_points.len().to_string(),
|
||||
),
|
||||
ro("Fit Point", "fit_pt_index", "0"),
|
||||
edit("Fit Point X", "fit_pt_x", fp0.map(|p| p.x).unwrap_or(0.0)),
|
||||
edit("Fit Point Y", "fit_pt_y", fp0.map(|p| p.y).unwrap_or(0.0)),
|
||||
edit("Fit Point Z", "fit_pt_z", fp0.map(|p| p.z).unwrap_or(0.0)),
|
||||
edit("Fit Tolerance", "fit_tolerance", spline.fit_tolerance),
|
||||
edit("Start Tangent X", "start_tan_x", spline.begin_tangent.x),
|
||||
edit("Start Tangent Y", "start_tan_y", spline.begin_tangent.y),
|
||||
edit("Start Tangent Z", "start_tan_z", spline.begin_tangent.z),
|
||||
edit("End Tangent X", "end_tan_x", spline.end_tangent.x),
|
||||
edit("End Tangent Y", "end_tan_y", spline.end_tangent.y),
|
||||
edit("End Tangent Z", "end_tan_z", spline.end_tangent.z),
|
||||
ro(t!("Fit Point").as_ref(), "fit_pt_index", "0"),
|
||||
edit(t!("Fit Point X").as_ref(), "fit_pt_x", fp0.map(|p| p.x).unwrap_or(0.0)),
|
||||
edit(t!("Fit Point Y").as_ref(), "fit_pt_y", fp0.map(|p| p.y).unwrap_or(0.0)),
|
||||
edit(t!("Fit Point Z").as_ref(), "fit_pt_z", fp0.map(|p| p.z).unwrap_or(0.0)),
|
||||
edit(t!("Fit Tolerance").as_ref(), "fit_tolerance", spline.fit_tolerance),
|
||||
edit(t!("Start Tangent X").as_ref(), "start_tan_x", spline.begin_tangent.x),
|
||||
edit(t!("Start Tangent Y").as_ref(), "start_tan_y", spline.begin_tangent.y),
|
||||
edit(t!("Start Tangent Z").as_ref(), "start_tan_z", spline.begin_tangent.z),
|
||||
edit(t!("End Tangent X").as_ref(), "end_tan_x", spline.end_tangent.x),
|
||||
edit(t!("End Tangent Y").as_ref(), "end_tan_y", spline.end_tangent.y),
|
||||
edit(t!("End Tangent Z").as_ref(), "end_tan_z", spline.end_tangent.z),
|
||||
],
|
||||
},
|
||||
PropSection {
|
||||
title: "Misc".into(),
|
||||
title: t!("Misc").into_owned(),
|
||||
props: vec![
|
||||
ro("Closed", "closed", yes_no(closed)),
|
||||
ro("Planar", "planar", yes_no(spline.flags.planar)),
|
||||
ro("Length", "length", format!("{length:.4}")),
|
||||
ro("Area", "area", area),
|
||||
ro(t!("Closed").as_ref(), "closed", yes_no(closed)),
|
||||
ro(t!("Planar").as_ref(), "planar", yes_no(spline.flags.planar)),
|
||||
ro(t!("Length").as_ref(), "length", format!("{length:.4}")),
|
||||
ro(t!("Area").as_ref(), "area", area),
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user