From 5cb6e0733ffbea7aa646514142eb71556b147b4a Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Sun, 16 Apr 2023 21:13:54 -0500 Subject: [PATCH] FEM: Fix translation of long phrase The lupdate tool does not correctly parse Python string concatenation. Also, .format() calls should be made on the string returned from tr(), not on the string going into it. --- src/Mod/Fem/femguiutils/selection_widgets.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Mod/Fem/femguiutils/selection_widgets.py b/src/Mod/Fem/femguiutils/selection_widgets.py index d2aa8e9187..6d93fc92f8 100644 --- a/src/Mod/Fem/femguiutils/selection_widgets.py +++ b/src/Mod/Fem/femguiutils/selection_widgets.py @@ -273,12 +273,10 @@ class GeometryElementsSelection(QtGui.QWidget): self._helpTextLbl = QtGui.QLabel() self._helpTextLbl.setWordWrap(True) helpTextPart1 = self.tr( - 'Click on "Add" and select geometric elements to add them to the list.{}' - "The following geometry elements are allowed to select: {}{}{}" - .format("
", "", self.sel_elem_text, "") - ) + 'Click on "Add" and select geometric elements to add them to the list.{}The following geometry elements can be selected: {}{}{}' + ).format("
", "", self.sel_elem_text, "") helpTextEmpty = self.tr( - "{}If no geometry is added to the list, all remaining ones are used.".format("
") + "{}If no geometry is added to the list, all remaining ones are used.").format("
" ) if self.showHintEmptyList is True: self._helpTextLbl.setText(