diff --git a/cura/CrashHandler.py b/cura/CrashHandler.py index 9e1dc0897d..e1a8690e52 100644 --- a/cura/CrashHandler.py +++ b/cura/CrashHandler.py @@ -6,6 +6,7 @@ import webbrowser from PyQt5.QtCore import QT_VERSION_STR, PYQT_VERSION_STR, QCoreApplication from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTextEdit from UM.i18n import i18nCatalog +catalog = i18nCatalog("cura") def show(type, value, tb): if not hasattr(sys, "frozen"): @@ -16,13 +17,13 @@ def show(type, value, tb): sys.exit(1) dialog = QDialog() - dialog.setWindowTitle(self._i18n_catalog.i18nc("@title:errormessage", "Oops!")) + dialog.setWindowTitle(catalog.i18nc("@title:window", "Oops!")) layout = QVBoxLayout(dialog) label = QLabel(dialog) layout.addWidget(label) - label.setText(self._i18n_catalog.i18nc("@info:errormessage", "

An uncaught exception has occurred!

Please use the information below to post a bug report at http://github.com/Ultimaker/Cura/issues

")) + label.setText(catalog.i18nc("@info", "

An uncaught exception has occurred!

Please use the information below to post a bug report at http://github.com/Ultimaker/Cura/issues

")) textarea = QTextEdit(dialog) layout.addWidget(textarea) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 7febdc574e..ea23fbf092 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -132,7 +132,7 @@ class CuraApplication(QtApplication): "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:progress", "Setting up scene...")) controller = self.getController() @@ -166,7 +166,7 @@ class CuraApplication(QtApplication): controller.getScene().setActiveCamera("3d") - self.showSplashMessage(self._i18n_catalog.i18nc("@info:splashscreen", "Loading interface...")) + self.showSplashMessage(self._i18n_catalog.i18nc("@info:progress", "Loading interface...")) self.setMainQml(Resources.getPath(self.ResourceTypes.QmlFiles, "Cura.qml")) self.initializeEngine() diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index ca3904bc4e..9b6c63c309 100644 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -120,5 +120,5 @@ class ThreeMFReader(MeshReader): except: pass except Exception as e: - Logger.log("e" ,"exception occured in 3mf reader: %s" , e) + Logger.log("e" ,"exception occured in 3mf reader: %s" , e) return result diff --git a/plugins/3MFReader/__init__.py b/plugins/3MFReader/__init__.py index 04bf2decf5..7d9b00a74e 100644 --- a/plugins/3MFReader/__init__.py +++ b/plugins/3MFReader/__init__.py @@ -9,15 +9,15 @@ from . import ThreeMFReader def getMetaData(): return { "plugin": { - "name": "3MF Reader", + "name": catalog.i18nc("@label", "3MF Reader"), "author": "Ultimaker", "version": "1.0", - "description": catalog.i18nc("3MF Reader plugin description", "Provides support for reading 3MF files."), + "description": catalog.i18nc("@info:whatsthis", "Provides support for reading 3MF files."), "api": 2 }, "mesh_reader": { "extension": "3mf", - "description": catalog.i18nc("3MF Reader plugin file type", "3MF File") + "description": catalog.i18nc("@item:inlistbox", "3MF File") } } diff --git a/plugins/ChangeLogPlugin/ChangeLog.qml b/plugins/ChangeLogPlugin/ChangeLog.qml index 61400f3d07..74170721d1 100644 --- a/plugins/ChangeLogPlugin/ChangeLog.qml +++ b/plugins/ChangeLogPlugin/ChangeLog.qml @@ -22,7 +22,6 @@ UM.Dialog text: manager.getChangeLogString() width:base.width - 35 wrapMode: Text.Wrap; - //Component.onCompleted: console.log() } } } diff --git a/plugins/ChangeLogPlugin/__init__.py b/plugins/ChangeLogPlugin/__init__.py index 8f8235bf23..431a93c395 100644 --- a/plugins/ChangeLogPlugin/__init__.py +++ b/plugins/ChangeLogPlugin/__init__.py @@ -1,18 +1,18 @@ # Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. -from UM.i18n import i18nCatalog from . import ChangeLog +from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "plugin": { - "name": "Change log", + "name": catalog.i18nc("@label", "Change Log"), "author": "Ultimaker", "version": "1.0", - "description": catalog.i18nc("Change log plugin description", "Shows changes since latest checked version"), + "description": catalog.i18nc("@info:whatsthis", "Shows changes since latest checked version"), "api": 2 } } diff --git a/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py b/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py index 6300499af7..2e2303863f 100644 --- a/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py +++ b/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py @@ -27,7 +27,7 @@ class ProcessSlicedObjectListJob(Job): def run(self): if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView": - self._progress = Message(catalog.i18nc("Layers View mode", "Layers"), 0, False, 0) + self._progress = Message(catalog.i18nc("@info", "Layers"), 0, False, 0) self._progress.show() Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged) diff --git a/plugins/CuraEngineBackend/__init__.py b/plugins/CuraEngineBackend/__init__.py index fc986c6f67..5aa12e6574 100644 --- a/plugins/CuraEngineBackend/__init__.py +++ b/plugins/CuraEngineBackend/__init__.py @@ -10,9 +10,9 @@ catalog = i18nCatalog("cura") def getMetaData(): return { "plugin": { - "name": "CuraEngine Backend", + "name": catalog.i18nc("@label", "CuraEngine Backend"), "author": "Ultimaker", - "description": catalog.i18nc("CuraEngine backend plugin description", "Provides the link to the CuraEngine slicing backend"), + "description": catalog.i18nc("@info:whatsthis", "Provides the link to the CuraEngine slicing backend"), "api": 2 } } diff --git a/plugins/GCodeWriter/__init__.py b/plugins/GCodeWriter/__init__.py index ecd63b02b5..2c3a47ecef 100644 --- a/plugins/GCodeWriter/__init__.py +++ b/plugins/GCodeWriter/__init__.py @@ -9,17 +9,17 @@ catalog = i18nCatalog("cura") def getMetaData(): return { "plugin": { - "name": "GCode Writer", + "name": catalog.i18nc("@label", "GCode Writer"), "author": "Ultimaker", "version": "1.0", - "description": catalog.i18nc("GCode Writer Plugin Description", "Writes GCode to a file"), + "description": catalog.i18nc("@info:whatsthis", "Writes GCode to a file"), "api": 2 }, "mesh_writer": { "output": [{ "extension": "gcode", - "description": catalog.i18nc("GCode Writer File Description", "GCode File"), + "description": catalog.i18nc("@item:inlistbox", "GCode File"), "mime_type": "text/x-gcode", "mode": GCodeWriter.GCodeWriter.OutputMode.TextMode }] diff --git a/plugins/LayerView/__init__.py b/plugins/LayerView/__init__.py index 4bd9a61fb0..cf9d5970da 100644 --- a/plugins/LayerView/__init__.py +++ b/plugins/LayerView/__init__.py @@ -10,14 +10,14 @@ catalog = i18nCatalog("cura") def getMetaData(): return { "plugin": { - "name": "Layer View", + "name": catalog.i18nc("@label", "Layer View"), "author": "Ultimaker", "version": "1.0", - "description": catalog.i18nc("Layer View plugin description", "Provides the Layer view."), + "description": catalog.i18nc("@info:whatsthis", "Provides the Layer view."), "api": 2 }, "view": { - "name": catalog.i18nc("Layers View mode", "Layers"), + "name": catalog.i18nc("@item:inlistbox", "Layers"), "view_panel": "LayerView.qml" } } diff --git a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py index 9c9afa4246..339721f7f2 100644 --- a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py +++ b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py @@ -10,7 +10,7 @@ from UM.OutputDevice.OutputDevice import OutputDevice from UM.OutputDevice import OutputDeviceError from UM.i18n import i18nCatalog -catalog = i18nCatalog("uranium") +catalog = i18nCatalog("cura") class RemovableDriveOutputDevice(OutputDevice): def __init__(self, device_id, device_name): @@ -18,7 +18,7 @@ class RemovableDriveOutputDevice(OutputDevice): self.setName(device_name) self.setShortDescription(catalog.i18nc("@action:button", "Save to Removable Drive")) - self.setDescription(catalog.i18nc("@info:tooltip", "Save to Removable Drive {0}").format(device_name)) + self.setDescription(catalog.i18nc("@item:inlistbox", "Save to Removable Drive {0}").format(device_name)) self.setIconName("save_sd") self.setPriority(1) @@ -49,7 +49,7 @@ class RemovableDriveOutputDevice(OutputDevice): job.progress.connect(self._onProgress) job.finished.connect(self._onFinished) - message = Message(catalog.i18nc("@info:status", "Saving to Removable Drive {0}").format(self.getName()), 0, False, -1) + message = Message(catalog.i18nc("@info:progress", "Saving to Removable Drive {0}").format(self.getName()), 0, False, -1) message.show() job._message = message @@ -70,13 +70,13 @@ class RemovableDriveOutputDevice(OutputDevice): job._message = None self.writeFinished.emit(self) if job.getResult(): - message = Message(catalog.i18nc("", "Saved to Removable Drive {0} as {1}").format(self.getName(), os.path.basename(job.getFileName()))) - message.addAction("eject", catalog.i18nc("", "Eject"), "eject", catalog.i18nc("", "Eject removable device {0}").format(self.getName())) + message = Message(catalog.i18nc("@info:status", "Saved to Removable Drive {0} as {1}").format(self.getName(), os.path.basename(job.getFileName()))) + message.addAction("eject", catalog.i18nc("@action:button", "Eject"), "eject", catalog.i18nc("@action", "Eject removable device {0}").format(self.getName())) message.actionTriggered.connect(self._onActionTriggered) message.show() self.writeSuccess.emit(self) else: - message = Message(catalog.i18nc("", "Could not save to removable drive {0}: {1}").format(self.getName(), str(job.getError()))) + message = Message(catalog.i18nc("@info:status", "Could not save to removable drive {0}: {1}").format(self.getName(), str(job.getError()))) message.show() self.writeError.emit(self) job.getStream().close() diff --git a/plugins/RemovableDriveOutputDevice/RemovableDrivePlugin.py b/plugins/RemovableDriveOutputDevice/RemovableDrivePlugin.py index a4e5e4f3f9..ed95e87e14 100644 --- a/plugins/RemovableDriveOutputDevice/RemovableDrivePlugin.py +++ b/plugins/RemovableDriveOutputDevice/RemovableDrivePlugin.py @@ -11,7 +11,7 @@ from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin from . import RemovableDriveOutputDevice from UM.i18n import i18nCatalog -catalog = i18nCatalog("uranium") +catalog = i18nCatalog("cura") class RemovableDrivePlugin(OutputDevicePlugin): def __init__(self): @@ -39,10 +39,10 @@ class RemovableDrivePlugin(OutputDevicePlugin): def ejectDevice(self, device): result = self.performEjectDevice(device) if result: - message = Message(catalog.i18n("Ejected {0}. You can now safely remove the drive.").format(device.getName())) + message = Message(catalog.i18n("@info:status", "Ejected {0}. You can now safely remove the drive.").format(device.getName())) message.show() else: - message = Message(catalog.i18n("Failed to eject {0}. Maybe it is still in use?").format(device.getName())) + message = Message(catalog.i18n("@info:status", "Failed to eject {0}. Maybe it is still in use?").format(device.getName())) message.show() def performEjectDevice(self, device): diff --git a/plugins/RemovableDriveOutputDevice/WindowsRemovableDrivePlugin.py b/plugins/RemovableDriveOutputDevice/WindowsRemovableDrivePlugin.py index aa85db0c09..3723d48231 100644 --- a/plugins/RemovableDriveOutputDevice/WindowsRemovableDrivePlugin.py +++ b/plugins/RemovableDriveOutputDevice/WindowsRemovableDrivePlugin.py @@ -16,7 +16,7 @@ import os import subprocess from UM.i18n import i18nCatalog -catalog = i18nCatalog("uranium") +catalog = i18nCatalog("cura") # WinAPI Constants that we need # Hardcoded here due to stupid WinDLL stuff that does not give us access to these values. @@ -55,7 +55,7 @@ class WindowsRemovableDrivePlugin(RemovableDrivePlugin.RemovableDrivePlugin): volume_name = name_buffer.value if not volume_name: - volume_name = catalog.i18nc("Default name for removable device", "Removable Drive") + volume_name = catalog.i18nc("@item:intext", "Removable Drive") # Certain readers will report themselves as a volume even when there is no card inserted, but will show an # "No volume in drive" warning when trying to call GetDiskFreeSpace. However, they will not report a valid diff --git a/plugins/RemovableDriveOutputDevice/__init__.py b/plugins/RemovableDriveOutputDevice/__init__.py index 72ba10f01f..34fd2f0fb9 100644 --- a/plugins/RemovableDriveOutputDevice/__init__.py +++ b/plugins/RemovableDriveOutputDevice/__init__.py @@ -9,9 +9,9 @@ catalog = i18nCatalog("uranium") def getMetaData(): return { "plugin": { - "name": catalog.i18nc("Removable Drive Output Device Plugin name", "Removable Drive Output Device Plugin"), + "name": catalog.i18nc("@label", "Removable Drive Output Device Plugin"), "author": "Ultimaker B.V.", - "description": catalog.i18nc("Removable Drive Output Device Plugin description", "Provides removable drive hotplugging and writing support"), + "description": catalog.i18nc("@info:whatsthis", "Provides removable drive hotplugging and writing support"), "version": "1.0", "api": 2 } diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index 600771f0bf..5ece6ef02c 100644 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -32,8 +32,8 @@ class SliceInfo(Extension): Preferences.getInstance().addPreference("info/asked_send_slice_info", False) if not Preferences.getInstance().getValue("info/asked_send_slice_info"): - self.send_slice_info_message = Message(catalog.i18nc("", "Cura automatically sends slice info. You can disable this in preferences"), lifetime = 0, dismissable = False) - self.send_slice_info_message.addAction("Dismiss","Dismiss", None, "Dismiss") + self.send_slice_info_message = Message(catalog.i18nc("@info", "Cura automatically sends slice info. You can disable this in preferences"), lifetime = 0, dismissable = False) + self.send_slice_info_message.addAction("Dismiss", catalog.i18nc("@action:button", "Dismiss"), None, catalog.i18nc("@action", "Dismiss")) self.send_slice_info_message.actionTriggered.connect(self.messageActionTriggered) self.send_slice_info_message.show() diff --git a/plugins/SliceInfoPlugin/__init__.py b/plugins/SliceInfoPlugin/__init__.py index 8db60a7d52..da9111b2e4 100644 --- a/plugins/SliceInfoPlugin/__init__.py +++ b/plugins/SliceInfoPlugin/__init__.py @@ -7,10 +7,10 @@ catalog = i18nCatalog("cura") def getMetaData(): return { "plugin": { - "name": "Slice Info", + "name": catalog.i18nc("@label", "Slice info"), "author": "Ultimaker", "version": "1.0", - "description": catalog.i18nc("Slice Info plugin description", "Submits anonymous slice info. Can be disabled through preferences."), + "description": catalog.i18nc("@info:whatsthis", "Submits anonymous slice info. Can be disabled through preferences."), "api": 2 } } diff --git a/plugins/USBPrinting/FirmwareUpdateWindow.qml b/plugins/USBPrinting/FirmwareUpdateWindow.qml index 55d3f60c62..52ad5ee9dd 100644 --- a/plugins/USBPrinting/FirmwareUpdateWindow.qml +++ b/plugins/USBPrinting/FirmwareUpdateWindow.qml @@ -75,7 +75,7 @@ UM.Dialog rightButtons: [ Button { - text: "Close"; + text: catalog.i18nc("@action:button","Close"); enabled: manager.progress >= 100; onClicked: base.visible = false; } diff --git a/plugins/USBPrinting/USBPrinterManager.py b/plugins/USBPrinting/USBPrinterManager.py index bae5099610..fb4dcb8ffb 100644 --- a/plugins/USBPrinting/USBPrinterManager.py +++ b/plugins/USBPrinting/USBPrinterManager.py @@ -24,7 +24,6 @@ from UM.Extension import Extension from PyQt5.QtQuick import QQuickView from PyQt5.QtQml import QQmlComponent, QQmlContext from PyQt5.QtCore import QUrl, QObject, pyqtSlot, pyqtProperty, pyqtSignal, Qt - from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("cura") @@ -44,8 +43,12 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): self._firmware_view = None ## Add menu item to top menu of the application. - self.setMenuName("Firmware") - self.addMenuItem(i18n_catalog.i18n("Update Firmware"), self.updateAllFirmware) + #self.setMenuName(self._i18n_catalog.i18n("@title:menu", "Firmware")) + #self.addMenuItem(self._i18n_catalog.i18n("@item:inmenu", "Update Firmware"), self.updateAllFirmware) + + #self.setMenuName("Firmware") + self.setMenuName(i18n_catalog.i18nc("@title:menu","Firmware")) + self.addMenuItem(i18n_catalog.i18nc("@item:inmenu", "Update Firmware"), self.updateAllFirmware) Application.getInstance().applicationShuttingDown.connect(self.stop) self.addConnectionSignal.connect(self.addConnection) #Because the model needs to be created in the same thread as the QMLEngine, we use a signal. diff --git a/plugins/USBPrinting/__init__.py b/plugins/USBPrinting/__init__.py index 7ee8290e12..47f5de321f 100644 --- a/plugins/USBPrinting/__init__.py +++ b/plugins/USBPrinting/__init__.py @@ -10,11 +10,11 @@ def getMetaData(): return { "type": "extension", "plugin": { - "name": "USB printing", + "name": i18n_catalog.i18nc("@label", "USB printing"), "author": "Ultimaker", "version": "1.0", "api": 2, - "description": i18n_catalog.i18nc("USB Printing plugin description","Accepts G-Code and sends them to a printer. Plugin can also update firmware") + "description": i18n_catalog.i18nc("@info:whatsthis","Accepts G-Code and sends them to a printer. Plugin can also update firmware.") } }