diff --git a/src/sakia/gui/navigation/identities/table_model.py b/src/sakia/gui/navigation/identities/table_model.py index 4e6b2e16fe0959b5a6dcf1160aba088db1919365..83d45ed77a0951b6b050036d1f4c4d57f056c335 100644 --- a/src/sakia/gui/navigation/identities/table_model.py +++ b/src/sakia/gui/navigation/identities/table_model.py @@ -8,7 +8,7 @@ from PyQt5.QtCore import ( QModelIndex, QLocale, QT_TRANSLATE_NOOP, -) + QCoreApplication) from PyQt5.QtGui import QColor, QIcon, QFont import logging import asyncio @@ -145,14 +145,14 @@ class IdentitiesTableModel(QAbstractTableModel): """ columns_titles = { - "uid": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "UID"), - "pubkey": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "Pubkey"), - "renewed": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "Renewed"), - "expiration": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "Expiration"), - "publication": lambda: QT_TRANSLATE_NOOP( + "uid": QT_TRANSLATE_NOOP("IdentitiesTableModel", "UID"), + "pubkey": QT_TRANSLATE_NOOP("IdentitiesTableModel", "Pubkey"), + "renewed": QT_TRANSLATE_NOOP("IdentitiesTableModel", "Renewed"), + "expiration": QT_TRANSLATE_NOOP("IdentitiesTableModel", "Expiration"), + "publication": QT_TRANSLATE_NOOP( "IdentitiesTableModel", "Publication" ), - "block": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "Publication Block"), + "block": QT_TRANSLATE_NOOP("IdentitiesTableModel", "Publication Block"), } columns_ids = ( "uid", @@ -248,7 +248,7 @@ class IdentitiesTableModel(QAbstractTableModel): def headerData(self, section, orientation, role): if role == Qt.DisplayRole: col_id = IdentitiesTableModel.columns_ids[section] - return IdentitiesTableModel.columns_titles[col_id]() + return QCoreApplication.translate("IdentitiesTableModel", IdentitiesTableModel.columns_titles[col_id]) def data(self, index, role): if index.isValid() and role == Qt.DisplayRole: