From 5f322c9626ebc24e7f2838751c3c5d43295ec8e3 Mon Sep 17 00:00:00 2001 From: Roy-043 <70520633+Roy-043@users.noreply.github.com> Date: Mon, 25 Aug 2025 11:31:50 +0200 Subject: [PATCH] Draft: task_orthoarray.py make some strings translatable --- .../Draft/drafttaskpanels/task_orthoarray.py | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/Mod/Draft/drafttaskpanels/task_orthoarray.py b/src/Mod/Draft/drafttaskpanels/task_orthoarray.py index bba641db75..619c9f3f50 100644 --- a/src/Mod/Draft/drafttaskpanels/task_orthoarray.py +++ b/src/Mod/Draft/drafttaskpanels/task_orthoarray.py @@ -429,7 +429,7 @@ class TaskPanelOrthoArray: # check radiobutton based on current cfg self.update_axis_ui() - # For linear mode we're hiding all group boxes for X, Y, Z axis and the one + # For linear mode we're hiding all group boxes for X-, Y-, Z-Axis and the one # with number of elements as we will reparent those spinboxes under newly # created group self._set_orthomode_groups_visibility(hide=True) @@ -438,7 +438,14 @@ class TaskPanelOrthoArray: # Set the appropriate title for the group (we flip it back and forth after changing mode) # and show the group self.form.group_linearmode.show() - self.form.group_linearmode.setTitle(f"{self.active_axis} Axis") + match self.active_axis: + case "X": + title = translate("draft", "X-Axis") + case "Y": + title = translate("draft", "Y-Axis") + case "Z": + title = translate("draft", "Z-Axis") + self.form.group_linearmode.setTitle(title) else: # ortho mode self.form.button_linear_mode.setText(translate("draft", "Switch to Linear Mode")) @@ -467,7 +474,14 @@ class TaskPanelOrthoArray: self.active_axis = axis params.set_param("AxisSelected", self.active_axis, "Mod/Draft/OrthoArrayLinearMode") self._setup_linear_mode_layout() - self.form.group_linearmode.setTitle(f"{self.active_axis} Axis") + match self.active_axis: + case "X": + title = translate("draft", "X-Axis") + case "Y": + title = translate("draft", "Y-Axis") + case "Z": + title = translate("draft", "Z-Axis") + self.form.group_linearmode.setTitle(title) def update_axis_ui(self):