Commit 60a6a31f authored by Tomaz Canabrava's avatar Tomaz Canabrava

Random additions to the qml qsTr calls

Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent c20c359f
...@@ -60,7 +60,7 @@ QGCFlickable { ...@@ -60,7 +60,7 @@ QGCFlickable {
QGCLabel { QGCLabel {
id: title id: title
color: textColor color: textColor
text: "Vibe" text: qsTr("Vibe")
anchors.horizontalCenter: barRow.horizontalCenter anchors.horizontalCenter: barRow.horizontalCenter
} }
...@@ -84,7 +84,7 @@ QGCFlickable { ...@@ -84,7 +84,7 @@ QGCFlickable {
QGCLabel { QGCLabel {
id: xBarLabel id: xBarLabel
color: textColor color: textColor
text: "X" text: qsTr("X")
anchors.horizontalCenter: xBar.horizontalCenter anchors.horizontalCenter: xBar.horizontalCenter
} }
} }
...@@ -102,7 +102,7 @@ QGCFlickable { ...@@ -102,7 +102,7 @@ QGCFlickable {
QGCLabel { QGCLabel {
anchors.horizontalCenter: yBar.horizontalCenter anchors.horizontalCenter: yBar.horizontalCenter
color: textColor color: textColor
text: "Y" text: qsTr("Y")
} }
} }
...@@ -119,7 +119,7 @@ QGCFlickable { ...@@ -119,7 +119,7 @@ QGCFlickable {
QGCLabel { QGCLabel {
anchors.horizontalCenter: zBar.horizontalCenter anchors.horizontalCenter: zBar.horizontalCenter
color: textColor color: textColor
text: "Z" text: qsTr("Z")
} }
} }
} // Row } // Row
...@@ -141,7 +141,7 @@ QGCFlickable { ...@@ -141,7 +141,7 @@ QGCFlickable {
anchors.left: barRow.right anchors.left: barRow.right
anchors.right: parent.right anchors.right: parent.right
color: textColor color: textColor
text: "Clip count" text: qsTr("Clip count")
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
...@@ -151,17 +151,17 @@ QGCFlickable { ...@@ -151,17 +151,17 @@ QGCFlickable {
anchors.horizontalCenter: clipLabel.horizontalCenter anchors.horizontalCenter: clipLabel.horizontalCenter
QGCLabel { QGCLabel {
text: "Accel 1: " + (_activeVehicle ? _activeVehicle.vibration.clipCount1.valueString : "") text: qsTr("Accel 1: ") + (_activeVehicle ? _activeVehicle.vibration.clipCount1.valueString : "")
color: textColor color: textColor
} }
QGCLabel { QGCLabel {
text: "Accel 2: " + (_activeVehicle ? _activeVehicle.vibration.clipCount2.valueString : "") text: qsTr("Accel 2: ") + (_activeVehicle ? _activeVehicle.vibration.clipCount2.valueString : "")
color: textColor color: textColor
} }
QGCLabel { QGCLabel {
text: "Accel 2: " + (_activeVehicle ? _activeVehicle.vibration.clipCount3.valueString : "") text: qsTr("Accel 2: ") + (_activeVehicle ? _activeVehicle.vibration.clipCount3.valueString : "")
color: textColor color: textColor
} }
} }
...@@ -175,7 +175,7 @@ QGCFlickable { ...@@ -175,7 +175,7 @@ QGCFlickable {
QGCLabel { QGCLabel {
anchors.fill: parent anchors.fill: parent
text: "Not Available" text: qsTr("Not Available")
color: textColor color: textColor
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
......
...@@ -90,7 +90,7 @@ QGCView { ...@@ -90,7 +90,7 @@ QGCView {
function loadFromFile() { function loadFromFile() {
if (ScreenTools.isMobile) { if (ScreenTools.isMobile) {
_root.showDialog(mobileFilePicker, "Select Mission File", _root.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel) _root.showDialog(mobileFilePicker, qsTr("Select Mission File"), _root.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel)
} else { } else {
controller.loadMissionFromFilePicker() controller.loadMissionFromFilePicker()
fitViewportToMissionItems() fitViewportToMissionItems()
...@@ -99,7 +99,7 @@ QGCView { ...@@ -99,7 +99,7 @@ QGCView {
function saveToFile() { function saveToFile() {
if (ScreenTools.isMobile) { if (ScreenTools.isMobile) {
_root.showDialog(mobileFileSaver, "Save Mission File", _root.showDialogDefaultWidth, StandardButton.Save | StandardButton.Cancel) _root.showDialog(mobileFileSaver, qsTr("Save Mission File"), _root.showDialogDefaultWidth, StandardButton.Save | StandardButton.Cancel)
} else { } else {
controller.saveMissionToFilePicker() controller.saveMissionToFilePicker()
} }
...@@ -238,7 +238,7 @@ QGCView { ...@@ -238,7 +238,7 @@ QGCView {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: "Move the selected mission item to the be after following mission item:" text: qsTr("Move the selected mission item to the be after following mission item:")
} }
QGCComboBox { QGCComboBox {
...@@ -585,13 +585,13 @@ QGCView { ...@@ -585,13 +585,13 @@ QGCView {
dropDownComponent: Component { dropDownComponent: Component {
Column { Column {
QGCLabel { text: "Center map:" } QGCLabel { text: qsTr("Center map:") }
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
QGCButton { QGCButton {
text: "Home" text: qsTr("Home")
onClicked: { onClicked: {
centerMapButton.hideDropDown() centerMapButton.hideDropDown()
...@@ -600,7 +600,7 @@ QGCView { ...@@ -600,7 +600,7 @@ QGCView {
} }
QGCButton { QGCButton {
text: "Mission" text: qsTr("Mission")
onClicked: { onClicked: {
centerMapButton.hideDropDown() centerMapButton.hideDropDown()
...@@ -609,7 +609,7 @@ QGCView { ...@@ -609,7 +609,7 @@ QGCView {
} }
QGCButton { QGCButton {
text: "Vehicle" text: qsTr("Vehicle")
enabled: activeVehicle && activeVehicle.latitude != 0 && activeVehicle.longitude != 0 enabled: activeVehicle && activeVehicle.latitude != 0 && activeVehicle.longitude != 0
property var activeVehicle: _activeVehicle property var activeVehicle: _activeVehicle
...@@ -635,7 +635,7 @@ QGCView { ...@@ -635,7 +635,7 @@ QGCView {
dropDownComponent: Component { dropDownComponent: Component {
Column { Column {
QGCLabel { text: "Map type:" } QGCLabel { text: qsTr("Map type:") }
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
...@@ -712,7 +712,7 @@ QGCView { ...@@ -712,7 +712,7 @@ QGCView {
QGCViewMessage { QGCViewMessage {
id: syncLoadFromVehicleCheck id: syncLoadFromVehicleCheck
message: "You have unsaved/unsent mission changes. Loading the mission from the Vehicle will lose these changes. Are you sure you want to load the mission from the Vehicle?" message: qsTr("You have unsaved/unsent mission changes. Loading the mission from the Vehicle will lose these changes. Are you sure you want to load the mission from the Vehicle?")
function accept() { function accept() {
hideDialog() hideDialog()
...@@ -726,7 +726,7 @@ QGCView { ...@@ -726,7 +726,7 @@ QGCView {
QGCViewMessage { QGCViewMessage {
id: syncLoadFromVehicleCheck id: syncLoadFromVehicleCheck
message: "You have unsaved/unsent mission changes. Loading a mission from a file will lose these changes. Are you sure you want to load a mission from a file?" message: qsTr("You have unsaved/unsent mission changes. Loading a mission from a file will lose these changes. Are you sure you want to load a mission from a file?")
function accept() { function accept() {
hideDialog() hideDialog()
...@@ -739,7 +739,7 @@ QGCView { ...@@ -739,7 +739,7 @@ QGCView {
id: removeAllPromptDialog id: removeAllPromptDialog
QGCViewMessage { QGCViewMessage {
message: "Are you sure you want to delete all mission items?" message: qsTr("Are you sure you want to delete all mission items?")
function accept() { function accept() {
itemDragger.clearItem() itemDragger.clearItem()
...@@ -760,8 +760,8 @@ QGCView { ...@@ -760,8 +760,8 @@ QGCView {
width: sendSaveRow.width width: sendSaveRow.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: syncNeeded && !controller.autoSync ? text: syncNeeded && !controller.autoSync ?
"You have unsaved changes to you mission. You should send to your vehicle, or save to a file:" : qsTr("You have unsaved changed to you mission. You should send to your vehicle, or save to a file:") :
"Sync:" qsTr("Sync:")
} }
Row { Row {
...@@ -770,7 +770,7 @@ QGCView { ...@@ -770,7 +770,7 @@ QGCView {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
QGCButton { QGCButton {
text: "Send to vehicle" text: qsTr("Send to vehicle")
enabled: _activeVehicle && !controller.syncInProgress enabled: _activeVehicle && !controller.syncInProgress
onClicked: { onClicked: {
...@@ -780,13 +780,13 @@ QGCView { ...@@ -780,13 +780,13 @@ QGCView {
} }
QGCButton { QGCButton {
text: "Load from vehicle" text: qsTr("Load from vehicle")
enabled: _activeVehicle && !controller.syncInProgress enabled: _activeVehicle && !controller.syncInProgress
onClicked: { onClicked: {
syncButton.hideDropDown() syncButton.hideDropDown()
if (syncNeeded) { if (syncNeeded) {
_root.showDialog(syncLoadFromVehicleOverwrite, "Mission overwrite", _root.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel) _root.showDialog(syncLoadFromVehicleOverwrite, qsTr("Mission overwrite"), _root.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel)
} else { } else {
loadFromVehicle() loadFromVehicle()
} }
...@@ -798,7 +798,7 @@ QGCView { ...@@ -798,7 +798,7 @@ QGCView {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
QGCButton { QGCButton {
text: "Save to file..." text: qsTr("Save to file...")
enabled: !controller.syncInProgress enabled: !controller.syncInProgress
onClicked: { onClicked: {
...@@ -808,13 +808,13 @@ QGCView { ...@@ -808,13 +808,13 @@ QGCView {
} }
QGCButton { QGCButton {
text: "Load from file..." text: qsTr("Load from file...")
enabled: !controller.syncInProgress enabled: !controller.syncInProgress
onClicked: { onClicked: {
syncButton.hideDropDown() syncButton.hideDropDown()
if (syncNeeded) { if (syncNeeded) {
_root.showDialog(syncLoadFromFileOverwrite, "Mission overwrite", _root.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel) _root.showDialog(syncLoadFromFileOverwrite, qsTr("Mission overwrite"), _root.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel)
} else { } else {
loadFromFile() loadFromFile()
} }
...@@ -823,10 +823,10 @@ QGCView { ...@@ -823,10 +823,10 @@ QGCView {
} }
QGCButton { QGCButton {
text: "Remove all" text: qsTr("Remove all")
onClicked: { onClicked: {
syncButton.hideDropDown() syncButton.hideDropDown()
_root.showDialog(removeAllPromptDialog, "Delete all", _root.showDialogDefaultWidth, StandardButton.Yes | StandardButton.No) _root.showDialog(removeAllPromptDialog, qsTr("Delete all"), _root.showDialogDefaultWidth, StandardButton.Yes | StandardButton.No)
} }
} }
......
...@@ -71,18 +71,17 @@ Rectangle { ...@@ -71,18 +71,17 @@ Rectangle {
columns: 2 columns: 2
columnSpacing: _margins columnSpacing: _margins
QGCLabel { text: "Distance:" } QGCLabel { text: qsTr("Distance:") }
QGCLabel { text: _distanceText } QGCLabel { text: _distanceText }
QGCLabel { text: "Alt diff:" } QGCLabel { text: qsTr("Alt diff:") }
QGCLabel { text: _altText } QGCLabel { text: _altText }
QGCLabel { text: "Gradient:" } QGCLabel { text: qsTr("Gradient:") }
QGCLabel { text: _gradientText } QGCLabel { text: _gradientText }
QGCLabel { text: "Azimuth:" } QGCLabel { text: qsTr("Azimuth:") }
QGCLabel { text: _azimuthText } QGCLabel { text: _azimuthText }
}
QGCFlickable { QGCFlickable {
anchors.leftMargin: _margins anchors.leftMargin: _margins
...@@ -133,7 +132,6 @@ Rectangle { ...@@ -133,7 +132,6 @@ Rectangle {
} }
*/ */
} }
} }
} }
} }
......
...@@ -42,9 +42,9 @@ Rectangle { ...@@ -42,9 +42,9 @@ Rectangle {
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font.pixelSize: ScreenTools.smallFontPixelHeight font.pixelSize: ScreenTools.smallFontPixelHeight
text: missionItem.sequenceNumber == 0 ? text: missionItem.sequenceNumber == 0 ?
"Planned home position." : qsTr("Planned home position.") :
(missionItem.rawEdit ? (missionItem.rawEdit ?
"Provides advanced access to all commands/parameters. Be very careful!" : qsTr("Provides advanced access to all commands/parameters. Be very careful!") :
missionItem.commandDescription) missionItem.commandDescription)
} }
......
...@@ -43,7 +43,7 @@ Rectangle { ...@@ -43,7 +43,7 @@ Rectangle {
} }
QGCLabel { QGCLabel {
text: "Fly a grid pattern over a defined area." text: qsTr("Fly a grid pattern over a defined area.")
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
} }
......
...@@ -41,7 +41,7 @@ QGCViewDialog { ...@@ -41,7 +41,7 @@ QGCViewDialog {
QGCLabel { QGCLabel {
id: categoryLabel id: categoryLabel
anchors.baseline: categoryCombo.baseline anchors.baseline: categoryCombo.baseline
text: "Category:" text: qsTr("Category:")
} }
QGCComboBox { QGCComboBox {
......
...@@ -73,12 +73,12 @@ Rectangle { ...@@ -73,12 +73,12 @@ Rectangle {
id: hamburgerMenu id: hamburgerMenu
MenuItem { MenuItem {
text: "Insert" text: qsTr("Insert")
onTriggered: insert(missionItem.sequenceNumber) onTriggered: insert(missionItem.sequenceNumber)
} }
MenuItem { MenuItem {
text: "Delete" text: qsTr("Delete")
onTriggered: remove() onTriggered: remove()
} }
...@@ -92,7 +92,7 @@ Rectangle { ...@@ -92,7 +92,7 @@ Rectangle {
} }
MenuItem { MenuItem {
text: "Show all values" text: qsTr("Show all values")
checkable: true checkable: true
checked: missionItem.isSimpleItem ? missionItem.rawEdit : false checked: missionItem.isSimpleItem ? missionItem.rawEdit : false
visible: missionItem.isSimpleItem visible: missionItem.isSimpleItem
...@@ -102,7 +102,7 @@ Rectangle { ...@@ -102,7 +102,7 @@ Rectangle {
if (missionItem.friendlyEditAllowed) { if (missionItem.friendlyEditAllowed) {
missionItem.rawEdit = false missionItem.rawEdit = false
} else { } else {
qgcView.showMessage("Mission Edit", "You have made changes to the mission item which cannot be shown in Simple Mode", StandardButton.Ok) qgcView.showMessage(qsTr("Mission Edit"), qsTr("You have made changes to the mission item which cannot be shown in Simple Mode"), StandardButton.Ok)
} }
} else { } else {
missionItem.rawEdit = true missionItem.rawEdit = true
...@@ -133,7 +133,7 @@ Rectangle { ...@@ -133,7 +133,7 @@ Rectangle {
} }
} }
onClicked: qgcView.showDialog(commandDialog, "Select Mission Command", qgcView.showDialogDefaultWidth, StandardButton.Cancel) onClicked: qgcView.showDialog(commandDialog, qsTr("Select Mission Command"), qgcView.showDialogDefaultWidth, StandardButton.Cancel)
} }
QGCLabel { QGCLabel {
......
...@@ -104,7 +104,7 @@ Rectangle { ...@@ -104,7 +104,7 @@ Rectangle {
width: ScreenTools.defaultFontPixelWidth * monitorThresholdCharWidth width: ScreenTools.defaultFontPixelWidth * monitorThresholdCharWidth
height: ScreenTools.defaultFontPixelHeight height: ScreenTools.defaultFontPixelHeight
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
text: "Monitor:" text: qsTr("Monitor:")
} }
Item { Item {
...@@ -144,7 +144,7 @@ Rectangle { ...@@ -144,7 +144,7 @@ Rectangle {
width: ScreenTools.defaultFontPixelWidth * monitorThresholdCharWidth width: ScreenTools.defaultFontPixelWidth * monitorThresholdCharWidth
height: ScreenTools.defaultFontPixelHeight height: ScreenTools.defaultFontPixelHeight
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
text: "Threshold:" text: qsTr("Threshold:")
} }
......
...@@ -54,7 +54,7 @@ QGCView { ...@@ -54,7 +54,7 @@ QGCView {
id: controller; id: controller;
factPanel: panel factPanel: panel
onShowErrorMessage: { onShowErrorMessage: {
showMessage("Parameter Load Errors", errorMsg, StandardButton.Ok) showMessage(qsTr("Parameter Load Errors"), errorMsg, StandardButton.Ok)
} }
} }
...@@ -71,7 +71,7 @@ QGCView { ...@@ -71,7 +71,7 @@ QGCView {
width: parent.width width: parent.width
height: ScreenTools.defaultFontPixelHeight * 1.75 height: ScreenTools.defaultFontPixelHeight * 1.75
QGCLabel { QGCLabel {
text: "Search Results" text: qsTr("Search Results")
visible: _searchFilter visible: _searchFilter
font.weight: Font.DemiBold font.weight: Font.DemiBold
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
...@@ -82,13 +82,13 @@ QGCView { ...@@ -82,13 +82,13 @@ QGCView {
width: ScreenTools.defaultFontPixelWidth * 25 width: ScreenTools.defaultFontPixelWidth * 25
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
QGCLabel { QGCLabel {
text: "GROUPS" text: qsTr("GROUPS")
font.weight: Font.DemiBold font.weight: Font.DemiBold
anchors.centerIn: parent anchors.centerIn: parent
} }
} }
QGCLabel { QGCLabel {
text: _currentGroup + " Parameters" text: qsTr("%1 Parameters").arg(_currentGroup)
visible: !_searchFilter visible: !_searchFilter
font.weight: Font.DemiBold font.weight: Font.DemiBold
anchors.left: groupTitle.right anchors.left: groupTitle.right
...@@ -96,7 +96,7 @@ QGCView { ...@@ -96,7 +96,7 @@ QGCView {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
QGCButton { QGCButton {
text: "Back" text: qsTr("Back")
visible: _searchFilter visible: _searchFilter
anchors.right: parent.right anchors.right: parent.right
height: ScreenTools.defaultFontPixelHeight * 1.75 height: ScreenTools.defaultFontPixelHeight * 1.75
...@@ -106,39 +106,39 @@ QGCView { ...@@ -106,39 +106,39 @@ QGCView {
} }
} }
QGCButton { QGCButton {
text: "Tools" text: qsTr("Tools")
visible: !_searchFilter visible: !_searchFilter
anchors.right: parent.right anchors.right: parent.right
height: ScreenTools.defaultFontPixelHeight * 1.75 height: ScreenTools.defaultFontPixelHeight * 1.75
menu: Menu { menu: Menu {
MenuItem { MenuItem {
text: "Refresh" text: qsTr("Refresh")
onTriggered: controller.refresh() onTriggered: controller.refresh()
} }
MenuItem { MenuItem {
text: "Reset all to defaults" text: qsTr("Reset all to defaults")
onTriggered: controller.resetAllToDefaults() onTriggered: controller.resetAllToDefaults()
} }
MenuItem { MenuItem {
text: "Search..." text: qsTr("Search...")
onTriggered: showDialog(searchDialogComponent, "Parameter Search", qgcView.showDialogDefaultWidth, StandardButton.Reset | StandardButton.Apply) onTriggered: showDialog(searchDialogComponent, qsTr("Parameter Search"), qgcView.showDialogDefaultWidth, StandardButton.Reset | StandardButton.Apply)
} }
MenuSeparator { } MenuSeparator { }
MenuItem { MenuItem {
text: "Load from file..." text: qsTr("Load from file...")
onTriggered: { onTriggered: {
if (ScreenTools.isMobile) { if (ScreenTools.isMobile) {
qgcView.showDialog(mobileFilePicker, "Select Parameter File", qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel) qgcView.showDialog(mobileFilePicker, qsTr("Select Parameter File"), qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel)
} else { } else {
controller.loadFromFilePicker() controller.loadFromFilePicker()
} }
} }
} }
MenuItem { MenuItem {
text: "Save to file..." text: qsTr("Save to file...")
onTriggered: { onTriggered: {
if (ScreenTools.isMobile) { if (ScreenTools.isMobile) {
qgcView.showDialog(mobileFileSaver, "Save Parameter File", qgcView.showDialogDefaultWidth, StandardButton.Save | StandardButton.Cancel) qgcView.showDialog(mobileFileSaver, qsTr("Save Parameter File"), qgcView.showDialogDefaultWidth, StandardButton.Save | StandardButton.Cancel)
} else { } else {
controller.saveToFilePicker() controller.saveToFilePicker()
} }
...@@ -146,7 +146,7 @@ QGCView { ...@@ -146,7 +146,7 @@ QGCView {
} }
MenuSeparator { visible: _showRCToParam } MenuSeparator { visible: _showRCToParam }
MenuItem { MenuItem {
text: "Clear RC to Param" text: qsTr("Clear RC to Param")
onTriggered: controller.clearRCToParam() onTriggered: controller.clearRCToParam()
visible: _showRCToParam visible: _showRCToParam
} }
...@@ -195,7 +195,7 @@ QGCView { ...@@ -195,7 +195,7 @@ QGCView {
readonly property int componentId: parseInt(modelData) readonly property int componentId: parseInt(modelData)
spacing: Math.ceil(ScreenTools.defaultFontPixelHeight * 0.25) spacing: Math.ceil(ScreenTools.defaultFontPixelHeight * 0.25)
QGCLabel { QGCLabel {
text: "Component #: " + componentId.toString() text: qsTr("Component #: %1)").arg(componentId.toString())
font.weight: Font.DemiBold font.weight: Font.DemiBold
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
......
...@@ -111,7 +111,7 @@ QGCViewDialog { ...@@ -111,7 +111,7 @@ QGCViewDialog {
QGCButton { QGCButton {
anchors.baseline: valueField.baseline anchors.baseline: valueField.baseline
visible: fact.defaultValueAvailable visible: fact.defaultValueAvailable
text: "Reset to default" text: qsTr("Reset to default")
onClicked: { onClicked: {
fact.value = fact.defaultValue fact.value = fact.defaultValue
...@@ -143,15 +143,15 @@ QGCViewDialog { ...@@ -143,15 +143,15 @@ QGCViewDialog {
Row { Row {
spacing: defaultTextWidth spacing: defaultTextWidth
QGCLabel { text: "Units:" } QGCLabel { text: qsTr("Units:") }
QGCLabel { text: fact.units ? fact.units : "none" } QGCLabel { text: fact.units ? fact.units : qsTr("none") }
} }
Row { Row {
spacing: defaultTextWidth spacing: defaultTextWidth
visible: !fact.minIsDefaultForType visible: !fact.minIsDefaultForType
QGCLabel { text: "Minimum value:" } QGCLabel { text: qsTr("Minimum value:") }
QGCLabel { text: fact.minString } QGCLabel { text: fact.minString }
} }
...@@ -159,35 +159,35 @@ QGCViewDialog { ...@@ -159,35 +159,35 @@ QGCViewDialog {
spacing: defaultTextWidth spacing: defaultTextWidth
visible: !fact.maxIsDefaultForType visible: !fact.maxIsDefaultForType
QGCLabel { text: "Maximum value:" } QGCLabel { text: qsTr("Maximum value:") }
QGCLabel { text: fact.maxString } QGCLabel { text: fact.maxString }
} }
Row { Row {
spacing: defaultTextWidth spacing: defaultTextWidth
QGCLabel { text: "Default value:" } QGCLabel { text: qsTr("Default value:") }
QGCLabel { text: fact.defaultValueAvailable ? fact.defaultValueString : "none" } QGCLabel { text: fact.defaultValueAvailable ? fact.defaultValueString : qsTr("none") }
} }
QGCLabel { QGCLabel {
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: "Warning: Modifying parameters while vehicle is in flight can lead to vehicle instability and possible vehicle loss. " + text: qsTr("Warning: Modifying parameters while vehicle is in flight can lead to vehicle instability and possible vehicle loss. ") +
"Make sure you know what you are doing and double-check your values before Save!" qsTr("Make sure you know what you are doing and double-check your values before Save!")
} }
QGCLabel { QGCLabel {
id: validationError id: validationError
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: "yellow" color: qsTr("yellow")
} }
QGCCheckBox { QGCCheckBox {
id: forceSave id: forceSave
visible: false visible: false
text: "Force save (dangerous!)" text: qsTr("Force save (dangerous!)")
} }
Row { Row {
...@@ -204,7 +204,7 @@ QGCViewDialog { ...@@ -204,7 +204,7 @@ QGCViewDialog {
QGCCheckBox { QGCCheckBox {
id: _advanced id: _advanced
text: "Advanced settings" text: qsTr("Advanced settings")
} }
Rectangle { Rectangle {
...@@ -216,7 +216,7 @@ QGCViewDialog { ...@@ -216,7 +216,7 @@ QGCViewDialog {
} }
QGCButton { QGCButton {
text: "Set RC to Param..." text: qsTr("Set RC to Param...")
visible: _advanced.checked && !validate && showRCToParam visible: _advanced.checked && !validate && showRCToParam
onClicked: controller.setRCToParam(fact.name) onClicked: controller.setRCToParam(fact.name)
} }
......
...@@ -74,7 +74,7 @@ QGCViewDialog { ...@@ -74,7 +74,7 @@ QGCViewDialog {
property alias replaceMessageShown: replaceMessage.visible property alias replaceMessageShown: replaceMessage.visible
QGCLabel { QGCLabel {
text: "File name:" text: qsTr("File name:")
} }
QGCTextField { QGCTextField {
...@@ -86,7 +86,7 @@ QGCViewDialog { ...@@ -86,7 +86,7 @@ QGCViewDialog {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: "File names must end with ." + fileExtension + " file extension. If missing it will be added." text: qsTr("File names must end with .%1 file extension. If missing it will be added.").arg(fileExtension)
} }
QGCLabel { QGCLabel {
...@@ -94,7 +94,7 @@ QGCViewDialog { ...@@ -94,7 +94,7 @@ QGCViewDialog {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: "The file " + filename + " exists. Click Save again to replace it." text: qsTr("The file %1 exists. Click Save again to replace it.").arg(filename)
visible: false visible: false
color: qgcPal.warningText color: qgcPal.warningText
} }
...@@ -125,7 +125,7 @@ QGCViewDialog { ...@@ -125,7 +125,7 @@ QGCViewDialog {
} }
QGCLabel { QGCLabel {
text: "No files" text: qsTr("No files")
visible: controller.getFiles(fileExtension).length == 0 visible: controller.getFiles(fileExtension).length == 0
} }
} }
......
...@@ -54,61 +54,61 @@ FactPanel { ...@@ -54,61 +54,61 @@ FactPanel {
// Accept role buttons // Accept role buttons
if (buttons & StandardButton.Ok) { if (buttons & StandardButton.Ok) {
__acceptButton.text = "Ok" __acceptButton.text = qsTr("Ok")
__acceptButton.visible = true __acceptButton.visible = true
} else if (buttons & StandardButton.Open) { } else if (buttons & StandardButton.Open) {
__acceptButton.text = "Open" __acceptButton.text = qsTr("Open")
__acceptButton.visible = true __acceptButton.visible = true
} else if (buttons & StandardButton.Save) { } else if (buttons & StandardButton.Save) {
__acceptButton.text = "Save" __acceptButton.text = qsTr("Save")
__acceptButton.visible = true __acceptButton.visible = true
} else if (buttons & StandardButton.Apply) { } else if (buttons & StandardButton.Apply) {
__acceptButton.text = "Apply" __acceptButton.text = qsTr("Apply")
__acceptButton.visible = true __acceptButton.visible = true
} else if (buttons & StandardButton.Open) { } else if (buttons & StandardButton.Open) {
__acceptButton.text = "Open" __acceptButton.text = qsTr("Open")
__acceptButton.visible = true __acceptButton.visible = true
} else if (buttons & StandardButton.SaveAll) { } else if (buttons & StandardButton.SaveAll) {
__acceptButton.text = "Save All" __acceptButton.text = qsTr("Save All")
__acceptButton.visible = true __acceptButton.visible = true
} else if (buttons & StandardButton.Yes) { } else if (buttons & StandardButton.Yes) {
__acceptButton.text = "Yes" __acceptButton.text = qsTr("Yes")
__acceptButton.visible = true __acceptButton.visible = true
} else if (buttons & StandardButton.YesToAll) { } else if (buttons & StandardButton.YesToAll) {
__acceptButton.text = "Yes to All" __acceptButton.text = qsTr("Yes to All")
__acceptButton.visible = true __acceptButton.visible = true
} else if (buttons & StandardButton.Retry) { } else if (buttons & StandardButton.Retry) {
__acceptButton.text = "Retry" __acceptButton.text = qsTr("Retry")
__acceptButton.visible = true __acceptButton.visible = true
} else if (buttons & StandardButton.Reset) { } else if (buttons & StandardButton.Reset) {
__acceptButton.text = "Reset" __acceptButton.text = qsTr("Reset")
__acceptButton.visible = true __acceptButton.visible = true
} else if (buttons & StandardButton.RestoreToDefaults) { } else if (buttons & StandardButton.RestoreToDefaults) {
__acceptButton.text = "Restore to Defaults" __acceptButton.text = qsTr("Restore to Defaults")
__acceptButton.visible = true __acceptButton.visible = true
} else if (buttons & StandardButton.Ignore) { } else if (buttons & StandardButton.Ignore) {
__acceptButton.text = "Ignore" __acceptButton.text = qsTr("Ignore")
__acceptButton.visible = true __acceptButton.visible = true
} }
// Reject role buttons // Reject role buttons
if (buttons & StandardButton.Cancel) { if (buttons & StandardButton.Cancel) {
__rejectButton.text = "Cancel" __rejectButton.text = qsTr("Cancel")
__rejectButton.visible = true __rejectButton.visible = true
} else if (buttons & StandardButton.Close) { } else if (buttons & StandardButton.Close) {
__rejectButton.text = "Close" __rejectButton.text = qsTr("Close")
__rejectButton.visible = true __rejectButton.visible = true
} else if (buttons & StandardButton.No) { } else if (buttons & StandardButton.No) {
__rejectButton.text = "No" __rejectButton.text = qsTr("No")
__rejectButton.visible = true __rejectButton.visible = true
} else if (buttons & StandardButton.NoToAll) { } else if (buttons & StandardButton.NoToAll) {
__rejectButton.text = "No to All" __rejectButton.text = qsTr("No to All")
__rejectButton.visible = true __rejectButton.visible = true
} else if (buttons & StandardButton.Abort) { } else if (buttons & StandardButton.Abort) {
__rejectButton.text = "Abort" __rejectButton.text = qsTr("Abort")
__rejectButton.visible = true __rejectButton.visible = true
} else if (buttons & StandardButton.Reset) { } else if (buttons & StandardButton.Reset) {
__rejectButton.text = "Reset" __rejectButton.text = qsTr("Reset")
__rejectButton.visible = true __rejectButton.visible = true
} }
} }
...@@ -121,7 +121,7 @@ FactPanel { ...@@ -121,7 +121,7 @@ FactPanel {
function __checkForEarlyDialog(title) { function __checkForEarlyDialog(title) {
if (!completedSignalled) { if (!completedSignalled) {
console.warn("showDialog|Message called before QGCView.completed signalled", title) console.warn(qsTr("showDialog|Message called before QGCView.completed signalled"), title)
} }
} }
......
...@@ -45,7 +45,7 @@ Item { ...@@ -45,7 +45,7 @@ Item {
Text { Text {
id: _textMeasure id: _textMeasure
text: "X" text: qsTr("X")
property real fontWidth: contentWidth * (ScreenToolsController.testHighDPI ? 2 : 1) property real fontWidth: contentWidth * (ScreenToolsController.testHighDPI ? 2 : 1)
property real fontHeight: contentHeight * (ScreenToolsController.testHighDPI ? 2 : 1) property real fontHeight: contentHeight * (ScreenToolsController.testHighDPI ? 2 : 1)
} }
......
...@@ -26,7 +26,7 @@ Rectangle { ...@@ -26,7 +26,7 @@ Rectangle {
id: label id: label
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "Slide to " + confirmText text: qsTr("Slide to %1").arg(confirmText)
} }
Rectangle { Rectangle {
......
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