[improvement] Not breaking the application when a i18n (translation) key was not found

This commit is contained in:
Vinicius Moreira
2019-11-25 13:09:50 -03:00
parent 8c1bf684ed
commit b59cb347c4
25 changed files with 175 additions and 108 deletions

View File

@@ -4,13 +4,14 @@ from PyQt5.QtWidgets import QDialog, QVBoxLayout, QGroupBox, \
QLineEdit, QLabel, QGridLayout, QPushButton, QPlainTextEdit, QToolBar
from bauh.api.abstract.cache import MemoryCache
from bauh.view.util.translation import I18n
IGNORED_ATTRS = {'name', '__app__'}
class InfoDialog(QDialog):
def __init__(self, app: dict, icon_cache: MemoryCache, i18n: dict, screen_size: QSize()):
def __init__(self, app: dict, icon_cache: MemoryCache, i18n: I18n, screen_size: QSize()):
super(InfoDialog, self).__init__()
self.setWindowTitle(str(app['__app__']))
self.screen_size = screen_size