mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
adds/adapts translation context markers
all nescessary in folder: Cura/cura Contributes to: issue CURA-116
This commit is contained in:
parent
e8c796ee24
commit
ff855ccf1b
2 changed files with 5 additions and 4 deletions
|
|
@ -6,6 +6,7 @@ import webbrowser
|
||||||
from PyQt5.QtCore import QT_VERSION_STR, PYQT_VERSION_STR, QCoreApplication
|
from PyQt5.QtCore import QT_VERSION_STR, PYQT_VERSION_STR, QCoreApplication
|
||||||
from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTextEdit
|
from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTextEdit
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
|
catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
def show(type, value, tb):
|
def show(type, value, tb):
|
||||||
if not hasattr(sys, "frozen"):
|
if not hasattr(sys, "frozen"):
|
||||||
|
|
@ -16,13 +17,13 @@ def show(type, value, tb):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
dialog = QDialog()
|
dialog = QDialog()
|
||||||
dialog.setWindowTitle(self._i18n_catalog.i18nc("@title:errormessage", "Oops!"))
|
dialog.setWindowTitle(catalog.i18nc("@title:window", "Oops!"))
|
||||||
|
|
||||||
layout = QVBoxLayout(dialog)
|
layout = QVBoxLayout(dialog)
|
||||||
|
|
||||||
label = QLabel(dialog)
|
label = QLabel(dialog)
|
||||||
layout.addWidget(label)
|
layout.addWidget(label)
|
||||||
label.setText(self._i18n_catalog.i18nc("@info:errormessage", "<p>An uncaught exception has occurred!</p><p>Please use the information below to post a bug report at <a href=\"http://github.com/Ultimaker/Cura/issues\">http://github.com/Ultimaker/Cura/issues</a></p>"))
|
label.setText(catalog.i18nc("@info", "<p>An uncaught exception has occurred!</p><p>Please use the information below to post a bug report at <a href=\"http://github.com/Ultimaker/Cura/issues\">http://github.com/Ultimaker/Cura/issues</a></p>"))
|
||||||
|
|
||||||
textarea = QTextEdit(dialog)
|
textarea = QTextEdit(dialog)
|
||||||
layout.addWidget(textarea)
|
layout.addWidget(textarea)
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ class CuraApplication(QtApplication):
|
||||||
"message": "font color=UM.Theme.colors.message_text;",
|
"message": "font color=UM.Theme.colors.message_text;",
|
||||||
})
|
})
|
||||||
|
|
||||||
self.showSplashMessage(self._i18n_catalog.i18nc("@info:splashscreen", "Setting up scene..."))
|
self.showSplashMessage(self._i18n_catalog.i18nc("@info", "Setting up scene..."))
|
||||||
|
|
||||||
controller = self.getController()
|
controller = self.getController()
|
||||||
|
|
||||||
|
|
@ -166,7 +166,7 @@ class CuraApplication(QtApplication):
|
||||||
|
|
||||||
controller.getScene().setActiveCamera("3d")
|
controller.getScene().setActiveCamera("3d")
|
||||||
|
|
||||||
self.showSplashMessage(self._i18n_catalog.i18nc("@info:splashscreen", "Loading interface..."))
|
self.showSplashMessage(self._i18n_catalog.i18nc("@info", "Loading interface..."))
|
||||||
|
|
||||||
self.setMainQml(Resources.getPath(self.ResourceTypes.QmlFiles, "Cura.qml"))
|
self.setMainQml(Resources.getPath(self.ResourceTypes.QmlFiles, "Cura.qml"))
|
||||||
self.initializeEngine()
|
self.initializeEngine()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue