[PATCH] Add translation markers to qml Files

Robert C. Helling helling at atdotde.de
Mon Mar 14 13:47:39 PDT 2016


From: "Robert C. Helling" <helling at atdotde.de>

I added qsTr() to all text: elements in the qml files.

Signed-off-by: Robert C. Helling <helling at atdotde.de>
---
 qt-mobile/qml/About.qml                    |  8 +++---
 qt-mobile/qml/CloudCredentials.qml         | 10 +++----
 qt-mobile/qml/DiveDetails.qml              |  2 +-
 qt-mobile/qml/DiveDetailsEdit.qml          | 32 +++++++++++-----------
 qt-mobile/qml/DiveDetailsView.qml          | 26 +++++++++---------
 qt-mobile/qml/DiveList.qml                 |  6 ++--
 qt-mobile/qml/DownloadFromDiveComputer.qml | 24 ++++++++--------
 qt-mobile/qml/GpsList.qml                  | 12 ++++----
 qt-mobile/qml/Log.qml                      |  4 +--
 qt-mobile/qml/Preferences.qml              | 10 +++----
 qt-mobile/qml/StartPage.qml                |  6 ++--
 qt-mobile/qml/ThemeTest.qml                | 18 ++++++------
 qt-mobile/qml/main.qml                     | 44 +++++++++++++++---------------
 13 files changed, 101 insertions(+), 101 deletions(-)

diff --git a/qt-mobile/qml/About.qml b/qt-mobile/qml/About.qml
index 2655401..a489849 100644
--- a/qt-mobile/qml/About.qml
+++ b/qt-mobile/qml/About.qml
@@ -17,7 +17,7 @@ MobileComponents.Page {
 			Layout.margins: MobileComponents.Units.gridUnit / 2
 
 			MobileComponents.Heading {
-				text: "About Subsurface-mobile"
+				text: qsTr("About Subsurface-mobile")
 				Layout.margins: MobileComponents.Units.largeSpacing / 2
 				Layout.alignment: Qt.AlignHCenter
 				Layout.maximumWidth: pageWidth
@@ -39,8 +39,8 @@ MobileComponents.Page {
 			}
 
 			MobileComponents.Heading {
-				text: "A mobile version of the free Subsurface divelog software.\n" +
-				      "View your dive logs while on the go."
+				text: qsTr("A mobile version of the free Subsurface divelog software.\n" +
+					   "View your dive logs while on the go.")
 				level: 4
 				Layout.alignment: Qt.AlignHCenter
 				Layout.topMargin: MobileComponents.Units.largeSpacing * 3
@@ -51,7 +51,7 @@ MobileComponents.Page {
 			}
 
 			MobileComponents.Heading {
-				text: "Version: " + manager.getVersion() + "\n\n© Subsurface developer team\n2011-2016"
+				text: qsTr("Version: %1\n\n© Subsurface developer team\n2011-2016").arg(manager.getVersion())
 				level: 5
 				font.pointSize: subsurfaceTheme.smallPointSize + 1
 				Layout.alignment: Qt.AlignHCenter
diff --git a/qt-mobile/qml/CloudCredentials.qml b/qt-mobile/qml/CloudCredentials.qml
index 73722d3..9d43c6f 100644
--- a/qt-mobile/qml/CloudCredentials.qml
+++ b/qt-mobile/qml/CloudCredentials.qml
@@ -25,13 +25,13 @@ Item {
 		id: outerLayout
 		width: subsurfaceTheme.columnWidth - 2 * MobileComponents.Units.gridUnit
 		MobileComponents.Heading {
-			text: "Cloud credentials"
+			text: qsTr("Cloud credentials")
 			level: headingLevel
 			Layout.bottomMargin: MobileComponents.Units.largeSpacing / 2
 		}
 
 		MobileComponents.Label {
-			text: "Email"
+			text: qsTr("Email")
 		}
 
 		TextField {
@@ -43,7 +43,7 @@ Item {
 		}
 
 		MobileComponents.Label {
-			text: "Password"
+			text: qsTr("Password")
 		}
 
 		TextField {
@@ -66,7 +66,7 @@ Item {
 				}
 			}
 			MobileComponents.Label {
-				text: "Show password"
+				text: qsTr("Show password")
 			}
 
 			CheckBox {
@@ -74,7 +74,7 @@ Item {
 				id: savePassword
 			}
 			MobileComponents.Label {
-				text: "Remember"
+				text: qsTr("Remember")
 			}
 		}
 		Item { width: MobileComponents.Units.gridUnit; height: width }
diff --git a/qt-mobile/qml/DiveDetails.qml b/qt-mobile/qml/DiveDetails.qml
index d7db352..4c13d4e 100644
--- a/qt-mobile/qml/DiveDetails.qml
+++ b/qt-mobile/qml/DiveDetails.qml
@@ -59,7 +59,7 @@ MobileComponents.Page {
 
 	property list<QtObject> deleteAction: [
 		Action {
-			text: "Delete dive"
+			text: qsTr("Delete dive")
 			iconName: "trash-empty"
 			onTriggered: {
 				contextDrawer.close()
diff --git a/qt-mobile/qml/DiveDetailsEdit.qml b/qt-mobile/qml/DiveDetailsEdit.qml
index cd8417e..733759e 100644
--- a/qt-mobile/qml/DiveDetailsEdit.qml
+++ b/qt-mobile/qml/DiveDetailsEdit.qml
@@ -69,11 +69,11 @@ Item {
 
 			MobileComponents.Heading {
 				Layout.columnSpan: 2
-				text: "Dive " + number
+				text: qsTr("Dive ") + number
 			}
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "Date:"
+				text: qsTr("Date:")
 			}
 			TextField {
 				id: txtDate;
@@ -81,7 +81,7 @@ Item {
 			}
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "Location:"
+				text: qsTr("Location:")
 			}
 			TextField {
 				id: txtLocation;
@@ -94,7 +94,7 @@ Item {
 			//  at the dive site)
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "Use current\nGPS location:"
+				text: qsTr("Use current\nGPS location:")
 			}
 			CheckBox {
 				id: checkboxGPS
@@ -106,7 +106,7 @@ Item {
 
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "Depth:"
+				text: qsTr("Depth:")
 			}
 			TextField {
 				id: txtDepth
@@ -115,7 +115,7 @@ Item {
 			}
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "Duration:"
+				text: qsTr("Duration:")
 			}
 			TextField {
 				id: txtDuration
@@ -125,7 +125,7 @@ Item {
 
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "Air Temp:"
+				text: qsTr("Air Temp:")
 			}
 			TextField {
 				id: txtAirTemp
@@ -134,7 +134,7 @@ Item {
 
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "Water Temp:"
+				text: qsTr("Water Temp:")
 			}
 			TextField {
 				id: txtWaterTemp
@@ -143,7 +143,7 @@ Item {
 
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "Suit:"
+				text: qsTr("Suit:")
 			}
 			TextField {
 				id: txtSuit
@@ -152,7 +152,7 @@ Item {
 
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "Buddy:"
+				text: qsTr("Buddy:")
 			}
 			TextField {
 				id: txtBuddy
@@ -161,7 +161,7 @@ Item {
 
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "Dive Master:"
+				text: qsTr("Dive Master:")
 			}
 			TextField {
 				id: txtDiveMaster
@@ -170,7 +170,7 @@ Item {
 
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "Weight:"
+				text: qsTr("Weight:")
 			}
 			TextField {
 				id: txtWeight
@@ -180,7 +180,7 @@ Item {
 
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "Gas mix:"
+				text: qsTr("Gas mix:")
 			}
 			TextField {
 				id: txtGasMix
@@ -191,7 +191,7 @@ Item {
 
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "Start Pressure:"
+				text: qsTr("Start Pressure:")
 			}
 			TextField {
 				id: txtStartPressure
@@ -201,7 +201,7 @@ Item {
 
 			MobileComponents.Label {
 				Layout.alignment: Qt.AlignRight
-				text: "End Pressure:"
+				text: qsTr("End Pressure:")
 			}
 			TextField {
 				id: txtEndPressure
@@ -213,7 +213,7 @@ Item {
 			MobileComponents.Label {
 				Layout.columnSpan: 2
 				Layout.alignment: Qt.AlignLeft
-				text: "Notes:"
+				text: qsTr("Notes:")
 			}
 			TextArea {
 				Layout.columnSpan: 2
diff --git a/qt-mobile/qml/DiveDetailsView.qml b/qt-mobile/qml/DiveDetailsView.qml
index 126a915..4a3cd5f 100644
--- a/qt-mobile/qml/DiveDetailsView.qml
+++ b/qt-mobile/qml/DiveDetailsView.qml
@@ -59,7 +59,7 @@ Item {
 		}
 		MobileComponents.Label {
 			id: dateLabel
-			text: "Date: "
+			text: qsTr("Date: ")
 			opacity: 0.6
 			Layout.alignment: Qt.AlignRight
 		}
@@ -77,7 +77,7 @@ Item {
 
 		MobileComponents.Label {
 			id: depthLabel
-			text: "Depth: "
+			text: qsTr("Depth: ")
 			opacity: 0.6
 			Layout.alignment: Qt.AlignRight
 		}
@@ -87,7 +87,7 @@ Item {
 			wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
 		}
 		MobileComponents.Label {
-			text: "Duration: "
+			text: qsTr("Duration: ")
 			opacity: 0.6
 			Layout.alignment: Qt.AlignRight
 		}
@@ -119,7 +119,7 @@ Item {
 			Layout.columnSpan: 4
 			Layout.margins: MobileComponents.Units.gridUnit
 			horizontalAlignment: Text.AlignHCenter
-			text: "No profile to show"
+			text: qsTr("No profile to show")
 		}
 	}
 	GridLayout {
@@ -137,13 +137,13 @@ Item {
 		MobileComponents.Heading {
 			Layout.fillWidth: true
 			level: 3
-			text: "Dive Details"
+			text: qsTr("Dive Details")
 			Layout.columnSpan: 4
 		}
 
 		// first row - here we set up the column widths - total is 90% of width
 		MobileComponents.Label {
-			text: "Suit:"
+			text: qsTr("Suit:")
 			wrapMode: Text.WrapAtWordBoundaryOrAnywhere
 			opacity: 0.6
 			Layout.maximumWidth: detailsView.col1Width
@@ -159,7 +159,7 @@ Item {
 		}
 
 		MobileComponents.Label {
-			text: "Air Temp:"
+			text: qsTr("Air Temp:")
 			wrapMode: Text.WrapAtWordBoundaryOrAnywhere
 			opacity: 0.6
 			Layout.maximumWidth: detailsView.col3Width
@@ -175,7 +175,7 @@ Item {
 		}
 
 		MobileComponents.Label {
-			text: "Cylinder:"
+			text: qsTr("Cylinder:")
 			wrapMode: Text.WrapAtWordBoundaryOrAnywhere
 			opacity: 0.6
 			Layout.maximumWidth: detailsView.col1Width
@@ -191,7 +191,7 @@ Item {
 		}
 
 		MobileComponents.Label {
-			text: "Water Temp:"
+			text: qsTr("Water Temp:")
 			wrapMode: Text.WrapAtWordBoundaryOrAnywhere
 			opacity: 0.6
 			Layout.maximumWidth: detailsView.col3Width
@@ -207,7 +207,7 @@ Item {
 		}
 
 		MobileComponents.Label {
-			text: "Dive Master:"
+			text: qsTr("Dive Master:")
 			wrapMode: Text.WrapAtWordBoundaryOrAnywhere
 			opacity: 0.6
 			Layout.maximumWidth: detailsView.col1Width
@@ -223,7 +223,7 @@ Item {
 		}
 
 		MobileComponents.Label {
-			text: "Weight:"
+			text: qsTr("Weight:")
 			wrapMode: Text.WrapAtWordBoundaryOrAnywhere
 			opacity: 0.6
 			Layout.maximumWidth: detailsView.col3Width
@@ -239,7 +239,7 @@ Item {
 		}
 
 		MobileComponents.Label {
-			text: "Buddy:"
+			text: qsTr("Buddy:")
 			wrapMode: Text.WrapAtWordBoundaryOrAnywhere
 			opacity: 0.6
 			Layout.maximumWidth: detailsView.col1Width
@@ -258,7 +258,7 @@ Item {
 		MobileComponents.Heading {
 			Layout.fillWidth: true
 			level: 3
-			text: "Notes"
+			text: qsTr("Notes")
 			wrapMode: Text.WrapAtWordBoundaryOrAnywhere
 			Layout.columnSpan: 4
 		}
diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml
index 21f0ceb..154eebb 100644
--- a/qt-mobile/qml/DiveList.qml
+++ b/qt-mobile/qml/DiveList.qml
@@ -69,7 +69,7 @@ MobileComponents.Page {
 						bottom: numberText.bottom
 					}
 					MobileComponents.Label {
-						text: 'Depth: '
+						text: qsTr('Depth: ')
 						opacity: 0.6
 						font.pointSize: subsurfaceTheme.smallPointSize
 					}
@@ -79,7 +79,7 @@ MobileComponents.Page {
 						font.pointSize: subsurfaceTheme.smallPointSize
 					}
 					MobileComponents.Label {
-						text: 'Duration: '
+						text: qsTr('Duration: ')
 						opacity: 0.6
 						font.pointSize: subsurfaceTheme.smallPointSize
 					}
@@ -178,7 +178,7 @@ MobileComponents.Page {
 				x: MobileComponents.Units.gridUnit / 2
 				height: paintedHeight + MobileComponents.Units.gridUnit / 2
 				verticalAlignment: Text.AlignBottom
-				text: "Dive Log"
+				text: qsTr("Dive Log")
 			}
 			Connections {
 				target: detailsWindow
diff --git a/qt-mobile/qml/DownloadFromDiveComputer.qml b/qt-mobile/qml/DownloadFromDiveComputer.qml
index 2acc508..1c92adf 100644
--- a/qt-mobile/qml/DownloadFromDiveComputer.qml
+++ b/qt-mobile/qml/DownloadFromDiveComputer.qml
@@ -17,7 +17,7 @@ MobileComponents.Page {
 /* this can be done by hitting the back key
 	contextualActions: [
 		Action {
-			text: "Close Preferences"
+			text: qsTr("Close Preferences")
 			iconName: "dialog-cancel"
 			onTriggered: {
 				stackView.pop()
@@ -34,29 +34,29 @@ MobileComponents.Page {
 		RowLayout {
 			anchors.top:parent.top
 			Layout.fillWidth: true
-			Text { text: " Vendor name : " }
+			Text { text: qsTr(" Vendor name : ") }
 			ComboBox { Layout.fillWidth: true }
 		}
 		RowLayout {
-			Text { text: " Dive Computer:" }
+			Text { text: qsTr(" Dive Computer:") }
 			ComboBox { Layout.fillWidth: true }
 		}
 		RowLayout {
-			Text { text: " Progress:" }
+			Text { text: qsTr(" Progress:") }
 			Layout.fillWidth: true
 			ProgressBar { Layout.fillWidth: true }
 		}
 		RowLayout {
 			SubsurfaceButton {
-				text: "Download"
+				text: qsTr("Download")
 				onClicked: {
-					text: "Retry"
+					text: qsTr("Retry")
 					stackView.pop();
 				}
 			}
 			SubsurfaceButton {
 				id:quitbutton
-				text: "Quit"
+				text: qsTr("Quit")
 				onClicked: {
 					stackView.pop();
 				}
@@ -64,7 +64,7 @@ MobileComponents.Page {
 		}
 		RowLayout {
 			Text {
-				text: " Downloaded dives"
+				text: qsTr(" Downloaded dives")
 			}
 		}
 		TableView {
@@ -91,13 +91,13 @@ MobileComponents.Page {
 		RowLayout {
 			Layout.fillWidth: true
 			SubsurfaceButton {
-				text: "Accept"
+				text: qsTr("Accept")
 				onClicked: {
 				stackView.pop();
 				}
 			}
 			SubsurfaceButton {
-				text: "Quit"
+				text: qsTr("Quit")
 				onClicked: {
 					stackView.pop();
 				}
@@ -107,11 +107,11 @@ MobileComponents.Page {
 				Layout.fillWidth: true
 			}
 			SubsurfaceButton {
-				text: "Select All"
+				text: qsTr("Select All")
 			}
 			SubsurfaceButton {
 				id: unselectbutton
-				text: "Unselect All"
+				text: qsTr("Unselect All")
 			}
 		}
 		RowLayout { // spacer to make space for silly button
diff --git a/qt-mobile/qml/GpsList.qml b/qt-mobile/qml/GpsList.qml
index 97998b3..a6af800 100644
--- a/qt-mobile/qml/GpsList.qml
+++ b/qt-mobile/qml/GpsList.qml
@@ -17,7 +17,7 @@ MobileComponents.Page {
 /* this can be done by hitting the back key
 	contextualActions: [
 		Action {
-			text: "Close GPS list"
+			text: qsTr("Close GPS list")
 			iconName: "dialog-cancel"
 			onTriggered: {
 				stackView.pop()
@@ -47,7 +47,7 @@ MobileComponents.Page {
 						rightMargin: horizontalPadding
 					}
 					MobileComponents.Label {
-						text: 'Date: '
+						text: qsTr('Date: ')
 						opacity: 0.6
 						font.pointSize: subsurfaceTheme.smallPointSize
 					}
@@ -57,7 +57,7 @@ MobileComponents.Page {
 						font.pointSize: subsurfaceTheme.smallPointSize
 					}
 					MobileComponents.Label {
-						text: 'Name: '
+						text: qsTr('Name: ')
 						opacity: 0.6
 						font.pointSize: subsurfaceTheme.smallPointSize
 					}
@@ -67,7 +67,7 @@ MobileComponents.Page {
 						font.pointSize: subsurfaceTheme.smallPointSize
 					}
 					MobileComponents.Label {
-						text: 'Latitude: '
+						text: qsTr('Latitude: ')
 						opacity: 0.6
 						font.pointSize: subsurfaceTheme.smallPointSize
 					}
@@ -76,7 +76,7 @@ MobileComponents.Page {
 						font.pointSize: subsurfaceTheme.smallPointSize
 					}
 					MobileComponents.Label {
-						text: 'Longitude: '
+						text: qsTr('Longitude: ')
 						opacity: 0.6
 						font.pointSize: subsurfaceTheme.smallPointSize
 					}
@@ -123,7 +123,7 @@ MobileComponents.Page {
 				x: MobileComponents.Units.gridUnit / 2
 				height: paintedHeight + MobileComponents.Units.gridUnit / 2
 				verticalAlignment: Text.AlignBottom
-				text: "List of stored GPS fixes"
+				text: qsTr("List of stored GPS fixes")
 			}
 		}
 	}
diff --git a/qt-mobile/qml/Log.qml b/qt-mobile/qml/Log.qml
index 8571a52..d21b58e 100644
--- a/qt-mobile/qml/Log.qml
+++ b/qt-mobile/qml/Log.qml
@@ -17,7 +17,7 @@ MobileComponents.Page {
 /* this can be done by hitting the back key
 	contextualActions: [
 		Action {
-			text: "Close Log"
+			text: qsTr("Close Log")
 			iconName: "dialog-cancel"
 			onTriggered: {
 				stackView.pop()
@@ -37,7 +37,7 @@ MobileComponents.Page {
 				width: logFlick.width
 				spacing: MobileComponents.Units.smallSpacing
 				MobileComponents.Heading {
-					text: "Application Log"
+					text: qsTr("Application Log")
 				}
 				MobileComponents.Label {
 					id: logContent
diff --git a/qt-mobile/qml/Preferences.qml b/qt-mobile/qml/Preferences.qml
index 9607b63..c2cc8c1 100644
--- a/qt-mobile/qml/Preferences.qml
+++ b/qt-mobile/qml/Preferences.qml
@@ -9,7 +9,7 @@ import org.subsurfacedivelog.mobile 1.0
 MobileComponents.Page {
 
 	mainAction: Action {
-		text: "Save"
+		text: qsTr("Save")
 		iconName: "document-save"
 		onTriggered: {
 			manager.distanceThreshold = distanceThreshold.text
@@ -31,13 +31,13 @@ MobileComponents.Page {
 		}
 
 		MobileComponents.Heading {
-			text: "Preferences"
+			text: qsTr("Preferences")
 			Layout.bottomMargin: MobileComponents.Units.largeSpacing / 2
 			Layout.columnSpan: 2
 		}
 
 		MobileComponents.Heading {
-			text: "Subsurface GPS data webservice"
+			text: qsTr("Subsurface GPS data webservice")
 			level: 3
 			Layout.topMargin: MobileComponents.Units.largeSpacing
 			Layout.bottomMargin: MobileComponents.Units.largeSpacing / 2
@@ -45,7 +45,7 @@ MobileComponents.Page {
 		}
 
 		MobileComponents.Label {
-			text: "Distance threshold (meters)"
+			text: qsTr("Distance threshold (meters)")
 			Layout.alignment: Qt.AlignRight
 		}
 
@@ -56,7 +56,7 @@ MobileComponents.Page {
 		}
 
 		MobileComponents.Label {
-			text: "Time threshold (minutes)"
+			text: qsTr("Time threshold (minutes)")
 			Layout.alignment: Qt.AlignRight
 		}
 
diff --git a/qt-mobile/qml/StartPage.qml b/qt-mobile/qml/StartPage.qml
index 3a60d0a..55018e7 100644
--- a/qt-mobile/qml/StartPage.qml
+++ b/qt-mobile/qml/StartPage.qml
@@ -15,14 +15,14 @@ ColumnLayout {
 
 	MobileComponents.Heading {
 		Layout.margins: MobileComponents.Units.gridUnit
-		text: "Subsurface-mobile"
+		text: qsTr("Subsurface-mobile")
 	}
 	MobileComponents.Label {
 		id: explanationText
 		Layout.fillWidth: true
 		Layout.margins: MobileComponents.Units.gridUnit
-		text: "In order to use Subsurface-mobile you need to have a Subsurface cloud storage account " +
-		      "(which can be created with the Subsurface desktop application)."
+		text: qsTr("In order to use Subsurface-mobile you need to have a Subsurface cloud storage account " +
+			"(which can be created with the Subsurface desktop application).")
 		wrapMode: Text.WordWrap
 	}
 	MobileComponents.Label {
diff --git a/qt-mobile/qml/ThemeTest.qml b/qt-mobile/qml/ThemeTest.qml
index e30615d..e5ac527 100644
--- a/qt-mobile/qml/ThemeTest.qml
+++ b/qt-mobile/qml/ThemeTest.qml
@@ -9,7 +9,7 @@ MobileComponents.Page {
 /* this can be done by hitting the back key
 	contextualActions: [
 		Action {
-			text: "Close Theme info"
+			text: qsTr("Close Theme info")
 			iconName: "dialog-cancel"
 			onTriggered: {
 				stackView.pop()
@@ -25,11 +25,11 @@ MobileComponents.Page {
 
 		MobileComponents.Heading {
 			Layout.columnSpan: 2
-			text: "Theme Information"
+			text: qsTr("Theme Information")
 		}
 
 		MobileComponents.Heading {
-			text: "Screen"
+			text: qsTr("Screen")
 			Layout.columnSpan: 2
 			level: 3
 		}
@@ -38,41 +38,41 @@ MobileComponents.Page {
 		}
 
 		MobileComponents.Label {
-			text: "Geometry (pixels):"
+			text: qsTr("Geometry (pixels):")
 		}
 		MobileComponents.Label {
 			text: rootItem.width + "x" + rootItem.height
 		}
 
 		MobileComponents.Label {
-			text: "Geometry (gridUnits):"
+			text: qsTr("Geometry (gridUnits):")
 		}
 		MobileComponents.Label {
 			text: Math.round(rootItem.width / MobileComponents.Units.gridUnit) + "x" + Math.round(rootItem.height / MobileComponents.Units.gridUnit)
 		}
 
 		MobileComponents.Label {
-			text: "Units.gridUnit:"
+			text: qsTr("Units.gridUnit:")
 		}
 		MobileComponents.Label {
 			text: MobileComponents.Units.gridUnit
 		}
 
 		MobileComponents.Label {
-			text: "Units.devicePixelRatio:"
+			text: qsTr("Units.devicePixelRatio:")
 		}
 		MobileComponents.Label {
 			text: Screen.devicePixelRatio
 		}
 
 		MobileComponents.Heading {
-			text: "Font Metrics"
+			text: qsTr("Font Metrics")
 			level: 3
 			Layout.columnSpan: 2
 		}
 
 		MobileComponents.Label {
-			text: "FontMetrics pointSize:"
+			text: qsTr("FontMetrics pointSize:")
 		}
 		MobileComponents.Label {
 			text: fm.font.pointSize
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml
index 71d507c..00e1343 100644
--- a/qt-mobile/qml/main.qml
+++ b/qt-mobile/qml/main.qml
@@ -44,7 +44,7 @@ MobileComponents.ApplicationWindow {
 		bannerImageSource: "dive.jpg"
 		actions: [
 			Action {
-				text: "Dive list"
+				text: qsTr("Dive list")
 				onTriggered: {
 					if (manager.credentialStatus == QMLManager.UNKNOWN) {
 						// the user has asked to change credentials - if the credentials before that
@@ -58,7 +58,7 @@ MobileComponents.ApplicationWindow {
 				}
 			},
 			Action {
-				text: "Cloud credentials"
+				text: qsTr("Cloud credentials")
 				onTriggered: {
 					returnTopPage()
 					oldStatus = manager.credentialStatus
@@ -72,12 +72,12 @@ MobileComponents.ApplicationWindow {
 				}
 			},
 			MobileComponents.ActionGroup {
-				text: "Manage dives"
+				text: qsTr("Manage dives")
 				enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL
 			/*
 			 * disable for the beta to avoid confusion
 				Action {
-					text: "Download from computer"
+					text: qsTr("Download from computer")
 					onTriggered: {
 						detailsWindow.endEditMode()
 						stackView.push(downloadDivesWindow)
@@ -85,7 +85,7 @@ MobileComponents.ApplicationWindow {
 				}
 			 */
 				Action {
-					text: "Add dive manually"
+					text: qsTr("Add dive manually")
 					onTriggered: {
 						detailsWindow.state = "add"
 						detailsWindow.dive_id = manager.addDive();
@@ -108,7 +108,7 @@ MobileComponents.ApplicationWindow {
 					}
 				}
 				Action {
-					text: "Refresh"
+					text: qsTr("Refresh")
 					onTriggered: {
 						globalDrawer.close()
 						detailsWindow.endEditMode()
@@ -116,7 +116,7 @@ MobileComponents.ApplicationWindow {
 					}
 				}
 				Action {
-					text: "Upload to cloud"
+					text: qsTr("Upload to cloud")
 					onTriggered: {
 						globalDrawer.close()
 						detailsWindow.endEditMode()
@@ -126,31 +126,31 @@ MobileComponents.ApplicationWindow {
 			},
 
 			MobileComponents.ActionGroup {
-				text: "GPS"
+				text: qsTr("GPS")
 				enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL
 				Action {
-					text: "GPS-tag dives"
+					text: qsTr("GPS-tag dives")
 					onTriggered: {
 						manager.applyGpsData();
 					}
 				}
 
 				Action {
-					text: "Upload GPS data"
+					text: qsTr("Upload GPS data")
 					onTriggered: {
 						manager.sendGpsData();
 					}
 				}
 
 				Action {
-					text: "Download GPS data"
+					text: qsTr("Download GPS data")
 					onTriggered: {
 						manager.downloadGpsData();
 					}
 				}
 
 				Action {
-					text: "Show GPS fixes"
+					text: qsTr("Show GPS fixes")
 					onTriggered: {
 						manager.populateGpsData();
 						stackView.push(gpsWindow)
@@ -158,13 +158,13 @@ MobileComponents.ApplicationWindow {
 				}
 
 				Action {
-					text: "Clear GPS cache"
+					text: qsTr("Clear GPS cache")
 					onTriggered: {
 						manager.clearGpsData();
 					}
 				}
 				Action {
-					text: "Preferences"
+					text: qsTr("Preferences")
 					onTriggered: {
 						stackView.push(prefsWindow)
 						detailsWindow.endEditMode()
@@ -173,16 +173,16 @@ MobileComponents.ApplicationWindow {
 			},
 
 			MobileComponents.ActionGroup {
-				text: "Developer"
+				text: qsTr("Developer")
 				Action {
-					text: "App log"
+					text: qsTr("App log")
 					onTriggered: {
 						stackView.push(logWindow)
 					}
 				}
 
 				Action {
-					text: "Theme information"
+					text: qsTr("Theme information")
 					onTriggered: {
 						stackView.push(themetest)
 					}
@@ -190,20 +190,20 @@ MobileComponents.ApplicationWindow {
 				Action {
 					checkable: true
 					checked: manager.verboseEnabled
-					text: checked ? "Disable verbose (for adb logcat)" : "Enable verbose (for adb logcat)"
+					text: checked ? qsTr("Disable verbose (for adb logcat)") : qsTr("Enable verbose (for adb logcat)")
 					onToggled: {
 						manager.verboseEnabled = checked;
 					}
 				}
 			},
 			Action {
-				text: "User manual"
+				text: qsTr("User manual")
 				onTriggered: {
 					manager.showUserManual()
 				}
 			},
 			Action {
-				text: "About"
+				text: qsTr("About")
 				onTriggered: {
 					stackView.push(aboutWindow)
 					detailsWindow.endEditMode()
@@ -215,7 +215,7 @@ MobileComponents.ApplicationWindow {
 			height: childrenRect.height
 			width: MobileComponents.Units.gridUnit * 10
 			CheckBox {
-				//text: "Run location service"
+				//text: qsTr("Run location service")
 				id: locationCheckbox
 				anchors {
 					left: parent.left
@@ -233,7 +233,7 @@ MobileComponents.ApplicationWindow {
 					//leftMargin: units.smallSpacing
 					verticalCenter: locationCheckbox.verticalCenter
 				}
-				text: "Run location service"
+				text: qsTr("Run location service")
 			}
 			onClicked: {
 				print("Click.")
-- 
2.5.4 (Apple Git-61)



More information about the subsurface mailing list