From a93bd3aeee4f05718bca7ab4f70f5aa797216996 Mon Sep 17 00:00:00 2001 From: glubsy Date: Tue, 29 Dec 2020 18:52:22 +0100 Subject: [PATCH] Add missing translation hooks --- qt/exclude_list_dialog.py | 4 ++-- qt/exclude_list_table.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/qt/exclude_list_dialog.py b/qt/exclude_list_dialog.py index f5ecf5d3..425d4eba 100644 --- a/qt/exclude_list_dialog.py +++ b/qt/exclude_list_dialog.py @@ -80,9 +80,9 @@ class ExcludeListDialog(QDialog): gridlayout.addWidget(self.testLine, 6, 0) layout.addLayout(gridlayout) - self.inputLine.setPlaceholderText("Type a python regular expression here...") + self.inputLine.setPlaceholderText(tr("Type a python regular expression here...")) self.inputLine.setFocus() - self.testLine.setPlaceholderText("Type a file system path or filename here...") + self.testLine.setPlaceholderText(tr("Type a file system path or filename here...")) self.testLine.setClearButtonEnabled(True) # --- model --> view diff --git a/qt/exclude_list_table.py b/qt/exclude_list_table.py index 3521c7a1..b58e2579 100644 --- a/qt/exclude_list_table.py +++ b/qt/exclude_list_table.py @@ -7,6 +7,8 @@ from PyQt5.QtGui import QFont, QFontMetrics, QIcon, QColor from qtlib.column import Column from qtlib.table import Table +from hscommon.trans import trget +tr = trget("ui") class ExcludeListTable(Table): @@ -31,7 +33,7 @@ class ExcludeListTable(Table): if role == Qt.CheckStateRole and row.markable: return Qt.Checked if row.marked else Qt.Unchecked if role == Qt.ToolTipRole and not row.markable: - return "Compilation error: " + row.get_cell_value("error") + return tr("Compilation error: ") + row.get_cell_value("error") if role == Qt.DecorationRole and not row.markable: return QIcon.fromTheme("dialog-error", QIcon(":/error")) return None