From 871397bd8e80558b2fd37677fb7ff77a910ef915 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 4 Apr 2016 18:40:12 -0300 Subject: [PATCH] Finish the qsTrlization of the qml components. Signed-off-by: Tomaz Canabrava --- src/VehicleSetup/PX4FlowSensor.qml | 2 +- src/VehicleSetup/SetupView.qml | 2 +- src/VehicleSetup/VehicleSummary.qml | 4 ++-- src/ViewWidgets/CustomCommandWidget.qml | 4 ++-- src/ViewWidgets/LogDownload.qml | 22 +++++++++++----------- src/ViewWidgets/ViewWidget.qml | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/VehicleSetup/PX4FlowSensor.qml b/src/VehicleSetup/PX4FlowSensor.qml index 94cc07e4f..6d889ec41 100644 --- a/src/VehicleSetup/PX4FlowSensor.qml +++ b/src/VehicleSetup/PX4FlowSensor.qml @@ -48,7 +48,7 @@ QGCView { QGCLabel { id: titleLabel - text: "PX4Flow Camera" + text: qsTr("PX4Flow Camera") font.weight: Font.DemiBold } diff --git a/src/VehicleSetup/SetupView.qml b/src/VehicleSetup/SetupView.qml index 6dfcfaa20..18e50da45 100644 --- a/src/VehicleSetup/SetupView.qml +++ b/src/VehicleSetup/SetupView.qml @@ -47,7 +47,7 @@ Rectangle { readonly property real _defaultTextWidth: ScreenTools.defaultFontPixelWidth readonly property real _margin: Math.round(_defaultTextHeight / 2) readonly property real _buttonWidth: Math.round(_defaultTextWidth * 18) - readonly property string _armedVehicleText: "This operation cannot be performed while vehicle is armed." + readonly property string _armedVehicleText: qsTr("This operation cannot be performed while vehicle is armed.") property string _messagePanelText: "missing message panel text" property bool _fullParameterVehicleAvailable: QGroundControl.multiVehicleManager.parameterReadyVehicleAvailable && !QGroundControl.multiVehicleManager.activeVehicle.missingParameters diff --git a/src/VehicleSetup/VehicleSummary.qml b/src/VehicleSetup/VehicleSummary.qml index e44ada102..18bf39b29 100644 --- a/src/VehicleSetup/VehicleSummary.qml +++ b/src/VehicleSetup/VehicleSummary.qml @@ -94,8 +94,8 @@ Rectangle { color: setupComplete ? qgcPal.text : qgcPal.warningText font.weight: Font.DemiBold text: setupComplete ? - "Below you will find a summary of the settings for your vehicle. To the left are the setup menus for each component." : - "WARNING: Your vehicle requires setup prior to flight. Please resolve the items marked in red using the menu on the left." + qsTr("Below you will find a summary of the settings for your vehicle. To the left are the setup menus for each component.") : + qsTr("WARNING: Your vehicle requires setup prior to flight. Please resolve the items marked in red using the menu on the left.") property bool setupComplete: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle.autopilot.setupComplete : false } diff --git a/src/ViewWidgets/CustomCommandWidget.qml b/src/ViewWidgets/CustomCommandWidget.qml index 149a87200..749210c65 100644 --- a/src/ViewWidgets/CustomCommandWidget.qml +++ b/src/ViewWidgets/CustomCommandWidget.qml @@ -96,12 +96,12 @@ QGCView { anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter QGCButton { - text: "Load Custom Qml file..." + text: qsTr("Load Custom Qml file...") width: ScreenTools.defaultFontPixelWidth * 22 onClicked: controller.selectQmlFile() } QGCButton { - text: "Reset" + text: qsTr("Reset") width: ScreenTools.defaultFontPixelWidth * 22 onClicked: { controller.clearQmlFile() diff --git a/src/ViewWidgets/LogDownload.qml b/src/ViewWidgets/LogDownload.qml index b9d1a95a8..65507d4e7 100644 --- a/src/ViewWidgets/LogDownload.qml +++ b/src/ViewWidgets/LogDownload.qml @@ -67,7 +67,7 @@ QGCView { selectionMode: SelectionMode.MultiSelection TableViewColumn { - title: "Id" + title: qsTr("Id") width: ScreenTools.defaultFontPixelWidth * 6 horizontalAlignment: Text.AlignHCenter delegate : Text { @@ -80,7 +80,7 @@ QGCView { } TableViewColumn { - title: "Date" + title: qsTr("Date") width: ScreenTools.defaultFontPixelWidth * 34 horizontalAlignment: Text.AlignHCenter delegate : Text { @@ -91,7 +91,7 @@ QGCView { if(controller.model.get(styleData.row).received) { var d = controller.model.get(styleData.row).time if(d.getUTCFullYear() < 2010) - return "Date Unknown" + return qsTr("Date Unknown") else return d.toLocaleString() } @@ -102,7 +102,7 @@ QGCView { } TableViewColumn { - title: "Size" + title: qsTr("Size") width: ScreenTools.defaultFontPixelWidth * 18 horizontalAlignment: Text.AlignHCenter delegate : Text { @@ -115,7 +115,7 @@ QGCView { } TableViewColumn { - title: "Status" + title: qsTr("Status") width: ScreenTools.defaultFontPixelWidth * 22 horizontalAlignment: Text.AlignHCenter delegate : Text { @@ -135,7 +135,7 @@ QGCView { anchors.top: parent.top anchors.right: parent.right enabled: !controller.requestingList && !controller.downloadingLogs - text: "Refresh" + text: qsTr("Refresh") onClicked: { controller.refresh() } @@ -147,7 +147,7 @@ QGCView { anchors.top: refreshButton.bottom anchors.right: parent.right enabled: !controller.requestingList && !controller.downloadingLogs && tableView.selection.count > 0 - text: "Download" + text: qsTr("Download") onClicked: { //-- Clear selection for(var i = 0; i < controller.model.count; i++) { @@ -170,7 +170,7 @@ QGCView { anchors.top: downloadButton.bottom anchors.right: parent.right enabled: !controller.requestingList && !controller.downloadingLogs && controller.model.count > 0 - text: "Erase All" + text: qsTr("Erase All") onClicked: { eraseAllDialog.visible = true } @@ -179,8 +179,8 @@ QGCView { visible: false icon: StandardIcon.Warning standardButtons: StandardButton.Yes | StandardButton.No - title: "Delete All Log Files" - text: "All log files will be erased permanently. Is this really what you want?" + title: qsTr("Delete All Log Files") + text: qsTr("All log files will be erased permanently. Is this really what you want?") onYes: { controller.eraseAll() eraseAllDialog.visible = false @@ -196,7 +196,7 @@ QGCView { anchors.margins: _margins anchors.top: eraseAllButton.bottom anchors.right: parent.right - text: "Cancel" + text: qsTr("Cancel") enabled: controller.requestingList || controller.downloadingLogs onClicked: { controller.cancel() diff --git a/src/ViewWidgets/ViewWidget.qml b/src/ViewWidgets/ViewWidget.qml index acdca20f5..bacf12c96 100644 --- a/src/ViewWidgets/ViewWidget.qml +++ b/src/ViewWidgets/ViewWidget.qml @@ -56,7 +56,7 @@ Rectangle { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - text: "missing connected implementation" + text: qsTr("missing connected implementation") } } } @@ -76,7 +76,7 @@ Rectangle { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - text: "no vehicle connected" + text: qsTr("no vehicle connected") } } } -- 2.22.0