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 ( ...@@ -8,7 +8,7 @@ from PyQt5.QtCore import (
QModelIndex, QModelIndex,
QLocale, QLocale,
QT_TRANSLATE_NOOP, QT_TRANSLATE_NOOP,
) QCoreApplication)
from PyQt5.QtGui import QColor, QIcon, QFont from PyQt5.QtGui import QColor, QIcon, QFont
import logging import logging
import asyncio import asyncio
...@@ -145,14 +145,14 @@ class IdentitiesTableModel(QAbstractTableModel): ...@@ -145,14 +145,14 @@ class IdentitiesTableModel(QAbstractTableModel):
""" """
columns_titles = { columns_titles = {
"uid": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "UID"), "uid": QT_TRANSLATE_NOOP("IdentitiesTableModel", "UID"),
"pubkey": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "Pubkey"), "pubkey": QT_TRANSLATE_NOOP("IdentitiesTableModel", "Pubkey"),
"renewed": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "Renewed"), "renewed": QT_TRANSLATE_NOOP("IdentitiesTableModel", "Renewed"),
"expiration": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "Expiration"), "expiration": QT_TRANSLATE_NOOP("IdentitiesTableModel", "Expiration"),
"publication": lambda: QT_TRANSLATE_NOOP( "publication": QT_TRANSLATE_NOOP(
"IdentitiesTableModel", "Publication" "IdentitiesTableModel", "Publication"
), ),
"block": lambda: QT_TRANSLATE_NOOP("IdentitiesTableModel", "Publication Block"), "block": QT_TRANSLATE_NOOP("IdentitiesTableModel", "Publication Block"),
} }
columns_ids = ( columns_ids = (
"uid", "uid",
...@@ -248,7 +248,7 @@ class IdentitiesTableModel(QAbstractTableModel): ...@@ -248,7 +248,7 @@ class IdentitiesTableModel(QAbstractTableModel):
def headerData(self, section, orientation, role): def headerData(self, section, orientation, role):
if role == Qt.DisplayRole: if role == Qt.DisplayRole:
col_id = IdentitiesTableModel.columns_ids[section] 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): def data(self, index, role):
if index.isValid() and role == Qt.DisplayRole: 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