From 2768ce7933b9f1226a27424ada149bc28a5e2b70 Mon Sep 17 00:00:00 2001 From: Sameer Mishra <64918520+Gopal-001@users.noreply.github.com> Date: Tue, 15 Apr 2025 23:28:28 +0530 Subject: [PATCH] BIM: Fix 'Convert to type' dialogue unhandled placeholder #20676 (#20705) Handle %1 placeholder that was appearing in text strings in the 'Convert to type' dialogue. This was affecting multiple language files in the translation system. This change improves the readability and correctness of the displayed text in the application interface. The dialog now dynamically shows the correct type (e.g., 'WallType', 'BeamType') in the user's interface language. --------- Co-authored-by: _sameer --- src/Mod/BIM/nativeifc/ifc_types.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mod/BIM/nativeifc/ifc_types.py b/src/Mod/BIM/nativeifc/ifc_types.py index fb4c7d3bd6..8d78796ee8 100644 --- a/src/Mod/BIM/nativeifc/ifc_types.py +++ b/src/Mod/BIM/nativeifc/ifc_types.py @@ -76,6 +76,10 @@ def convert_to_type(obj, keep_object=False): if FreeCAD.GuiUp: import FreeCADGui dlg = FreeCADGui.PySideUic.loadUi(":/ui/dialogConvertType.ui") + + original_text = dlg.label.text() + dlg.label.setText(original_text.replace("%1", obj.Class+"Type")) + result = dlg.exec_() if not result: return