Commit e8b042e4 authored by Tomaz Canabrava's avatar Tomaz Canabrava

Add the Qml translation rules for APM

Change all text to have a qsTr call, this way it will
call the right translated text when needed.
Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent b16f0917
......@@ -73,7 +73,7 @@ QGCView {
anchors.right: parent.right
anchors.margins: _margins
wrapMode: Text.WordWrap
text: "Select you drone to load the default parameters for it. "
text: qsTr("Select you drone to load the default parameters for it. ")
}
Flow {
......@@ -118,7 +118,7 @@ QGCView {
anchors.rightMargin: _margins
anchors.left: parent.left
anchors.right: applyButton.right
text: "Please select your airframe type"
text: qsTr("Please select your airframe type")
font.pixelSize: ScreenTools.mediumFontPixelSize
wrapMode: Text.WordWrap
}
......@@ -126,8 +126,8 @@ QGCView {
QGCButton {
id: applyButton
anchors.right: parent.right
text: "Load common parameters"
onClicked: showDialog(applyRestartDialogComponent, "Load common parameters", qgcView.showDialogDefaultWidth, StandardButton.Close)
text: qsTr("Load common parameters")
onClicked: showDialog(applyRestartDialogComponent, qsTr("Load common parameters"), qgcView.showDialogDefaultWidth, StandardButton.Close)
}
}
......
......@@ -27,7 +27,7 @@ FactPanel {
VehicleSummaryRow {
id: nameRow;
labelText: "Frame Type:"
labelText: qsTr("Frame Type:")
valueText: sysIdFact.valueString === "0" ? "Plus"
: sysIdFact.valueString === "1" ? "X"
: sysIdFact.valueString === "2" ? "V"
......
......@@ -175,17 +175,17 @@ QGCView {
ListModel {
id: gimbalOutModel
ListElement { text: "Disabled"; value: 0 }
ListElement { text: "Channel 5"; value: 5 }
ListElement { text: "Channel 6"; value: 6 }
ListElement { text: "Channel 7"; value: 7 }
ListElement { text: "Channel 8"; value: 8 }
ListElement { text: "Channel 9"; value: 9 }
ListElement { text: "Channel 10"; value: 10 }
ListElement { text: "Channel 11"; value: 11 }
ListElement { text: "Channel 12"; value: 12 }
ListElement { text: "Channel 13"; value: 13 }
ListElement { text: "Channel 14"; value: 14 }
ListElement { text: qsTr("Disabled"); value: 0 }
ListElement { text: qsTr("Channel 5"); value: 5 }
ListElement { text: qsTr("Channel 6"); value: 6 }
ListElement { text: qsTr("Channel 7"); value: 7 }
ListElement { text: qsTr("Channel 8"); value: 8 }
ListElement { text: qsTr("Channel 9"); value: 9 }
ListElement { text: qsTr("Channel 10"); value: 10 }
ListElement { text: qsTr("Channel 11"); value: 11 }
ListElement { text: qsTr("Channel 12"); value: 12 }
ListElement { text: qsTr("Channel 13"); value: 13 }
ListElement { text: qsTr("Channel 14"); value: 14 }
}
Component {
......@@ -210,7 +210,7 @@ QGCView {
QGCLabel {
id: directionLabel
text: "Gimbal " + directionTitle
text: qsTr("Gimbal ") + directionTitle
font.weight: Font.DemiBold
}
......@@ -228,7 +228,7 @@ QGCView {
anchors.topMargin: _margins
anchors.left: servoReverseCheckBox.left
anchors.top: parent.top
text: "Stabilize"
text: qsTr("Stabilize")
fact: mountStabFact
checkedValue: 1
uncheckedValue: 0
......@@ -240,7 +240,7 @@ QGCView {
anchors.margins: _margins
anchors.top: mountStabCheckBox.bottom
anchors.right: parent.right
text: "Servo reverse"
text: qsTr("Servo reverse")
checkedValue: 1
uncheckedValue: 0
fact: servoReverseFact
......@@ -252,7 +252,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: gimbalOutCombo.baseline
text: "Output channel:"
text: qsTr("Output channel:")
}
QGCComboBox {
......@@ -272,7 +272,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: mountRcInCombo.baseline
text: "Input channel:"
text: qsTr("Input channel:")
enabled: directionEnabled
}
......@@ -292,7 +292,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: mountAngMinField.baseline
text: "Gimbal angle limits:"
text: qsTr("Gimbal angle limits:")
enabled: directionEnabled
}
......@@ -319,7 +319,7 @@ QGCView {
anchors.margins: _margins
anchors.left: mountAngMinField.right
anchors.baseline: mountAngMinField.baseline
text: "max"
text: qsTr("max")
enabled: directionEnabled
}
......@@ -337,7 +337,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: servoPWMMinField.baseline
text: "Servo PWM limits:"
text: qsTr("Servo PWM limits:")
enabled: directionEnabled
}
......@@ -345,7 +345,7 @@ QGCView {
id: servoPWMMinLabel
anchors.left: mountAngMinLabel.left
anchors.baseline: servoPWMMinField.baseline
text: "min"
text: qsTr("min")
enabled: directionEnabled
}
......@@ -364,7 +364,7 @@ QGCView {
anchors.margins: _margins
anchors.left: servoPWMMinField.right
anchors.baseline: servoPWMMinField.baseline
text: "max"
text: qsTr("max")
enabled: directionEnabled
}
......@@ -392,7 +392,7 @@ QGCView {
QGCLabel {
id: settingsLabel
text: "Gimbal Settings"
text: qsTr("Gimbal Settings")
font.weight: Font.DemiBold
}
......@@ -431,7 +431,7 @@ QGCView {
anchors.right: parent.right
anchors.top: gimbalTypeCombo.bottom
wrapMode: Text.WordWrap
text: "Gimbal Type changes takes affect next reboot of autopilot"
text: qsTr("Gimbal Type changes takes affect next reboot of autopilot")
}
QGCLabel {
......@@ -439,7 +439,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: gimbalModeCombo.baseline
text: "Default Mode:"
text: qsTr("Default Mode:")
}
FactComboBox {
......@@ -469,7 +469,7 @@ QGCView {
id: gimbalDirectionTiltLoader
sourceComponent: gimbalDirectionSettings
property string directionTitle: "Tilt"
property string directionTitle: qsTr("Tilt")
property bool directionEnabled: _tiltEnabled
property int gimbalOutIndex: 0
property Fact mountRcInFact: _mountRCInTilt
......@@ -488,7 +488,7 @@ QGCView {
anchors.top: gimbalDirectionTiltLoader.bottom
sourceComponent: gimbalDirectionSettings
property string directionTitle: "Roll"
property string directionTitle: qsTr("Roll")
property bool directionEnabled: _rollEnabled
property int gimbalOutIndex: 0
property Fact mountRcInFact: _mountRCInRoll
......@@ -507,7 +507,7 @@ QGCView {
anchors.top: gimbalDirectionRollLoader.bottom
sourceComponent: gimbalDirectionSettings
property string directionTitle: "Pan"
property string directionTitle: qsTr("Pan")
property bool directionEnabled: _panEnabled
property int gimbalOutIndex: 0
property Fact mountRcInFact: _mountRCInPan
......
......@@ -28,22 +28,22 @@ FactPanel {
VehicleSummaryRow {
visible: _mountTypeExists
labelText: "Gimbal type:"
labelText: qsTr("Gimbal type:")
valueText: _mountTypeValue
}
VehicleSummaryRow {
labelText: "Tilt input channel:"
labelText: qsTr("Tilt input channel:")
valueText: _mountRCInTilt.enumStringValue
}
VehicleSummaryRow {
labelText: "Pan input channel:"
labelText: qsTr("Pan input channel:")
valueText: _mountRCInPan.enumStringValue
}
VehicleSummaryRow {
labelText: "Roll input channel:"
labelText: qsTr("Roll input channel:")
valueText: _mountRCInRoll.enumStringValue
}
}
......
......@@ -62,7 +62,7 @@ QGCView {
QGCLabel {
id: flightModeLabel
text: "Flight Mode Settings" + (_fltmodeChExists ? "" : " (Channel 5)")
text: qsTr("Flight Mode Settings") + (_fltmodeChExists ? "" : qsTr(" (Channel 5)"))
font.weight: Font.DemiBold
}
......@@ -88,13 +88,16 @@ QGCView {
QGCLabel {
id: modeChannelLabel
anchors.baseline: modeChannelCombo.baseline
text: "Flight mode channel:"
text: qsTr("Flight mode channel:")
}
QGCComboBox {
id: modeChannelCombo
width: ScreenTools.defaultFontPixelWidth * 15
model: [ "Not assigned", "Channel 1", "Channel 2","Channel 3","Channel 4","Channel 5","Channel 6","Channel 7","Channel 8" ]
model: [ qsTr("Not assigned"), qsTr("Channel 1"), qsTr("Channel 2"),
qsTr("Channel 3"), qsTr("Channel 4"), qsTr("Channel 5"),
qsTr("Channel 6"), qsTr("Channel 7"), qsTr("Channel 8") ]
currentIndex: _fltmodeCh.value
onActivated: _fltmodeCh.value = index
}
......@@ -112,7 +115,7 @@ QGCView {
QGCLabel {
anchors.baseline: modeCombo.baseline
text: "Flight Mode " + index + ":"
text: qsTr("Flight Mode ") + index + ":"
color: controller.activeFlightMode == index ? "yellow" : qgcPal.text
}
......@@ -137,7 +140,7 @@ QGCView {
anchors.leftMargin: _margins
anchors.top: parent.top
anchors.left: flightModeSettings.right
text: "Channel Options"
text: qsTr("Channel Options")
font.weight: Font.DemiBold
visible: _channelOptionCount != 0
}
......@@ -170,7 +173,7 @@ QGCView {
QGCLabel {
anchors.baseline: optCombo.baseline
text: "Channel option " + index + ":"
text: qsTr("Channel option %1 :").arg(index)
color: controller.channelOptionEnabled[modelData] ? "yellow" : qgcPal.text
}
......
......@@ -26,32 +26,32 @@ FactPanel {
anchors.margins: 8
VehicleSummaryRow {
labelText: "Flight Mode 1:"
labelText: qsTr("Flight Mode 1:")
valueText: flightMode1.enumStringValue
}
VehicleSummaryRow {
labelText: "Flight Mode 2:"
labelText: qsTr("Flight Mode 2:")
valueText: flightMode2.enumStringValue
}
VehicleSummaryRow {
labelText: "Flight Mode 3:"
labelText: qsTr("Flight Mode 3:")
valueText: flightMode3.enumStringValue
}
VehicleSummaryRow {
labelText: "Flight Mode 4:"
labelText: qsTr("Flight Mode 4:")
valueText: flightMode4.enumStringValue
}
VehicleSummaryRow {
labelText: "Flight Mode 5:"
labelText: qsTr("Flight Mode 5:")
valueText: flightMode5.enumStringValue
}
VehicleSummaryRow {
labelText: "Flight Mode 6:"
labelText: qsTr("Flight Mode 6:")
valueText: flightMode6.enumStringValue
}
}
......
......@@ -27,7 +27,7 @@ import QGroundControl.Controls 1.0
QGCLabel {
anchors.fill: parent
text: "Not supported"
text: qsTr("Not supported")
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
......@@ -67,7 +67,7 @@ QGCView {
id: sensorModel
ListElement {
text: "Power Module 90A"
text: qsTr("Power Module 90A")
voltPin: 2
currPin: 3
voltMult: 10.1
......@@ -75,7 +75,7 @@ QGCView {
}
ListElement {
text: "Power Module HV"
text: qsTr("Power Module HV")
voltPin: 2
currPin: 3
voltMult: 12.02
......@@ -91,7 +91,7 @@ QGCView {
}
ListElement {
text: "Other"
text: qsTr("Other")
}
}
......@@ -110,7 +110,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: monitorCombo.baseline
text: "Battery monitor:"
text: qsTr("Battery monitor:")
}
FactComboBox {
......@@ -128,7 +128,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: capacityField.baseline
text: "Battery capacity:"
text: qsTr("Battery capacity:")
}
FactTextField {
......@@ -146,7 +146,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: sensorCombo.baseline
text: "Power sensor:"
text: qsTr("Power sensor:")
}
QGCComboBox {
......@@ -174,7 +174,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: currPinCombo.baseline
text: "Current pin:"
text: qsTr("Current pin:")
visible: _showAdvanced
}
......@@ -194,7 +194,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: voltPinCombo.baseline
text: "Voltage pin:"
text: qsTr("Voltage pin:")
visible: _showAdvanced
}
......@@ -214,7 +214,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: voltMultField.baseline
text: "Voltage multiplier:"
text: qsTr("Voltage multiplier:")
visible: _showAdvanced
}
......@@ -233,7 +233,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: ampPerVoltField.baseline
text: "Amps per volt:"
text: qsTr("Amps per volt:")
visible: _showAdvanced
}
......
......@@ -45,12 +45,12 @@ FactPanel {
anchors.margins: 8
VehicleSummaryRow {
labelText: "Battery monitor:"
labelText: qsTr("Battery monitor:")
valueText: battMonitor.enumStringValue
}
VehicleSummaryRow {
labelText: "Battery capacity:"
labelText: qsTr("Battery capacity:")
valueText: battCapacity.valueString
}
}
......
......@@ -24,23 +24,23 @@ FactPanel {
anchors.margins: 8
VehicleSummaryRow {
labelText: "Roll:"
valueText: mapRollFact.value == 0 ? "Setup required" : "Channel " + mapRollFact.valueString
labelText: qsTr("Roll:")
valueText: mapRollFact.value == 0 ? qsTr("Setup required") : qsTr("Channel %1").arg(mapRollFact.valueString)
}
VehicleSummaryRow {
labelText: "Pitch:"
valueText: mapPitchFact.value == 0 ? "Setup required" : "Channel " + mapPitchFact.valueString
labelText: qsTr("Pitch:")
valueText: mapPitchFact.value == 0 ? qsTr("Setup required") : qsTr("Channel %1").arg(mapPitchFact.valueString)
}
VehicleSummaryRow {
labelText: "Yaw:"
valueText: mapYawFact.value == 0 ? "Setup required" : "Channel " + mapYawFact.valueString
labelText: qsTr("Yaw:")
valueText: mapYawFact.value == 0 ? qsTr("Setup required") : qsTr("Channel %1").arg(mapYawFact.valueString)
}
VehicleSummaryRow {
labelText: "Throttle:"
valueText: mapThrottleFact.value == 0 ? "Setup required" : "Channel " + mapThrottleFact.valueString
labelText: qsTr("Throttle:")
valueText: mapThrottleFact.value == 0 ? qsTr("Setup required") : qsTr("Channel %1").arg(mapThrottleFact.valueString)
}
}
}
......@@ -79,7 +79,7 @@ QGCView {
QGCLabel {
id: failsafeLabel
text: "Failsafe Triggers"
text: qsTr("Failsafe Triggers")
font.weight: Font.DemiBold
}
......@@ -98,7 +98,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: gcsEnableCombo.baseline
text: "Ground Station failsafe:"
text: qsTr("Ground Station failsafe:")
}
FactComboBox {
......@@ -117,7 +117,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: throttleEnableCombo.baseline
text: "Throttle failsafe:"
text: qsTr("Throttle failsafe:")
}
QGCComboBox {
......@@ -126,7 +126,8 @@ QGCView {
anchors.left: gcsEnableCombo.left
anchors.top: gcsEnableCombo.bottom
width: voltageField.width
model: ["Disabled", "Always RTL", "Continue with Mission in Auto Mode", "Always Land"]
model: [qsTr("Disabled"), qsTr("Always RTL"),
qsTr("Continue with Mission in Auto Mode"), qsTr("Always Land")]
currentIndex: _failsafeThrEnable.value
onActivated: _failsafeThrEnable.value = index
......@@ -137,7 +138,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: throttlePWMField.baseline
text: "PWM threshold:"
text: qsTr("PWM threshold:")
}
FactTextField {
......@@ -154,7 +155,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: batteryEnableCombo.baseline
text: "Battery failsafe:"
text: qsTr("Battery failsafe:")
}
QGCComboBox {
......@@ -163,7 +164,7 @@ QGCView {
anchors.left: gcsEnableCombo.left
anchors.top: throttlePWMField.bottom
width: voltageField.width
model: ["Disabled", "Land", "Return to Launch"]
model: [qsTr("Disabled"), qsTr("Land"), qsTr("Return to Launch")]
currentIndex: _failsafeBattEnable.value
onActivated: _failsafeBattEnable.value = index
......@@ -174,7 +175,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: voltageField.baseline
text: "Voltage threshold:"
text: qsTr("Voltage threshold:")
checked: _failsafeBattVoltage.value != 0
onClicked: _failsafeBattVoltage.value = checked ? 10.5 : 0
......@@ -194,7 +195,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: mahField.baseline
text: "MAH threshold:"
text: qsTr("MAH threshold:")
checked: _failsafeBattMah.value != 0
onClicked: _failsafeBattMah.value = checked ? 600 : 0
......@@ -215,7 +216,7 @@ QGCView {
anchors.leftMargin: _margins
anchors.left: failsafeSettings.right
anchors.top: parent.top
text: "GeoFence"
text: qsTr("GeoFence")
font.weight: Font.DemiBold
}
......@@ -233,7 +234,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.top: parent.top
text: "Circle GeoFence enabled"
text: qsTr("Circle GeoFence enabled")
checked: _fenceEnable.value != 0 && _fenceType.value & 2
onClicked: {
......@@ -258,7 +259,7 @@ QGCView {
anchors.topMargin: _margins / 2
anchors.left: circleGeo.left
anchors.top: circleGeo.bottom
text: "Altitude GeoFence enabled"
text: qsTr("Altitude GeoFence enabled")
checked: _fenceEnable.value != 0 && _fenceType.value & 1
onClicked: {
......@@ -283,7 +284,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.top: altitudeGeo.bottom
text: "Report only"
text: qsTr("Report only")
exclusiveGroup: fenceActionRadioGroup
checked: _fenceAction.value == 0
......@@ -295,7 +296,7 @@ QGCView {
anchors.topMargin: _margins / 2
anchors.left: circleGeo.left
anchors.top: geoReportRadio.bottom
text: "RTL or Land"
text: qsTr("RTL or Land")
exclusiveGroup: fenceActionRadioGroup
checked: _fenceAction.value == 1
......@@ -306,7 +307,7 @@ QGCView {
id: fenceRadiusLabel
anchors.left: circleGeo.left
anchors.baseline: fenceRadiusField.baseline
text: "Max radius:"
text: qsTr("Max radius:")
}
FactTextField {
......@@ -322,7 +323,7 @@ QGCView {
id: fenceAltMaxLabel
anchors.left: circleGeo.left
anchors.baseline: fenceAltMaxField.baseline
text: "Max altitude:"
text: qsTr("Max altitude:")
}
FactTextField {
......@@ -340,7 +341,7 @@ QGCView {
id: rtlLabel
anchors.topMargin: _margins
anchors.top: geoFenceSettings.bottom
text: "Return to Launch"
text: qsTr("Return to Launch")
font.weight: Font.DemiBold
}
......@@ -377,7 +378,7 @@ QGCView {
anchors.leftMargin: _margins
anchors.left: icon.right
anchors.top: icon.top
text: "Return at current altitude"
text: qsTr("Return at current altitude")
checked: _rtlAltFact.value == 0
exclusiveGroup: returnAltRadioGroup
......@@ -389,7 +390,7 @@ QGCView {
anchors.topMargin: _margins
anchors.left: returnAtCurrentRadio.left
anchors.top: returnAtCurrentRadio.bottom
text: "Return at specified altitude:"
text: qsTr("Return at specified altitude:")
exclusiveGroup: returnAltRadioGroup
checked: _rtlAltFact.value != 0
......@@ -411,7 +412,7 @@ QGCView {
anchors.left: returnAtCurrentRadio.left
anchors.baseline: landDelayField.baseline
checked: _rtlLoitTimeFact.value > 0
text: "Loiter above Home for:"
text: qsTr("Loiter above Home for:")
onClicked: _rtlLoitTimeFact.value = (checked ? 60 : 0)
}
......@@ -430,7 +431,7 @@ QGCView {
id: landRadio
anchors.left: returnAtCurrentRadio.left
anchors.baseline: landSpeedField.baseline
text: "Land with descent speed:"
text: qsTr("Land with descent speed:")
checked: _rtlAltFinalFact.value == 0
exclusiveGroup: landLoiterRadioGroup
......@@ -451,7 +452,7 @@ QGCView {
id: finalLoiterRadio
anchors.left: returnAtCurrentRadio.left
anchors.baseline: rltAltFinalField.baseline
text: "Final loiter altitude:"
text: qsTr("Final loiter altitude:")
exclusiveGroup: landLoiterRadioGroup
onClicked: _rtlAltFinalFact.value = _rtlAltFact.value
......@@ -473,7 +474,7 @@ QGCView {
anchors.topMargin: _margins
anchors.left: parent.left
anchors.top: rtlSettings.bottom
text: "Arming Checks"
text: qsTr("Arming Checks")
font.weight: Font.DemiBold
}
......@@ -490,7 +491,7 @@ QGCView {
id: armingCheckColumn
spacing: _margins
QGCLabel { text: "Be very careful when turning off arming checks. Could lead to loss of Vehicle control." }
QGCLabel { text: qsTr("Be very careful when turning off arming checks. Could lead to loss of Vehicle control.") }
FactBitmask { fact: _armingCheck }
}
}
......
......@@ -64,7 +64,7 @@ QGCView {
QGCLabel {
id: failsafeTriggersLabel
text: "Failsafe Triggers"
text: qsTr("Failsafe Triggers")
font.weight: Font.DemiBold
}
......@@ -83,7 +83,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: throttlePWMField.baseline
text: "Throttle PWM threshold:"
text: qsTr("Throttle PWM threshold:")
checked: _failsafeThrEnable.value == 1
onClicked: _failsafeThrEnable.value = (checked ? 1 : 0)
......@@ -104,7 +104,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: voltageField.baseline
text: "Voltage threshold:"
text: qsTr("Voltage threshold:")
checked: _failsafeBattVoltage.value != 0
onClicked: _failsafeBattVoltage.value = checked ? 10.5 : 0
......@@ -125,7 +125,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: mahField.baseline
text: "MAH threshold:"
text: qsTr("MAH threshold:")
checked: _failsafeBattMah.value != 0
onClicked: _failsafeBattMah.value = checked ? 600 : 0
......@@ -146,7 +146,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.top: mahField.bottom
text: "GCS failsafe"
text: qsTr("GCS failsafe")
checked: _failsafeGCSEnable.value != 0
onClicked: _failsafeGCSEnable.value = checked ? 1 : 0
......@@ -157,7 +157,7 @@ QGCView {
id: rtlLabel
anchors.leftMargin: _margins
anchors.left: failsafeTriggerSettings.right
text: "Return to Launch"
text: qsTr("Return to Launch")
font.weight: Font.DemiBold
}
......@@ -175,7 +175,7 @@ QGCView {
anchors.margins: _margins
anchors.left: parent.left
anchors.top: parent.top
text: "Return at current altitude"
text: qsTr("Return at current altitude")
checked: _rtlAltFact.value < 0
exclusiveGroup: returnAltRadioGroup
......@@ -187,7 +187,7 @@ QGCView {
anchors.topMargin: _margins / 2
anchors.left: returnAtCurrentRadio.left
anchors.top: returnAtCurrentRadio.bottom
text: "Return at specified altitude:"
text: qsTr("Return at specified altitude:")
exclusiveGroup: returnAltRadioGroup
checked: _rtlAltFact.value >= 0
......
......@@ -27,7 +27,7 @@ import QGroundControl.Controls 1.0
QGCLabel {
anchors.fill: parent
text: "Not supported"
text: qsTr("Not supported")
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
......@@ -51,35 +51,35 @@ FactPanel {
function setFailsafeThrEnableText() {
switch (_failsafeThrEnable.value) {
case 0:
_failsafeThrEnableText = "Disabled"
_failsafeThrEnableText = qsTr("Disabled")
break
case 1:
_failsafeThrEnableText = "Always RTL"
_failsafeThrEnableText = qsTr("Always RTL")
break
case 2:
_failsafeThrEnableText = "Continue with Mission in Auto Mode"
_failsafeThrEnableText = qsTr("Continue with Mission in Auto Mode")
break
case 3:
_failsafeThrEnableText = "Always Land"
_failsafeThrEnableText = qsTr("Always Land")
break
default:
_failsafeThrEnableText = "Unknown"
_failsafeThrEnableText = qsTr("Unknown")
}
}
function setFailsafeBattEnableText() {
switch (_failsafeBattEnable.value) {
case 0:
_failsafeBattEnableText = "Disabled"
_failsafeBattEnableText = qsTr("Disabled")
break
case 1:
_failsafeBattEnableText = "Land"
_failsafeBattEnableText = qsTr("Land")
break
case 2:
_failsafeBattEnableText = "Return to Launch"
_failsafeBattEnableText = qsTr("Return to Launch")
break
default:
_failsafeThrEnableText = "Unknown"
_failsafeThrEnableText = qsTr("Unknown")
}
}
......@@ -88,54 +88,54 @@ FactPanel {
anchors.margins: 8
VehicleSummaryRow {
labelText: "Arming Checks:"
valueText: _armingCheck.value & 1 ? "Enabled" : "Some disabled"
labelText: qsTr("Arming Checks:")
valueText: _armingCheck.value & 1 ? qsTr("Enabled") : qsTr("Some disabled")
}
VehicleSummaryRow {
labelText: "Throttle failsafe:"
labelText: qsTr("Throttle failsafe:")
valueText: _failsafeThrEnableText
}
VehicleSummaryRow {
labelText: "Battery failsafe:"
labelText: qsTr("Battery failsafe:")
valueText: _failsafeBattEnableText
}
VehicleSummaryRow {
labelText: "GeoFence:"
labelText: qsTr("GeoFence:")
valueText: _fenceEnable.value == 0 || _fenceType == 0 ?
"Disabled" :
qsTr("Disabled") :
(_fenceType.value == 1 ?
"Altitude" :
(_fenceType.value == 2 ? "Circle" : "Altitude,Circle"))
qsTr("Altitude") :
(_fenceType.value == 2 ? qsTr("Circle") : qsTr("Altitude,Circle")))
}
VehicleSummaryRow {
labelText: "GeoFence:"
labelText: qsTr("GeoFence:")
valueText: _fenceAction.value == 0 ?
"Report only" :
(_fenceAction.value == 1 ? "RTL or Land" : "Unknown")
qsTr("Report only") :
(_fenceAction.value == 1 ? qsTr("RTL or Land") : qsTr("Unknown"))
visible: _fenceEnable.value != 0
}
VehicleSummaryRow {
labelText: "RTL min alt:"
valueText: _rtlAltFact.value == 0 ? "current" : _rtlAltFact.valueString
labelText: qsTr("RTL min alt:")
valueText: _rtlAltFact.value == 0 ? qsTr("current") : _rtlAltFact.valueString
}
VehicleSummaryRow {
labelText: "RTL loiter time:"
labelText: qsTr("RTL loiter time:")
valueText: _rtlLoitTimeFact.valueString
}
VehicleSummaryRow {
labelText: "RTL final alt:"
valueText: _rtlAltFinalFact.value == 0 ? "Land" : _rtlAltFinalFact.valueString
labelText: qsTr("RTL final alt:")
valueText: _rtlAltFinalFact.value == 0 ? qsTr("Land") : _rtlAltFinalFact.valueString
}
VehicleSummaryRow {
labelText: "Descent speed:"
labelText: qsTr("Descent speed:")
valueText: _landSpeedFact.valueString
}
}
......
......@@ -27,23 +27,23 @@ FactPanel {
anchors.margins: 8
VehicleSummaryRow {
labelText: "Throttle failsafe:"
valueText: _failsafeThrEnable.value != 0 ? _failsafeThrValue.valueString : "Disabled"
labelText: qsTr("Throttle failsafe:")
valueText: _failsafeThrEnable.value != 0 ? _failsafeThrValue.valueString : qsTr("Disabled")
}
VehicleSummaryRow {
labelText: "Voltage failsafe:"
valueText: _failsafeBattVoltage.value == 0 ? "Disabled" : _failsafeBattVoltage.valueString
labelText: qsTr("Voltage failsafe:")
valueText: _failsafeBattVoltage.value == 0 ? qsTr("Disabled") : _failsafeBattVoltage.valueString
}
VehicleSummaryRow {
labelText: "mAh failsafe:"
valueText: _failsafeBattMah.value == 0 ? "Disabled" : _failsafeBattMah.valueString
labelText: qsTr("mAh failsafe:")
valueText: _failsafeBattMah.value == 0 ? qsTr("Disabled") : _failsafeBattMah.valueString
}
VehicleSummaryRow {
labelText: "RTL min alt:"
valueText: _rtlAltFact.value < 0 ? "current" : _rtlAltFact.valueString
labelText: qsTr("RTL min alt:")
valueText: _rtlAltFact.value < 0 ? qsTr("current") : _rtlAltFact.valueString
}
}
}
......@@ -27,7 +27,7 @@ import QGroundControl.Controls 1.0
QGCLabel {
anchors.fill: parent
text: "Not supported"
text: qsTr("Not supported")
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
......@@ -135,7 +135,7 @@ QGCView {
onWaitingForCancelChanged: {
if (controller.waitingForCancel) {
showMessage("Calibration Cancel", "Waiting for Vehicle to response to Cancel. This may take a few seconds.", 0)
showMessage(qsTr("Calibration Cancel"), qsTr("Waiting for Vehicle to response to Cancel. This may take a few seconds."), 0)
} else {
hideDialog()
}
......@@ -143,7 +143,7 @@ QGCView {
onCalibrationComplete: {
if (preCalibrationDialogType == "accel") {
_postCalibrationDialogText = "Accelerometer calibration complete."
_postCalibrationDialogText = qsTr("Accelerometer calibration complete.")
_postCalibrationDialogParams = [ "INS_ACCSCAL_X", "INS_ACCSCAL_Y", "INS_ACCSCAL_Z",
"INS_ACC2SCAL_X", "INS_ACC2SCAL_Y", "INS_ACC2SCAL_Z",
"INS_ACC3SCAL_X", "INS_ACC3SCAL_Y", "INS_ACC3SCAL_Z",
......@@ -151,7 +151,7 @@ QGCView {
"INS_GYR2OFFS_X", "INS_GYR2OFFS_Y", "INS_GYR2OFFS_Z",
"INS_GYR3OFFS_X", "INS_GYR3OFFS_Y", "INS_GYR3OFFS_Z" ]
} else if (preCalibrationDialogType == "compass") {
_postCalibrationDialogText = "Compass calibration complete. "
_postCalibrationDialogText = qsTr("Compass calibration complete. ")
_postCalibrationDialogParams = [];
if (compass1Id.value > 0) {
if (!validCompassOffsets("COMPASS_OFS_")) {
......@@ -178,7 +178,7 @@ QGCView {
_postCalibrationDialogParams.push("COMPASS_OFS3_Z")
}
}
showDialog(postCalibrationDialogComponent, "Calibration complete", qgcView.showDialogDefaultWidth, StandardButton.Ok)
showDialog(postCalibrationDialogComponent, qsTr("Calibration complete"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
}
}
......@@ -204,7 +204,7 @@ QGCView {
anchors.left: parent.left
anchors.right: parent.right
wrapMode: Text.WordWrap
text: "Before calibrating make sure orientation settings are correct."
text: qsTr("Before calibrating make sure orientation settings are correct.")
}
Loader {
......@@ -236,7 +236,7 @@ QGCView {
id: showValues
anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: textLabel.bottom
text: "Show values"
text: qsTr("Show values")
}
QGCFlickable {
......@@ -270,7 +270,7 @@ QGCView {
Column {
QGCLabel {
font.pixelSize: sideBarH1PointSize
text: "Set Orientations"
text: qsTr("Set Orientations")
}
Item {
......@@ -291,7 +291,7 @@ QGCView {
// Board rotation
QGCLabel {
text: "Autopilot Orientation"
text: qsTr("Autopilot Orientation")
}
FactComboBox {
......@@ -308,7 +308,7 @@ QGCView {
// Compass 1 rotation
QGCLabel {
text: "Compass 1 Orientation"
text: qsTr("Compass 1 Orientation")
visible: showCompassRotations && showCompass1Rot
}
......@@ -326,7 +326,7 @@ QGCView {
// Compass 2 rotation
QGCLabel {
text: "Compass 2 Orientation"
text: qsTr("Compass 2 Orientation")
visible: showCompassRotations && showCompass2Rot
}
......@@ -344,7 +344,7 @@ QGCView {
// Compass 3 rotation
QGCLabel {
text: "Compass 3 Orientation"
text: qsTr("Compass 3 Orientation")
visible: showCompassRotations && showCompass3Rot
}
......@@ -367,50 +367,50 @@ QGCView {
readonly property int buttonWidth: ScreenTools.defaultFontPixelWidth * 15
QGCLabel { text: "Calibrate:"; anchors.baseline: compassButton.baseline }
QGCLabel { text: qsTr("Calibrate:"); anchors.baseline: compassButton.baseline }
IndicatorButton {
id: accelButton
width: parent.buttonWidth
text: "Accelerometer"
text: qsTr("Accelerometer")
indicatorGreen: !accelCalNeeded
onClicked: {
preCalibrationDialogType = "accel"
preCalibrationDialogHelp = accelHelp
showDialog(preCalibrationDialogComponent, "Calibrate Accelerometer", qgcView.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Ok)
showDialog(preCalibrationDialogComponent, qsTr("Calibrate Accelerometer"), qgcView.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Ok)
}
}
IndicatorButton {
id: compassButton
width: parent.buttonWidth
text: "Compass"
text: qsTr("Compass")
indicatorGreen: !compassCalNeeded
onClicked: {
if (controller.accelSetupNeeded) {
showMessage("Calibrate Compass", "Accelerometer must be calibrated prior to Compass.", StandardButton.Ok)
showMessage(qsTr("Calibrate Compass"), qsTr("Accelerometer must be calibrated prior to Compass."), StandardButton.Ok)
} else if (compass3Id.value != 0 && compass3Use.value !=0) {
showMessage("Unabled to calibrate", "Support for calibrating compass 3 is currently not supported by QGroundControl.", StandardButton.Ok)
showMessage(qsTr("Unabled to calibrate"), qsTr("Support for calibrating compass 3 is currently not supported by QGroundControl."), StandardButton.Ok)
} else {
preCalibrationDialogType = "compass"
preCalibrationDialogHelp = compassHelp
showDialog(preCalibrationDialogComponent, "Calibrate Compass", qgcView.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Ok)
showDialog(preCalibrationDialogComponent, qsTr("Calibrate Compass"), qgcView.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Ok)
}
}
}
QGCButton {
id: nextButton
text: "Next"
text: qsTr("Next")
enabled: false
onClicked: controller.nextClicked()
}
QGCButton {
id: cancelButton
text: "Cancel"
text: qsTr("Cancel")
enabled: false
onClicked: controller.cancelCalibration()
}
......@@ -474,42 +474,42 @@ QGCView {
visible: controller.orientationCalDownSideVisible
calValid: controller.orientationCalDownSideDone
calInProgress: controller.orientationCalDownSideInProgress
calInProgressText: controller.orientationCalDownSideRotate ? "Rotate" : "Hold Still"
calInProgressText: controller.orientationCalDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
imageSource: controller.orientationCalDownSideRotate ? "qrc:///qmlimages/VehicleDownRotate.png" : "qrc:///qmlimages/VehicleDown.png"
}
VehicleRotationCal {
visible: controller.orientationCalUpsideDownSideVisible
calValid: controller.orientationCalUpsideDownSideDone
calInProgress: controller.orientationCalUpsideDownSideInProgress
calInProgressText: controller.orientationCalUpsideDownSideRotate ? "Rotate" : "Hold Still"
calInProgressText: controller.orientationCalUpsideDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
imageSource: controller.orientationCalUpsideDownSideRotate ? "qrc:///qmlimages/VehicleUpsideDownRotate.png" : "qrc:///qmlimages/VehicleUpsideDown.png"
}
VehicleRotationCal {
visible: controller.orientationCalNoseDownSideVisible
calValid: controller.orientationCalNoseDownSideDone
calInProgress: controller.orientationCalNoseDownSideInProgress
calInProgressText: controller.orientationCalNoseDownSideRotate ? "Rotate" : "Hold Still"
calInProgressText: controller.orientationCalNoseDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
imageSource: controller.orientationCalNoseDownSideRotate ? "qrc:///qmlimages/VehicleNoseDownRotate.png" : "qrc:///qmlimages/VehicleNoseDown.png"
}
VehicleRotationCal {
visible: controller.orientationCalTailDownSideVisible
calValid: controller.orientationCalTailDownSideDone
calInProgress: controller.orientationCalTailDownSideInProgress
calInProgressText: controller.orientationCalTailDownSideRotate ? "Rotate" : "Hold Still"
calInProgressText: controller.orientationCalTailDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
imageSource: controller.orientationCalTailDownSideRotate ? "qrc:///qmlimages/VehicleTailDownRotate.png" : "qrc:///qmlimages/VehicleTailDown.png"
}
VehicleRotationCal {
visible: controller.orientationCalLeftSideVisible
calValid: controller.orientationCalLeftSideDone
calInProgress: controller.orientationCalLeftSideInProgress
calInProgressText: controller.orientationCalLeftSideRotate ? "Rotate" : "Hold Still"
calInProgressText: controller.orientationCalLeftSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
imageSource: controller.orientationCalLeftSideRotate ? "qrc:///qmlimages/VehicleLeftRotate.png" : "qrc:///qmlimages/VehicleLeft.png"
}
VehicleRotationCal {
visible: controller.orientationCalRightSideVisible
calValid: controller.orientationCalRightSideDone
calInProgress: controller.orientationCalRightSideInProgress
calInProgressText: controller.orientationCalRightSideRotate ? "Rotate" : "Hold Still"
calInProgressText: controller.orientationCalRightSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
imageSource: controller.orientationCalRightSideRotate ? "qrc:///qmlimages/VehicleRightRotate.png" : "qrc:///qmlimages/VehicleRight.png"
}
}
......
......@@ -49,26 +49,26 @@ FactPanel {
anchors.margins: 8
VehicleSummaryRow {
labelText: "Compass 1:"
labelText: qsTr("Compass 1:")
visible: compass1Available
valueText: compass1Calibrated ? "Ready" : "Setup required"
valueText: compass1Calibrated ? qsTr("Ready") : qsTr("Setup required")
}
VehicleSummaryRow {
labelText: "Compass 2:"
labelText: qsTr("Compass 2:")
visible: compass2Available
valueText: compass2Calibrated ? "Ready" : "Setup required"
valueText: compass2Calibrated ? qsTr("Ready") : qsTr("Setup required")
}
VehicleSummaryRow {
labelText: "Compass 3:"
labelText: qsTr("Compass 3:")
visible: compass3Available
valueText: compass3Calibrated ? "Ready" : "Setup required"
valueText: compass3Calibrated ? qsTr("Ready") : qsTr("Setup required")
}
VehicleSummaryRow {
labelText: "Accelerometer:"
valueText: controller.accelSetupNeeded ? "Setup required" : "Ready"
labelText: qsTr("Accelerometer:")
valueText: controller.accelSetupNeeded ? qsTr("Setup required") : qsTr("Ready")
}
}
}
......@@ -134,7 +134,7 @@ QGCView {
QGCLabel {
id: basicLabel
text: "Basic Tuning"
text: qsTr("Basic Tuning")
font.weight: Font.DemiBold
}
......@@ -160,12 +160,12 @@ QGCView {
anchors.right: parent.right
QGCLabel {
text: "Throttle Hover"
text: qsTr("Throttle Hover")
font.weight: Font.DemiBold
}
QGCLabel {
text: "How much throttle is needed to maintain a steady hover"
text: qsTr("How much throttle is needed to maintain a steady hover")
}
Slider {
......@@ -190,12 +190,12 @@ QGCView {
anchors.right: parent.right
QGCLabel {
text: "Roll/Pitch Sensitivity"
text: qsTr("Roll/Pitch Sensitivity")
font.weight: Font.DemiBold
}
QGCLabel {
text: "Slide to the right if the copter is sluggish or slide to the left if the copter is twitchy"
text: qsTr("Slide to the right if the copter is sluggish or slide to the left if the copter is twitchy")
}
Slider {
......@@ -223,12 +223,12 @@ QGCView {
anchors.right: parent.right
QGCLabel {
text: "Climb Sensitivity"
text: qsTr("Climb Sensitivity")
font.weight: Font.DemiBold
}
QGCLabel {
text: "Slide to the right to climb more aggressively or slide to the left to climb more gently"
text: qsTr("Slide to the right to climb more aggressively or slide to the left to climb more gently")
}
Slider {
......@@ -255,12 +255,12 @@ QGCView {
anchors.right: parent.right
QGCLabel {
text: "RC Roll/Pitch Feel"
text: qsTr("RC Roll/Pitch Feel")
font.weight: Font.DemiBold
}
QGCLabel {
text: "Slide to the left for soft control, slide to the right for crisp control"
text: qsTr("Slide to the left for soft control, slide to the right for crisp control")
}
Slider {
......@@ -286,7 +286,7 @@ QGCView {
id: autoTuneLabel
anchors.topMargin: _margins
anchors.top: basicTuningRect.bottom
text: "AutoTune"
text: qsTr("AutoTune")
font.weight: Font.DemiBold
}
......@@ -309,7 +309,7 @@ QGCView {
Row {
spacing: _margins
QGCLabel { text: "Axes to AutoTune:" }
QGCLabel { text: qsTr("Axes to AutoTune:") }
FactBitmask { fact: _autoTuneAxes }
}
......@@ -318,13 +318,13 @@ QGCView {
QGCLabel {
anchors.baseline: autoTuneChannelCombo.baseline
text: "Channel for AutoTune switch:"
text: qsTr("Channel for AutoTune switch:")
}
QGCComboBox {
id: autoTuneChannelCombo
width: ScreenTools.defaultFontPixelWidth * 14
model: ["None", "Channel 7", "Channel 8", "Channel 9", "Channel 10", "Channel 11", "Channel 12" ]
model: [qsTr("None"), qsTr("Channel 7"), qsTr("Channel 8"), qsTr("Channel 9"), qsTr("Channel 10"), qsTr("Channel 11"), qsTr("Channel 12") ]
currentIndex: _autoTuneSwitchChannelIndex
onActivated: {
......
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