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 { @@ -138,7 +138,7 @@ AnalyzePage {
}
}
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
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter

2
src/AnalyzeView/MavlinkConsolePage.qml

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

4
src/AutoPilotPlugins/APM/APMCameraSubComponent.qml

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

2
src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml

@ -31,7 +31,7 @@ Item { @@ -31,7 +31,7 @@ Item {
}
VehicleSummaryRow {
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 {
labelText: qsTr("WiFi Channel")

4
src/AutoPilotPlugins/Common/SyslinkComponent.qml

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

2
src/AutoPilotPlugins/PX4/CameraComponentSummary.qml

@ -52,7 +52,7 @@ Item { @@ -52,7 +52,7 @@ Item {
VehicleSummaryRow {
visible: _camTriggerPol
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 { @@ -77,7 +77,7 @@ SetupPage {
QGCLabel {
visible: _sys_vehicle_resp && _sys_vehicle_resp.value > 0.8
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 { @@ -186,7 +186,7 @@ Item {
} // Row - Settings
QGCButton {
text: "Use Multi Channel Mode Selection"
text: qsTr("Use Multi Channel Mode Selection")
onClicked: {
controller.getParameterFact(-1, "RC_MAP_MODE_SW").value = 5
controller.getParameterFact(-1, "RC_MAP_FLTMODE").value = 0

2
src/FactSystem/FactControls/FactTextFieldSlider.qml

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

14
src/FlightDisplay/MultiVehicleList.qml

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

4
src/MissionManager/MissionSettingsItem.h

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

8
src/PlanView/PlanToolBarIndicators.qml

@ -58,13 +58,13 @@ Item { @@ -58,13 +58,13 @@ Item {
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 _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 _headingText: isNaN(_azimuth) ? "-.-" : Math.round(_heading) % 360
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 _batteryChangePointText: _batteryChangePoint < 0 ? "N/A" : _batteryChangePoint
property string _batteriesRequiredText: _batteriesRequired < 0 ? "N/A" : _batteriesRequired
property string _batteryChangePointText: _batteryChangePoint < 0 ? qsTr("N/A") : _batteryChangePoint
property string _batteriesRequiredText: _batteriesRequired < 0 ? qsTr("N/A") : _batteriesRequired
readonly property real _margins: ScreenTools.defaultFontPixelWidth
@ -115,7 +115,7 @@ Item { @@ -115,7 +115,7 @@ Item {
font.pointSize: ScreenTools.largeFontPointSize
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: "Done"
text: qsTr("Done")
visible: false
}

2
src/QmlControls/HeightIndicator.qml

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

2
src/QmlControls/PIDTuning.qml

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

4
src/QmlControls/ParameterEditorDialog.qml

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

4
src/QmlControls/RCChannelMonitor.qml

@ -79,7 +79,7 @@ Item { @@ -79,7 +79,7 @@ Item {
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: "Not Mapped"
text: qsTr("Not Mapped")
visible: !mapped
}
@ -101,7 +101,7 @@ Item { @@ -101,7 +101,7 @@ Item {
QGCLabel {
Layout.columnSpan: parent.columns
text: "Channel Monitor"
text: qsTr("Channel Monitor")
}
Connections {

2
src/QtLocationPlugin/QMLControl/OfflineMap.qml

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

10
src/VehicleSetup/FirmwareUpgrade.qml

@ -46,11 +46,11 @@ SetupPage { @@ -46,11 +46,11 @@ SetupPage {
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 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 flashFailText: "If upgrade failed, make sure to connect " + highlightPrefix + "directly" + highlightSuffix + " 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 + "."
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 qgcUnplugText2: highlightPrefix + "<big>Please unplug your Pixhawk and/or Radio from USB.</big>" + highlightSuffix
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: 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. ") +
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 + qsTr(" disconnected ") + highlightSuffix + qsTr("prior to firmware upgrade.")
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 _defaultFimwareTypeAPM: 3

22
src/ui/preferences/MavlinkSettings.qml

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

4
src/ui/toolbar/JoystickIndicator.qml

@ -58,12 +58,12 @@ Item { @@ -58,12 +58,12 @@ Item {
QGCLabel { text: qsTr("Connected:") }
QGCLabel {
text: joystickManager.activeJoystick ? "Yes" : "No"
text: joystickManager.activeJoystick ? qsTr("Yes") : qsTr("No")
color: joystickManager.activeJoystick ? qgcPal.buttonText : "red"
}
QGCLabel { text: qsTr("Enabled:") }
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"
}
}

Loading…
Cancel
Save