Commit 8b04e593 authored by Pino Toscano's avatar Pino Toscano
Browse files

i18n fixes

- avoid string puzzles
- add few contexts where needed
- HIG style fixes
- convert from qsTr()
parent 606dfc14
......@@ -169,7 +169,7 @@ QVariant LearningGoalModel::data(const QModelIndex &index, int role) const
{
case Qt::DisplayRole:
return !goal->name().isEmpty()?
QVariant(goal->name()): QVariant(i18nc("@item:inlistbox:", "unknown"));
QVariant(goal->name()): QVariant(i18nc("@item:inlistbox unknown learning goal", "unknown"));
case Qt::ToolTipRole:
return QVariant(goal->name());
case TitleRole:
......
......@@ -88,17 +88,17 @@ Kirigami.Page {
QQC2.Button {
visible: (model.status == KNS.ItemsModel.UpdateableStatus) ? true : false;
text: i18n("update")
text: i18nc("@action:button", "Update")
onClicked: newStuffModel.installItem(model.index)
}
QQC2.Button {
visible: (model.status == KNS.ItemsModel.DownloadableStatus || model.status == KNS.ItemsModel.DeletedStatus) ? true : false;
text: i18n("install")
text: i18nc("@action:button", "Install")
onClicked: newStuffModel.installItem(model.index)
}
QQC2.Button {
visible: (model.status == KNS.ItemsModel.InstalledStatus || model.status == KNS.ItemsModel.UpdateableStatus) ? true : false;
text: i18n("remove")
text: i18nc("@action:button", "Remove")
onClicked: newStuffModel.uninstallItem(model.index)
}
}
......
......@@ -60,7 +60,7 @@ Item {
spacing: 10
visible: { root.phrase != null && originalPhrase != "" && !root.isSkeletonPhrase}
Text {
text: i18n("Original Phrase:") + " <i>" + originalPhraseInfo.originalPhrase + "</i>"
text: i18n("Original Phrase: <i>%1</i>", originalPhraseInfo.originalPhrase)
width: root.width - 70
wrapMode: Text.WordWrap
}
......
......@@ -64,7 +64,7 @@ Item {
ExclusiveGroup { id: editStateGroup }
RadioButton {
id: buttonUnknown
text: i18n("Unknown")
text: i18nc("state", "Unknown")
onCheckedChanged: {
if (!checked) return
root.phrase.editState = Phrase.Unknown
......@@ -73,7 +73,7 @@ Item {
}
RadioButton {
id: buttonTranslated
text: i18n("Translated")
text: i18nc("state", "Translated")
onCheckedChanged: {
if (!checked) return
root.phrase.editState = Phrase.Translated
......@@ -82,7 +82,7 @@ Item {
}
RadioButton {
id: buttonCompleted
text: i18n("Completed")
text: i18nc("state", "Completed")
onCheckedChanged: {
if (!checked) return
root.phrase.editState = Phrase.Completed
......
......@@ -71,7 +71,7 @@ Item {
ToolButton {
anchors.verticalCenter: parent.verticalCenter
icon.name: "dialog-ok-apply"
text: i18n("Replace existing recording")
text: i18n("Replace Existing Recording")
onClicked: {
recorder.storeToFile(phrase.soundFileOutputPath())
}
......
......@@ -41,7 +41,7 @@ Kirigami.Page {
titleString += i18n("Category: no category selected");
}
else {
titleString += i18n("Category: ") + g_trainingSession.unit.title
titleString += i18n("Category: %1", g_trainingSession.unit.title)
}
if (g_trainingSession.unit !== null && g_trainingSession.course !== null) {
titleString += " / " + g_trainingSession.course.i18nTitle
......
......@@ -58,7 +58,7 @@ Kirigami.ScrollablePage {
ColumnLayout {
Kirigami.Heading {
level: 2
text: model.language.title + " / " + model.title
text: i18nc("@title:window language / course name", "%1 / %2", model.language.title, model.title)
}
Kirigami.Separator {
Layout.fillWidth: true
......@@ -72,7 +72,7 @@ Kirigami.ScrollablePage {
QQC2.Button {
Layout.alignment: Qt.AlignRight|Qt.AlignVCenter
Layout.columnSpan: 2
text: qsTr("Start Training")
text: i18nc("@action:button", "Start Training")
onClicked: {
showPassiveNotification("Starting training session for course " + model.title + ".");
g_trainingSession.course = model.dataRole
......
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