diff --git a/src/AutoPilotPlugins/Common/ESP8266Component.qml b/src/AutoPilotPlugins/Common/ESP8266Component.qml index 2a0e87a90dc52ec26a23feb42127e89e1854739f..ea191452f16002ddebdd79d1ac3957ff683d15e4 100644 --- a/src/AutoPilotPlugins/Common/ESP8266Component.qml +++ b/src/AutoPilotPlugins/Common/ESP8266Component.qml @@ -42,7 +42,7 @@ QGCView { property int _firstColumn: ScreenTools.defaultFontPixelWidth * 20 property int _secondColumn: ScreenTools.defaultFontPixelWidth * 12 - readonly property string dialogTitle: "controller WiFi Bridge" + readonly property string dialogTitle: qsTr("controller WiFi Bridge") property int stStatus: XMLHttpRequest.UNSENT property int stErrorCount: 0 property bool stEnabled: false @@ -75,7 +75,7 @@ QGCView { if (stStatus === XMLHttpRequest.DONE) { var objectArray = JSON.parse(req.responseText); if (objectArray.errors !== undefined) { - console.log("Error fetching WiFi Bridge Status: " + objectArray.errors[0].message) + console.log(qsTr("Error fetching WiFi Bridge Status: %1").arg(objectArray.errors[0].message)) stErrorCount = stErrorCount + 1 if(stErrorCount < 2 && stEnabled) timer.start() @@ -129,7 +129,7 @@ QGCView { spacing: ScreenTools.defaultFontPixelHeight * 0.5 QGCLabel { - text: "WiFi Bridge Settings" + text: qsTr("WiFi Bridge Settings") font.weight: Font.DemiBold } @@ -152,7 +152,7 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "WiFi Channel" + text: qsTr("WiFi Channel") width: _firstColumn anchors.baseline: channelField.baseline } @@ -169,7 +169,7 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "WiFi SSID" + text: qsTr("WiFi SSID") width: _firstColumn anchors.baseline: ssidField.baseline } @@ -186,7 +186,7 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "WiFi Password" + text: qsTr("WiFi Password") width: _firstColumn anchors.baseline: passwordField.baseline } @@ -203,7 +203,7 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "UART Baud Rate" + text: qsTr("UART Baud Rate") width: _firstColumn anchors.baseline: baudField.baseline } @@ -220,7 +220,7 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "QGC UDP Port" + text: qsTr("QGC UDP Port") width: _firstColumn anchors.baseline: qgcportField.baseline } @@ -248,13 +248,13 @@ QGCView { spacing: ScreenTools.defaultFontPixelHeight / 2 visible: false QGCLabel { - text: "Bridge/Vehicle Link" + text: qsTr("Bridge/Vehicle Link") font.weight: Font.DemiBold } Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "Messages Received" + text: qsTr("Messages Received") width: _firstColumn } QGCLabel { @@ -264,7 +264,7 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "Messages Lost" + text: qsTr("Messages Lost") width: _firstColumn } QGCLabel { @@ -274,7 +274,7 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "Messages Sent" + text: qsTr("Messages Sent") width: _firstColumn } QGCLabel { @@ -287,13 +287,13 @@ QGCView { color: palette.text } QGCLabel { - text: "Bridge/QGC Link" + text: qsTr("Bridge/QGC Link") font.weight: Font.DemiBold } Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "Messages Received" + text: qsTr("Messages Received") width: _firstColumn } QGCLabel { @@ -303,7 +303,7 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "Messages Lost" + text: qsTr("Messages Lost") width: _firstColumn } QGCLabel { @@ -313,7 +313,7 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "Messages Sent" + text: qsTr("Messages Sent") width: _firstColumn } QGCLabel { @@ -326,13 +326,13 @@ QGCView { color: palette.text } QGCLabel { - text: "QGC/Bridge Link" + text: qsTr("QGC/Bridge Link") font.weight: Font.DemiBold } Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "Messages Received" + text: qsTr("Messages Received") width: _firstColumn } QGCLabel { @@ -342,7 +342,7 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "Messages Lost" + text: qsTr("Messages Lost") width: _firstColumn } QGCLabel { @@ -352,7 +352,7 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "Messages Sent" + text: qsTr("Messages Sent") width: _firstColumn } QGCLabel { @@ -365,14 +365,14 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth * 1.5 QGCButton { - text: "Restore Defaults" + text: qsTr("Restore Defaults") width: ScreenTools.defaultFontPixelWidth * 16 onClicked: { controller.restoreDefaults() } } QGCButton { - text: "Restart WiFi Bridge" + text: qsTr("Restart WiFi Bridge") enabled: !controller.busy width: ScreenTools.defaultFontPixelWidth * 16 onClicked: { @@ -383,8 +383,8 @@ QGCView { visible: false icon: StandardIcon.Warning standardButtons: StandardButton.Yes | StandardButton.No - title: "Reboot WiFi Bridge" - text: "This will restart the WiFi Bridge so the settings you've changed can take effect. Note that you may have to change your computer WiFi settings and QGroundControl link settings to match these changes. Are you sure you want to restart it?" + title: qsTr("Reboot WiFi Bridge") + text: qsTr("This will restart the WiFi Bridge so the settings you've changed can take effect. Note that you may have to change your computer WiFi settings and QGroundControl link settings to match these changes. Are you sure you want to restart it?") onYes: { controller.reboot() rebootDialog.visible = false @@ -395,7 +395,7 @@ QGCView { } } QGCButton { - text: stEnabled ? "Hide Status" : "Show Status" + text: stEnabled ? qsTr("Hide Status") : qsTr("Show Status") width: ScreenTools.defaultFontPixelWidth * 16 onClicked: { stEnabled = !stEnabled @@ -408,7 +408,7 @@ QGCView { } } QGCButton { - text: "Reset Counters" + text: qsTr("Reset Counters") visible: stEnabled enabled: stEnabled width: ScreenTools.defaultFontPixelWidth * 16 diff --git a/src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml b/src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml index 76e1c7d544f61da6eea2ff2a04bc4cc4da52a6f0..bce51e41dd5b558422af9df641a17c027f85157a 100644 --- a/src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml +++ b/src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml @@ -30,23 +30,23 @@ FactPanel { anchors.fill: parent anchors.margins: 8 VehicleSummaryRow { - labelText: "Firmware Version:" + labelText: qsTr("Firmware Version:") valueText: esp8266.version } VehicleSummaryRow { - labelText: "WiFi Channel:" + labelText: qsTr("WiFi Channel:") valueText: wifiChannel ? wifiChannel.valueString : "" } VehicleSummaryRow { - labelText: "WiFi SSID:" + labelText: qsTr("WiFi SSID:") valueText: esp8266.wifiSSID } VehicleSummaryRow { - labelText: "WiFi Password:" + labelText: qsTr("WiFi Password:") valueText: esp8266.wifiPassword } VehicleSummaryRow { - labelText: "UART Baud Rate:" + labelText: qsTr("UART Baud Rate:") valueText: uartBaud ? uartBaud.valueString : "" } } diff --git a/src/AutoPilotPlugins/Common/RadioComponent.qml b/src/AutoPilotPlugins/Common/RadioComponent.qml index 8bac4be6c0e12a1452bf5994ccc29a1b5ebeec62..18f31d25851e20ce7947e2a52b676c0b7a612999 100644 --- a/src/AutoPilotPlugins/Common/RadioComponent.qml +++ b/src/AutoPilotPlugins/Common/RadioComponent.qml @@ -39,7 +39,7 @@ QGCView { QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled } - readonly property string dialogTitle: "Radio" + readonly property string dialogTitle: qsTr("Radio") readonly property real labelToMonitorMargin: defaultTextWidth * 3 property bool controllerCompleted: false @@ -76,7 +76,7 @@ QGCView { } onChannelCountChanged: updateChannelCount() - onFunctionMappingChangedAPMReboot: showMessage("Reboot required", "Your stick mappings have changed, you must reboot the vehicle for correct operation.", StandardButton.Ok) + onFunctionMappingChangedAPMReboot: showMessage(qsTr("Reboot required"), qsTr("Your stick mappings have changed, you must reboot the vehicle for correct operation."), StandardButton.Ok) } onCompleted: { @@ -95,7 +95,7 @@ QGCView { id: copyTrimsDialogComponent QGCViewMessage { - message: "Center your sticks and move throttle all the way down, then press Ok to copy trims. After pressing Ok, reset the trims on your radio back to zero." + message: qsTr("Center your sticks and move throttle all the way down, then press Ok to copy trims. After pressing Ok, reset the trims on your radio back to zero.") function accept() { hideDialog() @@ -108,8 +108,8 @@ QGCView { id: zeroTrimsDialogComponent QGCViewMessage { - message: "Before calibrating you should zero all your trims and subtrims. Click Ok to start Calibration.\n\n" + - (QGroundControl.multiVehicleManager.activeVehicle.px4Firmware ? "" : "Please ensure all motor power is disconnected AND all props are removed from the vehicle.") + message: qsTr("Before calibrating you should zero all your trims and subtrims. Click Ok to start Calibration.\n\n%1").arg( + (QGroundControl.multiVehicleManager.activeVehicle.px4Firmware ? "" : qsTr("Please ensure all motor power is disconnected AND all props are removed from the vehicle."))) function accept() { hideDialog() @@ -122,7 +122,7 @@ QGCView { id: channelCountDialogComponent QGCViewMessage { - message: controller.channelCount == 0 ? "Please turn on transmitter." : controller.minChannelCount + " channels or more are needed to fly." + message: controller.channelCount == 0 ? qsTr("Please turn on transmitter.") : qsTr("%1 channels or more are needed to fly.").arg(controller.minChannelCount) } } @@ -147,21 +147,21 @@ QGCView { QGCLabel { width: parent.width wrapMode: Text.WordWrap - text: "Click Ok to place your Spektrum receiver in the bind mode. Select the specific receiver type below:" + text: qsTr("Click Ok to place your Spektrum receiver in the bind mode. Select the specific receiver type below:") } ExclusiveGroup { id: radioGroup } QGCRadioButton { exclusiveGroup: radioGroup - text: "DSM2 Mode" + text: qsTr("DSM2 Mode") property int bindMode: RadioComponentController.DSM2 } QGCRadioButton { exclusiveGroup: radioGroup - text: "DSMX (7 channels or less)" + text: qsTr("DSMX (7 channels or less)") property int bindMode: RadioComponentController.DSMX7 } @@ -169,7 +169,7 @@ QGCView { QGCRadioButton { exclusiveGroup: radioGroup checked: true - text: "DSMX (8 channels or more)" + text: qsTr("DSMX (8 channels or more)") property int bindMode: RadioComponentController.DSMX8 } @@ -221,7 +221,7 @@ QGCView { anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - text: "Not Mapped" + text: qsTr("Not Mapped") visible: !mapped } @@ -270,17 +270,15 @@ QGCView { Column { width: parent.width spacing: 5 - - QGCLabel { text: "Attitude Controls" } + QGCLabel { text: qsTr("Attitude Controls") } Item { width: parent.width height: defaultTextHeight * 2 - QGCLabel { id: rollLabel width: defaultTextWidth * 10 - text: "Roll" + text: qsTr("Roll") } Loader { @@ -310,7 +308,7 @@ QGCView { QGCLabel { id: pitchLabel width: defaultTextWidth * 10 - text: "Pitch" + text: qsTr("Pitch") } Loader { @@ -340,7 +338,7 @@ QGCView { QGCLabel { id: yawLabel width: defaultTextWidth * 10 - text: "Yaw" + text: qsTr("Yaw") } Loader { @@ -370,7 +368,7 @@ QGCView { QGCLabel { id: throttleLabel width: defaultTextWidth * 10 - text: "Throttle" + text: qsTr("Throttle") } Loader { @@ -400,14 +398,14 @@ QGCView { QGCButton { id: skipButton - text: "Skip" + text: qsTr("Skip") onClicked: controller.skipButtonClicked() } QGCButton { id: cancelButton - text: "Cancel" + text: qsTr("Cancel") onClicked: controller.cancelButtonClicked() } @@ -415,10 +413,10 @@ QGCView { QGCButton { id: nextButton primary: true - text: "Calibrate" + text: qsTr("Calibrate") onClicked: { - if (text == "Calibrate") { + if (text == qsTr("Calibrate")) { showDialog(zeroTrimsDialogComponent, dialogTitle, qgcView.showDialogDefaultWidth, StandardButton.Ok | StandardButton.Cancel) } else { controller.nextButtonClicked() @@ -446,26 +444,26 @@ QGCView { border.width: 1 } - QGCLabel { text: "Additional Radio setup:" } + QGCLabel { text: qsTr("Additional Radio setup:") } Row { spacing: 10 QGCLabel { anchors.baseline: bindButton.baseline - text: "Place Spektrum satellite receiver in bind mode:" + text: qsTr("Place Spektrum satellite receiver in bind mode:") } QGCButton { id: bindButton - text: "Spektrum Bind" + text: qsTr("Spektrum Bind") onClicked: showDialog(spektrumBindDialogComponent, dialogTitle, qgcView.showDialogDefaultWidth, StandardButton.Ok | StandardButton.Cancel) } } QGCButton { - text: "Copy Trims" + text: qsTr("Copy Trims") visible: QGroundControl.multiVehicleManager.activeVehicle.px4Firmware onClicked: showDialog(copyTrimsDialogComponent, dialogTitle, qgcView.showDialogDefaultWidth, StandardButton.Ok | StandardButton.Cancel) } @@ -475,7 +473,6 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth - property Fact fact: controller.getParameterFact(-1, modelData) QGCLabel { @@ -510,10 +507,9 @@ QGCView { Row { spacing: 10 ExclusiveGroup { id: modeGroup } - QGCRadioButton { exclusiveGroup: modeGroup - text: "Mode 1" + text: qsTr("Mode 1") checked: controller.transmitterMode == 1 onClicked: controller.transmitterMode = 1 @@ -521,7 +517,7 @@ QGCView { QGCRadioButton { exclusiveGroup: modeGroup - text: "Mode 2" + text: qsTr("Mode 2") checked: controller.transmitterMode == 2 onClicked: controller.transmitterMode = 2 @@ -541,7 +537,7 @@ QGCView { width: parent.width spacing: 5 - QGCLabel { text: "Channel Monitor" } + QGCLabel { text: qsTr("Channel Monitor") } Connections { target: controller