Add missing translation calls and contexts

This commit is contained in:
Arjen Hiemstra 2015-02-18 11:39:41 +01:00
parent db74d4016e
commit ca2d2f4cb2
4 changed files with 64 additions and 31 deletions

View file

@ -28,7 +28,8 @@ Rectangle {
anchors.fill: parent;
anchors.margins: UM.Theme.defaultMargin;
Button { text: "Open File"; iconSource: UM.Resources.getIcon("open.png"); Layout.fillWidth: true; onClicked: base.requestOpenFile(); }
//: Open file button
Button { text: qsTr("Open File"); iconSource: UM.Resources.getIcon("open.png"); Layout.fillWidth: true; onClicked: base.requestOpenFile(); }
Rectangle {
Layout.fillWidth: true;

View file

@ -23,7 +23,8 @@ Rectangle {
font.pointSize: UM.Theme.largeTextSize;
color: "white";
text: "Save";
//: Save file to disk button
text: qsTr("Save");
}
Rectangle {
@ -68,12 +69,14 @@ Rectangle {
states: [
State {
name: 'sdcard';
PropertyChanges { target: label; text: 'Write to SD'; }
//: Write to SD card button
PropertyChanges { target: label; text: qsTr("Write to SD"); }
PropertyChanges { target: iconImage; source: UM.Resources.getIcon('sdcard.png'); }
},
State {
name: 'usb';
PropertyChanges { target: label; text: 'Send over USB'; }
//: Send print over USB button
PropertyChanges { target: label; text: qsTr("Send over USB"); }
PropertyChanges { target: iconImage; source: UM.Resources.getIcon('usb.png'); }
}
]

View file

@ -13,7 +13,7 @@ UM.MainWindow {
width: 1280
height: 720
title: "Cura";
title: qsTr("Cura");
Item {
id: backgroundItem;
@ -24,7 +24,8 @@ UM.MainWindow {
window: base
Menu {
title: '&File';
//: File menu
title: qsTr("&File");
MenuItem { action: openAction; }
MenuItem { action: saveAction; }
@ -35,7 +36,8 @@ UM.MainWindow {
}
Menu {
title: '&Edit';
//: Edit menu
title: qsTr("&Edit");
MenuItem { action: undoAction; }
MenuItem { action: redoAction; }
@ -46,7 +48,8 @@ UM.MainWindow {
Menu {
id: machineMenu;
title: "&Machine";
//: Machine menu
title: qsTr("&Machine");
Instantiator {
model: UM.Models.machinesModel
@ -62,24 +65,32 @@ UM.MainWindow {
}
ExclusiveGroup { id: machineMenuGroup; }
MenuSeparator { }
MenuItem { text: "Add new machine..."; enabled: false; }
MenuItem { action: addMachineAction; }
MenuItem { action: settingsAction; }
}
Menu {
title: 'E&xtensions';
//: Extensions menu
title: qsTr("E&xtensions");
MenuItem { text: "No extensions loaded"; enabled: false; }
//: Empty extensions menu
MenuItem { text: qsTr("No extensions loaded"); enabled: false; }
}
Menu {
title: '&Settings';
//: Settings menu
title: qsTr("&Settings");
MenuItem { action: preferencesAction; }
}
Menu {
title: '&Help';
//: Help menu
title: qsTr("&Help");
MenuItem { action: helpAction; enabled: false; }
MenuItem { action: aboutAction; enabled: false; }
@ -180,7 +191,8 @@ UM.MainWindow {
Action {
id: undoAction;
text: "Undo";
//: Undo action
text: qsTr("Undo");
iconName: "edit-undo";
shortcut: StandardKey.Undo;
onTriggered: UM.OperationStack.undo();
@ -189,7 +201,8 @@ UM.MainWindow {
Action {
id: redoAction;
text: "Redo";
//: Redo action
text: qsTr("Redo");
iconName: "edit-redo";
shortcut: StandardKey.Redo;
onTriggered: UM.OperationStack.redo();
@ -198,7 +211,8 @@ UM.MainWindow {
Action {
id: quitAction;
text: "Quit";
//: Quit action
text: qsTr("Quit");
iconName: "application-exit";
shortcut: StandardKey.Quit;
onTriggered: Qt.quit();
@ -206,34 +220,39 @@ UM.MainWindow {
Action {
id: preferencesAction;
text: "Preferences";
//: Preferences action
text: qsTr("Preferences");
iconName: "configure";
onTriggered: preferences.visible = true;
}
Action {
id: settingsAction;
text: "Configure Printers";
//: Manage Printers action
text: qsTr("Configure Printers");
iconSource: UM.Resources.getIcon("settings.png");
onTriggered: preferences.visible = true;
}
Action {
id: helpAction;
text: "Show Manual";
//: Show Manual action
text: qsTr("Show Manual");
iconName: "help-contents";
shortcut: StandardKey.Help;
}
Action {
id: aboutAction;
text: "About...";
//: About action
text: qsTr("About...");
iconName: "help-about";
}
Action {
id: deleteAction;
text: "Delete Selection";
//: Delete selection action
text: qsTr("Delete Selection");
iconName: "edit-delete";
shortcut: StandardKey.Delete;
onTriggered: UM.Controller.removeSelection();
@ -241,14 +260,16 @@ UM.MainWindow {
Action {
id: deleteAllAction;
text: "Clear Build Platform";
//: Clear build platform action
text: qsTr("Clear Build Platform");
iconName: "edit-clear";
enabled: false;
}
Action {
id: openAction;
text: "Open...";
//: Open file action
text: qsTr("Open...");
iconName: "document-open";
shortcut: StandardKey.Open;
onTriggered: openDialog.open();
@ -256,7 +277,8 @@ UM.MainWindow {
Action {
id: saveAction;
text: "Save...";
//: Save file action
text: qsTr("Save...");
iconName: "document-save";
shortcut: StandardKey.Save;
onTriggered: saveDialog.open();
@ -271,7 +293,8 @@ UM.MainWindow {
FileDialog {
id: openDialog;
title: "Choose files"
//: File open dialog title
title: qsTr("Open File")
modality: Qt.NonModal
//TODO: Support multiple file selection, workaround bug in KDE file dialog
//selectMultiple: true
@ -285,7 +308,8 @@ UM.MainWindow {
FileDialog {
id: saveDialog;
title: "Choose Filename";
//: File save dialog title
title: qsTr("Save File");
selectExisting: false;
modality: Qt.NonModal

View file

@ -37,7 +37,8 @@ Rectangle {
rightMargin: UM.Theme.defaultMargin;
}
Label { text: "Print Settings"; width: parent.width; font.capitalization: Font.AllUppercase; font.pointSize: UM.Theme.smallTextSize; }
//: Print Settings panel title
Label { text: qsTr("Print Settings"); width: parent.width; font.capitalization: Font.AllUppercase; font.pointSize: UM.Theme.smallTextSize; }
Item {
width: parent.width;
@ -47,7 +48,8 @@ Rectangle {
anchors.fill: parent;
spacing: UM.Theme.defaultMargin;
Label { text: "Material"; horizontalAlignment: Text.AlignRight; width: base.width * 0.5; }
//: Material selection combo box label
Label { text: qsTr("Material"); horizontalAlignment: Text.AlignRight; width: base.width * 0.5; }
ComboBox {
width: parent.width * 0.35;
model: ListModel {
@ -66,7 +68,8 @@ Rectangle {
Row {
anchors.fill: parent;
spacing: UM.Theme.defaultMargin;
Label { text: "Time"; width: base.width * 0.5; horizontalAlignment: Text.AlignRight; }
//: Time display label
Label { text: qsTr("Time"); width: base.width * 0.5; horizontalAlignment: Text.AlignRight; }
Label { text: Qt.formatTime(new Date(timeSlider.value * 60000)); width: base.width * 0.35; horizontalAlignment: Text.AlignLeft; }
}
}
@ -118,7 +121,8 @@ Rectangle {
anchors.bottom: parent.bottom;
Label { text: Qt.formatTime(new Date(timeSlider.minimumValue * 60000)); }
Label { text: "Low Quality"; }
//: Low quality display label
Label { text: qsTr("Low Quality"); }
}
Column {
@ -126,7 +130,8 @@ Rectangle {
anchors.bottom: parent.bottom;
Label { text: Qt.formatTime(new Date(timeSlider.maximumValue * 60000)); anchors.right: parent.right; }
Label { text: "High Quality"; }
//: High quality display label
Label { text: qsTr("High Quality"); }
}
}