Commit c8caf6f6 authored by Tomaz Canabrava's avatar Tomaz Canabrava

Tons of qsTr added

Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent a3838026
...@@ -17,7 +17,7 @@ Rectangle { ...@@ -17,7 +17,7 @@ Rectangle {
height: themeChoice.height * 2 height: themeChoice.height * 2
color: palette.window color: palette.window
QGCLabel { QGCLabel {
text: "Window Color" text: qsTr("Window Color")
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 20 anchors.leftMargin: 20
anchors.verticalCenter: parent.horizontalCenter anchors.verticalCenter: parent.horizontalCenter
...@@ -29,13 +29,13 @@ Rectangle { ...@@ -29,13 +29,13 @@ Rectangle {
spacing: 20 spacing: 20
ExclusiveGroup { id: themeGroup } ExclusiveGroup { id: themeGroup }
QGCRadioButton { QGCRadioButton {
text: "Light" text: qsTr("Light")
checked: palette.globalTheme === QGCPalette.Light checked: palette.globalTheme === QGCPalette.Light
exclusiveGroup: themeGroup exclusiveGroup: themeGroup
onClicked: { palette.globalTheme = QGCPalette.Light } onClicked: { palette.globalTheme = QGCPalette.Light }
} }
QGCRadioButton { QGCRadioButton {
text: "Dark" text: qsTr("Dark")
checked: palette.globalTheme === QGCPalette.Dark checked: palette.globalTheme === QGCPalette.Dark
exclusiveGroup: themeGroup exclusiveGroup: themeGroup
onClicked: { palette.globalTheme = QGCPalette.Dark } onClicked: { palette.globalTheme = QGCPalette.Dark }
...@@ -73,28 +73,28 @@ Rectangle { ...@@ -73,28 +73,28 @@ Rectangle {
height: 20 height: 20
color: "black" color: "black"
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: "Disabled" text: qsTr("Disabled")
} }
Text { Text {
width: 80 width: 80
height: 20 height: 20
color: "black" color: "black"
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: "Enabled" text: qsTr("Enabled")
} }
Text { Text {
width: 80 width: 80
height: 20 height: 20
color: "black" color: "black"
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: "Value" text: qsTr("Value")
} }
Text { Text {
width: 80 width: 80
height: 20 height: 20
color: "black" color: "black"
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: "Value" text: qsTr("Value")
} }
// window // window
...@@ -542,14 +542,14 @@ Rectangle { ...@@ -542,14 +542,14 @@ Rectangle {
height: 20 height: 20
color: "black" color: "black"
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: "Enabled" text: qsTr("Enabled")
} }
Text { Text {
width: 100 width: 100
height: 20 height: 20
color: "black" color: "black"
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: "Disabled" text: qsTr("Disabled")
} }
// QGCLabel // QGCLabel
...@@ -560,12 +560,12 @@ Rectangle { ...@@ -560,12 +560,12 @@ Rectangle {
QGCLabel { QGCLabel {
width: 100 width: 100
height: 20 height: 20
text: "Label" text: qsTr("Label")
} }
QGCLabel { QGCLabel {
width: 100 width: 100
height: 20 height: 20
text: "Label" text: qsTr("Label")
enabled: false enabled: false
} }
...@@ -577,12 +577,12 @@ Rectangle { ...@@ -577,12 +577,12 @@ Rectangle {
QGCButton { QGCButton {
width: 100 width: 100
height: 20 height: 20
text: "Button" text: qsTr("Button")
} }
QGCButton { QGCButton {
width: 100 width: 100
height: 20 height: 20
text: "Button" text: qsTr("Button")
enabled: false enabled: false
} }
...@@ -595,12 +595,12 @@ Rectangle { ...@@ -595,12 +595,12 @@ Rectangle {
width: 100 width: 100
height: 20 height: 20
primary: true primary: true
text: "Button" text: qsTr("Button")
} }
QGCButton { QGCButton {
width: 100 width: 100
height: 20 height: 20
text: "Button" text: qsTr("Button")
primary: true primary: true
enabled: false enabled: false
} }
...@@ -613,25 +613,25 @@ Rectangle { ...@@ -613,25 +613,25 @@ Rectangle {
Menu { Menu {
id: buttonMenu id: buttonMenu
MenuItem { MenuItem {
text: "Item 1" text: qsTr("Item 1")
} }
MenuItem { MenuItem {
text: "Item 2" text: qsTr("Item 2")
} }
MenuItem { MenuItem {
text: "Item 3" text: qsTr("Item 3")
} }
} }
QGCButton { QGCButton {
width: 100 width: 100
height: 20 height: 20
text: "Button" text: qsTr("Button")
menu: buttonMenu menu: buttonMenu
} }
QGCButton { QGCButton {
width: 100 width: 100
height: 20 height: 20
text: "Button" text: qsTr("Button")
enabled: false enabled: false
menu: buttonMenu menu: buttonMenu
} }
...@@ -644,12 +644,12 @@ Rectangle { ...@@ -644,12 +644,12 @@ Rectangle {
QGCRadioButton { QGCRadioButton {
width: 100 width: 100
height: 20 height: 20
text: "Radio" text: qsTr("Radio")
} }
QGCRadioButton { QGCRadioButton {
width: 100 width: 100
height: 20 height: 20
text: "Radio" text: qsTr("Radio")
enabled: false enabled: false
} }
...@@ -661,12 +661,12 @@ Rectangle { ...@@ -661,12 +661,12 @@ Rectangle {
QGCCheckBox { QGCCheckBox {
width: 100 width: 100
height: 20 height: 20
text: "Check Box" text: qsTr("Check Box")
} }
QGCCheckBox { QGCCheckBox {
width: 100 width: 100
height: 20 height: 20
text: "Check Box" text: qsTr("Check Box")
enabled: false enabled: false
} }
...@@ -695,12 +695,12 @@ Rectangle { ...@@ -695,12 +695,12 @@ Rectangle {
QGCComboBox { QGCComboBox {
width: 100 width: 100
height: 20 height: 20
model: [ "Item 1", "Item 2", "Item 3" ] model: [ qsTr("Item 1"), qsTr("Item 2"), qsTr("Item 3") ]
} }
QGCComboBox { QGCComboBox {
width: 100 width: 100
height: 20 height: 20
model: [ "Item 1", "Item 2", "Item 3" ] model: [ qsTr("Item 1"), qsTr("Item 2"), qsTr("Item 3") ]
enabled: false enabled: false
} }
...@@ -712,12 +712,12 @@ Rectangle { ...@@ -712,12 +712,12 @@ Rectangle {
SubMenuButton { SubMenuButton {
width: 100 width: 100
height: 100 height: 100
text: "SUB MENU" text: qsTr("SUB MENU")
} }
SubMenuButton { SubMenuButton {
width: 100 width: 100
height: 100 height: 100
text: "SUB MENU" text: qsTr("SUB MENU")
enabled: false enabled: false
} }
} }
......
...@@ -36,7 +36,7 @@ Rectangle { ...@@ -36,7 +36,7 @@ Rectangle {
property bool calInProgress: false property bool calInProgress: false
// Text to show while calibration is in progress // Text to show while calibration is in progress
property string calInProgressText: "Hold Still" property string calInProgressText: qsTr("Hold Still")
// Image source // Image source
property var imageSource: "" property var imageSource: ""
...@@ -70,7 +70,7 @@ Rectangle { ...@@ -70,7 +70,7 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignBottom verticalAlignment: Text.AlignBottom
font.pixelSize: ScreenTools.mediumFontPixelSize font.pixelSize: ScreenTools.mediumFontPixelSize
text: calInProgress ? calInProgressText : (calValid ? "Completed" : "Incomplete") text: calInProgress ? calInProgressText : (calValid ? qsTr("Completed") : qsTr("Incomplete"))
} }
} }
} }
...@@ -841,7 +841,7 @@ Rectangle { ...@@ -841,7 +841,7 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
QGCLabel { QGCLabel {
id: optionsLabel id: optionsLabel
text: "Offline Map Options" text: qsTr("Offline Map Options")
font.pixelSize: ScreenTools.isAndroid ? ScreenTools.mediumFontPixelSize : ScreenTools.largeFontPixelSize font.pixelSize: ScreenTools.isAndroid ? ScreenTools.mediumFontPixelSize : ScreenTools.largeFontPixelSize
anchors.centerIn: parent anchors.centerIn: parent
} }
......
...@@ -38,6 +38,10 @@ QGCView { ...@@ -38,6 +38,10 @@ QGCView {
id: qgcView id: qgcView
viewPanel: panel 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 // User visible strings
readonly property string title: "FIRMWARE" readonly property string title: "FIRMWARE"
readonly property string highlightPrefix: "<font color=\"" + qgcPal.warningText + "\">" readonly property string highlightPrefix: "<font color=\"" + qgcPal.warningText + "\">"
...@@ -55,7 +59,7 @@ QGCView { ...@@ -55,7 +59,7 @@ QGCView {
property string firmwareName property string firmwareName
function cancelFlash() { function cancelFlash() {
statusTextArea.append(highlightPrefix + "Upgrade cancelled" + highlightSuffix) statusTextArea.append(highlightPrefix + qsTr("Upgrade cancelled") + highlightSuffix)
statusTextArea.append("------------------------------------------") statusTextArea.append("------------------------------------------")
controller.cancel() controller.cancel()
} }
...@@ -105,7 +109,7 @@ QGCView { ...@@ -105,7 +109,7 @@ QGCView {
QGroundControl.multiVehicleManager.activeVehicle.autoDisconnect = true QGroundControl.multiVehicleManager.activeVehicle.autoDisconnect = true
} else { } else {
// We end up here when we detect a board plugged in after we've started upgrade // 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") { 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) showDialog(pixhawkFirmwareSelectDialog, title, qgcView.showDialogDefaultWidth, StandardButton.Ok | StandardButton.Cancel)
} }
...@@ -162,19 +166,19 @@ QGCView { ...@@ -162,19 +166,19 @@ QGCView {
id: firmwareTypeList id: firmwareTypeList
ListElement { ListElement {
text: "Standard Version (stable)"; text: qsTr("Standard Version (stable)")
firmwareType: FirmwareUpgradeController.StableFirmware firmwareType: FirmwareUpgradeController.StableFirmware
} }
ListElement { ListElement {
text: "Beta Testing (beta)"; text: qsTr("Beta Testing (beta)")
firmwareType: FirmwareUpgradeController.BetaFirmware firmwareType: FirmwareUpgradeController.BetaFirmware
} }
ListElement { ListElement {
text: "Developer Build (master)"; text: qsTr("Developer Build (master)")
firmwareType: FirmwareUpgradeController.DeveloperFirmware firmwareType: FirmwareUpgradeController.DeveloperFirmware
} }
ListElement { ListElement {
text: "Custom firmware file..."; text: qsTr("Custom firmware file...")
firmwareType: FirmwareUpgradeController.CustomFirmware firmwareType: FirmwareUpgradeController.CustomFirmware
} }
} }
...@@ -183,11 +187,11 @@ QGCView { ...@@ -183,11 +187,11 @@ QGCView {
id: px4FlowTypeList id: px4FlowTypeList
ListElement { ListElement {
text: "Standard Version (stable)"; text: qsTr("Standard Version (stable)")
firmwareType: FirmwareUpgradeController.StableFirmware firmwareType: FirmwareUpgradeController.StableFirmware
} }
ListElement { ListElement {
text: "Custom firmware file..."; text: qsTr("Custom firmware file...")
firmwareType: FirmwareUpgradeController.CustomFirmware firmwareType: FirmwareUpgradeController.CustomFirmware
} }
} }
...@@ -217,7 +221,7 @@ QGCView { ...@@ -217,7 +221,7 @@ QGCView {
id: px4FlightStack id: px4FlightStack
checked: true checked: true
exclusiveGroup: firmwareGroup exclusiveGroup: firmwareGroup
text: "PX4 Flight Stack" text: qsTr("PX4 Flight Stack")
visible: !px4Flow visible: !px4Flow
onClicked: parent.firmwareVersionChanged(firmwareTypeList) onClicked: parent.firmwareVersionChanged(firmwareTypeList)
...@@ -226,7 +230,7 @@ QGCView { ...@@ -226,7 +230,7 @@ QGCView {
QGCRadioButton { QGCRadioButton {
id: apmFlightStack id: apmFlightStack
exclusiveGroup: firmwareGroup exclusiveGroup: firmwareGroup
text: "ArduPilot Flight Stack" text: qsTr("ArduPilot Flight Stack")
visible: !px4Flow visible: !px4Flow
onClicked: parent.firmwareVersionChanged(firmwareTypeList) onClicked: parent.firmwareVersionChanged(firmwareTypeList)
...@@ -253,7 +257,7 @@ QGCView { ...@@ -253,7 +257,7 @@ QGCView {
QGCCheckBox { QGCCheckBox {
id: _advanced id: _advanced
text: "Advanced settings" text: qsTr("Advanced settings")
checked: px4Flow ? true : false checked: px4Flow ? true : false
onClicked: { onClicked: {
...@@ -274,7 +278,7 @@ QGCView { ...@@ -274,7 +278,7 @@ QGCView {
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
visible: showFirmwareTypeSelection 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 { QGCComboBox {
...@@ -288,18 +292,18 @@ QGCView { ...@@ -288,18 +292,18 @@ QGCView {
controller.selectedFirmwareType = index controller.selectedFirmwareType = index
if (model.get(index).firmwareType == FirmwareUpgradeController.BetaFirmware) { if (model.get(index).firmwareType == FirmwareUpgradeController.BetaFirmware) {
firmwareVersionWarningLabel.visible = true firmwareVersionWarningLabel.visible = true
firmwareVersionWarningLabel.text = "WARNING: BETA FIRMWARE. " + firmwareVersionWarningLabel.text = qsTr("WARNING: BETA FIRMWARE. ") +
"This firmware version is ONLY intended for beta testers. " + qsTr("This firmware version is ONLY intended for beta testers. ") +
"Although it has received FLIGHT TESTING, it represents actively changed code. " + qsTr("Although it has received FLIGHT TESTING, it represents actively changed code. ") +
"Do NOT use for normal operation." qsTr("Do NOT use for normal operation.")
} else if (model.get(index).firmwareType == FirmwareUpgradeController.DeveloperFirmware) { } else if (model.get(index).firmwareType == FirmwareUpgradeController.DeveloperFirmware) {
firmwareVersionWarningLabel.visible = true firmwareVersionWarningLabel.visible = true
firmwareVersionWarningLabel.text = "WARNING: CONTINUOUS BUILD FIRMWARE. " + firmwareVersionWarningLabel.text = qsTr("WARNING: CONTINUOUS BUILD FIRMWARE. ") +
"This firmware has NOT BEEN FLIGHT TESTED. " + qsTr("This firmware has NOT BEEN FLIGHT TESTED. ") +
"It is only intended for DEVELOPERS. " + qsTr("It is only intended for DEVELOPERS. ") +
"Run bench tests without props first. " + qsTr("Run bench tests without props first. ") +
"Do NOT fly this without additonal safety precautions. " + qsTr("Do NOT fly this without additonal safety precautions. ") +
"Follow the mailing list actively when using it." qsTr("Follow the mailing list actively when using it.")
} else { } else {
firmwareVersionWarningLabel.visible = false firmwareVersionWarningLabel.visible = false
} }
......
...@@ -39,7 +39,7 @@ QGCView { ...@@ -39,7 +39,7 @@ QGCView {
QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled } 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 readonly property real labelToMonitorMargin: defaultTextWidth * 3
property bool controllerCompleted: false property bool controllerCompleted: false
property bool controllerAndViewReady: false property bool controllerAndViewReady: false
...@@ -122,7 +122,7 @@ QGCView { ...@@ -122,7 +122,7 @@ QGCView {
anchors.fill: parent anchors.fill: parent
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
text: "Not Mapped" text: qsTr("Not Mapped")
visible: !mapped visible: !mapped
} }
...@@ -150,7 +150,7 @@ QGCView { ...@@ -150,7 +150,7 @@ QGCView {
QGCLabel { QGCLabel {
id: header id: header
font.pixelSize: ScreenTools.mediumFontPixelSize font.pixelSize: ScreenTools.mediumFontPixelSize
text: "JOYSTICK" text: qsTr("JOYSTICK")
} }
Item { Item {
...@@ -174,7 +174,7 @@ QGCView { ...@@ -174,7 +174,7 @@ QGCView {
width: parent.width width: parent.width
spacing: 5 spacing: 5
QGCLabel { text: "Attitude Controls" } QGCLabel { text: qsTr("Attitude Controls") }
Item { Item {
width: parent.width width: parent.width
...@@ -183,7 +183,7 @@ QGCView { ...@@ -183,7 +183,7 @@ QGCView {
QGCLabel { QGCLabel {
id: rollLabel id: rollLabel
width: defaultTextWidth * 10 width: defaultTextWidth * 10
text: "Roll" text: qsTr("Roll")
} }
Loader { Loader {
...@@ -213,7 +213,7 @@ QGCView { ...@@ -213,7 +213,7 @@ QGCView {
QGCLabel { QGCLabel {
id: pitchLabel id: pitchLabel
width: defaultTextWidth * 10 width: defaultTextWidth * 10
text: "Pitch" text: qsTr("Pitch")
} }
Loader { Loader {
...@@ -243,7 +243,7 @@ QGCView { ...@@ -243,7 +243,7 @@ QGCView {
QGCLabel { QGCLabel {
id: yawLabel id: yawLabel
width: defaultTextWidth * 10 width: defaultTextWidth * 10
text: "Yaw" text: qsTr("Yaw")
} }
Loader { Loader {
...@@ -273,7 +273,7 @@ QGCView { ...@@ -273,7 +273,7 @@ QGCView {
QGCLabel { QGCLabel {
id: throttleLabel id: throttleLabel
width: defaultTextWidth * 10 width: defaultTextWidth * 10
text: "Throttle" text: qsTr("Throttle")
} }
Loader { Loader {
...@@ -303,14 +303,14 @@ QGCView { ...@@ -303,14 +303,14 @@ QGCView {
QGCButton { QGCButton {
id: skipButton id: skipButton
text: "Skip" text: qsTr("Skip")
onClicked: controller.skipButtonClicked() onClicked: controller.skipButtonClicked()
} }
QGCButton { QGCButton {
id: cancelButton id: cancelButton
text: "Cancel" text: qsTr("Cancel")
onClicked: controller.cancelButtonClicked() onClicked: controller.cancelButtonClicked()
} }
...@@ -318,7 +318,7 @@ QGCView { ...@@ -318,7 +318,7 @@ QGCView {
QGCButton { QGCButton {
id: nextButton id: nextButton
primary: true primary: true
text: "Calibrate" text: qsTr("Calibrate")
onClicked: controller.nextButtonClicked() onClicked: controller.nextButtonClicked()
} }
...@@ -348,7 +348,7 @@ QGCView { ...@@ -348,7 +348,7 @@ QGCView {
width: parent.width / 2 width: parent.width / 2
spacing: ScreenTools.defaultFontPixelHeight spacing: ScreenTools.defaultFontPixelHeight
QGCLabel { text: "Additional Joystick settings:" } QGCLabel { text: qsTr("Additional Joystick settings:") }
Column { Column {
width: parent.width width: parent.width
...@@ -357,7 +357,7 @@ QGCView { ...@@ -357,7 +357,7 @@ QGCView {
QGCCheckBox { QGCCheckBox {
enabled: _activeJoystick.calibrated 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 checked: _activeVehicle.joystickEnabled
onClicked: _activeVehicle.joystickEnabled = checked onClicked: _activeVehicle.joystickEnabled = checked
...@@ -370,7 +370,7 @@ QGCView { ...@@ -370,7 +370,7 @@ QGCView {
QGCLabel { QGCLabel {
id: activeJoystickLabel id: activeJoystickLabel
anchors.baseline: joystickCombo.baseline anchors.baseline: joystickCombo.baseline
text: "Active joystick:" text: qsTr("Active joystick:")
} }
QGCComboBox { QGCComboBox {
...@@ -383,7 +383,7 @@ QGCView { ...@@ -383,7 +383,7 @@ QGCView {
Component.onCompleted: { Component.onCompleted: {
var index = joystickCombo.find(joystickManager.activeJoystickName) var index = joystickCombo.find(joystickManager.activeJoystickName)
if (index == -1) { 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 { } else {
joystickCombo.currentIndex = index joystickCombo.currentIndex = index
} }
...@@ -398,7 +398,7 @@ QGCView { ...@@ -398,7 +398,7 @@ QGCView {
QGCRadioButton { QGCRadioButton {
exclusiveGroup: throttleModeExclusiveGroup exclusiveGroup: throttleModeExclusiveGroup
text: "Center stick is zero throttle" text: qsTr("Center stick is zero throttle")
checked: _activeJoystick.throttleMode == 0 checked: _activeJoystick.throttleMode == 0
onClicked: _activeJoystick.throttleMode = 0 onClicked: _activeJoystick.throttleMode = 0
...@@ -406,7 +406,7 @@ QGCView { ...@@ -406,7 +406,7 @@ QGCView {
QGCRadioButton { QGCRadioButton {
exclusiveGroup: throttleModeExclusiveGroup exclusiveGroup: throttleModeExclusiveGroup
text: "Full down stick is zero throttle" text: qsTr("Full down stick is zero throttle")
checked: _activeJoystick.throttleMode == 1 checked: _activeJoystick.throttleMode == 1
onClicked: _activeJoystick.throttleMode = 1 onClicked: _activeJoystick.throttleMode = 1
...@@ -416,7 +416,7 @@ QGCView { ...@@ -416,7 +416,7 @@ QGCView {
QGCCheckBox { QGCCheckBox {
id: advancedSettings id: advancedSettings
checked: _activeVehicle.joystickMode != 0 checked: _activeVehicle.joystickMode != 0
text: "Advanced settings (careful!)" text: qsTr("Advanced settings (careful!)")
onClicked: { onClicked: {
if (!checked) { if (!checked) {
...@@ -433,7 +433,7 @@ QGCView { ...@@ -433,7 +433,7 @@ QGCView {
QGCLabel { QGCLabel {
id: joystickModeLabel id: joystickModeLabel
anchors.baseline: joystickModeCombo.baseline anchors.baseline: joystickModeCombo.baseline
text: "Joystick mode:" text: qsTr("Joystick mode:")
} }
QGCComboBox { QGCComboBox {
...@@ -463,7 +463,7 @@ QGCView { ...@@ -463,7 +463,7 @@ QGCView {
} }
} }
QGCLabel { text: "Button actions:" } QGCLabel { text: qsTr("Button actions:") }
Column { Column {
width: parent.width width: parent.width
...@@ -471,7 +471,7 @@ QGCView { ...@@ -471,7 +471,7 @@ QGCView {
QGCLabel { QGCLabel {
visible: _activeVehicle.manualControlReservedButtonCount != 0 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 property int reservedButtonCount: _activeVehicle.manualControlReservedButtonCount == -1 ? _activeJoystick.buttonCount : _activeVehicle.manualControlReservedButtonCount
} }
...@@ -547,7 +547,7 @@ QGCView { ...@@ -547,7 +547,7 @@ QGCView {
width: parent.width width: parent.width
spacing: 5 spacing: 5
QGCLabel { text: "Axis Monitor" } QGCLabel { text: qsTr("Axis Monitor") }
Connections { Connections {
target: controller target: controller
...@@ -595,7 +595,7 @@ QGCView { ...@@ -595,7 +595,7 @@ QGCView {
width: parent.width width: parent.width
spacing: ScreenTools.defaultFontPixelHeight spacing: ScreenTools.defaultFontPixelHeight
QGCLabel { text: "Button Monitor" } QGCLabel { text: qsTr("Button Monitor") }
Connections { Connections {
target: _activeJoystick target: _activeJoystick
......
...@@ -334,7 +334,7 @@ Rectangle { ...@@ -334,7 +334,7 @@ Rectangle {
anchors.right: parent.right anchors.right: parent.right
QGCButton { QGCButton {
width: ScreenTools.defaultFontPixelWidth * 10 width: ScreenTools.defaultFontPixelWidth * 10
text: "OK" text: qsTr("OK")
enabled: nameField.text !== "" enabled: nameField.text !== ""
onClicked: { onClicked: {
// Save editting // Save editting
......
...@@ -48,7 +48,7 @@ Item { ...@@ -48,7 +48,7 @@ Item {
spacing: ScreenTools.defaultFontPixelHeight / 2 spacing: ScreenTools.defaultFontPixelHeight / 2
QGCLabel { QGCLabel {
id: tcpLabel id: tcpLabel
text: "TCP Link Settings" text: qsTr("TCP Link Settings")
} }
Rectangle { Rectangle {
height: 1 height: 1
...@@ -62,7 +62,7 @@ Item { ...@@ -62,7 +62,7 @@ Item {
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
QGCLabel { QGCLabel {
text: "Host Address:" text: qsTr("Host Address:")
width: _firstColumn width: _firstColumn
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
...@@ -76,7 +76,7 @@ Item { ...@@ -76,7 +76,7 @@ Item {
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
QGCLabel { QGCLabel {
text: "TCP Port:" text: qsTr("TCP Port:")
width: _firstColumn width: _firstColumn
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
......
...@@ -54,7 +54,7 @@ Item { ...@@ -54,7 +54,7 @@ Item {
QGCLabel { QGCLabel {
id: udpLabel id: udpLabel
text: "UDP Link Settings" text: qsTr("UDP Link Settings")
} }
Rectangle { Rectangle {
height: 1 height: 1
...@@ -68,7 +68,7 @@ Item { ...@@ -68,7 +68,7 @@ Item {
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
QGCLabel { QGCLabel {
text: "Listening Port:" text: qsTr("Listening Port:")
width: _firstColumn width: _firstColumn
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
...@@ -91,7 +91,7 @@ Item { ...@@ -91,7 +91,7 @@ Item {
width: parent.width width: parent.width
} }
QGCLabel { QGCLabel {
text: "Target Hosts:" text: qsTr("Target Hosts:")
} }
Item { Item {
width: hostRow.width width: hostRow.width
...@@ -165,7 +165,7 @@ Item { ...@@ -165,7 +165,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
QGCButton { QGCButton {
width: ScreenTools.defaultFontPixelWidth * 10 width: ScreenTools.defaultFontPixelWidth * 10
text: "Add" text: qsTr("Add")
onClicked: { onClicked: {
if(hostField.visible && hostField.text !== "") { if(hostField.visible && hostField.text !== "") {
subEditConfig.addHost(hostField.text) subEditConfig.addHost(hostField.text)
...@@ -178,7 +178,7 @@ Item { ...@@ -178,7 +178,7 @@ Item {
QGCButton { QGCButton {
width: ScreenTools.defaultFontPixelWidth * 10 width: ScreenTools.defaultFontPixelWidth * 10
enabled: _udpSetting._currentHost && _udpSetting._currentHost !== "" enabled: _udpSetting._currentHost && _udpSetting._currentHost !== ""
text: "Remove" text: qsTr("Remove")
onClicked: { onClicked: {
subEditConfig.removeHost(_udpSetting._currentHost) subEditConfig.removeHost(_udpSetting._currentHost)
} }
......
...@@ -213,7 +213,7 @@ Rectangle { ...@@ -213,7 +213,7 @@ Rectangle {
QGCLabel { QGCLabel {
id: gpsLabel 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 font.weight:Font.DemiBold
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
...@@ -226,16 +226,16 @@ Rectangle { ...@@ -226,16 +226,16 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
columns: 2 columns: 2
QGCLabel { text: "GPS Count:" } QGCLabel { text: qsTr("GPS Count:") }
QGCLabel { text: activeVehicle ? activeVehicle.gps.count.valueString : "N/A" } QGCLabel { text: activeVehicle ? activeVehicle.gps.count.valueString : qsTr("N/A", "No data to display") }
QGCLabel { text: "GPS Lock:" } QGCLabel { text: qsTr("GPS Lock:") }
QGCLabel { text: activeVehicle ? activeVehicle.gps.lock.enumStringValue : "N/A" } QGCLabel { text: activeVehicle ? activeVehicle.gps.lock.enumStringValue : qsTr("N/A", "No data to display") }
QGCLabel { text: "HDOP:" } QGCLabel { text: qsTr("HDOP:") }
QGCLabel { text: activeVehicle ? activeVehicle.gps.hdop.valueString : "--.--" } QGCLabel { text: activeVehicle ? activeVehicle.gps.hdop.valueString : qsTr("--.--", "No data to display") }
QGCLabel { text: "VDOP:" } QGCLabel { text: qsTr("VDOP:") }
QGCLabel { text: activeVehicle ? activeVehicle.gps.vdop.valueString : "--.--" } QGCLabel { text: activeVehicle ? activeVehicle.gps.vdop.valueString : qsTr("--.--", "No data to display") }
QGCLabel { text: "Course Over Ground:" } QGCLabel { text: qsTr("Course Over Ground:") }
QGCLabel { text: activeVehicle ? activeVehicle.gps.courseOverGround.valueString : "--.--" } QGCLabel { text: activeVehicle ? activeVehicle.gps.courseOverGround.valueString : qsTr("--.--", "No data to display") }
} }
} }
...@@ -267,7 +267,7 @@ Rectangle { ...@@ -267,7 +267,7 @@ Rectangle {
QGCLabel { QGCLabel {
id: battLabel id: battLabel
text: "Battery Status" text: qsTr("Battery Status")
font.weight:Font.DemiBold font.weight:Font.DemiBold
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
...@@ -279,9 +279,9 @@ Rectangle { ...@@ -279,9 +279,9 @@ Rectangle {
columns: 2 columns: 2
anchors.horizontalCenter: parent.horizontalCenter 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: (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" } QGCLabel { text: (activeVehicle && activeVehicle.battery.mahConsumed.value != -1) ? (activeVehicle.battery.mahConsumed.valueString + " " + activeVehicle.battery.mahConsumed.units) : "N/A" }
} }
} }
...@@ -314,7 +314,7 @@ Rectangle { ...@@ -314,7 +314,7 @@ Rectangle {
QGCLabel { QGCLabel {
id: rssiLabel 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 font.weight:Font.DemiBold
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
...@@ -327,7 +327,7 @@ Rectangle { ...@@ -327,7 +327,7 @@ Rectangle {
columns: 2 columns: 2
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
QGCLabel { text: "RSSI:" } QGCLabel { text: qsTr("RSSI:") }
QGCLabel { text: activeVehicle ? (activeVehicle.rcRSSI + "%") : 0 } QGCLabel { text: activeVehicle ? (activeVehicle.rcRSSI + "%") : 0 }
} }
} }
...@@ -360,7 +360,7 @@ Rectangle { ...@@ -360,7 +360,7 @@ Rectangle {
QGCLabel { QGCLabel {
id: telemLabel id: telemLabel
text: "Telemetry RSSI Status" text: qsTr("Telemetry RSSI Status")
font.weight: Font.DemiBold font.weight: Font.DemiBold
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
...@@ -372,19 +372,19 @@ Rectangle { ...@@ -372,19 +372,19 @@ Rectangle {
columns: 2 columns: 2
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
QGCLabel { text: "Local RSSI:" } QGCLabel { text: qsTr("Local RSSI:") }
QGCLabel { text: _controller.telemetryLRSSI + " dBm" } QGCLabel { text: _controller.telemetryLRSSI + " dBm" }
QGCLabel { text: "Remote RSSI:" } QGCLabel { text: qsTr("Remote RSSI:") }
QGCLabel { text: _controller.telemetryRRSSI + " dBm" } QGCLabel { text: _controller.telemetryRRSSI + " dBm" }
QGCLabel { text: "RX Errors:" } QGCLabel { text: qsTr("RX Errors:") }
QGCLabel { text: _controller.telemetryRXErrors } QGCLabel { text: _controller.telemetryRXErrors }
QGCLabel { text: "Errors Fixed:" } QGCLabel { text: qsTr("Errors Fixed:") }
QGCLabel { text: _controller.telemetryFixed } QGCLabel { text: _controller.telemetryFixed }
QGCLabel { text: "TX Buffer:" } QGCLabel { text: qsTr("TX Buffer:") }
QGCLabel { text: _controller.telemetryTXBuffer } QGCLabel { text: _controller.telemetryTXBuffer }
QGCLabel { text: "Local Noise:" } QGCLabel { text: qsTr("Local Noise:") }
QGCLabel { text: _controller.telemetryLNoise } QGCLabel { text: _controller.telemetryLNoise }
QGCLabel { text: "Remote Noise:" } QGCLabel { text: qsTr("Remote Noise:") }
QGCLabel { text: _controller.telemetryRNoise } QGCLabel { text: _controller.telemetryRNoise }
} }
} }
...@@ -493,7 +493,7 @@ Rectangle { ...@@ -493,7 +493,7 @@ Rectangle {
QGCLabel { QGCLabel {
id: connectionLost id: connectionLost
text: "COMMUNICATION LOST" text: qsTr("COMMUNICATION LOST")
font.pixelSize: tbFontLarge font.pixelSize: tbFontLarge
font.weight: Font.DemiBold font.weight: Font.DemiBold
color: colorRed color: colorRed
...@@ -509,7 +509,7 @@ Rectangle { ...@@ -509,7 +509,7 @@ Rectangle {
anchors.rightMargin: mainWindow.tbSpacing * 2 anchors.rightMargin: mainWindow.tbSpacing * 2
anchors.right: parent.right anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "Disconnect" text: qsTr("Disconnect")
visible: parent.vehicleConnectionLost visible: parent.vehicleConnectionLost
primary: true primary: true
onClicked: activeVehicle.disconnectInactiveVehicle() onClicked: activeVehicle.disconnectInactiveVehicle()
......
...@@ -373,7 +373,7 @@ Row { ...@@ -373,7 +373,7 @@ Row {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
QGCLabel { QGCLabel {
text: activeVehicle ? activeVehicle.flightMode : "N/A" text: activeVehicle ? activeVehicle.flightMode : qsTr("N/A", "No data to display")
font.pixelSize: tbFontLarge font.pixelSize: tbFontLarge
color: qgcPal.buttonText color: qgcPal.buttonText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment