From 9524117322008ae6c12438ae7f77749651cd84ea Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Wed, 20 Feb 2019 07:32:34 -0700 Subject: [PATCH] [KRunner, SDDM theme, Logout screen, Login widget] Use the word "Sleep" instead of "Suspend" Summary: [copy-pasted from T10500:] Problems with the current term: - It's a somewhat severe-sounding technical term that doesn't intrinsically mean much to the average person. To the extent that it does, the connotations may be negative (e.g. when a misbehaving kid is being kept out of school) - Our two major closed-source desktop competitors (macOS and Windows) both use the term "Sleep", so user familiarity with "Suspend" is low and falling all the time I'd like to propose that we use "Sleep" instead, to address the above issues. It's a nicer word in general, and since it's what our competitors use, we benefit from user familiarity. We also recently adopted a moon icon with Zs for this, which visually connotes sleep. So it would make sense to update the string too, because then the string and the icon will both match. Test Plan: KRunner, searched for "Sleep": {F6640273} KRunner, searched for "Suspend": {F6640284} Kickoff, searched for "Sleep": {F6640309} Kickoff, searched for "Suspend": {F6640315} SDDM theme: {F6626026} Logout screen: {F6626010} Logout widget, UI: {F6626034} Logout widget, config: {F6626035} Reviewers: #vdg, #plasma, davidedmundson, filipf, mart Reviewed By: #vdg, #plasma, filipf, mart Subscribers: abetts, filipf, davidedmundson, plasma-devel Tags: #plasma Maniphest Tasks: T10500 Differential Revision: https://phabricator.kde.org/D19185 --- applets/lock_logout/contents/ui/ConfigGeneral.qml | 2 +- applets/lock_logout/contents/ui/data.js | 2 +- applets/lock_logout/contents/ui/lockout.qml | 2 +- lookandfeel/contents/logout/Logout.qml | 2 +- runners/powerdevil/PowerDevilRunner.cpp | 12 +++++++----- sddm-theme/Main.qml | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/applets/lock_logout/contents/ui/ConfigGeneral.qml b/applets/lock_logout/contents/ui/ConfigGeneral.qml index 1f5e7b704..10c8ae099 100644 --- a/applets/lock_logout/contents/ui/ConfigGeneral.qml +++ b/applets/lock_logout/contents/ui/ConfigGeneral.qml @@ -86,7 +86,7 @@ Item { } QtControls.CheckBox { id: sleep - text: i18n("Suspend") + text: i18nc("Suspend to RAM", "Sleep") enabled: iconsPage.canSuspend && (checkedOptions > 1 || !checked) } } diff --git a/applets/lock_logout/contents/ui/data.js b/applets/lock_logout/contents/ui/data.js index f81f598ac..6ccca7f55 100644 --- a/applets/lock_logout/contents/ui/data.js +++ b/applets/lock_logout/contents/ui/data.js @@ -17,7 +17,7 @@ var data = [{ }, { icon: "system-suspend", operation: "suspendToRam", - tooltip_mainText: i18n("Suspend"), + tooltip_mainText: i18nc("Suspend to RAM", "Sleep"), tooltip_subText: i18n("Sleep (suspend to RAM)"), requires: "Suspend" }, { diff --git a/applets/lock_logout/contents/ui/lockout.qml b/applets/lock_logout/contents/ui/lockout.qml index 80e7e53b8..1f6f64bed 100644 --- a/applets/lock_logout/contents/ui/lockout.qml +++ b/applets/lock_logout/contents/ui/lockout.qml @@ -138,7 +138,7 @@ Flow { id: sleepDialogComponent QueryDialog { titleIcon: "system-suspend" - titleText: i18n("Suspend") + titleText: i18nc("Suspend to RAM", "Sleep") message: i18n("Do you want to suspend to RAM (sleep)?") location: plasmoid.location diff --git a/lookandfeel/contents/logout/Logout.qml b/lookandfeel/contents/logout/Logout.qml index f26b15645..d3eff2f10 100644 --- a/lookandfeel/contents/logout/Logout.qml +++ b/lookandfeel/contents/logout/Logout.qml @@ -160,7 +160,7 @@ PlasmaCore.ColorScope { LogoutButton { id: suspendButton iconSource: "system-suspend" - text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Suspend") + text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Suspend to RAM", "Sleep") action: root.sleepRequested KeyNavigation.left: logoutButton KeyNavigation.right: hibernateButton diff --git a/runners/powerdevil/PowerDevilRunner.cpp b/runners/powerdevil/PowerDevilRunner.cpp index 6b92b9c6f..95f0274de 100644 --- a/runners/powerdevil/PowerDevilRunner.cpp +++ b/runners/powerdevil/PowerDevilRunner.cpp @@ -181,7 +181,7 @@ void PowerDevilRunner::match(Plasma::RunnerContext &context) match2.setId(QStringLiteral("DimHalf")); matches.append(match2); } - } else if (term.compare(i18nc("Note this is a KRunner keyword", "suspend"), Qt::CaseInsensitive) == 0) { + } else if (term.compare(i18nc("Note this is a KRunner keyword", "sleep"), Qt::CaseInsensitive) == 0) { QSet< Solid::PowerManagement::SleepState > states = Solid::PowerManagement::supportedSleepStates(); if (states.contains(Solid::PowerManagement::SuspendState)) { @@ -191,7 +191,7 @@ void PowerDevilRunner::match(Plasma::RunnerContext &context) if (states.contains(Solid::PowerManagement::HibernateState)) { addSuspendMatch(Solid::PowerManagement::HibernateState, matches); } - } else if (term.compare(i18nc("Note this is a KRunner keyword", "sleep"), Qt::CaseInsensitive) == 0 || + } else if (term.compare(i18nc("Note this is a KRunner keyword", "suspend"), Qt::CaseInsensitive) == 0 || term.compare(i18nc("Note this is a KRunner keyword", "to ram"), Qt::CaseInsensitive) == 0) { addSuspendMatch(Solid::PowerManagement::SuspendState, matches); } else if (term.compare(i18nc("Note this is a KRunner keyword", "hibernate"), Qt::CaseInsensitive) == 0 || @@ -213,18 +213,20 @@ void PowerDevilRunner::addSuspendMatch(int value, QList &mat case Solid::PowerManagement::SuspendState: case Solid::PowerManagement::StandbyState: match.setIconName(QStringLiteral("system-suspend")); - match.setText(i18n("Suspend")); + match.setText(i18nc("Suspend to RAM", "Sleep")); + match.setSubtext(i18n("Suspend to RAM")); match.setRelevance(1); break; case Solid::PowerManagement::HibernateState: match.setIconName(QStringLiteral("system-suspend-hibernate")); - match.setText(i18n("Hibernate")); + match.setText(i18nc("Suspend to disk", "Hibernate")); + match.setSubtext(i18n("Suspend to disk")); match.setRelevance(0.99); break; } match.setData(value); - match.setId(QStringLiteral("Suspend")); + match.setId(QStringLiteral("Sleep")); matches.append(match); } diff --git a/sddm-theme/Main.qml b/sddm-theme/Main.qml index 28421c4a2..e1fef19fa 100644 --- a/sddm-theme/Main.qml +++ b/sddm-theme/Main.qml @@ -175,7 +175,7 @@ PlasmaCore.ColorScope { actionItems: [ ActionButton { iconSource: "system-suspend" - text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Suspend") + text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel","Suspend to RAM","Sleep") onClicked: sddm.suspend() enabled: sddm.canSuspend visible: !inputPanel.keyboardActive