Browse Source

Support for various languages

QGC4.4
murata 4 years ago committed by Don Gagne
parent
commit
d034e538cb
  1. 2
      src/AnalyzeView/GeoTagPage.qml
  2. 2
      src/AnalyzeView/MavlinkConsolePage.qml
  3. 4
      src/AutoPilotPlugins/APM/APMCameraSubComponent.qml
  4. 2
      src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml
  5. 4
      src/AutoPilotPlugins/Common/SyslinkComponent.qml
  6. 2
      src/AutoPilotPlugins/PX4/CameraComponentSummary.qml
  7. 2
      src/AutoPilotPlugins/PX4/PX4FlightBehaviorCopter.qml
  8. 2
      src/AutoPilotPlugins/PX4/PX4SimpleFlightModes.qml
  9. 2
      src/FactSystem/FactControls/FactTextFieldSlider.qml
  10. 14
      src/FlightDisplay/MultiVehicleList.qml
  11. 4
      src/MissionManager/MissionSettingsItem.h
  12. 8
      src/PlanView/PlanToolBarIndicators.qml
  13. 2
      src/QmlControls/HeightIndicator.qml
  14. 2
      src/QmlControls/PIDTuning.qml
  15. 4
      src/QmlControls/ParameterEditorDialog.qml
  16. 4
      src/QmlControls/RCChannelMonitor.qml
  17. 2
      src/QtLocationPlugin/QMLControl/OfflineMap.qml
  18. 10
      src/VehicleSetup/FirmwareUpgrade.qml
  19. 22
      src/ui/preferences/MavlinkSettings.qml
  20. 4
      src/ui/toolbar/JoystickIndicator.qml

2
src/AnalyzeView/GeoTagPage.qml

@ -138,7 +138,7 @@ AnalyzePage {
} }
} }
QGCLabel { QGCLabel {
text: geoController.saveDirectory === "" ? (geoController.imageDirectory === "" ? "/TAGGED folder in your image folder" : geoController.imageDirectory + "/TAGGED") : geoController.saveDirectory text: geoController.saveDirectory === "" ? (geoController.imageDirectory === "" ? qsTr("/TAGGED folder in your image folder") : geoController.imageDirectory + qsTr("/TAGGED")) : geoController.saveDirectory
elide: Text.ElideLeft elide: Text.ElideLeft
Layout.fillWidth: true Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter

2
src/AnalyzeView/MavlinkConsolePage.qml

@ -274,7 +274,7 @@ AnalyzePage {
QGCTextField { QGCTextField {
id: commandInput id: commandInput
Layout.fillWidth: true Layout.fillWidth: true
placeholderText: "Enter Commands here..." placeholderText: qsTr("Enter Commands here...")
inputMethodHints: Qt.ImhNoAutoUppercase inputMethodHints: Qt.ImhNoAutoUppercase
function sendCommand() { function sendCommand() {

4
src/AutoPilotPlugins/APM/APMCameraSubComponent.qml

@ -195,12 +195,12 @@ SetupPage {
QGCCheckBox { QGCCheckBox {
id: _allVisible id: _allVisible
text: "Show all settings (advanced)" text: qsTr("Show all settings (advanced)")
} }
QGCLabel { QGCLabel {
visible: !_oldFW visible: !_oldFW
text: "Camera mount tilt speed:" text: qsTr("Camera mount tilt speed:")
font.family: ScreenTools.demiboldFontFamily font.family: ScreenTools.demiboldFontFamily
} }

2
src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml

@ -31,7 +31,7 @@ Item {
} }
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("WiFi Mode") labelText: qsTr("WiFi Mode")
valueText: wifiMode ? (wifiMode.value === 0 ? "AP Mode" : "Station Mode") : "AP Mode" valueText: wifiMode ? (wifiMode.value === 0 ? qsTr("AP Mode") : qsTr("Station Mode")) : qsTr("AP Mode")
} }
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("WiFi Channel") labelText: qsTr("WiFi Channel")

4
src/AutoPilotPlugins/Common/SyslinkComponent.qml

@ -103,7 +103,7 @@ SetupPage {
Layout.fillWidth: true Layout.fillWidth: true
font.pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: "Address in hex. Default is E7E7E7E7E7." text: qsTr("Address in hex. Default is E7E7E7E7E7.")
} }
@ -123,7 +123,7 @@ SetupPage {
} }
QGCButton { QGCButton {
text: "Restore Defaults" text: qsTr("Restore Defaults")
width: textEditWidth width: textEditWidth
onClicked: { onClicked: {
controller.resetDefaults() controller.resetDefaults()

2
src/AutoPilotPlugins/PX4/CameraComponentSummary.qml

@ -52,7 +52,7 @@ Item {
VehicleSummaryRow { VehicleSummaryRow {
visible: _camTriggerPol visible: _camTriggerPol
labelText: qsTr("AUX pin polarity") labelText: qsTr("AUX pin polarity")
valueText: _camTriggerPol ? (_camTriggerPol.value ? "High (3.3V)" : "Low (0V)") : "" valueText: _camTriggerPol ? (_camTriggerPol.value ? qsTr("High (3.3V)") : qsTr("Low (0V)")) : ""
} }
} }

2
src/AutoPilotPlugins/PX4/PX4FlightBehaviorCopter.qml

@ -77,7 +77,7 @@ SetupPage {
QGCLabel { QGCLabel {
visible: _sys_vehicle_resp && _sys_vehicle_resp.value > 0.8 visible: _sys_vehicle_resp && _sys_vehicle_resp.value > 0.8
color: qgcPal.warningText color: qgcPal.warningText
text: "Warning: a high responsiveness requires a vehicle with large thrust-to-weight ratio. The vehicle might lose altitude otherwise." text: qsTr("Warning: a high responsiveness requires a vehicle with large thrust-to-weight ratio. The vehicle might lose altitude otherwise.")
} }
} }

2
src/AutoPilotPlugins/PX4/PX4SimpleFlightModes.qml

@ -186,7 +186,7 @@ Item {
} // Row - Settings } // Row - Settings
QGCButton { QGCButton {
text: "Use Multi Channel Mode Selection" text: qsTr("Use Multi Channel Mode Selection")
onClicked: { onClicked: {
controller.getParameterFact(-1, "RC_MAP_MODE_SW").value = 5 controller.getParameterFact(-1, "RC_MAP_MODE_SW").value = 5
controller.getParameterFact(-1, "RC_MAP_FLTMODE").value = 0 controller.getParameterFact(-1, "RC_MAP_FLTMODE").value = 0

2
src/FactSystem/FactControls/FactTextFieldSlider.qml

@ -62,7 +62,7 @@ Row {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
QGCLabel { QGCLabel {
text: "Value: " text: qsTr("Value: ")
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }

14
src/FlightDisplay/MultiVehicleList.qml

@ -61,12 +61,12 @@ Item {
spacing: _margin spacing: _margin
QGCButton { QGCButton {
text: "Pause" text: qsTr("Pause")
onClicked: _guidedController.confirmAction(_guidedController.actionMVPause) onClicked: _guidedController.confirmAction(_guidedController.actionMVPause)
} }
QGCButton { QGCButton {
text: "Start Mission" text: qsTr("Start Mission")
onClicked: _guidedController.confirmAction(_guidedController.actionMVStartMission) onClicked: _guidedController.confirmAction(_guidedController.actionMVStartMission)
} }
} }
@ -148,31 +148,31 @@ Item {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
QGCButton { QGCButton {
text: "Arm" text: qsTr("Arm")
visible: _vehicle && !_vehicle.armed visible: _vehicle && !_vehicle.armed
onClicked: _vehicle.armed = true onClicked: _vehicle.armed = true
} }
QGCButton { QGCButton {
text: "Start Mission" text: qsTr("Start Mission")
visible: _vehicle && _vehicle.armed && _vehicle.flightMode !== _vehicle.missionFlightMode visible: _vehicle && _vehicle.armed && _vehicle.flightMode !== _vehicle.missionFlightMode
onClicked: _vehicle.startMission() onClicked: _vehicle.startMission()
} }
QGCButton { QGCButton {
text: "Pause" text: qsTr("Pause")
visible: _vehicle && _vehicle.armed && _vehicle.pauseVehicleSupported visible: _vehicle && _vehicle.armed && _vehicle.pauseVehicleSupported
onClicked: _vehicle.pauseVehicle() onClicked: _vehicle.pauseVehicle()
} }
QGCButton { QGCButton {
text: "RTL" text: qsTr("RTL")
visible: _vehicle && _vehicle.armed && _vehicle.flightMode !== _vehicle.rtlFlightMode visible: _vehicle && _vehicle.armed && _vehicle.flightMode !== _vehicle.rtlFlightMode
onClicked: _vehicle.flightMode = _vehicle.rtlFlightMode onClicked: _vehicle.flightMode = _vehicle.rtlFlightMode
} }
QGCButton { QGCButton {
text: "Take control" text: qsTr("Take control")
visible: _vehicle && _vehicle.armed && _vehicle.flightMode !== _vehicle.takeControlFlightMode visible: _vehicle && _vehicle.armed && _vehicle.flightMode !== _vehicle.takeControlFlightMode
onClicked: _vehicle.flightMode = _vehicle.takeControlFlightMode onClicked: _vehicle.flightMode = _vehicle.takeControlFlightMode
} }

4
src/MissionManager/MissionSettingsItem.h

@ -71,8 +71,8 @@ public:
bool isStandaloneCoordinate (void) const final { return false; } bool isStandaloneCoordinate (void) const final { return false; }
bool specifiesCoordinate (void) const final; bool specifiesCoordinate (void) const final;
bool specifiesAltitudeOnly (void) const final { return false; } bool specifiesAltitudeOnly (void) const final { return false; }
QString commandDescription (void) const final { return "Mission Start"; } QString commandDescription (void) const final { return tr("Mission Start"); }
QString commandName (void) const final { return "Mission Start"; } QString commandName (void) const final { return tr("Mission Start"); }
QString abbreviation (void) const final; QString abbreviation (void) const final;
QGeoCoordinate coordinate (void) const final { return _plannedHomePositionCoordinate; } // Includes altitude QGeoCoordinate coordinate (void) const final { return _plannedHomePositionCoordinate; } // Includes altitude
QGeoCoordinate exitCoordinate (void) const final { return _plannedHomePositionCoordinate; } QGeoCoordinate exitCoordinate (void) const final { return _plannedHomePositionCoordinate; }

8
src/PlanView/PlanToolBarIndicators.qml

@ -58,13 +58,13 @@ Item {
property string _distanceText: isNaN(_distance) ? "-.-" : QGroundControl.unitsConversion.metersToAppSettingsHorizontalDistanceUnits(_distance).toFixed(1) + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString property string _distanceText: isNaN(_distance) ? "-.-" : QGroundControl.unitsConversion.metersToAppSettingsHorizontalDistanceUnits(_distance).toFixed(1) + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString
property string _altDifferenceText: isNaN(_altDifference) ? "-.-" : QGroundControl.unitsConversion.metersToAppSettingsHorizontalDistanceUnits(_altDifference).toFixed(1) + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString property string _altDifferenceText: isNaN(_altDifference) ? "-.-" : QGroundControl.unitsConversion.metersToAppSettingsHorizontalDistanceUnits(_altDifference).toFixed(1) + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString
property string _gradientText: isNaN(_gradient) ? "-.-" : _gradient.toFixed(0) + " deg" property string _gradientText: isNaN(_gradient) ? "-.-" : _gradient.toFixed(0) + qsTr(" deg")
property string _azimuthText: isNaN(_azimuth) ? "-.-" : Math.round(_azimuth) % 360 property string _azimuthText: isNaN(_azimuth) ? "-.-" : Math.round(_azimuth) % 360
property string _headingText: isNaN(_azimuth) ? "-.-" : Math.round(_heading) % 360 property string _headingText: isNaN(_azimuth) ? "-.-" : Math.round(_heading) % 360
property string _missionDistanceText: isNaN(_missionDistance) ? "-.-" : QGroundControl.unitsConversion.metersToAppSettingsHorizontalDistanceUnits(_missionDistance).toFixed(0) + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString property string _missionDistanceText: isNaN(_missionDistance) ? "-.-" : QGroundControl.unitsConversion.metersToAppSettingsHorizontalDistanceUnits(_missionDistance).toFixed(0) + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString
property string _missionMaxTelemetryText: isNaN(_missionMaxTelemetry) ? "-.-" : QGroundControl.unitsConversion.metersToAppSettingsHorizontalDistanceUnits(_missionMaxTelemetry).toFixed(0) + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString property string _missionMaxTelemetryText: isNaN(_missionMaxTelemetry) ? "-.-" : QGroundControl.unitsConversion.metersToAppSettingsHorizontalDistanceUnits(_missionMaxTelemetry).toFixed(0) + " " + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString
property string _batteryChangePointText: _batteryChangePoint < 0 ? "N/A" : _batteryChangePoint property string _batteryChangePointText: _batteryChangePoint < 0 ? qsTr("N/A") : _batteryChangePoint
property string _batteriesRequiredText: _batteriesRequired < 0 ? "N/A" : _batteriesRequired property string _batteriesRequiredText: _batteriesRequired < 0 ? qsTr("N/A") : _batteriesRequired
readonly property real _margins: ScreenTools.defaultFontPixelWidth readonly property real _margins: ScreenTools.defaultFontPixelWidth
@ -115,7 +115,7 @@ Item {
font.pointSize: ScreenTools.largeFontPointSize font.pointSize: ScreenTools.largeFontPointSize
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
text: "Done" text: qsTr("Done")
visible: false visible: false
} }

2
src/QmlControls/HeightIndicator.qml

@ -10,7 +10,7 @@ ColumnLayout {
spacing: 0 spacing: 0
property var map property var map
property string heightText: "30 ft" property string heightText: qsTr("30 ft")
property color _textColor: _mapPalette.text property color _textColor: _mapPalette.text

2
src/QmlControls/PIDTuning.qml

@ -117,7 +117,7 @@ RowLayout {
min: 0 min: 0
max: 0 max: 0
labelFormat: "%.2f" labelFormat: "%.2f"
titleText: "sec" titleText: qsTr("sec")
tickCount: 11 tickCount: 11
} }

4
src/QmlControls/ParameterEditorDialog.qml

@ -228,12 +228,12 @@ QGCViewDialog {
QGCLabel { QGCLabel {
visible: fact.vehicleRebootRequired visible: fact.vehicleRebootRequired
text: "Vehicle reboot required after change" text: qsTr("Vehicle reboot required after change")
} }
QGCLabel { QGCLabel {
visible: fact.qgcRebootRequired visible: fact.qgcRebootRequired
text: "Application restart required after change" text: qsTr("Application restart required after change")
} }
QGCLabel { QGCLabel {

4
src/QmlControls/RCChannelMonitor.qml

@ -79,7 +79,7 @@ Item {
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
} }
@ -101,7 +101,7 @@ Item {
QGCLabel { QGCLabel {
Layout.columnSpan: parent.columns Layout.columnSpan: parent.columns
text: "Channel Monitor" text: qsTr("Channel Monitor")
} }
Connections { Connections {

2
src/QtLocationPlugin/QMLControl/OfflineMap.qml

@ -647,7 +647,7 @@ Item {
spacing: _margins spacing: _margins
QGCButton { QGCButton {
text: "Show zoom previews" text: qsTr("Show zoom previews")
visible: !_showPreview visible: !_showPreview
onClicked: _showPreview = !_showPreview onClicked: _showPreview = !_showPreview
} }

10
src/VehicleSetup/FirmwareUpgrade.qml

@ -46,11 +46,11 @@ SetupPage {
readonly property string highlightSuffix: "</font>" readonly property string highlightSuffix: "</font>"
readonly property string welcomeText: qsTr("%1 can upgrade the firmware on Pixhawk devices, SiK Radios and PX4 Flow Smart Cameras.").arg(QGroundControl.appName) readonly property string welcomeText: qsTr("%1 can upgrade the firmware on Pixhawk devices, SiK Radios and PX4 Flow Smart Cameras.").arg(QGroundControl.appName)
readonly property string welcomeTextSingle: qsTr("Update the autopilot firmware to the latest version") readonly property string welcomeTextSingle: qsTr("Update the autopilot firmware to the latest version")
readonly property string plugInText: "<big>" + highlightPrefix + "Plug in your device" + highlightSuffix + " via USB to " + highlightPrefix + "start" + highlightSuffix + " firmware upgrade.</big>" readonly property string plugInText: "<big>" + highlightPrefix + qsTr("Plug in your device") + highlightSuffix + qsTr(" via USB to ") + highlightPrefix + qsTr("start") + highlightSuffix + qsTr(" firmware upgrade.") + "</big>"
readonly property string flashFailText: "If upgrade failed, make sure to connect " + highlightPrefix + "directly" + highlightSuffix + " to a powered USB port on your computer, not through a USB hub. " + readonly property string flashFailText: qsTr("If upgrade failed, make sure to connect ") + highlightPrefix + qsTr("directly") + highlightSuffix + qsTr(" to a powered USB port on your computer, not through a USB hub. ") +
"Also make sure you are only powered via USB " + highlightPrefix + "not battery" + highlightSuffix + "." qsTr("Also make sure you are only powered via USB ") + highlightPrefix + qsTr("not battery") + highlightSuffix + "."
readonly property string qgcUnplugText1: qsTr("All %1 connections to vehicles must be ").arg(QGroundControl.appName) + highlightPrefix + " disconnected " + highlightSuffix + "prior to firmware upgrade." readonly property string qgcUnplugText1: qsTr("All %1 connections to vehicles must be ").arg(QGroundControl.appName) + highlightPrefix + qsTr(" disconnected ") + highlightSuffix + qsTr("prior to firmware upgrade.")
readonly property string qgcUnplugText2: highlightPrefix + "<big>Please unplug your Pixhawk and/or Radio from USB.</big>" + highlightSuffix readonly property string qgcUnplugText2: highlightPrefix + "<big>" + qsTr("Please unplug your Pixhawk and/or Radio from USB.") + "</big>" + highlightSuffix
readonly property int _defaultFimwareTypePX4: 12 readonly property int _defaultFimwareTypePX4: 12
readonly property int _defaultFimwareTypeAPM: 3 readonly property int _defaultFimwareTypeAPM: 3

22
src/ui/preferences/MavlinkSettings.qml

@ -546,11 +546,11 @@ Rectangle {
textRole: "text" textRole: "text"
model: ListModel { model: ListModel {
id: windItems id: windItems
ListElement { text: "Please Select"; value: -1 } ListElement { text: qsTr("Please Select"); value: -1 }
ListElement { text: "Calm"; value: 0 } ListElement { text: qsTr("Calm"); value: 0 }
ListElement { text: "Breeze"; value: 5 } ListElement { text: qsTr("Breeze"); value: 5 }
ListElement { text: "Gale"; value: 8 } ListElement { text: qsTr("Gale"); value: 8 }
ListElement { text: "Storm"; value: 10 } ListElement { text: qsTr("Storm"); value: 10 }
} }
onActivated: { onActivated: {
saveItems(); saveItems();
@ -584,12 +584,12 @@ Rectangle {
textRole: "text" textRole: "text"
model: ListModel { model: ListModel {
id: ratingItems id: ratingItems
ListElement { text: "Please Select"; value: "notset"} ListElement { text: qsTr("Please Select"); value: "notset"}
ListElement { text: "Crashed (Pilot Error)"; value: "crash_pilot" } ListElement { text: qsTr("Crashed (Pilot Error)"); value: "crash_pilot" }
ListElement { text: "Crashed (Software or Hardware issue)"; value: "crash_sw_hw" } ListElement { text: qsTr("Crashed (Software or Hardware issue)"); value: "crash_sw_hw" }
ListElement { text: "Unsatisfactory"; value: "unsatisfactory" } ListElement { text: qsTr("Unsatisfactory"); value: "unsatisfactory" }
ListElement { text: "Good"; value: "good" } ListElement { text: qsTr("Good"); value: "good" }
ListElement { text: "Great"; value: "great" } ListElement { text: qsTr("Great"); value: "great" }
} }
onActivated: { onActivated: {
saveItems(); saveItems();

4
src/ui/toolbar/JoystickIndicator.qml

@ -58,12 +58,12 @@ Item {
QGCLabel { text: qsTr("Connected:") } QGCLabel { text: qsTr("Connected:") }
QGCLabel { QGCLabel {
text: joystickManager.activeJoystick ? "Yes" : "No" text: joystickManager.activeJoystick ? qsTr("Yes") : qsTr("No")
color: joystickManager.activeJoystick ? qgcPal.buttonText : "red" color: joystickManager.activeJoystick ? qgcPal.buttonText : "red"
} }
QGCLabel { text: qsTr("Enabled:") } QGCLabel { text: qsTr("Enabled:") }
QGCLabel { QGCLabel {
text: globals.activeVehicle && globals.activeVehicle.joystickEnabled ? "Yes" : "No" text: globals.activeVehicle && globals.activeVehicle.joystickEnabled ? qsTr("Yes") : qsTr("No")
color: globals.activeVehicle && globals.activeVehicle.joystickEnabled ? qgcPal.buttonText : "red" color: globals.activeVehicle && globals.activeVehicle.joystickEnabled ? qgcPal.buttonText : "red"
} }
} }

Loading…
Cancel
Save