diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-01-22 17:23:55 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-01-22 18:20:03 -0800 |
commit | b15b3c195c73db1d181413a97783173649485f9d (patch) | |
tree | 99bf37a6c3cd82386e73070c984b13d9dc9b9f61 | |
parent | 0196d9a220e4bdd989539f55b4d5736d189410d4 (diff) | |
download | subsurface-b15b3c195c73db1d181413a97783173649485f9d.tar.gz |
QML UI: allow magic phrase for multiple buddies to be localized
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | core/subsurface-qt/DiveObjectHelper.cpp | 2 | ||||
-rw-r--r-- | mobile-widgets/qml/DiveDetails.qml | 2 | ||||
-rw-r--r-- | mobile-widgets/qml/DiveDetailsEdit.qml | 2 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp index 246e4510b..9814f9a6a 100644 --- a/core/subsurface-qt/DiveObjectHelper.cpp +++ b/core/subsurface-qt/DiveObjectHelper.cpp @@ -425,7 +425,7 @@ QStringList DiveObjectHelper::buddyList() const QRegExp sep("(,\\s)"); QStringList tempList = temp.split(sep); buddies << tempList; - buddies << "Multiple Buddies"; + buddies << tr("Multiple Buddies"); } } buddies.removeDuplicates(); diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index de8c29e40..31a6ba2ea 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -157,7 +157,7 @@ Kirigami.Page { watertemp = diveDetailsListView.currentItem.modelData.dive.waterTemp suitIndex = diveDetailsListView.currentItem.modelData.dive.suitList.indexOf(diveDetailsListView.currentItem.modelData.dive.suit) if (diveDetailsListView.currentItem.modelData.dive.buddy.indexOf(",") > 0) { - buddyIndex = diveDetailsListView.currentItem.modelData.dive.buddyList.indexOf("Multiple Buddies"); + buddyIndex = diveDetailsListView.currentItem.modelData.dive.buddyList.indexOf(qsTr("Multiple Buddies")); } else { buddyIndex = diveDetailsListView.currentItem.modelData.dive.buddyList.indexOf(diveDetailsListView.currentItem.modelData.dive.buddy) } diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml index d489db3e8..d6c83d97c 100644 --- a/mobile-widgets/qml/DiveDetailsEdit.qml +++ b/mobile-widgets/qml/DiveDetailsEdit.qml @@ -177,7 +177,7 @@ Item { } ComboBox { id: buddyBox - editable: currentText != "Multiple Buddies" + editable: currentText != qsTr("Multiple Buddies") model: diveDetailsListView.currentItem.modelData.dive.buddyList inputMethodHints: Qt.ImhNoPredictiveText Layout.fillWidth: true diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 1b9aebe10..84d3e0add 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -870,7 +870,7 @@ void QMLManager::commitChanges(QString diveId, QString date, QString location, Q } if (myDive->buddy() != buddy) { if (myDive->buddy().contains(",")) { - if (!buddy.contains("Multiple Buddies")) { + if (!buddy.contains(tr("Multiple Buddies"))) { diveChanged = true; free(d->buddy); d->buddy = strdup(qPrintable(buddy)); |