Code style & switch to translation catalog

This commit is contained in:
Jaime van Kessel 2015-08-27 16:04:02 +02:00
parent f17cc811c4
commit d195c859a2
16 changed files with 496 additions and 317 deletions

View file

@ -6,13 +6,14 @@ import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Window 2.1
import UM 1.0 as UM
import UM 1.1 as UM
UM.Dialog {
UM.Dialog
{
width: 500 * Screen.devicePixelRatio;
height: 100 * Screen.devicePixelRatio;
title: "Print with USB"
title: catalog.i18nc("@title:window", "Print with USB")
Column
{
@ -23,18 +24,20 @@ UM.Dialog {
Text
{
//: USB Printing dialog label, %1 is head temperature
text: qsTr("Extruder Temperature %1").arg(manager.extruderTemperature)
text: catalog.i18nc("@label","Extruder Temperature %1").arg(manager.extruderTemperature)
}
Text
{
//: USB Printing dialog label, %1 is bed temperature
text: qsTr("Bed Temperature %1").arg(manager.bedTemperature)
text: catalog.i18nc("@label","Bed Temperature %1").arg(manager.bedTemperature)
}
Text
{
text: "" + manager.error
}
UM.I18nCatalog{id: catalog; name:"cura"}
}
ProgressBar
@ -50,16 +53,17 @@ UM.Dialog {
}
rightButtons: [
Button {
Button
{
//: USB Printing dialog start print button
text: qsTr("Print");
text: catalog.i18nc("@action:button","Print");
onClicked: { manager.startPrint() }
enabled: manager.progress == 0 ? true : false
},
Button
{
//: USB Printing dialog cancel print button
text: qsTr("Cancel");
text: catalog.i18nc("@action:button","Cancel");
onClicked: { manager.cancelPrint() }
enabled: manager.progress == 0 ? false: true
}

View file

@ -17,7 +17,7 @@ UM.Dialog
visible: true;
modality: Qt.ApplicationModal;
title: "Firmware Update";
title: catalog.i18nc("@title:window","Firmware Update");
Column
{
@ -25,7 +25,8 @@ UM.Dialog
Text
{
anchors {
anchors
{
left: parent.left;
right: parent.right;
}
@ -34,17 +35,17 @@ UM.Dialog
if (manager.progress == 0)
{
//: Firmware update status label
return qsTr("Starting firmware update, this may take a while.")
return catalog.i18nc("@label","Starting firmware update, this may take a while.")
}
else if (manager.progress > 99)
{
//: Firmware update status label
return qsTr("Firmware update completed.")
return catalog.i18nc("@label","Firmware update completed.")
}
else
{
//: Firmware update status label
return qsTr("Updating firmware.")
return catalog.i18nc("@label","Updating firmware.")
}
}
@ -57,20 +58,23 @@ UM.Dialog
value: manager.progress
minimumValue: 0;
maximumValue: 100;
anchors {
anchors
{
left: parent.left;
right: parent.right;
}
}
SystemPalette {
SystemPalette
{
id: palette;
}
}
rightButtons: [
Button {
Button
{
text: "Close";
enabled: manager.progress >= 100;
onClicked: base.visible = false;