mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Machine action labels are now translatable
CURA-1385
This commit is contained in:
parent
b7906c9ce7
commit
41147b5128
3 changed files with 14 additions and 5 deletions
|
@ -1,14 +1,16 @@
|
||||||
from cura.MachineAction import MachineAction
|
from cura.MachineAction import MachineAction
|
||||||
|
from cura.PrinterOutputDevice import PrinterOutputDevice
|
||||||
|
|
||||||
from PyQt5.QtCore import pyqtSlot
|
from PyQt5.QtCore import pyqtSlot
|
||||||
|
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
|
from UM.i18n import i18nCatalog
|
||||||
|
catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
from cura.PrinterOutputDevice import PrinterOutputDevice
|
|
||||||
|
|
||||||
class BedLevelMachineAction(MachineAction):
|
class BedLevelMachineAction(MachineAction):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__("BedLevel", "Level bed")
|
super().__init__("BedLevel", catalog.i18nc("@action", "Level bed"))
|
||||||
self._qml_url = "BedLevelMachineAction.qml"
|
self._qml_url = "BedLevelMachineAction.qml"
|
||||||
self._bed_level_position = 0
|
self._bed_level_position = 0
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,13 @@ from cura.PrinterOutputDevice import PrinterOutputDevice
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
from PyQt5.QtCore import pyqtSlot, pyqtSignal, pyqtProperty
|
from PyQt5.QtCore import pyqtSlot, pyqtSignal, pyqtProperty
|
||||||
|
|
||||||
|
from UM.i18n import i18nCatalog
|
||||||
|
catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
|
|
||||||
class UMOCheckupMachineAction(MachineAction):
|
class UMOCheckupMachineAction(MachineAction):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__("UMOCheckup", "Checkup")
|
super().__init__("UMOCheckup", catalog.i18nc("@action", "Checkup"))
|
||||||
self._qml_url = "UMOCheckupMachineAction.qml"
|
self._qml_url = "UMOCheckupMachineAction.qml"
|
||||||
self._hotend_target_temp = 180
|
self._hotend_target_temp = 180
|
||||||
self._bed_target_temp = 60
|
self._bed_target_temp = 60
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
from cura.MachineAction import MachineAction
|
from cura.MachineAction import MachineAction
|
||||||
|
from UM.i18n import i18nCatalog
|
||||||
|
catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
|
|
||||||
class UpgradeFirmwareMachineAction(MachineAction):
|
class UpgradeFirmwareMachineAction(MachineAction):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__("UpgradeFirmware", "Upgrade Firmware")
|
super().__init__("UpgradeFirmware", catalog.i18nc("@action", "Upgrade Firmware"))
|
||||||
self._qml_url = "UpgradeFirmwareMachineAction.qml"
|
self._qml_url = "UpgradeFirmwareMachineAction.qml"
|
Loading…
Add table
Add a link
Reference in a new issue