diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2022-03-11 17:04:22 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2022-03-11 17:35:11 +0300 |
commit | 9e084d0660ccaed0be494dc205ce6512a5648836 (patch) | |
tree | 56de389de3c98a6920000a3e02a509f8779bbe77 /src/gui/accountsettings.cpp | |
parent | d34f46135777cc62c2948914b8d82048348c5621 (diff) |
Unify common translatable strings
Fixes: #9494
Diffstat (limited to 'src/gui/accountsettings.cpp')
-rw-r--r-- | src/gui/accountsettings.cpp | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index f30453dc7..40024701d 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -16,26 +16,27 @@ #include "accountsettings.h" #include "ui_accountsettings.h" -#include "theme.h" -#include "folderman.h" -#include "folderwizard.h" -#include "folderstatusmodel.h" -#include "folderstatusdelegate.h" -#include "common/utility.h" -#include "application.h" -#include "configfile.h" #include "account.h" -#include "accountstate.h" -#include "quotainfo.h" #include "accountmanager.h" -#include "owncloudsetupwizard.h" +#include "accountstate.h" +#include "application.h" +#include "common/utility.h" +#include "commonstrings.h" +#include "configfile.h" #include "creds/abstractcredentials.h" #include "creds/httpcredentialsgui.h" -#include "tooltipupdater.h" #include "filesystem.h" -#include "wizard/owncloudwizard.h" +#include "folderman.h" +#include "folderstatusdelegate.h" +#include "folderstatusmodel.h" +#include "folderwizard.h" #include "guiutility.h" +#include "owncloudsetupwizard.h" +#include "quotainfo.h" #include "settingsdialog.h" +#include "theme.h" +#include "tooltipupdater.h" +#include "wizard/owncloudwizard.h" #include <math.h> @@ -283,16 +284,7 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos) } if (!folderUrl.isEmpty()) { - QString openLocallyLabel; - if (Utility::isWindows()) { - openLocallyLabel = tr("Show in Explorer"); - } else if (Utility::isMac()) { - openLocallyLabel = tr("Show in Finder"); - } else { - openLocallyLabel = tr("Show in file manager"); - } - - QAction *ac = menu->addAction(openLocallyLabel, [folderUrl]() { + QAction *ac = menu->addAction(CommonStrings::showInFileBrowser(), [folderUrl]() { qCInfo(lcAccountSettings) << "Opening local folder" << folderUrl; if (!QDesktopServices::openUrl(folderUrl)) { qCWarning(lcAccountSettings) << "QDesktopServices::openUrl failed for" << folderUrl; @@ -312,7 +304,7 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos) // Only add the path of subfolders, because the remote path is the path of the root folder. path += info->_path; } - menu->addAction(tr("Show in Browser"), [this, path] { + menu->addAction(CommonStrings::showInWebBrowser(), [this, path] { fetchPrivateLinkUrl(_accountState->account(), path, this, [](const QString &url) { Utility::openBrowser(url, nullptr); }); |