From c75f45b83ceea63f2ea7bbb31341432e1e7fb61a Mon Sep 17 00:00:00 2001 From: nephros Date: Thu, 16 Sep 2021 14:50:22 +0200 Subject: [PATCH 01/14] [ui] add display of services to be restarted See Issue #23 https://github.com/sailfishos-patches/patchmanager/issues/23 --- src/qml/RestartServicesDialog.qml | 50 ++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/src/qml/RestartServicesDialog.qml b/src/qml/RestartServicesDialog.qml index 60dc3aad..9e8a7345 100644 --- a/src/qml/RestartServicesDialog.qml +++ b/src/qml/RestartServicesDialog.qml @@ -1,6 +1,10 @@ /* * Copyright (C) 2013 Lucien XU * Copyright (C) 2016 Andrey Kozhevnikov + * Copyright (c) 2021, Patchmanger for SailfishOS contributors: + * - olf "Olf0" + * - Peter G. "nephros" + * - Vlad G. "b100dian" * * You may use this file under the terms of the BSD license as follows: * @@ -39,21 +43,39 @@ Dialog { id: container onAccepted: PatchManager.restartServices() - SilicaFlickable { - anchors.fill: parent - Column { - spacing: Theme.paddingMedium - anchors.left: parent.left; anchors.right: parent.right - DialogHeader { - acceptText: qsTranslate("", "Restart services") - } + Component.onCompleted: console.info("Will restart " + PatchManager.appsToRestart); - Label { - anchors.left: parent.left; anchors.leftMargin: Theme.paddingMedium - anchors.right: parent.right; anchors.rightMargin: Theme.paddingMedium - wrapMode: Text.WordWrap - color: Theme.highlightColor - text: qsTranslate("", "Some services will now be restarted. Phone interface might take time to load for a short moment.") + Column { + spacing: Theme.paddingSmall + width: parent.width + DialogHeader { + acceptText: qsTranslate("", "Restart") + } + Label { + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width - Theme.horizontalPageMargin * 2 + color: Theme.highlightColor + text: qsTranslate("", "Some services will now be restarted. The phone interface might take a short moment to load.") + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignJustify + } + SectionHeader { text: qsTranslate("", "List of services:" ); color: Theme.secondaryHighlightColor } + Column { + id: col + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width - Theme.horizontalPageMargin * 2 + Repeater { + model: PatchManager.appsToRestart + delegate: Component { TextSwitch { + automaticCheck: false; checked: true; text: modelData; + description: { + if ((modelData == "homescreen") || (modelData == "silica")) { return qsTranslate("","Note: this will close all apps!"); } + else if (modelData == "settings") { return qsTranslate("","Note: this will close %1!").arg("Patchmanager"); } + else if (modelData == "keyboard") { return "" } + else if (modelData == "other") { return "" } + else { return qsTranslate("","Note: this will close the %1 app!").arg(modelData); } + } + } } } } } From 5294e239e7794112d8ca70bae6f4077124394b2e Mon Sep 17 00:00:00 2001 From: Peter G Date: Wed, 6 Oct 2021 21:29:52 +0200 Subject: [PATCH 02/14] implement getting list of services to be toggled --- .../dbus/org.SfietKonstantin.patchmanager.xml | 4 ++ .../patchmanagerobject.cpp | 5 +++ .../patchmanager-daemon/patchmanagerobject.h | 1 + src/qml/patchmanager.cpp | 40 +++++++++++++++++++ src/qml/patchmanager.h | 6 +++ 5 files changed, 56 insertions(+) diff --git a/src/bin/patchmanager-daemon/dbus/org.SfietKonstantin.patchmanager.xml b/src/bin/patchmanager-daemon/dbus/org.SfietKonstantin.patchmanager.xml index 22fd0eed..9fcb89cf 100644 --- a/src/bin/patchmanager-daemon/dbus/org.SfietKonstantin.patchmanager.xml +++ b/src/bin/patchmanager-daemon/dbus/org.SfietKonstantin.patchmanager.xml @@ -91,6 +91,10 @@ + + + + diff --git a/src/bin/patchmanager-daemon/patchmanagerobject.cpp b/src/bin/patchmanager-daemon/patchmanagerobject.cpp index 9c2ddcd0..9cd6a83c 100644 --- a/src/bin/patchmanager-daemon/patchmanagerobject.cpp +++ b/src/bin/patchmanager-daemon/patchmanagerobject.cpp @@ -1273,6 +1273,11 @@ void PatchManagerObject::patchToggleService(const QString &patch) } } +QStringList PatchManagerObject::getToggleServicesList() const +{ + return m_toggleServices.keys(); +} + bool PatchManagerObject::getToggleServices() const { return !m_toggleServices.isEmpty(); diff --git a/src/bin/patchmanager-daemon/patchmanagerobject.h b/src/bin/patchmanager-daemon/patchmanagerobject.h index 246e029e..011c422f 100644 --- a/src/bin/patchmanager-daemon/patchmanagerobject.h +++ b/src/bin/patchmanager-daemon/patchmanagerobject.h @@ -124,6 +124,7 @@ public slots: void patchToggleService(const QString &patch); bool getToggleServices() const; + QStringList getToggleServicesList() const; bool getFailure() const; bool getLoaded() const; void resolveFailure(); diff --git a/src/qml/patchmanager.cpp b/src/qml/patchmanager.cpp index 0d17c325..1ffd4580 100644 --- a/src/qml/patchmanager.cpp +++ b/src/qml/patchmanager.cpp @@ -98,6 +98,22 @@ PatchManager::PatchManager(QObject *parent) }); + QDBusPendingCallWatcher *watchGetToggleServicesList = new QDBusPendingCallWatcher(m_interface->getToggleServicesList(), this); + connect(watchGetToggleServicesList, &QDBusPendingCallWatcher::finished, [this](QDBusPendingCallWatcher *watcher){ + watcher->deleteLater(); + QDBusPendingReply reply = *watcher; + if (reply.isError()) { + qWarning() << Q_FUNC_INFO << reply.error().type() << reply.error().name() << reply.error().message(); + return; + } + + qDebug() << Q_FUNC_INFO << reply.value(); + + m_servicesToBeToggled = reply.value(); + emit toggleServicesListChanged(m_servicesToBeToggled); + }); + + QDBusPendingCallWatcher *watchGetToggleServices = new QDBusPendingCallWatcher(m_interface->getToggleServices(), this); connect(watchGetToggleServices, &QDBusPendingCallWatcher::finished, [this](QDBusPendingCallWatcher *watcher){ watcher->deleteLater(); @@ -233,6 +249,11 @@ QString PatchManager::patchmanagerVersion() const return m_patchmanagerVersion; } +QStringList PatchManager::toggleServicesList() const +{ + return m_servicesToBeToggled; +} + bool PatchManager::toggleServices() const { return m_toggleServices; @@ -257,6 +278,25 @@ void PatchManager::call(QDBusPendingCallWatcher *call) }); } +/* +void PatchManager::requestServicesToBeToggled() +{ + qDebug() << Q_FUNC_INFO; + + QDBusPendingCallWatcher *watch = new QDBusPendingCallWatcher(m_interface->getServicesToBeToggled(), this); + connect(watch, &QDBusPendingCallWatcher::finished, [this](QDBusPendingCallWatcher *watcher){ + watcher->deleteLater(); + QDBusPendingReply reply = *watcher; + if (reply.isError()) { + qWarning() << reply.error().type() << reply.error().name() << reply.error().message(); + return; + } + const QStringList list = reply.value(); + m_servicesToBeToggled = list; + }); +} +*/ + void PatchManager::requestListPatches(const QString &patch, bool installed) { qDebug() << Q_FUNC_INFO << patch << installed; diff --git a/src/qml/patchmanager.h b/src/qml/patchmanager.h index 7b0f1a06..c61eec56 100644 --- a/src/qml/patchmanager.h +++ b/src/qml/patchmanager.h @@ -69,6 +69,7 @@ class PatchManager: public QObject Q_PROPERTY(PatchManagerModel *installedModel READ installedModel CONSTANT) Q_PROPERTY(QVariantMap updates READ getUpdates NOTIFY updatesChanged) Q_PROPERTY(QStringList updatesNames READ getUpdatesNames NOTIFY updatesChanged) + Q_PROPERTY(QStringList appsToRestart READ toggleServicesList NOTIFY toggleServicesListChanged) Q_PROPERTY(bool appsNeedRestart READ toggleServices NOTIFY toggleServicesChanged) Q_PROPERTY(bool failure READ failure NOTIFY failureChanged) Q_PROPERTY(bool loaded READ loaded NOTIFY loadedChanged) @@ -88,6 +89,7 @@ class PatchManager: public QObject QVariantMap getUpdates() const; QStringList getUpdatesNames() const; QString patchmanagerVersion() const; + QStringList toggleServicesList() const; bool toggleServices() const; bool failure() const; @@ -102,6 +104,7 @@ class PatchManager: public QObject private slots: void requestListPatches(const QString &patch, bool installed); + void requestServicesToBeToggled(); public slots: QDBusPendingCallWatcher *applyPatch(const QString &patch); @@ -161,6 +164,7 @@ public slots: void failureChanged(bool failed); void loadedChanged(bool loaded); void patchmanagerVersionChanged(const QString &patchmanagerVersion); + void toggleServicesListChanged(const QStringList &servicesToBeToggled); private: void successCall(QJSValue callback, const QVariant &value); @@ -174,6 +178,8 @@ public slots: PatchManagerInterface *m_interface; PatchManagerTranslator *m_translator; + QStringList m_servicesToBeToggled; + bool m_toggleServices = false; bool m_failed = false; bool m_loaded = false; From 3a973c39801f6a5a9da70cafde845f8f7c7f1bc1 Mon Sep 17 00:00:00 2001 From: Peter G Date: Mon, 1 Nov 2021 20:47:15 +0100 Subject: [PATCH 03/14] fixup! [ui] add display of services to be restarted --- src/qml/RestartServicesDialog.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qml/RestartServicesDialog.qml b/src/qml/RestartServicesDialog.qml index 9e8a7345..12252b03 100644 --- a/src/qml/RestartServicesDialog.qml +++ b/src/qml/RestartServicesDialog.qml @@ -67,7 +67,10 @@ Dialog { Repeater { model: PatchManager.appsToRestart delegate: Component { TextSwitch { - automaticCheck: false; checked: true; text: modelData; + text: modelData //TODO: this displays the raw strings from the daemon. Should be formatted/enabled for translation + automaticCheck: false + checked: true + enabled: true description: { if ((modelData == "homescreen") || (modelData == "silica")) { return qsTranslate("","Note: this will close all apps!"); } else if (modelData == "settings") { return qsTranslate("","Note: this will close %1!").arg("Patchmanager"); } From b95ffeb9d281546405f83d7de9525028f74e5c9d Mon Sep 17 00:00:00 2001 From: Peter G Date: Mon, 1 Nov 2021 21:44:58 +0100 Subject: [PATCH 04/14] fixup! [ui] add display of services to be restarted --- src/qml/RestartServicesDialog.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qml/RestartServicesDialog.qml b/src/qml/RestartServicesDialog.qml index 12252b03..88aa2e2f 100644 --- a/src/qml/RestartServicesDialog.qml +++ b/src/qml/RestartServicesDialog.qml @@ -78,7 +78,9 @@ Dialog { else if (modelData == "other") { return "" } else { return qsTranslate("","Note: this will close the %1 app!").arg(modelData); } } - } } + TouchBlocker { anchors.fill: parent} + } + } } } } From 56f6242122c39662c0d43c4c398e3e3728b629b5 Mon Sep 17 00:00:00 2001 From: Peter G Date: Mon, 1 Nov 2021 21:51:13 +0100 Subject: [PATCH 05/14] fixup! Merge branch 'master' into issue-23 --- src/qml/RestartServicesDialog.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qml/RestartServicesDialog.qml b/src/qml/RestartServicesDialog.qml index df89284e..8e3c65b9 100644 --- a/src/qml/RestartServicesDialog.qml +++ b/src/qml/RestartServicesDialog.qml @@ -45,7 +45,6 @@ Dialog { Component.onCompleted: console.info("Will restart " + PatchManager.appsToRestart); -<<<<<<< HEAD Column { spacing: Theme.paddingSmall width: parent.width From 2aacf83148040a21b744987ec40b97301279cb70 Mon Sep 17 00:00:00 2001 From: Peter G Date: Tue, 2 Nov 2021 11:37:34 +0100 Subject: [PATCH 06/14] cleanup: remove dead code --- src/qml/patchmanager.cpp | 19 ------------------- src/qml/patchmanager.h | 1 - 2 files changed, 20 deletions(-) diff --git a/src/qml/patchmanager.cpp b/src/qml/patchmanager.cpp index 1ffd4580..d0091cbc 100644 --- a/src/qml/patchmanager.cpp +++ b/src/qml/patchmanager.cpp @@ -278,25 +278,6 @@ void PatchManager::call(QDBusPendingCallWatcher *call) }); } -/* -void PatchManager::requestServicesToBeToggled() -{ - qDebug() << Q_FUNC_INFO; - - QDBusPendingCallWatcher *watch = new QDBusPendingCallWatcher(m_interface->getServicesToBeToggled(), this); - connect(watch, &QDBusPendingCallWatcher::finished, [this](QDBusPendingCallWatcher *watcher){ - watcher->deleteLater(); - QDBusPendingReply reply = *watcher; - if (reply.isError()) { - qWarning() << reply.error().type() << reply.error().name() << reply.error().message(); - return; - } - const QStringList list = reply.value(); - m_servicesToBeToggled = list; - }); -} -*/ - void PatchManager::requestListPatches(const QString &patch, bool installed) { qDebug() << Q_FUNC_INFO << patch << installed; diff --git a/src/qml/patchmanager.h b/src/qml/patchmanager.h index c61eec56..2fdecf94 100644 --- a/src/qml/patchmanager.h +++ b/src/qml/patchmanager.h @@ -104,7 +104,6 @@ class PatchManager: public QObject private slots: void requestListPatches(const QString &patch, bool installed); - void requestServicesToBeToggled(); public slots: QDBusPendingCallWatcher *applyPatch(const QString &patch); From ce498adda1e9b94b9501e268bd871c0770414c57 Mon Sep 17 00:00:00 2001 From: Peter G Date: Wed, 3 Nov 2021 14:33:22 +0100 Subject: [PATCH 07/14] translate category strings --- src/qml/RestartServicesDialog.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qml/RestartServicesDialog.qml b/src/qml/RestartServicesDialog.qml index 8e3c65b9..67e0e5c1 100644 --- a/src/qml/RestartServicesDialog.qml +++ b/src/qml/RestartServicesDialog.qml @@ -67,7 +67,7 @@ Dialog { Repeater { model: PatchManager.appsToRestart delegate: Component { TextSwitch { - text: modelData //TODO: this displays the raw strings from the daemon. Should be formatted/enabled for translation + text: qsTranslate("Sections", modelData) automaticCheck: false checked: true enabled: true From e63cc87484783b90e0505263bc30c8d0aa6299dc Mon Sep 17 00:00:00 2001 From: Peter G Date: Wed, 3 Nov 2021 17:00:05 +0100 Subject: [PATCH 08/14] move dbus call to getter --- src/qml/patchmanager.cpp | 27 ++++++++++----------------- src/qml/patchmanager.h | 2 -- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/qml/patchmanager.cpp b/src/qml/patchmanager.cpp index d0091cbc..ae292ca0 100644 --- a/src/qml/patchmanager.cpp +++ b/src/qml/patchmanager.cpp @@ -98,22 +98,6 @@ PatchManager::PatchManager(QObject *parent) }); - QDBusPendingCallWatcher *watchGetToggleServicesList = new QDBusPendingCallWatcher(m_interface->getToggleServicesList(), this); - connect(watchGetToggleServicesList, &QDBusPendingCallWatcher::finished, [this](QDBusPendingCallWatcher *watcher){ - watcher->deleteLater(); - QDBusPendingReply reply = *watcher; - if (reply.isError()) { - qWarning() << Q_FUNC_INFO << reply.error().type() << reply.error().name() << reply.error().message(); - return; - } - - qDebug() << Q_FUNC_INFO << reply.value(); - - m_servicesToBeToggled = reply.value(); - emit toggleServicesListChanged(m_servicesToBeToggled); - }); - - QDBusPendingCallWatcher *watchGetToggleServices = new QDBusPendingCallWatcher(m_interface->getToggleServices(), this); connect(watchGetToggleServices, &QDBusPendingCallWatcher::finished, [this](QDBusPendingCallWatcher *watcher){ watcher->deleteLater(); @@ -251,7 +235,16 @@ QString PatchManager::patchmanagerVersion() const QStringList PatchManager::toggleServicesList() const { - return m_servicesToBeToggled; + QStringList list; + + QDBusPendingReply reply = m_interface->getToggleServicesList(); + reply.waitForFinished(); + if (reply.isFinished()) { + qDebug() << Q_FUNC_INFO << "dbus replied:" << reply.value(); + list = reply.value();; + return list; + } + return list; } bool PatchManager::toggleServices() const diff --git a/src/qml/patchmanager.h b/src/qml/patchmanager.h index 2fdecf94..387b78d4 100644 --- a/src/qml/patchmanager.h +++ b/src/qml/patchmanager.h @@ -177,8 +177,6 @@ public slots: PatchManagerInterface *m_interface; PatchManagerTranslator *m_translator; - QStringList m_servicesToBeToggled; - bool m_toggleServices = false; bool m_failed = false; bool m_loaded = false; From 8a79db3b7cada343e2a542c0327e4d4144c919b2 Mon Sep 17 00:00:00 2001 From: Peter G Date: Wed, 3 Nov 2021 21:23:59 +0100 Subject: [PATCH 09/14] update translation source --- translations/settings-patchmanager.ts | 36 +++++++++++++++++++++------ 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/translations/settings-patchmanager.ts b/translations/settings-patchmanager.ts index a943b300..d7f3123b 100644 --- a/translations/settings-patchmanager.ts +++ b/translations/settings-patchmanager.ts @@ -142,11 +142,6 @@ Maintainer - - - This patch uses the legacy format for its patch.json file. If you are its maintainer, please do consider updating to the new format; if you are using the Web Catalog you shall not include a patch.json file in your upload!<br />See the developer section in the <a href="%1">README</a> for details. - - Description @@ -213,6 +208,11 @@ May conflict with: + + + This patch uses the legacy format for its patch.json file. If you are its maintainer, please do consider updating to the new format; if you are using the Web Catalog you shall not include a patch.json file in your upload!&lt;br /&gt;See the developer section in the &lt;a href=&quot;%1&quot;&gt;README&lt;/a&gt; for details. + + Unapply all patches @@ -302,15 +302,35 @@ - - Restart services + + Restart - + Some services will be restarted now. Reloading the homescreen of the device might take a little time. + + + List of services: + + + + + Note: this will close all apps! + + + + + Note: this will close %1! + + + + + Note: this will close the %1 app! + + From d4bf66a15dbf5a6145e3f8b618c1e9dfe86dfa6b Mon Sep 17 00:00:00 2001 From: Peter G Date: Fri, 5 Nov 2021 11:43:30 +0100 Subject: [PATCH 10/14] fixup! translate category strings --- src/qml/RestartServicesDialog.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qml/RestartServicesDialog.qml b/src/qml/RestartServicesDialog.qml index 67e0e5c1..d531eff5 100644 --- a/src/qml/RestartServicesDialog.qml +++ b/src/qml/RestartServicesDialog.qml @@ -72,11 +72,13 @@ Dialog { checked: true enabled: true description: { - if ((modelData == "homescreen") || (modelData == "silica")) { return qsTranslate("","Note: this will close all apps!"); } - else if (modelData == "settings") { return qsTranslate("","Note: this will close %1!").arg("Patchmanager"); } + if ((modelData == "homescreen") + || (modelData == "silica")) + { return qsTranslate("","Note: this will close all apps!"); } + else if (modelData == "settings") { return qsTranslate("","Note: this will close %1!").arg(qsTranslate("", "Patchmanager")); } else if (modelData == "keyboard") { return "" } else if (modelData == "other") { return "" } - else { return qsTranslate("","Note: this will close the %1 app!").arg(modelData); } + else { return qsTranslate("","Note: this will close the %1 app!").arg(text); } } TouchBlocker { anchors.fill: parent} } From 3d0c1665622618592cb7b7b5248d7173cc3446b9 Mon Sep 17 00:00:00 2001 From: Peter G Date: Sat, 6 Nov 2021 13:48:16 +0100 Subject: [PATCH 11/14] Add warning icon and message to apply/unapply notification --- src/bin/patchmanager-daemon/patchmanagerobject.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/bin/patchmanager-daemon/patchmanagerobject.cpp b/src/bin/patchmanager-daemon/patchmanagerobject.cpp index 36085a6d..43f432e4 100644 --- a/src/bin/patchmanager-daemon/patchmanagerobject.cpp +++ b/src/bin/patchmanager-daemon/patchmanagerobject.cpp @@ -231,10 +231,20 @@ void PatchManagerObject::notify(const QString &patch, NotifyAction action) case NotifyActionSuccessApply: summary = qApp->translate("", "Patch installed"); body = qApp->translate("", "Patch %1 installed").arg(patch); + if (getToggleServices()) { + body.append( ", " ); + body.append( qApp->translate("", "Services need restart!") ); + notification.setHintValue("icon", "icon-lock-warning"); + }; break; case NotifyActionSuccessUnapply: summary = qApp->translate("", "Patch removed"); body = qApp->translate("", "Patch %1 removed").arg(patch); + if (getToggleServices()) { + body.append( ", " ); + body.append( qApp->translate("", "Services need restart!") ); + notification.setHintValue("icon", "icon-lock-warning"); + }; break; case NotifyActionFailedApply: summary = qApp->translate("", "Failed to install patch"); From 1ddbba86c6a16a955f32a764c8c77015562a42d7 Mon Sep 17 00:00:00 2001 From: Peter G Date: Sat, 6 Nov 2021 15:29:00 +0100 Subject: [PATCH 12/14] update translations --- translations/settings-patchmanager.ts | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/translations/settings-patchmanager.ts b/translations/settings-patchmanager.ts index d7f3123b..78276cb6 100644 --- a/translations/settings-patchmanager.ts +++ b/translations/settings-patchmanager.ts @@ -43,6 +43,7 @@ + Patchmanager @@ -317,17 +318,17 @@ - + Note: this will close all apps! - + Note: this will close %1! - + Note: this will close the %1 app! @@ -451,41 +452,47 @@ + + Services need restart! + + + + Patch removed - + Patch %1 removed - + Failed to install patch - + Patch %1 installation failed - + Failed to remove patch - + Patch %1 removal failed - + Update available - + Patch %1 have update candidate From 5a5d2380967f508978ef1333253b711a5c4fc3aa Mon Sep 17 00:00:00 2001 From: Peter G Date: Sat, 6 Nov 2021 15:30:35 +0100 Subject: [PATCH 13/14] add missing noop source string for "keyboard" --- src/qml/patchmanager.cpp | 1 + translations/settings-patchmanager.ts | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/qml/patchmanager.cpp b/src/qml/patchmanager.cpp index ae292ca0..1ede2e90 100644 --- a/src/qml/patchmanager.cpp +++ b/src/qml/patchmanager.cpp @@ -61,6 +61,7 @@ static const char *noop_strings[] = { QT_TRANSLATE_NOOP("Sections", "silica"), QT_TRANSLATE_NOOP("Sections", "settings"), QT_TRANSLATE_NOOP("Sections", "other"), + QT_TRANSLATE_NOOP("Sections", "keyboard"), }; PatchManager::PatchManager(QObject *parent) diff --git a/translations/settings-patchmanager.ts b/translations/settings-patchmanager.ts index 78276cb6..32a5877a 100644 --- a/translations/settings-patchmanager.ts +++ b/translations/settings-patchmanager.ts @@ -592,9 +592,14 @@ - + other + + + keyboard + Keyboard + From 04d24e4fca4cf01a473359bc953d336c4b2292e5 Mon Sep 17 00:00:00 2001 From: Peter G Date: Wed, 10 Nov 2021 09:23:42 +0100 Subject: [PATCH 14/14] Fix wording according to https://github.com/sailfishos-patches/patchmanager/wiki/Terms-and-wording https://github.com/sailfishos-patches/patchmanager/pull/136/files#r745053026 --- src/qml/RestartServicesDialog.qml | 6 +++--- translations/settings-patchmanager.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/qml/RestartServicesDialog.qml b/src/qml/RestartServicesDialog.qml index d531eff5..3c9afe71 100644 --- a/src/qml/RestartServicesDialog.qml +++ b/src/qml/RestartServicesDialog.qml @@ -74,11 +74,11 @@ Dialog { description: { if ((modelData == "homescreen") || (modelData == "silica")) - { return qsTranslate("","Note: this will close all apps!"); } - else if (modelData == "settings") { return qsTranslate("","Note: this will close %1!").arg(qsTranslate("", "Patchmanager")); } + { return qsTranslate("","Note: this will close all apps."); } + else if (modelData == "settings") { return qsTranslate("","Note: this will close %1.").arg(qsTranslate("", "Patchmanager")); } else if (modelData == "keyboard") { return "" } else if (modelData == "other") { return "" } - else { return qsTranslate("","Note: this will close the %1 app!").arg(text); } + else { return qsTranslate("","Note: this will close the %1 app.").arg(text); } } TouchBlocker { anchors.fill: parent} } diff --git a/translations/settings-patchmanager.ts b/translations/settings-patchmanager.ts index 7cfb7739..c82e5ea8 100644 --- a/translations/settings-patchmanager.ts +++ b/translations/settings-patchmanager.ts @@ -129,8 +129,8 @@ - + Patch details @@ -315,17 +315,17 @@ - Note: this will close all apps! + Note: this will close all apps. - Note: this will close %1! + Note: this will close %1. - Note: this will close the %1 app! + Note: this will close the %1 app.