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