diff --git a/USBPrinterManager.py b/USBPrinterManager.py index 6180ed66e8..31ec5a5298 100644 --- a/USBPrinterManager.py +++ b/USBPrinterManager.py @@ -15,6 +15,10 @@ from UM.Extension import Extension from PyQt5.QtQuick import QQuickView from PyQt5.QtCore import QUrl, QObject,pyqtSlot , pyqtProperty,pyqtSignal +from UM.i18n import i18nCatalog + +i18n_catalog = i18nCatalog('plugins') + class USBPrinterManager(QObject, SignalEmitter, Extension): def __init__(self, parent = None): super().__init__(parent) @@ -32,7 +36,7 @@ class USBPrinterManager(QObject, SignalEmitter, Extension): self._bed_temp = 0 self._error_message = "" - self.addMenuItem("Update firmware", self.updateAllFirmware) + self.addMenuItem(i18n_catalog.i18n("Update firmware"), self.updateAllFirmware) #time.sleep(1) #self.connectAllConnections() diff --git a/__init__.py b/__init__.py index c5c0a4733d..243fc5ba0f 100644 --- a/__init__.py +++ b/__init__.py @@ -1,4 +1,9 @@ from . import USBPrinterManager + +from UM.i18n import i18nCatalog + +i18n_catalog = i18nCatalog('plugins') + def getMetaData(): return { 'type': 'extension', @@ -6,9 +11,9 @@ def getMetaData(): 'name': 'USB printing', 'author': 'Jaime van Kessel', 'version': '1.0', - 'description': 'Accepts G-Code and sends them to a printer. Plugin can also update firmware ' + 'description': i18n_catalog.i18nc('usb printing description','Accepts G-Code and sends them to a printer. Plugin can also update firmware') } } - + def register(app): return USBPrinterManager.USBPrinterManager()