mirror of
https://github.com/Syncplay/syncplay
synced 2025-01-10 00:29:38 +00:00
Added multilanguage support in the About dialog
This commit is contained in:
parent
cecb710e2c
commit
8936b071f3
@ -282,6 +282,14 @@ de = {
|
||||
"help-menu-label" : u"&Hilfe",
|
||||
"userguide-menu-label" : u"&Benutzerhandbuch öffnen",
|
||||
"update-menu-label" : u"auf &Aktualisierung prüfen",
|
||||
|
||||
#About dialog - TODO: Translate
|
||||
"about-menu-label": u"&About Syncplay",
|
||||
"about-dialog-title": u"About Syncplay",
|
||||
"about-dialog-release": u"Version {} release {} on {}",
|
||||
"about-dialog-license-text" : u"Licensed under the Apache License, Version 2.0",
|
||||
"about-dialog-license-button": u"License",
|
||||
"about-dialog-dependencies": u"Dependencies",
|
||||
|
||||
"setoffset-msgbox-label" : u"Offset einstellen",
|
||||
"offsetinfo-msgbox-label" : u"Offset (siehe http://syncplay.pl/guide/ für eine Anleitung [Englisch]):",
|
||||
|
@ -282,6 +282,14 @@ en = {
|
||||
"help-menu-label" : "&Help",
|
||||
"userguide-menu-label" : "Open user &guide",
|
||||
"update-menu-label" : "Check for &update",
|
||||
|
||||
#About dialog
|
||||
"about-menu-label": u"&About Syncplay",
|
||||
"about-dialog-title": u"About Syncplay",
|
||||
"about-dialog-release": u"Version {} release {} on {}",
|
||||
"about-dialog-license-text" : u"Licensed under the Apache License, Version 2.0",
|
||||
"about-dialog-license-button": u"License",
|
||||
"about-dialog-dependencies": u"Dependencies",
|
||||
|
||||
"setoffset-msgbox-label" : "Set offset",
|
||||
"offsetinfo-msgbox-label" : "Offset (see http://syncplay.pl/guide/ for usage instructions):",
|
||||
|
@ -284,6 +284,14 @@ ru = {
|
||||
"help-menu-label" : u"&Помощь",
|
||||
"userguide-menu-label" : u"&Руководство пользователя",
|
||||
"update-menu-label" : u"Проверить &обновления",
|
||||
|
||||
#About dialog - TODO: Translate
|
||||
"about-menu-label": u"&About Syncplay",
|
||||
"about-dialog-title": u"About Syncplay",
|
||||
"about-dialog-release": u"Version {} release {} on {}",
|
||||
"about-dialog-license-text" : u"Licensed under the Apache License, Version 2.0",
|
||||
"about-dialog-license-button": u"License",
|
||||
"about-dialog-dependencies": u"Dependencies",
|
||||
|
||||
"setoffset-msgbox-label" : u"Установить смещение",
|
||||
"offsetinfo-msgbox-label" : u"Смещение (см. инструкцию на странице www.syncplay.pl/guide):",
|
||||
|
@ -100,15 +100,15 @@ class AboutDialog(QtWidgets.QDialog):
|
||||
if sys.platform.startswith('darwin'):
|
||||
self.setWindowTitle("")
|
||||
else:
|
||||
self.setWindowTitle("About Syncplay")
|
||||
self.setWindowTitle(getMessage("about-dialog-title"))
|
||||
if sys.platform.startswith('win'):
|
||||
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint)
|
||||
nameLabel = QtWidgets.QLabel("<center><strong>Syncplay</strong></center>")
|
||||
nameLabel.setFont(QtGui.QFont("Helvetica", 20))
|
||||
linkLabel = QtWidgets.QLabel("<center><a href=\"http://syncplay.pl\">syncplay.pl</a></center>")
|
||||
linkLabel.setOpenExternalLinks(True)
|
||||
versionLabel = QtWidgets.QLabel("<center>Version v" + version + " release " + release_number + " on " + __binding__ + "</center>")
|
||||
licenseLabel = QtWidgets.QLabel("<center><p>Copyright © 2017 Syncplay</p><p>Licensed under the Apache License, Version 2.0</p></center>")
|
||||
versionLabel = QtWidgets.QLabel("<center>" + getMessage("about-dialog-release").format(version, release_number, __binding__) + "</center>")
|
||||
licenseLabel = QtWidgets.QLabel("<center><p>Copyright © 2017 Syncplay</p><p>" + getMessage("about-dialog-license-text") + "</p></center>")
|
||||
aboutIconPixmap = QtGui.QPixmap(self.resourcespath + u"syncplay.png")
|
||||
aboutIconLabel = QtWidgets.QLabel()
|
||||
aboutIconLabel.setPixmap(aboutIconPixmap.scaled(120, 120, Qt.KeepAspectRatio))
|
||||
@ -118,11 +118,11 @@ class AboutDialog(QtWidgets.QDialog):
|
||||
aboutLayout.addWidget(linkLabel, 1, 2, 1, 2)
|
||||
aboutLayout.addWidget(versionLabel, 2, 2, 1, 2)
|
||||
aboutLayout.addWidget(licenseLabel, 3, 2, 1, 2)
|
||||
licenseButton = QtWidgets.QPushButton("License")
|
||||
licenseButton = QtWidgets.QPushButton(getMessage("about-dialog-license-button"))
|
||||
licenseButton.setAutoDefault(False)
|
||||
licenseButton.clicked.connect(self.openLicense)
|
||||
aboutLayout.addWidget(licenseButton, 4, 2)
|
||||
dependenciesButton = QtWidgets.QPushButton("Dependencies")
|
||||
dependenciesButton = QtWidgets.QPushButton(getMessage("about-dialog-dependencies"))
|
||||
dependenciesButton.setAutoDefault(False)
|
||||
dependenciesButton.clicked.connect(self.openDependencies)
|
||||
aboutLayout.addWidget(dependenciesButton, 4, 3)
|
||||
@ -1449,7 +1449,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
if not sys.platform.startswith('darwin'):
|
||||
window.helpMenu.addSeparator()
|
||||
window.about = window.helpMenu.addAction(QtGui.QPixmap(self.resourcespath + 'syncplay.png'),
|
||||
'About Syncplay')
|
||||
getMessage("about-menu-label"))
|
||||
else:
|
||||
window.about = window.helpMenu.addAction("&About")
|
||||
window.about.triggered.connect(self.openAbout)
|
||||
|
Loading…
Reference in New Issue
Block a user