Mark strings in qml files for translation

I did this semi-automatically: I used the script from
the previous patch and then did some manual corrections.

This marks only title: and text: tags, there might be others

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2016-05-03 21:24:00 +02:00 committed by Dirk Hohndel
parent 70e3ec9e90
commit 502be2a0f1
13 changed files with 118 additions and 118 deletions

View file

@ -7,7 +7,7 @@ import org.subsurfacedivelog.mobile 1.0
Kirigami.ScrollablePage { Kirigami.ScrollablePage {
id: aboutPage id: aboutPage
property int pageWidth: aboutPage.width - aboutPage.leftPadding - aboutPage.rightPadding property int pageWidth: aboutPage.width - aboutPage.leftPadding - aboutPage.rightPadding
title: "About Subsurface-mobile" title: qsTr("About Subsurface-mobile")
ColumnLayout { ColumnLayout {
spacing: Kirigami.Units.largeSpacing spacing: Kirigami.Units.largeSpacing
@ -16,7 +16,7 @@ Kirigami.ScrollablePage {
Kirigami.Heading { Kirigami.Heading {
text: "About Subsurface-mobile" text: qsTr("About Subsurface-mobile")
Layout.topMargin: Kirigami.Units.gridUnit Layout.topMargin: Kirigami.Units.gridUnit
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: pageWidth Layout.maximumWidth: pageWidth
@ -33,8 +33,8 @@ Kirigami.ScrollablePage {
} }
Kirigami.Heading { Kirigami.Heading {
text: "A mobile version of the free Subsurface divelog software.\n" + text: qsTr("A mobile version of the free Subsurface divelog software.\n") +
"View your dive logs while on the go." qsTr("View your dive logs while on the go.")
level: 4 level: 4
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.topMargin: Kirigami.Units.largeSpacing * 3 Layout.topMargin: Kirigami.Units.largeSpacing * 3
@ -45,7 +45,7 @@ Kirigami.ScrollablePage {
} }
Kirigami.Heading { Kirigami.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 level: 5
font.pointSize: subsurfaceTheme.smallPointSize + 1 font.pointSize: subsurfaceTheme.smallPointSize + 1
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter

View file

@ -46,13 +46,13 @@ Item {
} }
Kirigami.Heading { Kirigami.Heading {
text: "Cloud credentials" text: qsTr("Cloud credentials")
level: headingLevel level: headingLevel
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2 Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
} }
Kirigami.Label { Kirigami.Label {
text: "Email" text: qsTr("Email")
} }
StyledTextField { StyledTextField {
@ -64,7 +64,7 @@ Item {
} }
Kirigami.Label { Kirigami.Label {
text: "Password" text: qsTr("Password")
} }
StyledTextField { StyledTextField {
@ -87,7 +87,7 @@ Item {
} }
} }
Kirigami.Label { Kirigami.Label {
text: "Show password" text: qsTr("Show password")
} }
} }
Item { width: Kirigami.Units.gridUnit; height: width } Item { width: Kirigami.Units.gridUnit; height: width }

View file

@ -30,7 +30,7 @@ Kirigami.Page {
property alias gpsCheckbox: detailsEdit.gpsCheckbox property alias gpsCheckbox: detailsEdit.gpsCheckbox
property int updateCurrentIdx: manager.updateSelectedDive property int updateCurrentIdx: manager.updateSelectedDive
title: diveDetailsListView.currentItem ? diveDetailsListView.currentItem.modelData.dive.location : "Dive details" title: diveDetailsListView.currentItem ? diveDetailsListView.currentItem.modelData.dive.location : qsTr("Dive details")
state: "view" state: "view"
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
@ -64,7 +64,7 @@ Kirigami.Page {
] ]
property QtObject deleteAction: Action { property QtObject deleteAction: Action {
text: "Delete dive" text: qsTr("Delete dive")
iconName: "trash-empty" iconName: "trash-empty"
onTriggered: { onTriggered: {
contextDrawer.close() contextDrawer.close()
@ -81,7 +81,7 @@ Kirigami.Page {
} }
property QtObject mapAction: Action { property QtObject mapAction: Action {
text: "Show on map" text: qsTr("Show on map")
iconName: "gps" iconName: "gps"
onTriggered: { onTriggered: {
showMap(diveDetailsListView.currentItem.modelData.dive.gps) showMap(diveDetailsListView.currentItem.modelData.dive.gps)

View file

@ -71,11 +71,11 @@ Item {
Kirigami.Heading { Kirigami.Heading {
Layout.columnSpan: 2 Layout.columnSpan: 2
text: "Dive " + number text: qsTr("Dive %1").arg(number)
} }
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Date:" text: qsTr("Date:")
} }
StyledTextField { StyledTextField {
id: txtDate; id: txtDate;
@ -83,7 +83,7 @@ Item {
} }
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Location:" text: qsTr("Location:")
} }
StyledTextField { StyledTextField {
id: txtLocation; id: txtLocation;
@ -92,7 +92,7 @@ Item {
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Coordinates:" text: qsTr("Coordinates:")
} }
StyledTextField { StyledTextField {
id: txtGps id: txtGps
@ -101,7 +101,7 @@ Item {
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Use current\nGPS location:" text: qsTr("Use current\nGPS location:")
visible: manager.locationServiceAvailable visible: manager.locationServiceAvailable
} }
CheckBox { CheckBox {
@ -115,7 +115,7 @@ Item {
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Depth:" text: qsTr("Depth:")
} }
StyledTextField { StyledTextField {
id: txtDepth id: txtDepth
@ -124,7 +124,7 @@ Item {
} }
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Duration:" text: qsTr("Duration:")
} }
StyledTextField { StyledTextField {
id: txtDuration id: txtDuration
@ -134,7 +134,7 @@ Item {
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Air Temp:" text: qsTr("Air Temp:")
} }
StyledTextField { StyledTextField {
id: txtAirTemp id: txtAirTemp
@ -143,7 +143,7 @@ Item {
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Water Temp:" text: qsTr("Water Temp:")
} }
StyledTextField { StyledTextField {
id: txtWaterTemp id: txtWaterTemp
@ -152,7 +152,7 @@ Item {
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Suit:" text: qsTr("Suit:")
} }
StyledTextField { StyledTextField {
id: txtSuit id: txtSuit
@ -161,7 +161,7 @@ Item {
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Buddy:" text: qsTr("Buddy:")
} }
StyledTextField { StyledTextField {
id: txtBuddy id: txtBuddy
@ -170,7 +170,7 @@ Item {
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Dive Master:" text: qsTr("Dive Master:")
} }
StyledTextField { StyledTextField {
id: txtDiveMaster id: txtDiveMaster
@ -179,7 +179,7 @@ Item {
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Weight:" text: qsTr("Weight:")
} }
StyledTextField { StyledTextField {
id: txtWeight id: txtWeight
@ -189,7 +189,7 @@ Item {
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Gas mix:" text: qsTr("Gas mix:")
} }
StyledTextField { StyledTextField {
id: txtGasMix id: txtGasMix
@ -200,7 +200,7 @@ Item {
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "Start Pressure:" text: qsTr("Start Pressure:")
} }
StyledTextField { StyledTextField {
id: txtStartPressure id: txtStartPressure
@ -210,7 +210,7 @@ Item {
Kirigami.Label { Kirigami.Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: "End Pressure:" text: qsTr("End Pressure:")
} }
StyledTextField { StyledTextField {
id: txtEndPressure id: txtEndPressure
@ -221,7 +221,7 @@ Item {
Kirigami.Label { Kirigami.Label {
Layout.columnSpan: 2 Layout.columnSpan: 2
Layout.alignment: Qt.AlignLeft Layout.alignment: Qt.AlignLeft
text: "Notes:" text: qsTr("Notes:")
} }
TextArea { TextArea {
Layout.columnSpan: 2 Layout.columnSpan: 2

View file

@ -60,7 +60,7 @@ Item {
} }
Kirigami.Label { Kirigami.Label {
id: dateLabel id: dateLabel
text: "Date: " text: qsTr("Date: ")
opacity: 0.6 opacity: 0.6
} }
Kirigami.Label { Kirigami.Label {
@ -77,7 +77,7 @@ Item {
Kirigami.Label { Kirigami.Label {
id: depthLabel id: depthLabel
text: "Depth: " text: qsTr("Depth: ")
opacity: 0.6 opacity: 0.6
} }
Kirigami.Label { Kirigami.Label {
@ -86,7 +86,7 @@ Item {
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
} }
Kirigami.Label { Kirigami.Label {
text: "Duration: " text: qsTr("Duration: ")
opacity: 0.6 opacity: 0.6
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }
@ -118,7 +118,7 @@ Item {
Layout.columnSpan: 4 Layout.columnSpan: 4
Layout.margins: Kirigami.Units.gridUnit Layout.margins: Kirigami.Units.gridUnit
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: "No profile to show" text: qsTr("No profile to show")
} }
} }
GridLayout { GridLayout {
@ -136,12 +136,12 @@ Item {
Kirigami.Heading { Kirigami.Heading {
Layout.fillWidth: true Layout.fillWidth: true
level: 3 level: 3
text: "Dive Details" text: qsTr("Dive Details")
Layout.columnSpan: 4 Layout.columnSpan: 4
} }
Kirigami.Label { Kirigami.Label {
text: "Suit:" text: qsTr("Suit:")
wrapMode: Text.WrapAtWordBoundaryOrAnywhere wrapMode: Text.WrapAtWordBoundaryOrAnywhere
opacity: 0.6 opacity: 0.6
Layout.maximumWidth: detailsView.col1Width Layout.maximumWidth: detailsView.col1Width
@ -156,7 +156,7 @@ Item {
} }
Kirigami.Label { Kirigami.Label {
text: "Air Temp:" text: qsTr("Air Temp:")
wrapMode: Text.WrapAtWordBoundaryOrAnywhere wrapMode: Text.WrapAtWordBoundaryOrAnywhere
opacity: 0.6 opacity: 0.6
Layout.maximumWidth: detailsView.col3Width Layout.maximumWidth: detailsView.col3Width
@ -172,7 +172,7 @@ Item {
} }
Kirigami.Label { Kirigami.Label {
text: "Cylinder:" text: qsTr("Cylinder:")
opacity: 0.6 opacity: 0.6
Layout.maximumWidth: detailsView.col1Width Layout.maximumWidth: detailsView.col1Width
Layout.minimumWidth: detailsView.col1Width Layout.minimumWidth: detailsView.col1Width
@ -186,7 +186,7 @@ Item {
} }
Kirigami.Label { Kirigami.Label {
text: "Water Temp:" text: qsTr("Water Temp:")
wrapMode: Text.WrapAtWordBoundaryOrAnywhere wrapMode: Text.WrapAtWordBoundaryOrAnywhere
opacity: 0.6 opacity: 0.6
Layout.maximumWidth: detailsView.col3Width Layout.maximumWidth: detailsView.col3Width
@ -202,7 +202,7 @@ Item {
} }
Kirigami.Label { Kirigami.Label {
text: "Dive Master:" text: qsTr("Dive Master:")
wrapMode: Text.WrapAtWordBoundaryOrAnywhere wrapMode: Text.WrapAtWordBoundaryOrAnywhere
opacity: 0.6 opacity: 0.6
Layout.maximumWidth: detailsView.col1Width Layout.maximumWidth: detailsView.col1Width
@ -217,7 +217,7 @@ Item {
} }
Kirigami.Label { Kirigami.Label {
text: "Weight:" text: qsTr("Weight:")
opacity: 0.6 opacity: 0.6
Layout.maximumWidth: detailsView.col3Width Layout.maximumWidth: detailsView.col3Width
Layout.minimumWidth: detailsView.col3Width Layout.minimumWidth: detailsView.col3Width
@ -246,7 +246,7 @@ Item {
columnSpacing: Kirigami.Units.smallSpacing columnSpacing: Kirigami.Units.smallSpacing
Kirigami.Label { Kirigami.Label {
text: "Buddy:" text: qsTr("Buddy:")
opacity: 0.6 opacity: 0.6
Layout.maximumWidth: detailsView.col1Width Layout.maximumWidth: detailsView.col1Width
Layout.minimumWidth: detailsView.col1Width Layout.minimumWidth: detailsView.col1Width
@ -260,7 +260,7 @@ Item {
} }
Kirigami.Label { Kirigami.Label {
text: "SAC:" text: qsTr("SAC:")
opacity: 0.6 opacity: 0.6
Layout.maximumWidth: detailsView.col3Width Layout.maximumWidth: detailsView.col3Width
Layout.minimumWidth: detailsView.col3Width Layout.minimumWidth: detailsView.col3Width
@ -277,7 +277,7 @@ Item {
Kirigami.Heading { Kirigami.Heading {
Layout.fillWidth: true Layout.fillWidth: true
level: 3 level: 3
text: "Notes" text: qsTr("Notes")
wrapMode: Text.WrapAtWordBoundaryOrAnywhere wrapMode: Text.WrapAtWordBoundaryOrAnywhere
Layout.columnSpan: 4 Layout.columnSpan: 4
} }

View file

@ -9,7 +9,7 @@ import org.subsurfacedivelog.mobile 1.0
Kirigami.ScrollablePage { Kirigami.ScrollablePage {
id: page id: page
objectName: "DiveList" objectName: "DiveList"
title: "Dive list" title: qsTr("Dive list")
background: Rectangle { background: Rectangle {
color: Kirigami.Theme.viewBackgroundColor color: Kirigami.Theme.viewBackgroundColor
} }
@ -92,7 +92,7 @@ Kirigami.ScrollablePage {
bottom: numberText.bottom bottom: numberText.bottom
} }
Kirigami.Label { Kirigami.Label {
text: 'Depth: ' text: qsTr('Depth: ')
font.pointSize: subsurfaceTheme.smallPointSize font.pointSize: subsurfaceTheme.smallPointSize
color: textColor color: textColor
} }
@ -103,7 +103,7 @@ Kirigami.ScrollablePage {
color: textColor color: textColor
} }
Kirigami.Label { Kirigami.Label {
text: 'Duration: ' text: qsTr('Duration: ')
font.pointSize: subsurfaceTheme.smallPointSize font.pointSize: subsurfaceTheme.smallPointSize
color: textColor color: textColor
} }
@ -219,17 +219,17 @@ Kirigami.ScrollablePage {
if (visible) { if (visible) {
page.actions.main = page.saveAction page.actions.main = page.saveAction
page.actions.right = page.offlineAction page.actions.right = page.offlineAction
title = "Cloud credentials" title = qsTr("Cloud credentials")
} else if(manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL || manager.credentialStatus === QMLManager.NOCLOUD) { } else if(manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL || manager.credentialStatus === QMLManager.NOCLOUD) {
page.actions.main = page.addDiveAction page.actions.main = page.addDiveAction
page.actions.right = null page.actions.right = null
title = "Dive list" title = qsTr("Dive list")
if (diveListView.count === 0) if (diveListView.count === 0)
showPassiveNotification(qsTr("Please tap the '+' button to add a dive"), 3000) showPassiveNotification(qsTr("Please tap the '+' button to add a dive"), 3000)
} else { } else {
page.actions.main = null page.actions.main = null
page.actions.right = null page.actions.right = null
title = "Dive list" title = qsTr("Dive list")
} }
} }

View file

@ -13,12 +13,12 @@ Kirigami.Page {
width: parent.width width: parent.width
height: parent.height height: parent.height
Layout.fillWidth: true; Layout.fillWidth: true;
title: "Dive Computer" title: qsTr("Dive Computer")
/* this can be done by hitting the back key /* this can be done by hitting the back key
contextualActions: [ contextualActions: [
Action { Action {
text: "Close Preferences" text: qsTr("Close Preferences")
iconName: "dialog-cancel" iconName: "dialog-cancel"
onTriggered: { onTriggered: {
stackView.pop() stackView.pop()
@ -35,11 +35,11 @@ Kirigami.Page {
RowLayout { RowLayout {
anchors.top:parent.top anchors.top:parent.top
Layout.fillWidth: true Layout.fillWidth: true
Text { text: " Vendor name : " } Text { text: qsTr(" Vendor name : ") }
ComboBox { Layout.fillWidth: true } ComboBox { Layout.fillWidth: true }
} }
RowLayout { RowLayout {
Text { text: " Dive Computer:" } Text { text: qsTr(" Dive Computer:") }
ComboBox { Layout.fillWidth: true } ComboBox { Layout.fillWidth: true }
} }
RowLayout { RowLayout {
@ -49,15 +49,15 @@ Kirigami.Page {
} }
RowLayout { RowLayout {
SubsurfaceButton { SubsurfaceButton {
text: "Download" text: qsTr("Download")
onClicked: { onClicked: {
text: "Retry" text: qsTr("Retry")
stackView.pop(); stackView.pop();
} }
} }
SubsurfaceButton { SubsurfaceButton {
id:quitbutton id:quitbutton
text: "Quit" text: qsTr("Quit")
onClicked: { onClicked: {
stackView.pop(); stackView.pop();
} }
@ -65,7 +65,7 @@ Kirigami.Page {
} }
RowLayout { RowLayout {
Text { Text {
text: " Downloaded dives" text: qsTr(" Downloaded dives")
} }
} }
TableView { TableView {
@ -76,29 +76,29 @@ Kirigami.Page {
TableViewColumn { TableViewColumn {
width: parent.width / 2 width: parent.width / 2
role: "datetime" role: "datetime"
title: "Date / Time" title: qsTr("Date / Time")
} }
TableViewColumn { TableViewColumn {
width: parent.width / 4 width: parent.width / 4
role: "duration" role: "duration"
title: "Duration" title: qsTr("Duration")
} }
TableViewColumn { TableViewColumn {
width: parent.width / 4 width: parent.width / 4
role: "depth" role: "depth"
title: "Depth" title: qsTr("Depth")
} }
} }
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
SubsurfaceButton { SubsurfaceButton {
text: "Accept" text: qsTr("Accept")
onClicked: { onClicked: {
stackView.pop(); stackView.pop();
} }
} }
SubsurfaceButton { SubsurfaceButton {
text: "Quit" text: qsTr("Quit")
onClicked: { onClicked: {
stackView.pop(); stackView.pop();
} }
@ -108,11 +108,11 @@ Kirigami.Page {
Layout.fillWidth: true Layout.fillWidth: true
} }
SubsurfaceButton { SubsurfaceButton {
text: "Select All" text: qsTr("Select All")
} }
SubsurfaceButton { SubsurfaceButton {
id: unselectbutton id: unselectbutton
text: "Unselect All" text: qsTr("Unselect All")
} }
} }
RowLayout { // spacer to make space for silly button RowLayout { // spacer to make space for silly button

View file

@ -13,7 +13,7 @@ Kirigami.ScrollablePage {
width: parent.width - Kirigami.Units.gridUnit width: parent.width - Kirigami.Units.gridUnit
anchors.margins: Kirigami.Units.gridUnit / 2 anchors.margins: Kirigami.Units.gridUnit / 2
objectName: "gpsList" objectName: "gpsList"
title: "GPS Fixes" title: qsTr("GPS Fixes")
Component { Component {
id: gpsDelegate id: gpsDelegate
@ -37,7 +37,7 @@ Kirigami.ScrollablePage {
rightMargin: horizontalPadding rightMargin: horizontalPadding
} }
Kirigami.Label { Kirigami.Label {
text: 'Date: ' text: qsTr('Date: ')
opacity: 0.6 opacity: 0.6
font.pointSize: subsurfaceTheme.smallPointSize font.pointSize: subsurfaceTheme.smallPointSize
} }
@ -47,7 +47,7 @@ Kirigami.ScrollablePage {
font.pointSize: subsurfaceTheme.smallPointSize font.pointSize: subsurfaceTheme.smallPointSize
} }
Kirigami.Label { Kirigami.Label {
text: 'Name: ' text: qsTr('Name: ')
opacity: 0.6 opacity: 0.6
font.pointSize: subsurfaceTheme.smallPointSize font.pointSize: subsurfaceTheme.smallPointSize
} }
@ -57,7 +57,7 @@ Kirigami.ScrollablePage {
font.pointSize: subsurfaceTheme.smallPointSize font.pointSize: subsurfaceTheme.smallPointSize
} }
Kirigami.Label { Kirigami.Label {
text: 'Latitude: ' text: qsTr('Latitude: ')
opacity: 0.6 opacity: 0.6
font.pointSize: subsurfaceTheme.smallPointSize font.pointSize: subsurfaceTheme.smallPointSize
} }
@ -66,7 +66,7 @@ Kirigami.ScrollablePage {
font.pointSize: subsurfaceTheme.smallPointSize font.pointSize: subsurfaceTheme.smallPointSize
} }
Kirigami.Label { Kirigami.Label {
text: 'Longitude: ' text: qsTr('Longitude: ')
opacity: 0.6 opacity: 0.6
font.pointSize: subsurfaceTheme.smallPointSize font.pointSize: subsurfaceTheme.smallPointSize
} }
@ -110,7 +110,7 @@ Kirigami.ScrollablePage {
x: Kirigami.Units.gridUnit / 2 x: Kirigami.Units.gridUnit / 2
height: paintedHeight + Kirigami.Units.gridUnit / 2 height: paintedHeight + Kirigami.Units.gridUnit / 2
verticalAlignment: Text.AlignBottom verticalAlignment: Text.AlignBottom
text: "List of stored GPS fixes" text: qsTr("List of stored GPS fixes")
} }
} }
} }

View file

@ -12,7 +12,7 @@ Kirigami.ScrollablePage {
id: logWindow id: logWindow
anchors.margins: Kirigami.Units.gridUnit / 2 anchors.margins: Kirigami.Units.gridUnit / 2
objectName: "Log" objectName: "Log"
title: "Application Log" title: qsTr("Application Log")
property int pageWidth: subsurfaceTheme.columnWidth - Kirigami.Units.smallSpacing property int pageWidth: subsurfaceTheme.columnWidth - Kirigami.Units.smallSpacing
@ -20,7 +20,7 @@ Kirigami.ScrollablePage {
width: logWindow.width - logWindow.leftPadding - logWindow.rightPadding - 2 * Kirigami.Units.smallSpacing width: logWindow.width - logWindow.leftPadding - logWindow.rightPadding - 2 * Kirigami.Units.smallSpacing
spacing: Kirigami.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
Kirigami.Heading { Kirigami.Heading {
text: "Application Log" text: qsTr("Application Log")
} }
Kirigami.Label { Kirigami.Label {
id: logContent id: logContent

View file

@ -8,10 +8,10 @@ import org.subsurfacedivelog.mobile 1.0
Kirigami.Page { Kirigami.Page {
title: "Preferences" title: qsTr("Preferences")
actions { actions {
main: Action { main: Action {
text: "Save" text: qsTr("Save")
iconName: "document-save" iconName: "document-save"
onTriggered: { onTriggered: {
manager.distanceThreshold = distanceThreshold.text manager.distanceThreshold = distanceThreshold.text
@ -34,13 +34,13 @@ Kirigami.Page {
} }
Kirigami.Heading { Kirigami.Heading {
text: "Preferences" text: qsTr("Preferences")
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2 Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
Layout.columnSpan: 2 Layout.columnSpan: 2
} }
Kirigami.Heading { Kirigami.Heading {
text: "Subsurface GPS data webservice" text: qsTr("Subsurface GPS data webservice")
level: 3 level: 3
Layout.topMargin: Kirigami.Units.largeSpacing Layout.topMargin: Kirigami.Units.largeSpacing
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2 Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
@ -48,7 +48,7 @@ Kirigami.Page {
} }
Kirigami.Label { Kirigami.Label {
text: "Distance threshold (meters)" text: qsTr("Distance threshold (meters)")
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }
@ -59,7 +59,7 @@ Kirigami.Page {
} }
Kirigami.Label { Kirigami.Label {
text: "Time threshold (minutes)" text: qsTr("Time threshold (minutes)")
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }

View file

@ -16,10 +16,10 @@ ColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: Kirigami.Units.gridUnit Layout.margins: Kirigami.Units.gridUnit
Layout.topMargin: Kirigami.Units.gridUnit * 3 Layout.topMargin: Kirigami.Units.gridUnit * 3
text: "To use Subsurface-mobile with Subsurface cloud storage, please enter " + text: qsTr("To use Subsurface-mobile with Subsurface cloud storage, please enter" +
"your cloud credentials.\n\n" + "your cloud credentials.\n\n" +
"To use Subsurface-mobile only with local data on this device, tap " + "To use Subsurface-mobile only with local data on this device, tap " +
"on the no cloud icon below." "on the no cloud icon below.")
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
} }
Kirigami.Label { Kirigami.Label {

View file

@ -10,7 +10,7 @@ Kirigami.Page {
/* this can be done by hitting the back key /* this can be done by hitting the back key
contextualActions: [ contextualActions: [
Action { Action {
text: "Close Theme info" text: qsTr("Close Theme info")
iconName: "dialog-cancel" iconName: "dialog-cancel"
onTriggered: { onTriggered: {
stackView.pop() stackView.pop()
@ -26,11 +26,11 @@ Kirigami.Page {
Kirigami.Heading { Kirigami.Heading {
Layout.columnSpan: 2 Layout.columnSpan: 2
text: "Theme Information" text: qsTr("Theme Information")
} }
Kirigami.Heading { Kirigami.Heading {
text: "Screen" text: qsTr("Screen")
Layout.columnSpan: 2 Layout.columnSpan: 2
level: 3 level: 3
} }
@ -39,83 +39,83 @@ Kirigami.Page {
} }
Kirigami.Label { Kirigami.Label {
text: "Geometry (pixels):" text: qsTr("Geometry (pixels):")
} }
Kirigami.Label { Kirigami.Label {
text: rootItem.width + "x" + rootItem.height text: rootItem.width + "x" + rootItem.height
} }
Kirigami.Label { Kirigami.Label {
text: "Geometry (gridUnits):" text: qsTr("Geometry (gridUnits):")
} }
Kirigami.Label { Kirigami.Label {
text: Math.round(rootItem.width / Kirigami.Units.gridUnit) + "x" + Math.round(rootItem.height / Kirigami.Units.gridUnit) text: Math.round(rootItem.width / Kirigami.Units.gridUnit) + "x" + Math.round(rootItem.height / Kirigami.Units.gridUnit)
} }
Kirigami.Label { Kirigami.Label {
text: "Units.gridUnit:" text: qsTr("Units.gridUnit:")
} }
Kirigami.Label { Kirigami.Label {
text: Kirigami.Units.gridUnit text: Kirigami.Units.gridUnit
} }
Kirigami.Label { Kirigami.Label {
text: "Units.devicePixelRatio:" text: qsTr("Units.devicePixelRatio:")
} }
Kirigami.Label { Kirigami.Label {
text: Screen.devicePixelRatio text: Screen.devicePixelRatio
} }
Kirigami.Heading { Kirigami.Heading {
text: "Font Metrics" text: qsTr("Font Metrics")
level: 3 level: 3
Layout.columnSpan: 2 Layout.columnSpan: 2
} }
Kirigami.Label { Kirigami.Label {
text: "FontMetrics pointSize:" text: qsTr("FontMetrics pointSize:")
} }
Kirigami.Label { Kirigami.Label {
text: fm.font.pointSize text: fm.font.pointSize
} }
Kirigami.Label { Kirigami.Label {
text: "FontMetrics pixelSize:" text: qsTr("FontMetrics pixelSize:")
} }
Kirigami.Label { Kirigami.Label {
text: fm.height text: fm.height
} }
Kirigami.Label { Kirigami.Label {
text: "FontMetrics devicePixelRatio:" text: qsTr("FontMetrics devicePixelRatio:")
} }
Kirigami.Label { Kirigami.Label {
text: fm.height / fm.font.pointSize text: fm.height / fm.font.pointSize
} }
Kirigami.Label { Kirigami.Label {
text: "Text item pixelSize:" text: qsTr("Text item pixelSize:")
} }
Text { Text {
text: font.pixelSize text: font.pixelSize
} }
Kirigami.Label { Kirigami.Label {
text: "Text item pointSize:" text: qsTr("Text item pointSize:")
} }
Text { Text {
text: font.pointSize text: font.pointSize
} }
Kirigami.Label { Kirigami.Label {
text: "Pixel density:" text: qsTr("Pixel density:")
} }
Text { Text {
text: Screen.pixelDensity text: Screen.pixelDensity
} }
Kirigami.Label { Kirigami.Label {
text: "Height of default font:" text: qsTr("Height of default font:")
} }
Text { Text {
text: font.pixelSize / Screen.pixelDensity + "mm" text: font.pixelSize / Screen.pixelDensity + "mm"

View file

@ -88,13 +88,13 @@ Kirigami.ApplicationWindow {
} }
globalDrawer: Kirigami.GlobalDrawer { globalDrawer: Kirigami.GlobalDrawer {
title: "Subsurface" title: qsTr("Subsurface")
titleIcon: "qrc:/qml/subsurface-mobile-icon.png" titleIcon: "qrc:/qml/subsurface-mobile-icon.png"
bannerImageSource: "dive.jpg" bannerImageSource: "dive.jpg"
actions: [ actions: [
Kirigami.Action { Kirigami.Action {
text: "Dive list" text: qsTr("Dive list")
onTriggered: { onTriggered: {
manager.appendTextToLog("requested dive list with credential status " + manager.credentialStatus) manager.appendTextToLog("requested dive list with credential status " + manager.credentialStatus)
if (manager.credentialStatus == QMLManager.UNKNOWN) { if (manager.credentialStatus == QMLManager.UNKNOWN) {
@ -109,7 +109,7 @@ Kirigami.ApplicationWindow {
} }
}, },
Kirigami.Action { Kirigami.Action {
text: "Cloud credentials" text: qsTr("Cloud credentials")
onTriggered: { onTriggered: {
returnTopPage() returnTopPage()
oldStatus = manager.credentialStatus oldStatus = manager.credentialStatus
@ -123,11 +123,11 @@ Kirigami.ApplicationWindow {
} }
}, },
Kirigami.Action { Kirigami.Action {
text: "Manage dives" text: qsTr("Manage dives")
/* /*
* disable for the beta to avoid confusion * disable for the beta to avoid confusion
Action { Action {
text: "Download from computer" text: qsTr("Download from computer")
onTriggered: { onTriggered: {
detailsWindow.endEditMode() detailsWindow.endEditMode()
stackView.push(downloadDivesWindow) stackView.push(downloadDivesWindow)
@ -135,7 +135,7 @@ Kirigami.ApplicationWindow {
} }
*/ */
Kirigami.Action { Kirigami.Action {
text: "Add dive manually" text: qsTr("Add dive manually")
enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL || manager.credentialStatus === QMLManager.NOCLOUD enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL || manager.credentialStatus === QMLManager.NOCLOUD
onTriggered: { onTriggered: {
returnTopPage() // otherwise odd things happen with the page stack returnTopPage() // otherwise odd things happen with the page stack
@ -143,7 +143,7 @@ Kirigami.ApplicationWindow {
} }
} }
Kirigami.Action { Kirigami.Action {
text: "Manual sync with cloud" text: qsTr("Manual sync with cloud")
enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL || manager.credentialStatus === QMLManager.NOCLOUD enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL || manager.credentialStatus === QMLManager.NOCLOUD
onTriggered: { onTriggered: {
if (manager.credentialStatus === QMLManager.NOCLOUD) { if (manager.credentialStatus === QMLManager.NOCLOUD) {
@ -161,7 +161,7 @@ Kirigami.ApplicationWindow {
} }
} }
Kirigami.Action { Kirigami.Action {
text: syncToCloud ? "Offline mode" : "Enable auto cloud sync" text: syncToCloud ? qsTr("Offline mode") : qsTr("Enable auto cloud sync")
enabled: manager.credentialStatus !== QMLManager.NOCLOUD enabled: manager.credentialStatus !== QMLManager.NOCLOUD
onTriggered: { onTriggered: {
syncToCloud = !syncToCloud syncToCloud = !syncToCloud
@ -179,31 +179,31 @@ Kirigami.ApplicationWindow {
}, },
Kirigami.Action { Kirigami.Action {
text: "GPS" text: qsTr("GPS")
enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL
Kirigami.Action { Kirigami.Action {
text: "GPS-tag dives" text: qsTr("GPS-tag dives")
onTriggered: { onTriggered: {
manager.applyGpsData(); manager.applyGpsData();
} }
} }
Kirigami.Action { Kirigami.Action {
text: "Upload GPS data" text: qsTr("Upload GPS data")
onTriggered: { onTriggered: {
manager.sendGpsData(); manager.sendGpsData();
} }
} }
Kirigami.Action { Kirigami.Action {
text: "Download GPS data" text: qsTr("Download GPS data")
onTriggered: { onTriggered: {
manager.downloadGpsData(); manager.downloadGpsData();
} }
} }
Kirigami.Action { Kirigami.Action {
text: "Show GPS fixes" text: qsTr("Show GPS fixes")
onTriggered: { onTriggered: {
returnTopPage() returnTopPage()
manager.populateGpsData(); manager.populateGpsData();
@ -212,13 +212,13 @@ Kirigami.ApplicationWindow {
} }
Kirigami.Action { Kirigami.Action {
text: "Clear GPS cache" text: qsTr("Clear GPS cache")
onTriggered: { onTriggered: {
manager.clearGpsData(); manager.clearGpsData();
} }
} }
Kirigami.Action { Kirigami.Action {
text: "Preferences" text: qsTr("Preferences")
onTriggered: { onTriggered: {
stackView.push(prefsWindow) stackView.push(prefsWindow)
detailsWindow.endEditMode() detailsWindow.endEditMode()
@ -227,29 +227,29 @@ Kirigami.ApplicationWindow {
}, },
Kirigami.Action { Kirigami.Action {
text: "Developer" text: qsTr("Developer")
Kirigami.Action { Kirigami.Action {
text: "App log" text: qsTr("App log")
onTriggered: { onTriggered: {
stackView.push(logWindow) stackView.push(logWindow)
} }
} }
Kirigami.Action { Kirigami.Action {
text: "Theme information" text: qsTr("Theme information")
onTriggered: { onTriggered: {
stackView.push(themetest) stackView.push(themetest)
} }
} }
}, },
Kirigami.Action { Kirigami.Action {
text: "User manual" text: qsTr("User manual")
onTriggered: { onTriggered: {
Qt.openUrlExternally("https://subsurface-divelog.org/documentation/subsurface-mobile-user-manual/") Qt.openUrlExternally("https://subsurface-divelog.org/documentation/subsurface-mobile-user-manual/")
} }
}, },
Kirigami.Action { Kirigami.Action {
text: "About" text: qsTr("About")
onTriggered: { onTriggered: {
stackView.push(aboutWindow) stackView.push(aboutWindow)
detailsWindow.endEditMode() detailsWindow.endEditMode()
@ -261,7 +261,7 @@ Kirigami.ApplicationWindow {
height: childrenRect.height height: childrenRect.height
width: Kirigami.Units.gridUnit * 10 width: Kirigami.Units.gridUnit * 10
CheckBox { CheckBox {
//text: "Run location service" //text: qsTr("Run location service")
id: locationCheckbox id: locationCheckbox
visible: manager.locationServiceAvailable visible: manager.locationServiceAvailable
anchors { anchors {
@ -280,7 +280,7 @@ Kirigami.ApplicationWindow {
//leftMargin: units.smallSpacing //leftMargin: units.smallSpacing
verticalCenter: locationCheckbox.verticalCenter verticalCenter: locationCheckbox.verticalCenter
} }
text: manager.locationServiceAvailable ? "Run location service" : "No GPS source available" text: manager.locationServiceAvailable ? qsTr("Run location service") : qsTr("No GPS source available")
} }
onClicked: { onClicked: {
print("Click.") print("Click.")
@ -292,7 +292,7 @@ Kirigami.ApplicationWindow {
contextDrawer: Kirigami.ContextDrawer { contextDrawer: Kirigami.ContextDrawer {
id: contextDrawer id: contextDrawer
actions: rootItem.pageStack.currentPage ? rootItem.pageStack.currentPage.contextualActions : null actions: rootItem.pageStack.currentPage ? rootItem.pageStack.currentPage.contextualActions : null
title: "Actions" title: qsTr("Actions")
} }
QtObject { QtObject {