mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
i18n: All visible text must be wrapped.
This commit is contained in:
parent
06bd36e225
commit
ad562d09c2
|
@ -30,8 +30,6 @@
|
||||||
SpaceInfoToolsMenu::SpaceInfoToolsMenu(QWidget* parent, QUrl url)
|
SpaceInfoToolsMenu::SpaceInfoToolsMenu(QWidget* parent, QUrl url)
|
||||||
: QMenu(parent)
|
: QMenu(parent)
|
||||||
{
|
{
|
||||||
const QString notInstalled = " [" + i18nc("@action:inmenu", "not installed") + "]";
|
|
||||||
|
|
||||||
// find service
|
// find service
|
||||||
//
|
//
|
||||||
const auto filelightService = KService::serviceByDesktopName("org.kde.filelight");
|
const auto filelightService = KService::serviceByDesktopName("org.kde.filelight");
|
||||||
|
@ -41,8 +39,7 @@ SpaceInfoToolsMenu::SpaceInfoToolsMenu(QWidget* parent, QUrl url)
|
||||||
if (url.isLocalFile()) { // 2015-01-12: Filelight can handle FTP connections but KIO/kioexec cannot (bug or feature?), so we don't offer it in this case
|
if (url.isLocalFile()) { // 2015-01-12: Filelight can handle FTP connections but KIO/kioexec cannot (bug or feature?), so we don't offer it in this case
|
||||||
// add action and connect signals
|
// add action and connect signals
|
||||||
//
|
//
|
||||||
const auto startFilelightDirectoryAction = addAction(filelightService->genericName() + " - "
|
const auto startFilelightDirectoryAction = addAction(i18nc("@action:inmenu %1 service name", "%1 - current folder", filelightService->genericName()));
|
||||||
+ i18nc("@action:inmenu", "current folder"));
|
|
||||||
startFilelightDirectoryAction->setIcon(filelightIcon);
|
startFilelightDirectoryAction->setIcon(filelightIcon);
|
||||||
|
|
||||||
connect(startFilelightDirectoryAction, &QAction::triggered, this, [filelightService, url](bool) {
|
connect(startFilelightDirectoryAction, &QAction::triggered, this, [filelightService, url](bool) {
|
||||||
|
@ -53,8 +50,7 @@ SpaceInfoToolsMenu::SpaceInfoToolsMenu(QWidget* parent, QUrl url)
|
||||||
if (url.isLocalFile()) { // makes no sense for non-local URLs (e.g. FTP server), so we don't offer it in this case
|
if (url.isLocalFile()) { // makes no sense for non-local URLs (e.g. FTP server), so we don't offer it in this case
|
||||||
// add action and connect signals
|
// add action and connect signals
|
||||||
//
|
//
|
||||||
const auto startFilelightDeviceAction = addAction(filelightService->genericName() + " - "
|
const auto startFilelightDeviceAction = addAction(i18nc("@action:inmenu %1 service name", "%1 - current device", filelightService->genericName()));
|
||||||
+ i18nc("@action:inmenu", "current device"));
|
|
||||||
startFilelightDeviceAction->setIcon(filelightIcon);
|
startFilelightDeviceAction->setIcon(filelightIcon);
|
||||||
|
|
||||||
connect(startFilelightDeviceAction, &QAction::triggered, this, [filelightService, url](bool) {
|
connect(startFilelightDeviceAction, &QAction::triggered, this, [filelightService, url](bool) {
|
||||||
|
@ -65,15 +61,14 @@ SpaceInfoToolsMenu::SpaceInfoToolsMenu(QWidget* parent, QUrl url)
|
||||||
|
|
||||||
// add action and connect signals
|
// add action and connect signals
|
||||||
//
|
//
|
||||||
const auto startFilelightAllDevicesAction = addAction(filelightService->genericName() + " - "
|
const auto startFilelightAllDevicesAction = addAction(i18nc("@action:inmenu %1 service name", "%1 - all devices", filelightService->genericName()));
|
||||||
+ i18nc("@action:inmenu", "all devices"));
|
|
||||||
startFilelightAllDevicesAction->setIcon(filelightIcon);
|
startFilelightAllDevicesAction->setIcon(filelightIcon);
|
||||||
|
|
||||||
connect(startFilelightAllDevicesAction, &QAction::triggered, this, [filelightService](bool) {
|
connect(startFilelightAllDevicesAction, &QAction::triggered, this, [filelightService](bool) {
|
||||||
KRun::runService(*filelightService, { }, nullptr);
|
KRun::runService(*filelightService, { }, nullptr);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const auto startFilelightDirectoryAction = addAction("Filelight" + notInstalled);
|
const auto startFilelightDirectoryAction = addAction(i18nc("@action:inmenu", "Filelight [not installed]"));
|
||||||
startFilelightDirectoryAction->setEnabled(false);
|
startFilelightDirectoryAction->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +86,7 @@ SpaceInfoToolsMenu::SpaceInfoToolsMenu(QWidget* parent, QUrl url)
|
||||||
KRun::runService(*kdiskfreeService, { }, nullptr);
|
KRun::runService(*kdiskfreeService, { }, nullptr);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const auto startKDiskFreeAction = addAction("KDiskFree" + notInstalled);
|
const auto startKDiskFreeAction = addAction(i18nc("@action:inmenu", "KDiskFree [not installed]"));
|
||||||
startKDiskFreeAction->setEnabled(false);
|
startKDiskFreeAction->setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue