Merge branch '15.10' of https://github.com/Ultimaker/Cura into 15.10

This commit is contained in:
Jaime van Kessel 2015-09-08 15:31:36 +02:00
commit 77bda1a7b1
19 changed files with 47 additions and 44 deletions

View File

@ -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", "<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)
layout.addWidget(textarea)

View File

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

View File

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

View File

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

View File

@ -22,7 +22,6 @@ UM.Dialog
text: manager.getChangeLogString()
width:base.width - 35
wrapMode: Text.Wrap;
//Component.onCompleted: console.log()
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

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
}

View File

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

View File

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

View File

@ -75,7 +75,7 @@ UM.Dialog
rightButtons: [
Button
{
text: "Close";
text: catalog.i18nc("@action:button","Close");
enabled: manager.progress >= 100;
onClicked: base.visible = false;
}

View File

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

View File

@ -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.")
}
}