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

[fix] fix identities table model translation

parent 943eb0b3
No related branches found
No related tags found
1 merge request!7750.50.0
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment