Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit c7f72367 authored by Nate Graham's avatar Nate Graham 🔩

Use more contextual strings for some button labels

Summary:
Every Bluetooth error's "fix this error" button's text is "Fix it". However, some issues are not actually problems //per se// from the user's perspective, so the text can imply the existence of a problem where none exists.

In the case where the Bluetooth adapter is powered off or disabled, display a more contextually appropriate string instead ("Turn On" and "Enable", respectively)

CCBUG: 394778
FIXED-IN: 5.14

Test Plan: {F5890529}

Reviewers: #plasma, #vdg, drosca

Reviewed By: drosca

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D13346
parent 92da7ed3
......@@ -75,7 +75,7 @@ void SystemCheck::createWarnings(QVBoxLayout *layout)
m_blockedError->setCloseButtonVisible(false);
m_blockedError->setText(i18n("Bluetooth is disabled."));
QAction *fixBlocked = new QAction(QIcon::fromTheme(QStringLiteral("dialog-ok-apply")), i18nc("Action to fix a problem", "Fix it"), m_blockedError);
QAction *fixBlocked = new QAction(QIcon::fromTheme(QStringLiteral("dialog-ok-apply")), i18nc("Action to enable Bluetooth adapter", "Enable"), m_blockedError);
connect(fixBlocked, SIGNAL(triggered(bool)), this, SLOT(fixBlockedError()));
m_blockedError->addAction(fixBlocked);
......@@ -86,7 +86,7 @@ void SystemCheck::createWarnings(QVBoxLayout *layout)
m_noUsableAdapterError->setCloseButtonVisible(false);
m_noUsableAdapterError->setText(i18n("Your Bluetooth adapter is powered off."));
QAction *fixNoUsableAdapter = new QAction(QIcon::fromTheme(QStringLiteral("dialog-ok-apply")), i18nc("Action to fix a problem", "Fix it"), m_noUsableAdapterError);
QAction *fixNoUsableAdapter = new QAction(QIcon::fromTheme(QStringLiteral("dialog-ok-apply")), i18nc("Action to turn on Bluetooth adapter", "Turn On"), m_noUsableAdapterError);
connect(fixNoUsableAdapter, SIGNAL(triggered(bool)), this, SLOT(fixNoUsableAdapterError()));
m_noUsableAdapterError->addAction(fixNoUsableAdapter);
......
......@@ -143,13 +143,17 @@ void DiscoverWidget::checkAdapters()
m_warningWidget = new KMessageWidget(this);
m_warningWidget->setMessageType(KMessageWidget::Warning);
m_warningWidget->setCloseButtonVisible(false);
QString fixBluetoothButtonString;
if (m_manager->isBluetoothBlocked()) {
m_warningWidget->setText(i18n("Bluetooth is disabled."));
fixBluetoothButtonString = i18nc("Action to enable Bluetooth adapter", "Enable");
} else {
m_warningWidget->setText(i18n("Your Bluetooth adapter is powered off."));
fixBluetoothButtonString = i18nc("Action to turn on Bluetooth adapter", "Turn On");
}
QAction *fixAdapters = new QAction(QIcon::fromTheme(QStringLiteral("dialog-ok-apply")), i18nc("Action to fix a problem", "Fix it"), m_warningWidget);
QAction *fixAdapters = new QAction(QIcon::fromTheme(QStringLiteral("dialog-ok-apply")), fixBluetoothButtonString, m_warningWidget);
connect(fixAdapters, &QAction::triggered, this, &DiscoverWidget::fixAdaptersError);
m_warningWidget->addAction(fixAdapters);
verticalLayout->insertWidget(0, m_warningWidget);
......
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