Commit 87d793d1 authored by Harald Sitter's avatar Harald Sitter 🏳🌈
Browse files

do not show "copy in english" when using C as locale

Summary:
qlocale differentiates LANG=C from LANG=en_US for us it is
though as the native untranslated strings are english, so when
kinfocenter is invoked with C it will effectively be == en_US.
with that in mind we don't need the copy in english button when
using C.

BUG: 403368
FIXED-IN: 5.18.0

Test Plan: LANG=C.UTF-8 no longer causes the button to be visible

Reviewers: mart, ngraham

Reviewed By: mart, ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26792
parent ced4536e
...@@ -107,7 +107,7 @@ Module::Module(QWidget *parent, const QVariantList &args) : ...@@ -107,7 +107,7 @@ Module::Module(QWidget *parent, const QVariantList &args) :
// Setup Copy to Clipboard button // Setup Copy to Clipboard button
connect(ui->pushButtonCopyInfo, &QPushButton::clicked, this, &Module::copyToClipboard); connect(ui->pushButtonCopyInfo, &QPushButton::clicked, this, &Module::copyToClipboard);
connect(ui->pushButtonCopyInfoInEnglish, &QPushButton::clicked, this, &Module::copyToClipboardInEnglish); connect(ui->pushButtonCopyInfoInEnglish, &QPushButton::clicked, this, &Module::copyToClipboardInEnglish);
if (QLocale::system().language() == QLocale::English) { if (QLocale::system().language() == QLocale::English || QLocale::system().language() == QLocale::C) {
ui->pushButtonCopyInfoInEnglish->hide(); ui->pushButtonCopyInfoInEnglish->hide();
} }
ui->pushButtonCopyInfo->setShortcut(QKeySequence::Copy); ui->pushButtonCopyInfo->setShortcut(QKeySequence::Copy);
......
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