adds/adapts translation context markers

all nescessary in folder: Cura/plugins

Contributes to: issue CURA-116
This commit is contained in:
Tamara Hogenhout 2015-09-08 15:26:49 +02:00
parent 79f69f30f5
commit 4a9bf2b4d6
17 changed files with 42 additions and 40 deletions

View file

@ -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 <filename>{0}</filename>").format(self.getName()), 0, False, -1)
message = Message(catalog.i18nc("@info:progress", "Saving to Removable Drive <filename>{0}</filename>").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()

View file

@ -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):

View file

@ -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

View file

@ -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
}