Commit f15d0adb authored by Pino Toscano's avatar Pino Toscano

i18n fixes

- use plural forms where needed
- add various i18n semantic markers
- fix string puzzles
- translate UI visible texts
- style fixes
parent 843ccfea
......@@ -27,7 +27,7 @@ import org.kde.kpublictransport 1.0
Kirigami.Page
{
title: i18n("Details")
title: i18nc("@title", "Details")
property var journey
......@@ -48,7 +48,7 @@ Kirigami.Page
Component {
id: walking
Label {
text: i18n("Walking (%1 minutes)", theData.duration / 60)
text: i18np("Walking (%1 minute)", "Walking (%1 minutes)", theData.duration / 60)
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
}
......
......@@ -27,7 +27,7 @@ import org.kde.kpublictransport 1.0 as KPT
Kirigami.Page
{
title: i18n("Connections")
title: i18nc("@title", "Connections")
header: Kirigami.InlineMessage {
type: Kirigami.MessageType.Error
......@@ -46,7 +46,7 @@ Kirigami.Page
}
header: Button {
text: i18n("Earlier")
text: i18nc("@action:button", "Earlier")
width: parent.width
visible: theModel.canQueryPrevious
onClicked: theModel.queryPrevious()
......@@ -58,11 +58,11 @@ Kirigami.Page
RowLayout {
Label {
text: journey.sections[0].scheduledDepartureTime.toLocaleTimeString(Locale.ShortFormat) + " - " + journey.sections[journey.sections.length - 1].scheduledArrivalTime.toLocaleTimeString(Locale.ShortFormat)
text: i18n("%1 - %2", journey.sections[0].scheduledDepartureTime.toLocaleTimeString(Locale.ShortFormat), journey.sections[journey.sections.length - 1].scheduledArrivalTime.toLocaleTimeString(Locale.ShortFormat))
}
Label {
text: "(" + _formatter.formatDuration(journey.duration) + ")"
text: i18n("(%1)", _formatter.formatDuration(journey.duration))
Layout.fillWidth: !delayLabel.visible
}
......@@ -75,14 +75,14 @@ Kirigami.Page
}
Label {
text: journey.numberOfChanges + " changes"
text: i18np("%1 change", "%2 changes", journey.numberOfChanges)
visible: journey.numberOfChanges > 0
}
}
}
footer: Button {
text: i18n("Later")
text: i18nc("@action:button", "Later")
width: parent.width
visible: theModel.canQueryNext
onClicked: theModel.queryNext()
......
......@@ -54,12 +54,12 @@ Button {
footer: RowLayout {
Button {
text: i18n("Cancel")
text: i18nc("@action:button", "Cancel")
Layout.fillWidth: true
onClicked: dialog.reject()
}
Button {
text: i18n("Accept")
text: i18nc("@action:button", "Accept")
Layout.fillWidth: true
onClicked: dialog.accept()
}
......
......@@ -27,11 +27,11 @@ Kirigami.Page
{
id: rootPage
title: i18n("Start journey")
title: i18nc("@title", "Start Journey")
actions.main: Kirigami.Action {
icon.name: "search"
text: i18n("Search")
text: i18nc("@action", "Search")
enabled: _queryController.start.name != "" && _queryController.destination.name != ""
onTriggered: pageStack.push(Qt.resolvedUrl("ConnectionsPage.qml"))
}
......@@ -53,17 +53,17 @@ Kirigami.Page
}
Button {
Layout.fillWidth: true
text: _queryController.start.name ? _queryController.start.name : i18n("Pick start")
onClicked: pageStack.push(Qt.resolvedUrl("LocationQueryPage.qml"), {title: i18n("Search for start location"), callback: startPicked})
text: _queryController.start.name ? _queryController.start.name : i18nc("@action:button", "Pick Start")
onClicked: pageStack.push(Qt.resolvedUrl("LocationQueryPage.qml"), {title: i18nc("@title", "Search for Start Location"), callback: startPicked})
}
Label {
text: "To:"
text: i18n("To:")
}
Button {
Layout.fillWidth: true
text: _queryController.destination.name ? _queryController.destination.name : i18n("Pick destination")
onClicked: pageStack.push(Qt.resolvedUrl("LocationQueryPage.qml"), {title: i18n("Search for destination location"), callback: destinationPicked})
text: _queryController.destination.name ? _queryController.destination.name : i18nc("@action:button", "Pick Destination")
onClicked: pageStack.push(Qt.resolvedUrl("LocationQueryPage.qml"), {title: i18nc("@title", "Search for Destination Location"), callback: destinationPicked})
}
Label {
......
......@@ -52,12 +52,12 @@ Button {
footer: RowLayout {
Button {
text: i18n("Cancel")
text: i18nc("@action:button", "Cancel")
Layout.fillWidth: true
onClicked: dialog.reject()
}
Button {
text: i18n("Accept")
text: i18nc("@action:button", "Accept")
Layout.fillWidth: true
onClicked: dialog.accept()
}
......
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