Skip to content
Snippets Groups Projects
Commit 001dacae authored by Vincent Texier's avatar Vincent Texier
Browse files

[fix] fix identity table model translation

parent 9436b066
Branches
Tags
1 merge request!7750.50.0
......@@ -9,7 +9,7 @@ from PyQt5.QtCore import (
QModelIndex,
QLocale,
QT_TRANSLATE_NOOP,
)
QCoreApplication)
from PyQt5.QtGui import QColor, QIcon, QFont
import logging
import asyncio
......@@ -121,13 +121,13 @@ class CertifiersTableModel(QAbstractTableModel):
"""
columns_titles = {
"uid": lambda: QT_TRANSLATE_NOOP("CertifiersTableModel", "UID"),
"pubkey": lambda: QT_TRANSLATE_NOOP("CertifiersTableModel", "Pubkey"),
"publication": lambda: QT_TRANSLATE_NOOP(
"uid": QT_TRANSLATE_NOOP("CertifiersTableModel", "UID"),
"pubkey": QT_TRANSLATE_NOOP("CertifiersTableModel", "Pubkey"),
"publication": QT_TRANSLATE_NOOP(
"CertifiersTableModel", "Publication"
),
"expiration": lambda: QT_TRANSLATE_NOOP("CertifiersTableModel", "Expiration"),
"available": lambda: QT_TRANSLATE_NOOP("CertifiersTableModel"),
"expiration": QT_TRANSLATE_NOOP("CertifiersTableModel", "Expiration"),
"available": QT_TRANSLATE_NOOP("CertifiersTableModel", "available"),
}
columns_ids = ("uid", "pubkey", "publication", "expiration", "written", "identity")
......@@ -222,7 +222,7 @@ class CertifiersTableModel(QAbstractTableModel):
def headerData(self, section, orientation, role):
if orientation == Qt.Horizontal and role == Qt.DisplayRole:
col_id = CertifiersTableModel.columns_ids[section]
return CertifiersTableModel.columns_titles[col_id]()
return QCoreApplication.translate("CertifiersTableModel", CertifiersTableModel.columns_titles[col_id])
def data(self, index, role):
if index.isValid() and role == Qt.DisplayRole:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment