[Pkg-privacy-commits] [tails-installer] 80/210: Load the translator on startup
Intrigeri
intrigeri at moszumanska.debian.org
Wed May 24 15:26:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to tag 3.90.0
in repository tails-installer.
commit 4fa44d3b710e9305f20e5b04dc6915061bbe4fcf
Author: Martin Briza <mbriza at redhat.com>
Date: Thu Apr 16 14:40:04 2015 +0200
Load the translator on startup
---
liveusb/gui.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 770a55d..90e1b42 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -32,7 +32,7 @@ import urlparse
from time import sleep
from datetime import datetime
-from PyQt5.QtCore import pyqtProperty, pyqtSlot, QObject, QUrl, QDateTime, pyqtSignal, QThread, QAbstractListModel, QSortFilterProxyModel, QModelIndex, Qt
+from PyQt5.QtCore import pyqtProperty, pyqtSlot, QObject, QUrl, QDateTime, pyqtSignal, QThread, QAbstractListModel, QSortFilterProxyModel, QModelIndex, Qt, QTranslator, QLocale
from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQml import qmlRegisterType, qmlRegisterUncreatableType, QQmlComponent, QQmlApplicationEngine, QQmlListProperty
from PyQt5.QtQuick import QQuickView
@@ -923,6 +923,9 @@ class LiveUSBApp(QGuiApplication):
""" Main application class """
def __init__(self, opts, args):
QGuiApplication.__init__(self, args)
+ translator = QTranslator()
+ translator.load(QLocale.system().name(), "i18n")
+ self.installTranslator(translator)
qmlRegisterUncreatableType(ReleaseDownload, 'LiveUSB', 1, 0, 'Download', 'Not creatable directly, use the liveUSBData instance instead')
qmlRegisterUncreatableType(ReleaseWriter, 'LiveUSB', 1, 0, 'Writer', 'Not creatable directly, use the liveUSBData instance instead')
qmlRegisterUncreatableType(ReleaseListModel, 'LiveUSB', 1, 0, 'ReleaseModel', 'Not creatable directly, use the liveUSBData instance instead')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git
More information about the Pkg-privacy-commits
mailing list