From c8caf6f673e6edc965ab776bfca383388049d75d Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 4 Apr 2016 18:26:01 -0300 Subject: [PATCH] Tons of qsTr added Signed-off-by: Tomaz Canabrava --- src/QmlControls/QmlTest.qml | 56 +++++++++---------- src/QmlControls/VehicleRotationCal.qml | 4 +- .../QMLControl/OfflineMap.qml | 2 +- src/VehicleSetup/FirmwareUpgrade.qml | 48 ++++++++-------- src/VehicleSetup/JoystickConfig.qml | 46 +++++++-------- src/ui/preferences/LinkSettings.qml | 2 +- src/ui/preferences/TcpSettings.qml | 6 +- src/ui/preferences/UdpSettings.qml | 10 ++-- src/ui/toolbar/MainToolBar.qml | 52 ++++++++--------- src/ui/toolbar/MainToolBarIndicators.qml | 2 +- 10 files changed, 116 insertions(+), 112 deletions(-) diff --git a/src/QmlControls/QmlTest.qml b/src/QmlControls/QmlTest.qml index 8d0a72512..a6a461ba2 100644 --- a/src/QmlControls/QmlTest.qml +++ b/src/QmlControls/QmlTest.qml @@ -17,7 +17,7 @@ Rectangle { height: themeChoice.height * 2 color: palette.window QGCLabel { - text: "Window Color" + text: qsTr("Window Color") anchors.left: parent.left anchors.leftMargin: 20 anchors.verticalCenter: parent.horizontalCenter @@ -29,13 +29,13 @@ Rectangle { spacing: 20 ExclusiveGroup { id: themeGroup } QGCRadioButton { - text: "Light" + text: qsTr("Light") checked: palette.globalTheme === QGCPalette.Light exclusiveGroup: themeGroup onClicked: { palette.globalTheme = QGCPalette.Light } } QGCRadioButton { - text: "Dark" + text: qsTr("Dark") checked: palette.globalTheme === QGCPalette.Dark exclusiveGroup: themeGroup onClicked: { palette.globalTheme = QGCPalette.Dark } @@ -73,28 +73,28 @@ Rectangle { height: 20 color: "black" horizontalAlignment: Text.AlignHCenter - text: "Disabled" + text: qsTr("Disabled") } Text { width: 80 height: 20 color: "black" horizontalAlignment: Text.AlignHCenter - text: "Enabled" + text: qsTr("Enabled") } Text { width: 80 height: 20 color: "black" horizontalAlignment: Text.AlignHCenter - text: "Value" + text: qsTr("Value") } Text { width: 80 height: 20 color: "black" horizontalAlignment: Text.AlignHCenter - text: "Value" + text: qsTr("Value") } // window @@ -542,14 +542,14 @@ Rectangle { height: 20 color: "black" horizontalAlignment: Text.AlignHCenter - text: "Enabled" + text: qsTr("Enabled") } Text { width: 100 height: 20 color: "black" horizontalAlignment: Text.AlignHCenter - text: "Disabled" + text: qsTr("Disabled") } // QGCLabel @@ -560,12 +560,12 @@ Rectangle { QGCLabel { width: 100 height: 20 - text: "Label" + text: qsTr("Label") } QGCLabel { width: 100 height: 20 - text: "Label" + text: qsTr("Label") enabled: false } @@ -577,12 +577,12 @@ Rectangle { QGCButton { width: 100 height: 20 - text: "Button" + text: qsTr("Button") } QGCButton { width: 100 height: 20 - text: "Button" + text: qsTr("Button") enabled: false } @@ -595,12 +595,12 @@ Rectangle { width: 100 height: 20 primary: true - text: "Button" + text: qsTr("Button") } QGCButton { width: 100 height: 20 - text: "Button" + text: qsTr("Button") primary: true enabled: false } @@ -613,25 +613,25 @@ Rectangle { Menu { id: buttonMenu MenuItem { - text: "Item 1" + text: qsTr("Item 1") } MenuItem { - text: "Item 2" + text: qsTr("Item 2") } MenuItem { - text: "Item 3" + text: qsTr("Item 3") } } QGCButton { width: 100 height: 20 - text: "Button" + text: qsTr("Button") menu: buttonMenu } QGCButton { width: 100 height: 20 - text: "Button" + text: qsTr("Button") enabled: false menu: buttonMenu } @@ -644,12 +644,12 @@ Rectangle { QGCRadioButton { width: 100 height: 20 - text: "Radio" + text: qsTr("Radio") } QGCRadioButton { width: 100 height: 20 - text: "Radio" + text: qsTr("Radio") enabled: false } @@ -661,12 +661,12 @@ Rectangle { QGCCheckBox { width: 100 height: 20 - text: "Check Box" + text: qsTr("Check Box") } QGCCheckBox { width: 100 height: 20 - text: "Check Box" + text: qsTr("Check Box") enabled: false } @@ -695,12 +695,12 @@ Rectangle { QGCComboBox { width: 100 height: 20 - model: [ "Item 1", "Item 2", "Item 3" ] + model: [ qsTr("Item 1"), qsTr("Item 2"), qsTr("Item 3") ] } QGCComboBox { width: 100 height: 20 - model: [ "Item 1", "Item 2", "Item 3" ] + model: [ qsTr("Item 1"), qsTr("Item 2"), qsTr("Item 3") ] enabled: false } @@ -712,12 +712,12 @@ Rectangle { SubMenuButton { width: 100 height: 100 - text: "SUB MENU" + text: qsTr("SUB MENU") } SubMenuButton { width: 100 height: 100 - text: "SUB MENU" + text: qsTr("SUB MENU") enabled: false } } diff --git a/src/QmlControls/VehicleRotationCal.qml b/src/QmlControls/VehicleRotationCal.qml index 587f68db3..a4298c8cf 100644 --- a/src/QmlControls/VehicleRotationCal.qml +++ b/src/QmlControls/VehicleRotationCal.qml @@ -36,7 +36,7 @@ Rectangle { property bool calInProgress: false // Text to show while calibration is in progress - property string calInProgressText: "Hold Still" + property string calInProgressText: qsTr("Hold Still") // Image source property var imageSource: "" @@ -70,7 +70,7 @@ Rectangle { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignBottom font.pixelSize: ScreenTools.mediumFontPixelSize - text: calInProgress ? calInProgressText : (calValid ? "Completed" : "Incomplete") + text: calInProgress ? calInProgressText : (calValid ? qsTr("Completed") : qsTr("Incomplete")) } } } diff --git a/src/QtLocationPlugin/QMLControl/OfflineMap.qml b/src/QtLocationPlugin/QMLControl/OfflineMap.qml index 5b99c3a7e..30a87ab04 100644 --- a/src/QtLocationPlugin/QMLControl/OfflineMap.qml +++ b/src/QtLocationPlugin/QMLControl/OfflineMap.qml @@ -841,7 +841,7 @@ Rectangle { anchors.horizontalCenter: parent.horizontalCenter QGCLabel { id: optionsLabel - text: "Offline Map Options" + text: qsTr("Offline Map Options") font.pixelSize: ScreenTools.isAndroid ? ScreenTools.mediumFontPixelSize : ScreenTools.largeFontPixelSize anchors.centerIn: parent } diff --git a/src/VehicleSetup/FirmwareUpgrade.qml b/src/VehicleSetup/FirmwareUpgrade.qml index b637b46f1..74e285f95 100644 --- a/src/VehicleSetup/FirmwareUpgrade.qml +++ b/src/VehicleSetup/FirmwareUpgrade.qml @@ -38,6 +38,10 @@ QGCView { id: qgcView viewPanel: panel + // Those user visible strings are hard to translate because we can't send the + // HTML strings to translation as this can create a security risk. we need to find + // a better way to hightlight them, or use less hightlights. + // User visible strings readonly property string title: "FIRMWARE" readonly property string highlightPrefix: "" @@ -55,7 +59,7 @@ QGCView { property string firmwareName function cancelFlash() { - statusTextArea.append(highlightPrefix + "Upgrade cancelled" + highlightSuffix) + statusTextArea.append(highlightPrefix + qsTr("Upgrade cancelled") + highlightSuffix) statusTextArea.append("------------------------------------------") controller.cancel() } @@ -105,7 +109,7 @@ QGCView { QGroundControl.multiVehicleManager.activeVehicle.autoDisconnect = true } else { // We end up here when we detect a board plugged in after we've started upgrade - statusTextArea.append(highlightPrefix + "Found device" + highlightSuffix + ": " + controller.boardType) + statusTextArea.append(highlightPrefix + qsTr("Found device") + highlightSuffix + ": " + controller.boardType) if (controller.boardType == "Pixhawk" || controller.boardType == "AeroCore" || controller.boardType == "PX4 Flow" || controller.boardType == "PX4 FMU V1") { showDialog(pixhawkFirmwareSelectDialog, title, qgcView.showDialogDefaultWidth, StandardButton.Ok | StandardButton.Cancel) } @@ -162,19 +166,19 @@ QGCView { id: firmwareTypeList ListElement { - text: "Standard Version (stable)"; + text: qsTr("Standard Version (stable)") firmwareType: FirmwareUpgradeController.StableFirmware } ListElement { - text: "Beta Testing (beta)"; + text: qsTr("Beta Testing (beta)") firmwareType: FirmwareUpgradeController.BetaFirmware } ListElement { - text: "Developer Build (master)"; + text: qsTr("Developer Build (master)") firmwareType: FirmwareUpgradeController.DeveloperFirmware } ListElement { - text: "Custom firmware file..."; + text: qsTr("Custom firmware file...") firmwareType: FirmwareUpgradeController.CustomFirmware } } @@ -183,11 +187,11 @@ QGCView { id: px4FlowTypeList ListElement { - text: "Standard Version (stable)"; + text: qsTr("Standard Version (stable)") firmwareType: FirmwareUpgradeController.StableFirmware } ListElement { - text: "Custom firmware file..."; + text: qsTr("Custom firmware file...") firmwareType: FirmwareUpgradeController.CustomFirmware } } @@ -217,7 +221,7 @@ QGCView { id: px4FlightStack checked: true exclusiveGroup: firmwareGroup - text: "PX4 Flight Stack" + text: qsTr("PX4 Flight Stack") visible: !px4Flow onClicked: parent.firmwareVersionChanged(firmwareTypeList) @@ -226,7 +230,7 @@ QGCView { QGCRadioButton { id: apmFlightStack exclusiveGroup: firmwareGroup - text: "ArduPilot Flight Stack" + text: qsTr("ArduPilot Flight Stack") visible: !px4Flow onClicked: parent.firmwareVersionChanged(firmwareTypeList) @@ -253,7 +257,7 @@ QGCView { QGCCheckBox { id: _advanced - text: "Advanced settings" + text: qsTr("Advanced settings") checked: px4Flow ? true : false onClicked: { @@ -274,7 +278,7 @@ QGCView { width: parent.width wrapMode: Text.WordWrap visible: showFirmwareTypeSelection - text: px4Flow ? "Select which version of the firmware you would like to install:" : "Select which version of the above flight stack you would like to install:" + text: px4Flow ? qsTr("Select which version of the firmware you would like to install:") : qsTr("Select which version of the above flight stack you would like to install:") } QGCComboBox { @@ -288,18 +292,18 @@ QGCView { controller.selectedFirmwareType = index if (model.get(index).firmwareType == FirmwareUpgradeController.BetaFirmware) { firmwareVersionWarningLabel.visible = true - firmwareVersionWarningLabel.text = "WARNING: BETA FIRMWARE. " + - "This firmware version is ONLY intended for beta testers. " + - "Although it has received FLIGHT TESTING, it represents actively changed code. " + - "Do NOT use for normal operation." + firmwareVersionWarningLabel.text = qsTr("WARNING: BETA FIRMWARE. ") + + qsTr("This firmware version is ONLY intended for beta testers. ") + + qsTr("Although it has received FLIGHT TESTING, it represents actively changed code. ") + + qsTr("Do NOT use for normal operation.") } else if (model.get(index).firmwareType == FirmwareUpgradeController.DeveloperFirmware) { firmwareVersionWarningLabel.visible = true - firmwareVersionWarningLabel.text = "WARNING: CONTINUOUS BUILD FIRMWARE. " + - "This firmware has NOT BEEN FLIGHT TESTED. " + - "It is only intended for DEVELOPERS. " + - "Run bench tests without props first. " + - "Do NOT fly this without additonal safety precautions. " + - "Follow the mailing list actively when using it." + firmwareVersionWarningLabel.text = qsTr("WARNING: CONTINUOUS BUILD FIRMWARE. ") + + qsTr("This firmware has NOT BEEN FLIGHT TESTED. ") + + qsTr("It is only intended for DEVELOPERS. ") + + qsTr("Run bench tests without props first. ") + + qsTr("Do NOT fly this without additonal safety precautions. ") + + qsTr("Follow the mailing list actively when using it.") } else { firmwareVersionWarningLabel.visible = false } diff --git a/src/VehicleSetup/JoystickConfig.qml b/src/VehicleSetup/JoystickConfig.qml index 9f2a3c539..ec0b15487 100644 --- a/src/VehicleSetup/JoystickConfig.qml +++ b/src/VehicleSetup/JoystickConfig.qml @@ -39,7 +39,7 @@ QGCView { QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled } - readonly property string dialogTitle: "Joystick Config" + readonly property string dialogTitle: qsTr("Joystick Config") readonly property real labelToMonitorMargin: defaultTextWidth * 3 property bool controllerCompleted: false property bool controllerAndViewReady: false @@ -122,7 +122,7 @@ QGCView { anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - text: "Not Mapped" + text: qsTr("Not Mapped") visible: !mapped } @@ -150,7 +150,7 @@ QGCView { QGCLabel { id: header font.pixelSize: ScreenTools.mediumFontPixelSize - text: "JOYSTICK" + text: qsTr("JOYSTICK") } Item { @@ -174,7 +174,7 @@ QGCView { width: parent.width spacing: 5 - QGCLabel { text: "Attitude Controls" } + QGCLabel { text: qsTr("Attitude Controls") } Item { width: parent.width @@ -183,7 +183,7 @@ QGCView { QGCLabel { id: rollLabel width: defaultTextWidth * 10 - text: "Roll" + text: qsTr("Roll") } Loader { @@ -213,7 +213,7 @@ QGCView { QGCLabel { id: pitchLabel width: defaultTextWidth * 10 - text: "Pitch" + text: qsTr("Pitch") } Loader { @@ -243,7 +243,7 @@ QGCView { QGCLabel { id: yawLabel width: defaultTextWidth * 10 - text: "Yaw" + text: qsTr("Yaw") } Loader { @@ -273,7 +273,7 @@ QGCView { QGCLabel { id: throttleLabel width: defaultTextWidth * 10 - text: "Throttle" + text: qsTr("Throttle") } Loader { @@ -303,14 +303,14 @@ QGCView { QGCButton { id: skipButton - text: "Skip" + text: qsTr("Skip") onClicked: controller.skipButtonClicked() } QGCButton { id: cancelButton - text: "Cancel" + text: qsTr("Cancel") onClicked: controller.cancelButtonClicked() } @@ -318,7 +318,7 @@ QGCView { QGCButton { id: nextButton primary: true - text: "Calibrate" + text: qsTr("Calibrate") onClicked: controller.nextButtonClicked() } @@ -348,7 +348,7 @@ QGCView { width: parent.width / 2 spacing: ScreenTools.defaultFontPixelHeight - QGCLabel { text: "Additional Joystick settings:" } + QGCLabel { text: qsTr("Additional Joystick settings:") } Column { width: parent.width @@ -357,7 +357,7 @@ QGCView { QGCCheckBox { enabled: _activeJoystick.calibrated - text: _activeJoystick.calibrated ? "Enable joystick input" : "Enable/Disable not allowed (Calibrate First)" + text: _activeJoystick.calibrated ? qsTr("Enable joystick input") : qsTr("Enable/Disable not allowed (Calibrate First)") checked: _activeVehicle.joystickEnabled onClicked: _activeVehicle.joystickEnabled = checked @@ -370,7 +370,7 @@ QGCView { QGCLabel { id: activeJoystickLabel anchors.baseline: joystickCombo.baseline - text: "Active joystick:" + text: qsTr("Active joystick:") } QGCComboBox { @@ -383,7 +383,7 @@ QGCView { Component.onCompleted: { var index = joystickCombo.find(joystickManager.activeJoystickName) if (index == -1) { - console.warn("Active joystick name not in combo", joystickManager.activeJoystickName) + console.warn(qsTr("Active joystick name not in combo"), joystickManager.activeJoystickName) } else { joystickCombo.currentIndex = index } @@ -398,7 +398,7 @@ QGCView { QGCRadioButton { exclusiveGroup: throttleModeExclusiveGroup - text: "Center stick is zero throttle" + text: qsTr("Center stick is zero throttle") checked: _activeJoystick.throttleMode == 0 onClicked: _activeJoystick.throttleMode = 0 @@ -406,7 +406,7 @@ QGCView { QGCRadioButton { exclusiveGroup: throttleModeExclusiveGroup - text: "Full down stick is zero throttle" + text: qsTr("Full down stick is zero throttle") checked: _activeJoystick.throttleMode == 1 onClicked: _activeJoystick.throttleMode = 1 @@ -416,7 +416,7 @@ QGCView { QGCCheckBox { id: advancedSettings checked: _activeVehicle.joystickMode != 0 - text: "Advanced settings (careful!)" + text: qsTr("Advanced settings (careful!)") onClicked: { if (!checked) { @@ -433,7 +433,7 @@ QGCView { QGCLabel { id: joystickModeLabel anchors.baseline: joystickModeCombo.baseline - text: "Joystick mode:" + text: qsTr("Joystick mode:") } QGCComboBox { @@ -463,7 +463,7 @@ QGCView { } } - QGCLabel { text: "Button actions:" } + QGCLabel { text: qsTr("Button actions:") } Column { width: parent.width @@ -471,7 +471,7 @@ QGCView { QGCLabel { visible: _activeVehicle.manualControlReservedButtonCount != 0 - text: "Buttons 0-" + reservedButtonCount + " reserved for firmware use" + text: qsTr("Buttons 0-%1 reserved for firmware use").arg(reservedButtonCount) property int reservedButtonCount: _activeVehicle.manualControlReservedButtonCount == -1 ? _activeJoystick.buttonCount : _activeVehicle.manualControlReservedButtonCount } @@ -547,7 +547,7 @@ QGCView { width: parent.width spacing: 5 - QGCLabel { text: "Axis Monitor" } + QGCLabel { text: qsTr("Axis Monitor") } Connections { target: controller @@ -595,7 +595,7 @@ QGCView { width: parent.width spacing: ScreenTools.defaultFontPixelHeight - QGCLabel { text: "Button Monitor" } + QGCLabel { text: qsTr("Button Monitor") } Connections { target: _activeJoystick diff --git a/src/ui/preferences/LinkSettings.qml b/src/ui/preferences/LinkSettings.qml index 05e1ba159..3fd960c3e 100644 --- a/src/ui/preferences/LinkSettings.qml +++ b/src/ui/preferences/LinkSettings.qml @@ -334,7 +334,7 @@ Rectangle { anchors.right: parent.right QGCButton { width: ScreenTools.defaultFontPixelWidth * 10 - text: "OK" + text: qsTr("OK") enabled: nameField.text !== "" onClicked: { // Save editting diff --git a/src/ui/preferences/TcpSettings.qml b/src/ui/preferences/TcpSettings.qml index d3ae6d33d..628b633e6 100644 --- a/src/ui/preferences/TcpSettings.qml +++ b/src/ui/preferences/TcpSettings.qml @@ -48,7 +48,7 @@ Item { spacing: ScreenTools.defaultFontPixelHeight / 2 QGCLabel { id: tcpLabel - text: "TCP Link Settings" + text: qsTr("TCP Link Settings") } Rectangle { height: 1 @@ -62,7 +62,7 @@ Item { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "Host Address:" + text: qsTr("Host Address:") width: _firstColumn anchors.verticalCenter: parent.verticalCenter } @@ -76,7 +76,7 @@ Item { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "TCP Port:" + text: qsTr("TCP Port:") width: _firstColumn anchors.verticalCenter: parent.verticalCenter } diff --git a/src/ui/preferences/UdpSettings.qml b/src/ui/preferences/UdpSettings.qml index 6fbcc3ea6..d906f8d71 100644 --- a/src/ui/preferences/UdpSettings.qml +++ b/src/ui/preferences/UdpSettings.qml @@ -54,7 +54,7 @@ Item { QGCLabel { id: udpLabel - text: "UDP Link Settings" + text: qsTr("UDP Link Settings") } Rectangle { height: 1 @@ -68,7 +68,7 @@ Item { Row { spacing: ScreenTools.defaultFontPixelWidth QGCLabel { - text: "Listening Port:" + text: qsTr("Listening Port:") width: _firstColumn anchors.verticalCenter: parent.verticalCenter } @@ -91,7 +91,7 @@ Item { width: parent.width } QGCLabel { - text: "Target Hosts:" + text: qsTr("Target Hosts:") } Item { width: hostRow.width @@ -165,7 +165,7 @@ Item { anchors.horizontalCenter: parent.horizontalCenter QGCButton { width: ScreenTools.defaultFontPixelWidth * 10 - text: "Add" + text: qsTr("Add") onClicked: { if(hostField.visible && hostField.text !== "") { subEditConfig.addHost(hostField.text) @@ -178,7 +178,7 @@ Item { QGCButton { width: ScreenTools.defaultFontPixelWidth * 10 enabled: _udpSetting._currentHost && _udpSetting._currentHost !== "" - text: "Remove" + text: qsTr("Remove") onClicked: { subEditConfig.removeHost(_udpSetting._currentHost) } diff --git a/src/ui/toolbar/MainToolBar.qml b/src/ui/toolbar/MainToolBar.qml index 680bcaef8..37a856615 100644 --- a/src/ui/toolbar/MainToolBar.qml +++ b/src/ui/toolbar/MainToolBar.qml @@ -213,7 +213,7 @@ Rectangle { QGCLabel { id: gpsLabel - text: (activeVehicle && activeVehicle.gps.count.value >= 0) ? "GPS Status" : "GPS Data Unavailable" + text: (activeVehicle && activeVehicle.gps.count.value >= 0) ? qsTr("GPS Status") : qsTr("GPS Data Unavailable") font.weight:Font.DemiBold anchors.horizontalCenter: parent.horizontalCenter } @@ -226,16 +226,16 @@ Rectangle { anchors.horizontalCenter: parent.horizontalCenter columns: 2 - QGCLabel { text: "GPS Count:" } - QGCLabel { text: activeVehicle ? activeVehicle.gps.count.valueString : "N/A" } - QGCLabel { text: "GPS Lock:" } - QGCLabel { text: activeVehicle ? activeVehicle.gps.lock.enumStringValue : "N/A" } - QGCLabel { text: "HDOP:" } - QGCLabel { text: activeVehicle ? activeVehicle.gps.hdop.valueString : "--.--" } - QGCLabel { text: "VDOP:" } - QGCLabel { text: activeVehicle ? activeVehicle.gps.vdop.valueString : "--.--" } - QGCLabel { text: "Course Over Ground:" } - QGCLabel { text: activeVehicle ? activeVehicle.gps.courseOverGround.valueString : "--.--" } + QGCLabel { text: qsTr("GPS Count:") } + QGCLabel { text: activeVehicle ? activeVehicle.gps.count.valueString : qsTr("N/A", "No data to display") } + QGCLabel { text: qsTr("GPS Lock:") } + QGCLabel { text: activeVehicle ? activeVehicle.gps.lock.enumStringValue : qsTr("N/A", "No data to display") } + QGCLabel { text: qsTr("HDOP:") } + QGCLabel { text: activeVehicle ? activeVehicle.gps.hdop.valueString : qsTr("--.--", "No data to display") } + QGCLabel { text: qsTr("VDOP:") } + QGCLabel { text: activeVehicle ? activeVehicle.gps.vdop.valueString : qsTr("--.--", "No data to display") } + QGCLabel { text: qsTr("Course Over Ground:") } + QGCLabel { text: activeVehicle ? activeVehicle.gps.courseOverGround.valueString : qsTr("--.--", "No data to display") } } } @@ -267,7 +267,7 @@ Rectangle { QGCLabel { id: battLabel - text: "Battery Status" + text: qsTr("Battery Status") font.weight:Font.DemiBold anchors.horizontalCenter: parent.horizontalCenter } @@ -279,9 +279,9 @@ Rectangle { columns: 2 anchors.horizontalCenter: parent.horizontalCenter - QGCLabel { text: "Voltage:" } + QGCLabel { text: qsTr("Voltage:") } QGCLabel { text: (activeVehicle && activeVehicle.battery.voltage.value != -1) ? (activeVehicle.battery.voltage.valueString + " " + activeVehicle.battery.voltage.units) : "N/A" } - QGCLabel { text: "Accumulated Consumption:" } + QGCLabel { text: qsTr("Accumulated Consumption:") } QGCLabel { text: (activeVehicle && activeVehicle.battery.mahConsumed.value != -1) ? (activeVehicle.battery.mahConsumed.valueString + " " + activeVehicle.battery.mahConsumed.units) : "N/A" } } } @@ -314,7 +314,7 @@ Rectangle { QGCLabel { id: rssiLabel - text: activeVehicle ? (activeVehicle.rcRSSI > 0 ? "RC RSSI Status" : "RC RSSI Data Unavailable") : "N/A" + text: activeVehicle ? (activeVehicle.rcRSSI > 0 ? qsTr("RC RSSI Status") : qsTr("RC RSSI Data Unavailable")) : qsTr("N/A", "No data avaliable") font.weight:Font.DemiBold anchors.horizontalCenter: parent.horizontalCenter } @@ -327,7 +327,7 @@ Rectangle { columns: 2 anchors.horizontalCenter: parent.horizontalCenter - QGCLabel { text: "RSSI:" } + QGCLabel { text: qsTr("RSSI:") } QGCLabel { text: activeVehicle ? (activeVehicle.rcRSSI + "%") : 0 } } } @@ -360,7 +360,7 @@ Rectangle { QGCLabel { id: telemLabel - text: "Telemetry RSSI Status" + text: qsTr("Telemetry RSSI Status") font.weight: Font.DemiBold anchors.horizontalCenter: parent.horizontalCenter } @@ -372,19 +372,19 @@ Rectangle { columns: 2 anchors.horizontalCenter: parent.horizontalCenter - QGCLabel { text: "Local RSSI:" } + QGCLabel { text: qsTr("Local RSSI:") } QGCLabel { text: _controller.telemetryLRSSI + " dBm" } - QGCLabel { text: "Remote RSSI:" } + QGCLabel { text: qsTr("Remote RSSI:") } QGCLabel { text: _controller.telemetryRRSSI + " dBm" } - QGCLabel { text: "RX Errors:" } + QGCLabel { text: qsTr("RX Errors:") } QGCLabel { text: _controller.telemetryRXErrors } - QGCLabel { text: "Errors Fixed:" } + QGCLabel { text: qsTr("Errors Fixed:") } QGCLabel { text: _controller.telemetryFixed } - QGCLabel { text: "TX Buffer:" } + QGCLabel { text: qsTr("TX Buffer:") } QGCLabel { text: _controller.telemetryTXBuffer } - QGCLabel { text: "Local Noise:" } + QGCLabel { text: qsTr("Local Noise:") } QGCLabel { text: _controller.telemetryLNoise } - QGCLabel { text: "Remote Noise:" } + QGCLabel { text: qsTr("Remote Noise:") } QGCLabel { text: _controller.telemetryRNoise } } } @@ -493,7 +493,7 @@ Rectangle { QGCLabel { id: connectionLost - text: "COMMUNICATION LOST" + text: qsTr("COMMUNICATION LOST") font.pixelSize: tbFontLarge font.weight: Font.DemiBold color: colorRed @@ -509,7 +509,7 @@ Rectangle { anchors.rightMargin: mainWindow.tbSpacing * 2 anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - text: "Disconnect" + text: qsTr("Disconnect") visible: parent.vehicleConnectionLost primary: true onClicked: activeVehicle.disconnectInactiveVehicle() diff --git a/src/ui/toolbar/MainToolBarIndicators.qml b/src/ui/toolbar/MainToolBarIndicators.qml index b2d4e885d..308f42222 100644 --- a/src/ui/toolbar/MainToolBarIndicators.qml +++ b/src/ui/toolbar/MainToolBarIndicators.qml @@ -373,7 +373,7 @@ Row { anchors.horizontalCenter: parent.horizontalCenter QGCLabel { - text: activeVehicle ? activeVehicle.flightMode : "N/A" + text: activeVehicle ? activeVehicle.flightMode : qsTr("N/A", "No data to display") font.pixelSize: tbFontLarge color: qgcPal.buttonText anchors.verticalCenter: parent.verticalCenter -- 2.22.0