mirror of
https://invent.kde.org/network/falkon.git
synced 2024-09-21 09:42:10 +02:00
lib: Port to KI18n
This commit is contained in:
parent
ee4dbad676
commit
3f37ada906
|
@ -89,12 +89,7 @@ endif()
|
|||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
# Mandatory: KF5
|
||||
find_package(KF5 REQUIRED COMPONENTS Archive)
|
||||
|
||||
# KF5I18n: Mandatory with downloaded translations (only for ki18n_install)
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/po")
|
||||
find_package(KF5I18n REQUIRED)
|
||||
endif()
|
||||
find_package(KF5 REQUIRED COMPONENTS I18n Archive)
|
||||
|
||||
# Optional: KWallet, KIO, KCrash, KCoreAddons
|
||||
set(KF5_MIN_VERSION "5.54.0")
|
||||
|
@ -180,7 +175,4 @@ if (BUILD_TESTING)
|
|||
add_subdirectory(tests/benchmarks)
|
||||
endif()
|
||||
|
||||
# Tell releaseme that po is already taken care of
|
||||
# SKIP_PO_INSTALL
|
||||
|
||||
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
#! /bin/sh
|
||||
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui' | grep -v -e '/plugins/' -e '/scripts/'` -o $podir/falkon_qt.pot
|
10
src/lib/3rdparty/fancytabwidget.cpp
vendored
10
src/lib/3rdparty/fancytabwidget.cpp
vendored
|
@ -668,11 +668,11 @@ void FancyTabWidget::contextMenuEvent(QContextMenuEvent* e)
|
|||
|
||||
// QSignalMapper* mapper = new QSignalMapper(this);
|
||||
// QActionGroup* group = new QActionGroup(this);
|
||||
// AddMenuItem(mapper, group, tr("Large sidebar"), Mode_LargeSidebar);
|
||||
// AddMenuItem(mapper, group, tr("Small sidebar"), Mode_SmallSidebar);
|
||||
// AddMenuItem(mapper, group, tr("Plain sidebar"), Mode_PlainSidebar);
|
||||
// AddMenuItem(mapper, group, tr("Tabs on top"), Mode_Tabs);
|
||||
// AddMenuItem(mapper, group, tr("Icons on top"), Mode_IconOnlyTabs);
|
||||
// AddMenuItem(mapper, group, i18n("Large sidebar"), Mode_LargeSidebar);
|
||||
// AddMenuItem(mapper, group, i18n("Small sidebar"), Mode_SmallSidebar);
|
||||
// AddMenuItem(mapper, group, i18n("Plain sidebar"), Mode_PlainSidebar);
|
||||
// AddMenuItem(mapper, group, i18n("Tabs on top"), Mode_Tabs);
|
||||
// AddMenuItem(mapper, group, i18n("Icons on top"), Mode_IconOnlyTabs);
|
||||
// menu_->addActions(group->actions());
|
||||
|
||||
// connect(mapper, SIGNAL(mapped(int)), SLOT(SetMode(int)));
|
||||
|
|
18
src/lib/3rdparty/lineedit.cpp
vendored
18
src/lib/3rdparty/lineedit.cpp
vendored
|
@ -27,6 +27,8 @@
|
|||
#include <QStyleOption>
|
||||
#include <QApplication>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
SideWidget::SideWidget(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
|
@ -99,27 +101,27 @@ void LineEdit::init()
|
|||
connect(m_leftWidget, &SideWidget::sizeHintChanged, this, &LineEdit::updateTextMargins);
|
||||
connect(m_rightWidget, &SideWidget::sizeHintChanged, this, &LineEdit::updateTextMargins);
|
||||
|
||||
QAction* undoAction = new QAction(QIcon::fromTheme(QSL("edit-undo")), tr("&Undo"), this);
|
||||
QAction* undoAction = new QAction(QIcon::fromTheme(QSL("edit-undo")), i18n("&Undo"), this);
|
||||
undoAction->setShortcut(QKeySequence(QSL("Ctrl+Z")));
|
||||
undoAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
connect(undoAction, &QAction::triggered, this, &QLineEdit::undo);
|
||||
|
||||
QAction* redoAction = new QAction(QIcon::fromTheme(QSL("edit-redo")), tr("&Redo"), this);
|
||||
QAction* redoAction = new QAction(QIcon::fromTheme(QSL("edit-redo")), i18n("&Redo"), this);
|
||||
redoAction->setShortcut(QKeySequence(QSL("Ctrl+Shift+Z")));
|
||||
redoAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
connect(redoAction, &QAction::triggered, this, &QLineEdit::redo);
|
||||
|
||||
QAction* cutAction = new QAction(QIcon::fromTheme(QSL("edit-cut")), tr("Cu&t"), this);
|
||||
QAction* cutAction = new QAction(QIcon::fromTheme(QSL("edit-cut")), i18n("Cu&t"), this);
|
||||
cutAction->setShortcut(QKeySequence(QSL("Ctrl+X")));
|
||||
cutAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
connect(cutAction, &QAction::triggered, this, &QLineEdit::cut);
|
||||
|
||||
QAction* copyAction = new QAction(QIcon::fromTheme(QSL("edit-copy")), tr("&Copy"), this);
|
||||
QAction* copyAction = new QAction(QIcon::fromTheme(QSL("edit-copy")), i18n("&Copy"), this);
|
||||
copyAction->setShortcut(QKeySequence(QSL("Ctrl+C")));
|
||||
copyAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
connect(copyAction, &QAction::triggered, this, &QLineEdit::copy);
|
||||
|
||||
QAction* pasteAction = new QAction(QIcon::fromTheme(QSL("edit-paste")), tr("&Paste"), this);
|
||||
QAction* pasteAction = new QAction(QIcon::fromTheme(QSL("edit-paste")), i18n("&Paste"), this);
|
||||
pasteAction->setShortcut(QKeySequence(QSL("Ctrl+V")));
|
||||
pasteAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
connect(pasteAction, &QAction::triggered, this, &QLineEdit::paste);
|
||||
|
@ -128,13 +130,13 @@ void LineEdit::init()
|
|||
pasteAndGoAction->setShortcut(QKeySequence(QSL("Ctrl+Shift+V")));
|
||||
pasteAndGoAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
|
||||
QAction* deleteAction = new QAction(QIcon::fromTheme(QSL("edit-delete")), tr("Delete"), this);
|
||||
QAction* deleteAction = new QAction(QIcon::fromTheme(QSL("edit-delete")), i18n("Delete"), this);
|
||||
connect(deleteAction, &QAction::triggered, this, &LineEdit::slotDelete);
|
||||
|
||||
QAction* clearAllAction = new QAction(QIcon::fromTheme(QSL("edit-clear")), tr("Clear All"), this);
|
||||
QAction* clearAllAction = new QAction(QIcon::fromTheme(QSL("edit-clear")), i18n("Clear All"), this);
|
||||
connect(clearAllAction, &QAction::triggered, this, &QLineEdit::clear);
|
||||
|
||||
QAction* selectAllAction = new QAction(QIcon::fromTheme(QSL("edit-select-all")), tr("Select All"), this);
|
||||
QAction* selectAllAction = new QAction(QIcon::fromTheme(QSL("edit-select-all")), i18n("Select All"), this);
|
||||
selectAllAction->setShortcut(QKeySequence(QSL("Ctrl+A")));
|
||||
selectAllAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
connect(selectAllAction, &QAction::triggered, this, &QLineEdit::selectAll);
|
||||
|
|
4
src/lib/3rdparty/squeezelabelv2.cpp
vendored
4
src/lib/3rdparty/squeezelabelv2.cpp
vendored
|
@ -24,6 +24,8 @@
|
|||
#include <QDrag>
|
||||
#include <QMenu>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
SqueezeLabelV2::SqueezeLabelV2(QWidget* parent)
|
||||
: QLabel(parent)
|
||||
{
|
||||
|
@ -61,7 +63,7 @@ void SqueezeLabelV2::contextMenuEvent(QContextMenuEvent* event)
|
|||
}
|
||||
|
||||
QMenu menu;
|
||||
QAction* act = menu.addAction(tr("Copy"), this, &SqueezeLabelV2::copy);
|
||||
QAction* act = menu.addAction(i18n("Copy"), this, &SqueezeLabelV2::copy);
|
||||
act->setShortcut(QKeySequence(QSL("Ctrl+C")));
|
||||
act->setEnabled(hasSelectedText());
|
||||
|
||||
|
|
|
@ -279,8 +279,7 @@ if (APPLE)
|
|||
set(SRCS ${SRCS} tools/disablewindowtabbbing.mm)
|
||||
endif()
|
||||
|
||||
# TODO: use ki18n_wrap_ui?
|
||||
qt5_wrap_ui(SRCS
|
||||
ki18n_wrap_ui(SRCS
|
||||
adblock/adblockaddsubscriptiondialog.ui
|
||||
adblock/adblockdialog.ui
|
||||
autofill/autofillnotification.ui
|
||||
|
@ -349,6 +348,7 @@ target_link_libraries(FalkonPrivate
|
|||
Qt5::PrintSupport
|
||||
Qt5::QuickWidgets
|
||||
Qt5::WebChannel
|
||||
KF5::I18n
|
||||
KF5::Archive
|
||||
${OPENSSL_CRYPTO_LIBRARY}
|
||||
)
|
||||
|
|
3
src/lib/Messages.sh
Normal file
3
src/lib/Messages.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#! /bin/sh
|
||||
$EXTRACTRC `find . -name \*.ui` >> rc.cpp
|
||||
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h'` -o $podir/falkon.pot
|
|
@ -19,6 +19,8 @@
|
|||
#include "ui_adblockaddsubscriptiondialog.h"
|
||||
#include "adblockmanager.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
AdBlockAddSubscriptionDialog::AdBlockAddSubscriptionDialog(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::AdBlockAddSubscriptionDialog)
|
||||
|
@ -42,7 +44,7 @@ AdBlockAddSubscriptionDialog::AdBlockAddSubscriptionDialog(QWidget* parent)
|
|||
<< Subscription(QSL("ABPindo (Indonesian)"), QSL("https://raw.githubusercontent.com/heradhis/indonesianadblockrules/master/subscriptions/abpindo.txt"))
|
||||
<< Subscription(QSL("Easylist China (Chinese)"), QSL("https://easylist-downloads.adblockplus.org/easylistchina.txt"))
|
||||
<< Subscription(QSL("Anti-Adblock Killer"), QSL("https://raw.githubusercontent.com/reek/anti-adblock-killer/master/anti-adblock-killer-filters.txt"))
|
||||
<< Subscription(tr("Other..."), QString());
|
||||
<< Subscription(i18n("Other..."), QString());
|
||||
|
||||
foreach (const Subscription &subscription, m_knownSubscriptions) {
|
||||
ui->comboBox->addItem(subscription.title);
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include <QMessageBox>
|
||||
#include <QInputDialog>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
AdBlockDialog::AdBlockDialog(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, m_manager(AdBlockManager::instance())
|
||||
|
@ -46,14 +48,14 @@ AdBlockDialog::AdBlockDialog(QWidget* parent)
|
|||
adblockCheckBox->setChecked(m_manager->isEnabled());
|
||||
|
||||
QMenu* menu = new QMenu(buttonOptions);
|
||||
m_actionAddRule = menu->addAction(tr("Add Rule"), this, &AdBlockDialog::addRule);
|
||||
m_actionRemoveRule = menu->addAction(tr("Remove Rule"), this, &AdBlockDialog::removeRule);
|
||||
m_actionAddRule = menu->addAction(i18n("Add Rule"), this, &AdBlockDialog::addRule);
|
||||
m_actionRemoveRule = menu->addAction(i18n("Remove Rule"), this, &AdBlockDialog::removeRule);
|
||||
menu->addSeparator();
|
||||
m_actionAddSubscription = menu->addAction(tr("Add Subscription"), this, &AdBlockDialog::addSubscription);
|
||||
m_actionRemoveSubscription = menu->addAction(tr("Remove Subscription"), this, &AdBlockDialog::removeSubscription);
|
||||
menu->addAction(tr("Update Subscriptions"), m_manager, &AdBlockManager::updateAllSubscriptions);
|
||||
m_actionAddSubscription = menu->addAction(i18n("Add Subscription"), this, &AdBlockDialog::addSubscription);
|
||||
m_actionRemoveSubscription = menu->addAction(i18n("Remove Subscription"), this, &AdBlockDialog::removeSubscription);
|
||||
menu->addAction(i18n("Update Subscriptions"), m_manager, &AdBlockManager::updateAllSubscriptions);
|
||||
menu->addSeparator();
|
||||
menu->addAction(tr("Learn about writing rules..."), this, &AdBlockDialog::learnAboutRules);
|
||||
menu->addAction(i18n("Learn about writing rules..."), this, &AdBlockDialog::learnAboutRules);
|
||||
|
||||
buttonOptions->setMenu(menu);
|
||||
connect(menu, &QMenu::aboutToShow, this, &AdBlockDialog::aboutToShowMenu);
|
||||
|
|
|
@ -28,10 +28,12 @@
|
|||
|
||||
#include <QMenu>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
AdBlockIcon::AdBlockIcon(QObject *parent)
|
||||
: AbstractButtonInterface(parent)
|
||||
{
|
||||
setTitle(tr("AdBlock"));
|
||||
setTitle(i18n("AdBlock"));
|
||||
setIcon(QIcon(QSL(":adblock/data/adblock.png")));
|
||||
|
||||
updateState();
|
||||
|
@ -49,7 +51,7 @@ QString AdBlockIcon::id() const
|
|||
|
||||
QString AdBlockIcon::name() const
|
||||
{
|
||||
return tr("AdBlock Icon");
|
||||
return i18n("AdBlock Icon");
|
||||
}
|
||||
|
||||
void AdBlockIcon::toggleCustomFilter()
|
||||
|
@ -83,19 +85,19 @@ void AdBlockIcon::updateState()
|
|||
}
|
||||
if (!AdBlockManager::instance()->isEnabled()) {
|
||||
setActive(false);
|
||||
setToolTip(tr("AdBlock is disabled"));
|
||||
setToolTip(i18n("AdBlock is disabled"));
|
||||
setBadgeText(QString());
|
||||
return;
|
||||
}
|
||||
if (!AdBlockManager::instance()->canRunOnScheme(view->url().scheme())) {
|
||||
setActive(false);
|
||||
setToolTip(tr("AdBlock is disabled on this site "));
|
||||
setToolTip(i18n("AdBlock is disabled on this site "));
|
||||
setBadgeText(QString());
|
||||
return;
|
||||
}
|
||||
|
||||
setActive(true);
|
||||
setToolTip(tr("AdBlock is active"));
|
||||
setToolTip(i18n("AdBlock is active"));
|
||||
updateBadgeText();
|
||||
}
|
||||
|
||||
|
@ -142,7 +144,7 @@ void AdBlockIcon::clicked(ClickController *controller)
|
|||
|
||||
QMenu *menu = new QMenu();
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
menu->addAction(tr("Show AdBlock &Settings"), manager, SLOT(showDialog()));
|
||||
menu->addAction(i18n("Show AdBlock &Settings"), manager, SLOT(showDialog()));
|
||||
menu->addSeparator();
|
||||
|
||||
if (!pageUrl.host().isEmpty() && manager->isEnabled() && manager->canRunOnScheme(pageUrl.scheme())) {
|
||||
|
@ -150,13 +152,13 @@ void AdBlockIcon::clicked(ClickController *controller)
|
|||
const QString hostFilter = QSL("@@||%1^$document").arg(host);
|
||||
const QString pageFilter = QSL("@@|%1|$document").arg(pageUrl.toString());
|
||||
|
||||
QAction* act = menu->addAction(tr("Disable on %1").arg(host));
|
||||
QAction* act = menu->addAction(i18n("Disable on %1", host));
|
||||
act->setCheckable(true);
|
||||
act->setChecked(customList->containsFilter(hostFilter));
|
||||
act->setData(hostFilter);
|
||||
connect(act, &QAction::triggered, this, &AdBlockIcon::toggleCustomFilter);
|
||||
|
||||
act = menu->addAction(tr("Disable only on this page"));
|
||||
act = menu->addAction(i18n("Disable only on this page"));
|
||||
act->setCheckable(true);
|
||||
act->setChecked(customList->containsFilter(pageFilter));
|
||||
act->setData(pageFilter);
|
||||
|
|
|
@ -44,6 +44,8 @@
|
|||
#include <QElapsedTimer>
|
||||
#endif
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
Q_GLOBAL_STATIC(AdBlockManager, qz_adblock_manager)
|
||||
|
||||
AdBlockManager::AdBlockManager(QObject* parent)
|
||||
|
@ -181,9 +183,9 @@ bool AdBlockManager::addSubscriptionFromUrl(const QUrl &url)
|
|||
if (subscriptionTitle.isEmpty() || subscriptionUrl.isEmpty())
|
||||
return false;
|
||||
|
||||
const QString message = AdBlockManager::tr("Do you want to add <b>%1</b> subscription?").arg(subscriptionTitle);
|
||||
const QString message = i18n("Do you want to add <b>%1</b> subscription?", subscriptionTitle);
|
||||
|
||||
QMessageBox::StandardButton result = QMessageBox::question(nullptr, AdBlockManager::tr("AdBlock Subscription"), message, QMessageBox::Yes | QMessageBox::No);
|
||||
QMessageBox::StandardButton result = QMessageBox::question(nullptr, i18n("AdBlock Subscription"), message, QMessageBox::Yes | QMessageBox::No);
|
||||
if (result == QMessageBox::Yes) {
|
||||
AdBlockManager::instance()->addSubscription(subscriptionTitle, subscriptionUrl);
|
||||
AdBlockManager::instance()->showDialog();
|
||||
|
@ -313,12 +315,12 @@ void AdBlockManager::load()
|
|||
|
||||
// Add EasyList + NoCoinList if subscriptions are empty
|
||||
if (m_subscriptions.isEmpty()) {
|
||||
AdBlockSubscription *easyList = new AdBlockSubscription(tr("EasyList"), this);
|
||||
AdBlockSubscription *easyList = new AdBlockSubscription(i18n("EasyList"), this);
|
||||
easyList->setUrl(QUrl(ADBLOCK_EASYLIST_URL));
|
||||
easyList->setFilePath(DataPaths::currentProfilePath() + QLatin1String("/adblock/easylist.txt"));
|
||||
m_subscriptions.append(easyList);
|
||||
|
||||
AdBlockSubscription *noCoinList = new AdBlockSubscription(tr("NoCoin List"), this);
|
||||
AdBlockSubscription *noCoinList = new AdBlockSubscription(i18n("NoCoin List"), this);
|
||||
noCoinList->setUrl(QUrl(ADBLOCK_NOCOINLIST_URL));
|
||||
noCoinList->setFilePath(DataPaths::currentProfilePath() + QLatin1String("/adblock/nocoinlist.txt"));
|
||||
m_subscriptions.append(noCoinList);
|
||||
|
|
|
@ -55,6 +55,8 @@
|
|||
#include <QNetworkReply>
|
||||
#include <QSaveFile>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
AdBlockSubscription::AdBlockSubscription(const QString &title, QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_reply(nullptr)
|
||||
|
@ -171,7 +173,7 @@ void AdBlockSubscription::subscriptionDownloaded()
|
|||
m_reply = 0;
|
||||
|
||||
if (error) {
|
||||
emit subscriptionError(tr("Cannot load subscription!"));
|
||||
emit subscriptionError(i18n("Cannot load subscription!"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -284,7 +286,7 @@ AdBlockSubscription::~AdBlockSubscription()
|
|||
// AdBlockCustomList
|
||||
|
||||
AdBlockCustomList::AdBlockCustomList(QObject* parent)
|
||||
: AdBlockSubscription(tr("Custom Rules"), parent)
|
||||
: AdBlockSubscription(i18n("Custom Rules"), parent)
|
||||
{
|
||||
setFilePath(DataPaths::currentProfilePath() + QLatin1String("/adblock/customlist.txt"));
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include <QApplication>
|
||||
#include <QInputDialog>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
AdBlockTreeWidget::AdBlockTreeWidget(AdBlockSubscription* subscription, QWidget* parent)
|
||||
: TreeWidget(parent)
|
||||
, m_subscription(subscription)
|
||||
|
@ -77,9 +79,9 @@ void AdBlockTreeWidget::contextMenuRequested(const QPoint &pos)
|
|||
}
|
||||
|
||||
QMenu menu;
|
||||
menu.addAction(tr("Add Rule"), this, &AdBlockTreeWidget::addRule);
|
||||
menu.addAction(i18n("Add Rule"), this, &AdBlockTreeWidget::addRule);
|
||||
menu.addSeparator();
|
||||
QAction* deleteAction = menu.addAction(tr("Remove Rule"), this, &AdBlockTreeWidget::removeRule);
|
||||
QAction* deleteAction = menu.addAction(i18n("Remove Rule"), this, &AdBlockTreeWidget::removeRule);
|
||||
|
||||
if (!item->parent()) {
|
||||
deleteAction->setDisabled(true);
|
||||
|
@ -138,7 +140,7 @@ void AdBlockTreeWidget::addRule()
|
|||
return;
|
||||
}
|
||||
|
||||
QString newRule = QInputDialog::getText(this, tr("Add Custom Rule"), tr("Please write your rule here:"));
|
||||
QString newRule = QInputDialog::getText(this, i18n("Add Custom Rule"), i18n("Please write your rule here:"));
|
||||
if (newRule.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
@ -176,7 +178,7 @@ void AdBlockTreeWidget::subscriptionUpdated()
|
|||
refresh();
|
||||
|
||||
m_itemChangingBlock = true;
|
||||
m_topItem->setText(0, tr("%1 (recently updated)").arg(m_subscription->title()));
|
||||
m_topItem->setText(0, i18n("%1 (recently updated)", m_subscription->title()));
|
||||
m_itemChangingBlock = false;
|
||||
}
|
||||
|
||||
|
@ -185,7 +187,7 @@ void AdBlockTreeWidget::subscriptionError(const QString &message)
|
|||
refresh();
|
||||
|
||||
m_itemChangingBlock = true;
|
||||
m_topItem->setText(0, tr("%1 (Error: %2)").arg(m_subscription->title(), message));
|
||||
m_topItem->setText(0, i18n("%1 (Error: %2)", m_subscription->title(), message));
|
||||
m_itemChangingBlock = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include <QUrlQuery>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
AdBlockUrlInterceptor::AdBlockUrlInterceptor(AdBlockManager *manager)
|
||||
: UrlInterceptor(manager)
|
||||
, m_manager(manager)
|
||||
|
@ -41,8 +43,8 @@ void AdBlockUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &request)
|
|||
page.append(QzTools::readAllFileContents(QSL(":adblock/data/adblock.html")));
|
||||
page.replace(QSL("%FAVICON%"), QSL("qrc:adblock/data/adblock_big.png"));
|
||||
page.replace(QSL("%IMAGE%"), QSL("qrc:adblock/data/adblock_big.png"));
|
||||
page.replace(QSL("%TITLE%"), tr("Blocked content"));
|
||||
page.replace(QSL("%RULE%"), tr("Blocked by <i>%1 (%2)</i>").arg(ruleFilter, ruleSubscription));
|
||||
page.replace(QSL("%TITLE%"), i18n("Blocked content"));
|
||||
page.replace(QSL("%RULE%"), i18n("Blocked by <i>%1 (%2)</i>", ruleFilter, ruleSubscription));
|
||||
page = QzTools::applyDirectionToPage(page);
|
||||
request.redirect(QUrl(QString::fromUtf8(QByteArray("data:text/html;base64,") + page.toUtf8().toBase64())));
|
||||
} else {
|
||||
|
|
|
@ -84,6 +84,8 @@
|
|||
#include <xcb/xcb_atom.h>
|
||||
#endif
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
static const int savedWindowVersion = 2;
|
||||
|
||||
BrowserWindow::SavedWindow::SavedWindow()
|
||||
|
@ -202,7 +204,7 @@ BrowserWindow::BrowserWindow(Qz::BrowserWindowType type, const QUrl &startUrl)
|
|||
setAttribute(Qt::WA_DontCreateNativeAncestors);
|
||||
|
||||
setObjectName(QSL("mainwindow"));
|
||||
setWindowTitle(tr("Falkon"));
|
||||
setWindowTitle(i18n("Falkon"));
|
||||
setProperty("private", mApp->isPrivate());
|
||||
|
||||
setupUi();
|
||||
|
@ -392,7 +394,7 @@ void BrowserWindow::setupUi()
|
|||
m_progressBar = new ProgressBar(m_statusBar);
|
||||
m_ipLabel = new QLabel(this);
|
||||
m_ipLabel->setObjectName(QSL("statusbar-ip-label"));
|
||||
m_ipLabel->setToolTip(tr("IP Address of current page"));
|
||||
m_ipLabel->setToolTip(i18n("IP Address of current page"));
|
||||
|
||||
m_statusBar->addPermanentWidget(m_progressBar);
|
||||
m_statusBar->addPermanentWidget(m_ipLabel);
|
||||
|
@ -732,7 +734,7 @@ void BrowserWindow::setWindowTitle(const QString &t)
|
|||
QString title = t;
|
||||
|
||||
if (mApp->isPrivate()) {
|
||||
title.append(tr(" (Private Browsing)"));
|
||||
title.append(i18n(" (Private Browsing)"));
|
||||
}
|
||||
|
||||
QMainWindow::setWindowTitle(title);
|
||||
|
@ -977,9 +979,9 @@ void BrowserWindow::currentTabChanged()
|
|||
|
||||
const QString title = view->webTab()->title(/*allowEmpty*/true);
|
||||
if (title.isEmpty()) {
|
||||
setWindowTitle(tr("Falkon"));
|
||||
setWindowTitle(i18n("Falkon"));
|
||||
} else {
|
||||
setWindowTitle(tr("%1 - Falkon").arg(title));
|
||||
setWindowTitle(i18n("%1 - Falkon", title));
|
||||
}
|
||||
m_ipLabel->setText(view->getIp());
|
||||
view->setFocus();
|
||||
|
@ -1045,22 +1047,22 @@ void BrowserWindow::createToolbarsMenu(QMenu* menu)
|
|||
QAction* action;
|
||||
|
||||
#ifndef Q_OS_MACOS
|
||||
action = menu->addAction(tr("&Menu Bar"), this, &BrowserWindow::toggleShowMenubar);
|
||||
action = menu->addAction(i18n("&Menu Bar"), this, &BrowserWindow::toggleShowMenubar);
|
||||
action->setCheckable(true);
|
||||
action->setChecked(menuBar()->isVisible());
|
||||
#endif
|
||||
|
||||
action = menu->addAction(tr("&Navigation Toolbar"), this, &BrowserWindow::toggleShowNavigationToolbar);
|
||||
action = menu->addAction(i18n("&Navigation Toolbar"), this, &BrowserWindow::toggleShowNavigationToolbar);
|
||||
action->setCheckable(true);
|
||||
action->setChecked(m_navigationToolbar->isVisible());
|
||||
|
||||
action = menu->addAction(tr("&Bookmarks Toolbar"), this, &BrowserWindow::toggleShowBookmarksToolbar);
|
||||
action = menu->addAction(i18n("&Bookmarks Toolbar"), this, &BrowserWindow::toggleShowBookmarksToolbar);
|
||||
action->setCheckable(true);
|
||||
action->setChecked(Settings().value(QSL("Browser-View-Settings/showBookmarksToolbar")).toBool());
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
action = menu->addAction(tr("&Tabs on Top"), this, SLOT(toggleTabsOnTop(bool)));
|
||||
action = menu->addAction(i18n("&Tabs on Top"), this, SLOT(toggleTabsOnTop(bool)));
|
||||
action->setCheckable(true);
|
||||
action->setChecked(qzSettings->tabsOnTop);
|
||||
|
||||
|
@ -1114,7 +1116,7 @@ void BrowserWindow::createEncodingMenu(QMenu* menu)
|
|||
createEncodingSubMenu(QSL("Windows"), windowsCodecs, menu);
|
||||
createEncodingSubMenu(QSL("Iscii"), isciiCodecs, menu);
|
||||
createEncodingSubMenu(QSL("IBM"), ibmCodecs, menu);
|
||||
createEncodingSubMenu(tr("Other"), otherCodecs, menu);
|
||||
createEncodingSubMenu(i18n("Other"), otherCodecs, menu);
|
||||
}
|
||||
|
||||
void BrowserWindow::removeActions(const QList<QAction *> &actions)
|
||||
|
@ -1156,9 +1158,9 @@ void BrowserWindow::openFile()
|
|||
const QString fileTypes = QSL("%1(*.html *.htm *.shtml *.shtm *.xhtml);;"
|
||||
"%2(*.png *.jpg *.jpeg *.bmp *.gif *.svg *.tiff);;"
|
||||
"%3(*.txt);;"
|
||||
"%4(*.*)").arg(tr("HTML files"), tr("Image files"), tr("Text files"), tr("All files"));
|
||||
"%4(*.*)").arg(i18n("HTML files"), i18n("Image files"), i18n("Text files"), i18n("All files"));
|
||||
|
||||
const QString filePath = QzTools::getOpenFileName(QSL("MainWindow-openFile"), this, tr("Open file..."), QDir::homePath(), fileTypes);
|
||||
const QString filePath = QzTools::getOpenFileName(QSL("MainWindow-openFile"), this, i18n("Open file..."), QDir::homePath(), fileTypes);
|
||||
|
||||
if (!filePath.isEmpty()) {
|
||||
loadAddress(QUrl::fromLocalFile(filePath));
|
||||
|
@ -1498,11 +1500,11 @@ void BrowserWindow::closeEvent(QCloseEvent* event)
|
|||
if (askOnClose && m_tabWidget->normalTabsCount() > 1) {
|
||||
CheckBoxDialog dialog(QMessageBox::Yes | QMessageBox::No, this);
|
||||
dialog.setDefaultButton(QMessageBox::No);
|
||||
//~ singular There is still %n open tab and your session won't be stored.\nAre you sure you want to close this window?
|
||||
//~ plural There are still %n open tabs and your session won't be stored.\nAre you sure you want to close this window?
|
||||
dialog.setText(tr("There are still %n open tabs and your session won't be stored.\nAre you sure you want to close this window?", "", m_tabWidget->count()));
|
||||
dialog.setCheckBoxText(tr("Don't ask again"));
|
||||
dialog.setWindowTitle(tr("There are still open tabs"));
|
||||
dialog.setText(i18np("There is still %1 open tab and your session won't be stored.\nAre you sure you want to close this window?",
|
||||
"There are still %1 open tabs and your session won't be stored.\nAre you sure you want to close this window?",
|
||||
m_tabWidget->count()));
|
||||
dialog.setCheckBoxText(i18n("Don't ask again"));
|
||||
dialog.setWindowTitle(i18n("There are still open tabs"));
|
||||
dialog.setIcon(QMessageBox::Warning);
|
||||
|
||||
if (dialog.exec() != QMessageBox::Yes) {
|
||||
|
|
|
@ -80,6 +80,8 @@
|
|||
#include "registerqappassociation.h"
|
||||
#endif
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
static bool s_testMode = false;
|
||||
|
||||
MainApplication::MainApplication(int &argc, char** argv)
|
||||
|
@ -1068,10 +1070,10 @@ void MainApplication::checkDefaultWebBrowser()
|
|||
if (!associationManager()->isDefaultForAllCapabilities()) {
|
||||
CheckBoxDialog dialog(QMessageBox::Yes | QMessageBox::No, getWindow());
|
||||
dialog.setDefaultButton(QMessageBox::Yes);
|
||||
dialog.setText(tr("Falkon is not currently your default browser. Would you like to make it your default browser?"));
|
||||
dialog.setCheckBoxText(tr("Always perform this check when starting Falkon."));
|
||||
dialog.setText(i18n("Falkon is not currently your default browser. Would you like to make it your default browser?"));
|
||||
dialog.setCheckBoxText(i18n("Always perform this check when starting Falkon."));
|
||||
dialog.setDefaultCheckState(Qt::Checked);
|
||||
dialog.setWindowTitle(tr("Default Browser"));
|
||||
dialog.setWindowTitle(i18n("Default Browser"));
|
||||
dialog.setIcon(QMessageBox::Warning);
|
||||
|
||||
if (dialog.exec() == QMessageBox::Yes) {
|
||||
|
@ -1192,9 +1194,9 @@ void MainApplication::createJumpList()
|
|||
// Tasks
|
||||
QWinJumpListCategory *tasks = jumpList->tasks();
|
||||
tasks->setVisible(true);
|
||||
tasks->addLink(IconProvider::newTabIcon(), tr("Open new tab"), applicationFilePath(), {QSL("--new-tab")});
|
||||
tasks->addLink(IconProvider::newWindowIcon(), tr("Open new window"), applicationFilePath(), {QSL("--new-window")});
|
||||
tasks->addLink(IconProvider::privateBrowsingIcon(), tr("Open new private window"), applicationFilePath(), {QSL("--private-browsing")});
|
||||
tasks->addLink(IconProvider::newTabIcon(), i18n("Open new tab"), applicationFilePath(), {QSL("--new-tab")});
|
||||
tasks->addLink(IconProvider::newWindowIcon(), i18n("Open new window"), applicationFilePath(), {QSL("--new-window")});
|
||||
tasks->addLink(IconProvider::privateBrowsingIcon(), i18n("Open new private window"), applicationFilePath(), {QSL("--private-browsing")});
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1209,7 +1211,7 @@ void MainApplication::initPulseSupport()
|
|||
RegisterQAppAssociation* MainApplication::associationManager()
|
||||
{
|
||||
if (!m_registerQAppAssociation) {
|
||||
QString desc = tr("Falkon is a new and very fast Qt web browser. Falkon is licensed under GPL version 3 or (at your option) any later version. It is based on QtWebEngine and Qt Framework.");
|
||||
QString desc = i18n("Falkon is a new and very fast Qt web browser. Falkon is licensed under GPL version 3 or (at your option) any later version. It is based on QtWebEngine and Qt Framework.");
|
||||
QString fileIconPath = QApplication::applicationFilePath() + ",1";
|
||||
QString appIconPath = QApplication::applicationFilePath() + ",0";
|
||||
m_registerQAppAssociation = new RegisterQAppAssociation("Falkon", QApplication::applicationFilePath(), appIconPath, desc, this);
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
extern void qt_mac_set_dock_menu(QMenu* menu);
|
||||
#endif
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
MainMenu::MainMenu(BrowserWindow* window, QWidget* parent)
|
||||
: QMenu(parent)
|
||||
, m_window(window)
|
||||
|
@ -81,7 +83,7 @@ void MainMenu::initSuperMenu(QMenu* superMenu) const
|
|||
superMenu->addAction(m_actions[QSL("File/OpenFile")]);
|
||||
if (mApp->sessionManager()) {
|
||||
superMenu->addSeparator();
|
||||
QMenu* sessionsSubmenu = new QMenu(tr("Sessions"));
|
||||
QMenu* sessionsSubmenu = new QMenu(i18n("Sessions"));
|
||||
connect(sessionsSubmenu, SIGNAL(aboutToShow()), mApp->sessionManager(), SLOT(aboutToShowSessionsMenu()));
|
||||
superMenu->addMenu(sessionsSubmenu);
|
||||
superMenu->addAction(m_actions[QSL("File/SessionManager")]);
|
||||
|
@ -464,83 +466,83 @@ void MainMenu::init()
|
|||
m_actions[QSL(name)] = action
|
||||
|
||||
// Standard actions - needed on Mac to be placed correctly in "application" menu
|
||||
QAction* action = new QAction(QIcon::fromTheme(QSL("help-about")), tr("&About Falkon"), this);
|
||||
QAction* action = new QAction(QIcon::fromTheme(QSL("help-about")), i18n("&About Falkon"), this);
|
||||
action->setMenuRole(QAction::AboutRole);
|
||||
connect(action, &QAction::triggered, this, &MainMenu::showAboutDialog);
|
||||
m_actions[QSL("Standard/About")] = action;
|
||||
|
||||
action = new QAction(IconProvider::settingsIcon(), tr("Pr&eferences"), this);
|
||||
action = new QAction(IconProvider::settingsIcon(), i18n("Pr&eferences"), this);
|
||||
action->setMenuRole(QAction::PreferencesRole);
|
||||
action->setShortcut(QKeySequence(QKeySequence::Preferences));
|
||||
connect(action, &QAction::triggered, this, &MainMenu::showPreferences);
|
||||
m_actions[QSL("Standard/Preferences")] = action;
|
||||
|
||||
action = new QAction(QIcon::fromTheme(QSL("application-exit")), tr("Quit"), this);
|
||||
action = new QAction(QIcon::fromTheme(QSL("application-exit")), i18n("Quit"), this);
|
||||
action->setMenuRole(QAction::QuitRole);
|
||||
// shortcut set from browserwindow
|
||||
connect(action, &QAction::triggered, this, &MainMenu::quitApplication);
|
||||
m_actions[QSL("Standard/Quit")] = action;
|
||||
|
||||
// File menu
|
||||
m_menuFile = new QMenu(tr("&File"));
|
||||
m_menuFile = new QMenu(i18n("&File"));
|
||||
connect(m_menuFile, &QMenu::aboutToShow, this, &MainMenu::aboutToShowFileMenu);
|
||||
|
||||
ADD_ACTION("File/NewTab", m_menuFile, IconProvider::newTabIcon(), tr("New Tab"), SLOT(newTab()), "Ctrl+T");
|
||||
ADD_ACTION("File/NewWindow", m_menuFile, IconProvider::newWindowIcon(), tr("&New Window"), SLOT(newWindow()), "Ctrl+N");
|
||||
ADD_ACTION("File/NewPrivateWindow", m_menuFile, IconProvider::privateBrowsingIcon(), tr("New &Private Window"), SLOT(newPrivateWindow()), "Ctrl+Shift+P");
|
||||
ADD_ACTION("File/OpenLocation", m_menuFile, QIcon::fromTheme(QSL("document-open-remote")), tr("Open Location"), SLOT(openLocation()), "Ctrl+L");
|
||||
ADD_ACTION("File/OpenFile", m_menuFile, QIcon::fromTheme(QSL("document-open")), tr("Open &File..."), SLOT(openFile()), "Ctrl+O");
|
||||
ADD_ACTION("File/CloseWindow", m_menuFile, QIcon::fromTheme(QSL("window-close")), tr("Close Window"), SLOT(closeWindow()), "Ctrl+Shift+W");
|
||||
ADD_ACTION("File/NewTab", m_menuFile, IconProvider::newTabIcon(), i18n("New Tab"), SLOT(newTab()), "Ctrl+T");
|
||||
ADD_ACTION("File/NewWindow", m_menuFile, IconProvider::newWindowIcon(), i18n("&New Window"), SLOT(newWindow()), "Ctrl+N");
|
||||
ADD_ACTION("File/NewPrivateWindow", m_menuFile, IconProvider::privateBrowsingIcon(), i18n("New &Private Window"), SLOT(newPrivateWindow()), "Ctrl+Shift+P");
|
||||
ADD_ACTION("File/OpenLocation", m_menuFile, QIcon::fromTheme(QSL("document-open-remote")), i18n("Open Location"), SLOT(openLocation()), "Ctrl+L");
|
||||
ADD_ACTION("File/OpenFile", m_menuFile, QIcon::fromTheme(QSL("document-open")), i18n("Open &File..."), SLOT(openFile()), "Ctrl+O");
|
||||
ADD_ACTION("File/CloseWindow", m_menuFile, QIcon::fromTheme(QSL("window-close")), i18n("Close Window"), SLOT(closeWindow()), "Ctrl+Shift+W");
|
||||
m_menuFile->addSeparator();
|
||||
|
||||
if (mApp->sessionManager()) {
|
||||
QMenu* sessionsSubmenu = new QMenu(tr("Sessions"));
|
||||
QMenu* sessionsSubmenu = new QMenu(i18n("Sessions"));
|
||||
connect(sessionsSubmenu, SIGNAL(aboutToShow()), mApp->sessionManager(), SLOT(aboutToShowSessionsMenu()));
|
||||
m_menuFile->addMenu(sessionsSubmenu);
|
||||
action = new QAction(tr("Session Manager"), this);
|
||||
action = new QAction(i18n("Session Manager"), this);
|
||||
connect(action, &QAction::triggered, mApp->sessionManager(), &SessionManager::openSessionManagerDialog);
|
||||
m_actions[QSL("File/SessionManager")] = action;
|
||||
m_menuFile->addAction(action);
|
||||
m_menuFile->addSeparator();
|
||||
}
|
||||
|
||||
ADD_ACTION("File/SavePageAs", m_menuFile, QIcon::fromTheme(QSL("document-save")), tr("&Save Page As..."), SLOT(savePageAs()), "Ctrl+S");
|
||||
ADD_ACTION("File/SendLink", m_menuFile, QIcon::fromTheme(QSL("mail-message-new")), tr("Send Link..."), SLOT(sendLink()), "");
|
||||
ADD_ACTION("File/Print", m_menuFile, QIcon::fromTheme(QSL("document-print")), tr("&Print..."), SLOT(printPage()), "Ctrl+P");
|
||||
ADD_ACTION("File/SavePageAs", m_menuFile, QIcon::fromTheme(QSL("document-save")), i18n("&Save Page As..."), SLOT(savePageAs()), "Ctrl+S");
|
||||
ADD_ACTION("File/SendLink", m_menuFile, QIcon::fromTheme(QSL("mail-message-new")), i18n("Send Link..."), SLOT(sendLink()), "");
|
||||
ADD_ACTION("File/Print", m_menuFile, QIcon::fromTheme(QSL("document-print")), i18n("&Print..."), SLOT(printPage()), "Ctrl+P");
|
||||
m_menuFile->addSeparator();
|
||||
m_menuFile->addAction(m_actions[QSL("Standard/Quit")]);
|
||||
|
||||
// Edit menu
|
||||
m_menuEdit = new QMenu(tr("&Edit"));
|
||||
m_menuEdit = new QMenu(i18n("&Edit"));
|
||||
connect(m_menuEdit, &QMenu::aboutToShow, this, &MainMenu::aboutToShowEditMenu);
|
||||
|
||||
ADD_ACTION("Edit/Undo", m_menuEdit, QIcon::fromTheme(QSL("edit-undo")), tr("&Undo"), SLOT(editUndo()), "Ctrl+Z");
|
||||
ADD_ACTION("Edit/Undo", m_menuEdit, QIcon::fromTheme(QSL("edit-undo")), i18n("&Undo"), SLOT(editUndo()), "Ctrl+Z");
|
||||
action->setShortcutContext(Qt::WidgetShortcut);
|
||||
ADD_ACTION("Edit/Redo", m_menuEdit, QIcon::fromTheme(QSL("edit-redo")), tr("&Redo"), SLOT(editRedo()), "Ctrl+Shift+Z");
|
||||
ADD_ACTION("Edit/Redo", m_menuEdit, QIcon::fromTheme(QSL("edit-redo")), i18n("&Redo"), SLOT(editRedo()), "Ctrl+Shift+Z");
|
||||
action->setShortcutContext(Qt::WidgetShortcut);
|
||||
m_menuEdit->addSeparator();
|
||||
ADD_ACTION("Edit/Cut", m_menuEdit, QIcon::fromTheme(QSL("edit-cut")), tr("&Cut"), SLOT(editCut()), "Ctrl+X");
|
||||
ADD_ACTION("Edit/Cut", m_menuEdit, QIcon::fromTheme(QSL("edit-cut")), i18n("&Cut"), SLOT(editCut()), "Ctrl+X");
|
||||
action->setShortcutContext(Qt::WidgetShortcut);
|
||||
ADD_ACTION("Edit/Copy", m_menuEdit, QIcon::fromTheme(QSL("edit-copy")), tr("C&opy"), SLOT(editCopy()), "Ctrl+C");
|
||||
ADD_ACTION("Edit/Copy", m_menuEdit, QIcon::fromTheme(QSL("edit-copy")), i18n("C&opy"), SLOT(editCopy()), "Ctrl+C");
|
||||
action->setShortcutContext(Qt::WidgetShortcut);
|
||||
ADD_ACTION("Edit/Paste", m_menuEdit, QIcon::fromTheme(QSL("edit-paste")), tr("&Paste"), SLOT(editPaste()), "Ctrl+V");
|
||||
ADD_ACTION("Edit/Paste", m_menuEdit, QIcon::fromTheme(QSL("edit-paste")), i18n("&Paste"), SLOT(editPaste()), "Ctrl+V");
|
||||
action->setShortcutContext(Qt::WidgetShortcut);
|
||||
m_menuEdit->addSeparator();
|
||||
ADD_ACTION("Edit/SelectAll", m_menuEdit, QIcon::fromTheme(QSL("edit-select-all")), tr("Select &All"), SLOT(editSelectAll()), "Ctrl+A");
|
||||
ADD_ACTION("Edit/SelectAll", m_menuEdit, QIcon::fromTheme(QSL("edit-select-all")), i18n("Select &All"), SLOT(editSelectAll()), "Ctrl+A");
|
||||
action->setShortcutContext(Qt::WidgetShortcut);
|
||||
ADD_ACTION("Edit/Find", m_menuEdit, QIcon::fromTheme(QSL("edit-find")), tr("&Find"), SLOT(editFind()), "Ctrl+F");
|
||||
ADD_ACTION("Edit/Find", m_menuEdit, QIcon::fromTheme(QSL("edit-find")), i18n("&Find"), SLOT(editFind()), "Ctrl+F");
|
||||
action->setShortcutContext(Qt::WidgetShortcut);
|
||||
m_menuEdit->addSeparator();
|
||||
|
||||
// View menu
|
||||
m_menuView = new QMenu(tr("&View"));
|
||||
m_menuView = new QMenu(i18n("&View"));
|
||||
connect(m_menuView, &QMenu::aboutToShow, this, &MainMenu::aboutToShowViewMenu);
|
||||
|
||||
QMenu* toolbarsMenu = new QMenu(tr("Toolbars"));
|
||||
QMenu* toolbarsMenu = new QMenu(i18n("Toolbars"));
|
||||
connect(toolbarsMenu, &QMenu::aboutToShow, this, &MainMenu::aboutToShowToolbarsMenu);
|
||||
QMenu* sidebarMenu = new QMenu(tr("Sidebar"));
|
||||
QMenu* sidebarMenu = new QMenu(i18n("Sidebar"));
|
||||
connect(sidebarMenu, &QMenu::aboutToShow, this, &MainMenu::aboutToShowSidebarsMenu);
|
||||
QMenu* encodingMenu = new QMenu(tr("Character &Encoding"));
|
||||
QMenu* encodingMenu = new QMenu(i18n("Character &Encoding"));
|
||||
connect(encodingMenu, &QMenu::aboutToShow, this, &MainMenu::aboutToShowEncodingMenu);
|
||||
|
||||
// Create menus to make shortcuts available even before first showing the menu
|
||||
|
@ -549,54 +551,54 @@ void MainMenu::init()
|
|||
|
||||
m_menuView->addMenu(toolbarsMenu);
|
||||
m_menuView->addMenu(sidebarMenu);
|
||||
ADD_CHECKABLE_ACTION("View/ShowStatusBar", m_menuView, QIcon(), tr("Sta&tus Bar"), SLOT(showStatusBar()), "");
|
||||
ADD_CHECKABLE_ACTION("View/ShowStatusBar", m_menuView, QIcon(), i18n("Sta&tus Bar"), SLOT(showStatusBar()), "");
|
||||
m_menuView->addSeparator();
|
||||
ADD_ACTION("View/Stop", m_menuView, QIcon::fromTheme(QSL("process-stop")), tr("&Stop"), SLOT(stop()), "Esc");
|
||||
ADD_ACTION("View/Reload", m_menuView, QIcon::fromTheme(QSL("view-refresh")), tr("&Reload"), SLOT(reload()), "F5");
|
||||
ADD_ACTION("View/Stop", m_menuView, QIcon::fromTheme(QSL("process-stop")), i18n("&Stop"), SLOT(stop()), "Esc");
|
||||
ADD_ACTION("View/Reload", m_menuView, QIcon::fromTheme(QSL("view-refresh")), i18n("&Reload"), SLOT(reload()), "F5");
|
||||
m_menuView->addSeparator();
|
||||
ADD_ACTION("View/ZoomIn", m_menuView, QIcon::fromTheme(QSL("zoom-in")), tr("Zoom &In"), SLOT(zoomIn()), "Ctrl++");
|
||||
ADD_ACTION("View/ZoomOut", m_menuView, QIcon::fromTheme(QSL("zoom-out")), tr("Zoom &Out"), SLOT(zoomOut()), "Ctrl+-");
|
||||
ADD_ACTION("View/ZoomReset", m_menuView, QIcon::fromTheme(QSL("zoom-original")), tr("Reset"), SLOT(zoomReset()), "Ctrl+0");
|
||||
ADD_ACTION("View/ZoomIn", m_menuView, QIcon::fromTheme(QSL("zoom-in")), i18n("Zoom &In"), SLOT(zoomIn()), "Ctrl++");
|
||||
ADD_ACTION("View/ZoomOut", m_menuView, QIcon::fromTheme(QSL("zoom-out")), i18n("Zoom &Out"), SLOT(zoomOut()), "Ctrl+-");
|
||||
ADD_ACTION("View/ZoomReset", m_menuView, QIcon::fromTheme(QSL("zoom-original")), i18n("Reset"), SLOT(zoomReset()), "Ctrl+0");
|
||||
m_menuView->addSeparator();
|
||||
m_menuView->addMenu(encodingMenu);
|
||||
m_menuView->addSeparator();
|
||||
ADD_ACTION("View/PageSource", m_menuView, QIcon::fromTheme(QSL("text-html")), tr("&Page Source"), SLOT(showPageSource()), "Ctrl+U");
|
||||
ADD_ACTION("View/PageSource", m_menuView, QIcon::fromTheme(QSL("text-html")), i18n("&Page Source"), SLOT(showPageSource()), "Ctrl+U");
|
||||
action->setShortcutContext(Qt::WidgetShortcut);
|
||||
ADD_CHECKABLE_ACTION("View/FullScreen", m_menuView, QIcon::fromTheme(QSL("view-fullscreen")), tr("&FullScreen"), SLOT(showFullScreen()), "F11");
|
||||
ADD_CHECKABLE_ACTION("View/FullScreen", m_menuView, QIcon::fromTheme(QSL("view-fullscreen")), i18n("&FullScreen"), SLOT(showFullScreen()), "F11");
|
||||
|
||||
// Tools menu
|
||||
m_menuTools = new QMenu(tr("&Tools"));
|
||||
m_menuTools = new QMenu(i18n("&Tools"));
|
||||
connect(m_menuTools, &QMenu::aboutToShow, this, &MainMenu::aboutToShowToolsMenu);
|
||||
|
||||
ADD_ACTION("Tools/WebSearch", m_menuTools, QIcon::fromTheme(QSL("edit-find")), tr("&Web Search"), SLOT(webSearch()), "Ctrl+K");
|
||||
ADD_ACTION("Tools/SiteInfo", m_menuTools, QIcon::fromTheme(QSL("dialog-information")), tr("Site &Info"), SLOT(showSiteInfo()), "Ctrl+I");
|
||||
ADD_ACTION("Tools/WebSearch", m_menuTools, QIcon::fromTheme(QSL("edit-find")), i18n("&Web Search"), SLOT(webSearch()), "Ctrl+K");
|
||||
ADD_ACTION("Tools/SiteInfo", m_menuTools, QIcon::fromTheme(QSL("dialog-information")), i18n("Site &Info"), SLOT(showSiteInfo()), "Ctrl+I");
|
||||
action->setShortcutContext(Qt::WidgetShortcut);
|
||||
m_menuTools->addSeparator();
|
||||
ADD_ACTION("Tools/DownloadManager", m_menuTools, QIcon::fromTheme(QSL("download")), tr("&Download Manager"), SLOT(showDownloadManager()), "Ctrl+Y");
|
||||
ADD_ACTION("Tools/CookiesManager", m_menuTools, QIcon(), tr("&Cookies Manager"), SLOT(showCookieManager()), "");
|
||||
ADD_ACTION("Tools/WebInspector", m_menuTools, QIcon(), tr("Web In&spector"), SLOT(toggleWebInspector()), "Ctrl+Shift+I");
|
||||
ADD_ACTION("Tools/ClearRecentHistory", m_menuTools, QIcon::fromTheme(QSL("edit-clear")), tr("Clear Recent &History"), SLOT(showClearRecentHistoryDialog()), "Ctrl+Shift+Del");
|
||||
ADD_ACTION("Tools/DownloadManager", m_menuTools, QIcon::fromTheme(QSL("download")), i18n("&Download Manager"), SLOT(showDownloadManager()), "Ctrl+Y");
|
||||
ADD_ACTION("Tools/CookiesManager", m_menuTools, QIcon(), i18n("&Cookies Manager"), SLOT(showCookieManager()), "");
|
||||
ADD_ACTION("Tools/WebInspector", m_menuTools, QIcon(), i18n("Web In&spector"), SLOT(toggleWebInspector()), "Ctrl+Shift+I");
|
||||
ADD_ACTION("Tools/ClearRecentHistory", m_menuTools, QIcon::fromTheme(QSL("edit-clear")), i18n("Clear Recent &History"), SLOT(showClearRecentHistoryDialog()), "Ctrl+Shift+Del");
|
||||
|
||||
if (!WebInspector::isEnabled())
|
||||
m_actions.value(QSL("Tools/WebInspector"))->setVisible(false);
|
||||
|
||||
m_submenuExtensions = new QMenu(tr("&Extensions"));
|
||||
m_submenuExtensions = new QMenu(i18n("&Extensions"));
|
||||
m_submenuExtensions->menuAction()->setVisible(false);
|
||||
m_menuTools->addMenu(m_submenuExtensions);
|
||||
m_menuTools->addSeparator();
|
||||
|
||||
// Help menu
|
||||
m_menuHelp = new QMenu(tr("&Help"));
|
||||
m_menuHelp = new QMenu(i18n("&Help"));
|
||||
|
||||
#ifndef Q_OS_MACOS
|
||||
ADD_ACTION("Help/AboutQt", m_menuHelp, QIcon(), tr("About &Qt"), SLOT(aboutQt()), "");
|
||||
ADD_ACTION("Help/AboutQt", m_menuHelp, QIcon(), i18n("About &Qt"), SLOT(aboutQt()), "");
|
||||
m_menuHelp->addAction(m_actions[QSL("Standard/About")]);
|
||||
m_menuHelp->addSeparator();
|
||||
#endif
|
||||
|
||||
ADD_ACTION("Help/InfoAboutApp", m_menuHelp, QIcon::fromTheme(QSL("help-contents")), tr("Information about application"), SLOT(showInfoAboutApp()), "");
|
||||
ADD_ACTION("Help/ConfigInfo", m_menuHelp, QIcon(), tr("Configuration Information"), SLOT(showConfigInfo()), "");
|
||||
ADD_ACTION("Help/ReportIssue", m_menuHelp, QIcon(), tr("Report &Issue"), SLOT(reportIssue()), "");
|
||||
ADD_ACTION("Help/InfoAboutApp", m_menuHelp, QIcon::fromTheme(QSL("help-contents")), i18n("Information about application"), SLOT(showInfoAboutApp()), "");
|
||||
ADD_ACTION("Help/ConfigInfo", m_menuHelp, QIcon(), i18n("Configuration Information"), SLOT(showConfigInfo()), "");
|
||||
ADD_ACTION("Help/ReportIssue", m_menuHelp, QIcon(), i18n("Report &Issue"), SLOT(reportIssue()), "");
|
||||
|
||||
m_actions[QSL("Help/InfoAboutApp")]->setShortcut(QKeySequence(QKeySequence::HelpContents));
|
||||
|
||||
|
@ -609,7 +611,7 @@ void MainMenu::init()
|
|||
m_menuBookmarks->setMainWindow(m_window);
|
||||
|
||||
// Other actions
|
||||
action = new QAction(QIcon::fromTheme(QSL("user-trash")), tr("Restore &Closed Tab"), this);
|
||||
action = new QAction(QIcon::fromTheme(QSL("user-trash")), i18n("Restore &Closed Tab"), this);
|
||||
action->setShortcut(QKeySequence(QSL("Ctrl+Shift+T")));
|
||||
connect(action, &QAction::triggered, this, &MainMenu::restoreClosedTab);
|
||||
m_actions[QSL("Other/RestoreClosedTab")] = action;
|
||||
|
|
|
@ -20,13 +20,15 @@
|
|||
|
||||
#include <QContextMenuEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
AutoFillIcon::AutoFillIcon(QWidget* parent)
|
||||
: ClickableLabel(parent)
|
||||
, m_view(nullptr)
|
||||
{
|
||||
setObjectName(QSL("locationbar-autofillicon"));
|
||||
setCursor(Qt::PointingHandCursor);
|
||||
setToolTip(AutoFillWidget::tr("Choose username to login"));
|
||||
setToolTip(i18n("Choose username to login"));
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
|
||||
connect(this, &ClickableLabel::clicked, this, &AutoFillIcon::iconClicked);
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
#include "animatedwidget.h"
|
||||
#include "iconprovider.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
AutoFillNotification::AutoFillNotification(const QUrl &url, const PageFormData &formData, const PasswordEntry &updateData)
|
||||
: AnimatedWidget(AnimatedWidget::Down, 300, 0)
|
||||
, ui(new Ui::AutoFillNotification)
|
||||
|
@ -38,21 +40,21 @@ AutoFillNotification::AutoFillNotification(const QUrl &url, const PageFormData &
|
|||
QString userPart;
|
||||
|
||||
if (!url.host().isEmpty()) {
|
||||
hostPart = tr("on %1").arg(url.host());
|
||||
hostPart = i18n("on %1", url.host());
|
||||
}
|
||||
|
||||
if (!m_formData.username.isEmpty()) {
|
||||
userPart = tr("for <b>%1</b>").arg(m_formData.username);
|
||||
userPart = i18n("for <b>%1</b>", m_formData.username);
|
||||
}
|
||||
|
||||
if (m_updateData.isValid()) {
|
||||
ui->label->setText(tr("Do you want Falkon to update saved password %1?").arg(userPart));
|
||||
ui->label->setText(i18n("Do you want Falkon to update saved password %1?", userPart));
|
||||
|
||||
ui->remember->setVisible(false);
|
||||
ui->never->setVisible(false);
|
||||
}
|
||||
else {
|
||||
ui->label->setText(tr("Do you want Falkon to remember the password %1 %2?").arg(userPart, hostPart));
|
||||
ui->label->setText(i18n("Do you want Falkon to remember the password %1 %2?", userPart, hostPart));
|
||||
|
||||
ui->update->setVisible(false);
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <QVector>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#define INTERNAL_SERVER_ID QLatin1String("falkon.internal")
|
||||
|
||||
DatabaseEncryptedPasswordBackend::DatabaseEncryptedPasswordBackend()
|
||||
|
@ -255,7 +257,7 @@ void DatabaseEncryptedPasswordBackend::removeAll()
|
|||
|
||||
QString DatabaseEncryptedPasswordBackend::name() const
|
||||
{
|
||||
return AutoFill::tr("Database (encrypted)");
|
||||
return i18n("Database (encrypted)");
|
||||
}
|
||||
|
||||
bool DatabaseEncryptedPasswordBackend::hasSettings() const
|
||||
|
@ -544,12 +546,12 @@ void MasterPasswordDialog::accept()
|
|||
QByteArray currentPassField = AesInterface::passwordToHash(ui->currentPassword->text());
|
||||
|
||||
if (m_backend->isMasterPasswordSetted() && !m_backend->isPasswordVerified(currentPassField)) {
|
||||
QMessageBox::information(this, tr("Warning!"), tr("You entered a wrong password!"));
|
||||
QMessageBox::information(this, i18n("Warning!"), i18n("You entered a wrong password!"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (ui->newPassword->text() != ui->confirmPassword->text()) {
|
||||
QMessageBox::information(this, tr("Warning!"), tr("New/Confirm password fields do not match!"));
|
||||
QMessageBox::information(this, i18n("Warning!"), i18n("New/Confirm password fields do not match!"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -576,8 +578,8 @@ void MasterPasswordDialog::reject()
|
|||
|
||||
if (m_backend->isActive() && !m_backend->isMasterPasswordSetted()) {
|
||||
// master password not set
|
||||
QMessageBox::information(this, AutoFill::tr("Warning!"),
|
||||
AutoFill::tr("This backend needs a master password to be set! "
|
||||
QMessageBox::information(this, i18n("Warning!"),
|
||||
i18n("This backend needs a master password to be set! "
|
||||
"Falkon just switches to its default backend"));
|
||||
// active default backend
|
||||
mApp->autoFill()->passwordManager()->switchBackend(QSL("database"));
|
||||
|
@ -598,7 +600,7 @@ void MasterPasswordDialog::showSetMasterPasswordPage()
|
|||
|
||||
void MasterPasswordDialog::clearMasterPasswordAndConvert(bool forcedAskPass)
|
||||
{
|
||||
if (QMessageBox::information(this, tr("Warning!"), tr("Are you sure you want to clear master password and decrypt data?"), QMessageBox::Yes | QMessageBox::No)
|
||||
if (QMessageBox::information(this, i18n("Warning!"), i18n("Are you sure you want to clear master password and decrypt data?"), QMessageBox::Yes | QMessageBox::No)
|
||||
== QMessageBox::No) {
|
||||
reject();
|
||||
return;
|
||||
|
@ -641,7 +643,7 @@ void MasterPasswordDialog::clearMasterPasswordAndConvert(bool forcedAskPass)
|
|||
mApp->autoFill()->passwordManager()->switchBackend(QSL("database"));
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr("Warning!"), tr("Some data has not been decrypted. The master password was not cleared!"));
|
||||
QMessageBox::information(this, i18n("Warning!"), i18n("Some data has not been decrypted. The master password was not cleared!"));
|
||||
mApp->autoFill()->passwordManager()->switchBackend(QSL("database"));
|
||||
}
|
||||
}
|
||||
|
@ -667,17 +669,17 @@ AskMasterPassword::AskMasterPassword(DatabaseEncryptedPasswordBackend* backend,
|
|||
, m_backend(backend)
|
||||
{
|
||||
setWindowModality(Qt::ApplicationModal);
|
||||
setWindowTitle(AutoFill::tr("Enter Master Password"));
|
||||
setWindowTitle(i18n("Enter Master Password"));
|
||||
|
||||
QVBoxLayout* verticalLayout = new QVBoxLayout(this);
|
||||
QLabel* label = new QLabel(this);
|
||||
label->setText(AutoFill::tr("Permission is required, please enter Master Password:"));
|
||||
label->setText(i18n("Permission is required, please enter Master Password:"));
|
||||
m_lineEdit = new QLineEdit(this);
|
||||
m_lineEdit->setEchoMode(QLineEdit::Password);
|
||||
m_buttonBox = new QDialogButtonBox(this);
|
||||
m_buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
|
||||
m_labelWarning = new QLabel(this);
|
||||
m_labelWarning->setText(AutoFill::tr("Entered password is wrong!"));
|
||||
m_labelWarning->setText(i18n("Entered password is wrong!"));
|
||||
QPalette pal = m_labelWarning->palette();
|
||||
pal.setBrush(QPalette::WindowText, Qt::red);
|
||||
m_labelWarning->setPalette(pal);
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include <QVector>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
DatabasePasswordBackend::DatabasePasswordBackend()
|
||||
: PasswordBackend()
|
||||
{
|
||||
|
@ -29,7 +31,7 @@ DatabasePasswordBackend::DatabasePasswordBackend()
|
|||
|
||||
QString DatabasePasswordBackend::name() const
|
||||
{
|
||||
return AutoFill::tr("Database (plaintext)");
|
||||
return i18n("Database (plaintext)");
|
||||
}
|
||||
|
||||
QVector<PasswordEntry> DatabasePasswordBackend::getEntries(const QUrl &url)
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <QSaveFile>
|
||||
#include <QJsonDocument>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
static const int bookmarksVersion = 1;
|
||||
|
||||
Bookmarks::Bookmarks(QObject* parent)
|
||||
|
@ -204,16 +206,16 @@ void Bookmarks::init()
|
|||
m_root = new BookmarkItem(BookmarkItem::Root);
|
||||
|
||||
m_folderToolbar = new BookmarkItem(BookmarkItem::Folder, m_root);
|
||||
m_folderToolbar->setTitle(tr("Bookmarks Toolbar"));
|
||||
m_folderToolbar->setDescription(tr("Bookmarks located in Bookmarks Toolbar"));
|
||||
m_folderToolbar->setTitle(i18n("Bookmarks Toolbar"));
|
||||
m_folderToolbar->setDescription(i18n("Bookmarks located in Bookmarks Toolbar"));
|
||||
|
||||
m_folderMenu = new BookmarkItem(BookmarkItem::Folder, m_root);
|
||||
m_folderMenu->setTitle(tr("Bookmarks Menu"));
|
||||
m_folderMenu->setDescription(tr("Bookmarks located in Bookmarks Menu"));
|
||||
m_folderMenu->setTitle(i18n("Bookmarks Menu"));
|
||||
m_folderMenu->setDescription(i18n("Bookmarks located in Bookmarks Menu"));
|
||||
|
||||
m_folderUnsorted = new BookmarkItem(BookmarkItem::Folder, m_root);
|
||||
m_folderUnsorted->setTitle(tr("Unsorted Bookmarks"));
|
||||
m_folderUnsorted->setDescription(tr("All other bookmarks"));
|
||||
m_folderUnsorted->setTitle(i18n("Unsorted Bookmarks"));
|
||||
m_folderUnsorted->setDescription(i18n("All other bookmarks"));
|
||||
|
||||
if (BookmarksTools::migrateBookmarksIfNecessary(this)) {
|
||||
// Bookmarks migrated just now, let's save them ASAP
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
BookmarksExportDialog::BookmarksExportDialog(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::BookmarksExportDialog)
|
||||
|
@ -61,7 +63,7 @@ void BookmarksExportDialog::exportBookmarks()
|
|||
bool ok = m_currentExporter->exportBookmarks(mApp->bookmarks()->rootItem());
|
||||
|
||||
if (!ok) {
|
||||
QMessageBox::critical(this, tr("Error!"), m_currentExporter->errorString());
|
||||
QMessageBox::critical(this, i18n("Error!"), m_currentExporter->errorString());
|
||||
}
|
||||
else {
|
||||
close();
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include <QTextStream>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
HtmlExporter::HtmlExporter(QObject* parent)
|
||||
: BookmarksExporter(parent)
|
||||
{
|
||||
|
@ -28,14 +30,14 @@ HtmlExporter::HtmlExporter(QObject* parent)
|
|||
|
||||
QString HtmlExporter::name() const
|
||||
{
|
||||
return BookmarksExporter::tr("HTML File") + QL1S(" (bookmarks.html)");
|
||||
return i18n("HTML File") + QL1S(" (bookmarks.html)");
|
||||
}
|
||||
|
||||
QString HtmlExporter::getPath(QWidget* parent)
|
||||
{
|
||||
const QString defaultPath = QDir::homePath() + QLatin1String("/bookmarks.html");
|
||||
const QString filter = BookmarksExporter::tr("HTML Bookmarks") + QL1S(" (.html)");
|
||||
m_path = QzTools::getSaveFileName(QStringLiteral("HtmlExporter"), parent, BookmarksExporter::tr("Choose file..."), defaultPath, filter);
|
||||
const QString filter = i18n("HTML Bookmarks") + QL1S(" (.html)");
|
||||
m_path = QzTools::getSaveFileName(QStringLiteral("HtmlExporter"), parent, i18n("Choose file..."), defaultPath, filter);
|
||||
return m_path;
|
||||
}
|
||||
|
||||
|
@ -44,7 +46,7 @@ bool HtmlExporter::exportBookmarks(BookmarkItem* root)
|
|||
QFile file(m_path);
|
||||
|
||||
if (!file.open(QFile::WriteOnly | QFile::Truncate)) {
|
||||
setError(BookmarksExporter::tr("Cannot open file for writing!"));
|
||||
setError(i18n("Cannot open file for writing!"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <QStyle>
|
||||
#include <QContextMenuEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
BookmarksIcon::BookmarksIcon(QWidget* parent)
|
||||
: ClickableLabel(parent)
|
||||
, m_view(0)
|
||||
|
@ -34,7 +36,7 @@ BookmarksIcon::BookmarksIcon(QWidget* parent)
|
|||
{
|
||||
setObjectName("locationbar-bookmarkicon");
|
||||
setCursor(Qt::PointingHandCursor);
|
||||
setToolTip(tr("Bookmark this Page"));
|
||||
setToolTip(i18n("Bookmark this Page"));
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
|
||||
connect(mApp->bookmarks(), SIGNAL(bookmarkAdded(BookmarkItem*)), this, SLOT(bookmarksChanged()));
|
||||
|
@ -97,7 +99,7 @@ void BookmarksIcon::setBookmarkSaved()
|
|||
setProperty("bookmarked", QVariant(true));
|
||||
style()->unpolish(this);
|
||||
style()->polish(this);
|
||||
setToolTip(tr("Edit this bookmark"));
|
||||
setToolTip(i18n("Edit this bookmark"));
|
||||
}
|
||||
|
||||
void BookmarksIcon::setBookmarkDisabled()
|
||||
|
@ -105,7 +107,7 @@ void BookmarksIcon::setBookmarkDisabled()
|
|||
setProperty("bookmarked", QVariant(false));
|
||||
style()->unpolish(this);
|
||||
style()->polish(this);
|
||||
setToolTip(tr("Bookmark this Page"));
|
||||
setToolTip(i18n("Bookmark this Page"));
|
||||
}
|
||||
|
||||
void BookmarksIcon::contextMenuEvent(QContextMenuEvent* ev)
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
BookmarksImportDialog::BookmarksImportDialog(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::BookmarksImportDialog)
|
||||
|
@ -110,19 +112,19 @@ void BookmarksImportDialog::nextPage()
|
|||
}
|
||||
|
||||
if (m_importer->error()) {
|
||||
QMessageBox::critical(this, tr("Error!"), m_importer->errorString());
|
||||
QMessageBox::critical(this, i18n("Error!"), m_importer->errorString());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_importedFolder || m_importedFolder->children().isEmpty()) {
|
||||
QMessageBox::warning(this, tr("Error!"), tr("No bookmarks were found."));
|
||||
QMessageBox::warning(this, i18n("Error!"), i18n("No bookmarks were found."));
|
||||
return;
|
||||
}
|
||||
|
||||
Q_ASSERT(m_importedFolder->isFolder());
|
||||
|
||||
ui->stackedWidget->setCurrentIndex(++m_currentPage);
|
||||
ui->nextButton->setText(tr("Finish"));
|
||||
ui->nextButton->setText(i18n("Finish"));
|
||||
showExportedBookmarks();
|
||||
break;
|
||||
|
||||
|
@ -154,7 +156,7 @@ void BookmarksImportDialog::previousPage()
|
|||
case 2:
|
||||
showImporterPage();
|
||||
|
||||
ui->nextButton->setText(tr("Next >"));
|
||||
ui->nextButton->setText(i18n("Next >"));
|
||||
ui->nextButton->setEnabled(true);
|
||||
ui->backButton->setEnabled(true);
|
||||
ui->stackedWidget->setCurrentIndex(--m_currentPage);
|
||||
|
@ -183,7 +185,7 @@ void BookmarksImportDialog::setFile()
|
|||
void BookmarksImportDialog::showImporterPage()
|
||||
{
|
||||
ui->iconLabel->setPixmap(ui->browserList->currentItem()->icon().pixmap(48));
|
||||
ui->importingFromLabel->setText(tr("<b>Importing from %1</b>").arg(ui->browserList->currentItem()->text()));
|
||||
ui->importingFromLabel->setText(i18n("<b>Importing from %1</b>", ui->browserList->currentItem()->text()));
|
||||
ui->fileText1->setText(m_importer->description());
|
||||
ui->standardDirLabel->setText(QSL("<i>%1</i>").arg(m_importer->standardPath()));
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include <QVariantList>
|
||||
#include <QJsonDocument>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
ChromeImporter::ChromeImporter(QObject* parent)
|
||||
: BookmarksImporter(parent)
|
||||
{
|
||||
|
@ -30,7 +32,7 @@ ChromeImporter::ChromeImporter(QObject* parent)
|
|||
|
||||
QString ChromeImporter::description() const
|
||||
{
|
||||
return BookmarksImporter::tr("Google Chrome stores its bookmarks in <b>Bookmarks</b> text file. "
|
||||
return i18n("Google Chrome stores its bookmarks in <b>Bookmarks</b> text file. "
|
||||
"This file is usually located in");
|
||||
}
|
||||
|
||||
|
@ -47,7 +49,7 @@ QString ChromeImporter::standardPath() const
|
|||
|
||||
QString ChromeImporter::getPath(QWidget* parent)
|
||||
{
|
||||
m_path = QFileDialog::getOpenFileName(parent, BookmarksImporter::tr("Choose file..."), standardPath(), QSL("Bookmarks (Bookmarks)"));
|
||||
m_path = QFileDialog::getOpenFileName(parent, i18n("Choose file..."), standardPath(), QSL("Bookmarks (Bookmarks)"));
|
||||
return m_path;
|
||||
}
|
||||
|
||||
|
@ -56,7 +58,7 @@ bool ChromeImporter::prepareImport()
|
|||
m_file.setFileName(m_path);
|
||||
|
||||
if (!m_file.open(QFile::ReadOnly)) {
|
||||
setError(BookmarksImporter::tr("Unable to open file."));
|
||||
setError(i18n("Unable to open file."));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -73,7 +75,7 @@ BookmarkItem* ChromeImporter::importBookmarks()
|
|||
const QVariant res = json.toVariant();
|
||||
|
||||
if (err.error != QJsonParseError::NoError || res.type() != QVariant::Map) {
|
||||
setError(BookmarksImporter::tr("Cannot parse JSON file!"));
|
||||
setError(i18n("Cannot parse JSON file!"));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include <QSqlQuery>
|
||||
#include <QSqlDatabase>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#define CONNECTION "firefox-places-import"
|
||||
|
||||
FirefoxImporter::FirefoxImporter(QObject* parent)
|
||||
|
@ -39,7 +41,7 @@ FirefoxImporter::~FirefoxImporter()
|
|||
|
||||
QString FirefoxImporter::description() const
|
||||
{
|
||||
return BookmarksImporter::tr("Mozilla Firefox stores its bookmarks in <b>places.sqlite</b> SQLite "
|
||||
return i18n("Mozilla Firefox stores its bookmarks in <b>places.sqlite</b> SQLite "
|
||||
"database. This file is usually located in");
|
||||
}
|
||||
|
||||
|
@ -54,7 +56,7 @@ QString FirefoxImporter::standardPath() const
|
|||
|
||||
QString FirefoxImporter::getPath(QWidget* parent)
|
||||
{
|
||||
m_path = QFileDialog::getOpenFileName(parent, BookmarksImporter::tr("Choose file..."), standardPath(), QStringLiteral("Places (places.sqlite)"));
|
||||
m_path = QFileDialog::getOpenFileName(parent, i18n("Choose file..."), standardPath(), QStringLiteral("Places (places.sqlite)"));
|
||||
return m_path;
|
||||
}
|
||||
|
||||
|
@ -67,14 +69,14 @@ bool FirefoxImporter::prepareImport()
|
|||
QSqlDatabase db = QSqlDatabase::addDatabase(QStringLiteral("QSQLITE"), CONNECTION);
|
||||
|
||||
if (!QFile::exists(m_path)) {
|
||||
setError(BookmarksImportDialog::tr("File does not exist."));
|
||||
setError(i18n("File does not exist."));
|
||||
return false;
|
||||
}
|
||||
|
||||
db.setDatabaseName(m_path);
|
||||
|
||||
if (!db.open()) {
|
||||
setError(BookmarksImportDialog::tr("Unable to open database. Is Firefox running?"));
|
||||
setError(i18n("Unable to open database. Is Firefox running?"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
#include <QFileDialog>
|
||||
#include <QRegularExpression>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
HtmlImporter::HtmlImporter(QObject* parent)
|
||||
: BookmarksImporter(parent)
|
||||
{
|
||||
|
@ -29,7 +31,7 @@ HtmlImporter::HtmlImporter(QObject* parent)
|
|||
|
||||
QString HtmlImporter::description() const
|
||||
{
|
||||
return BookmarksImporter::tr("You can import bookmarks from any browser that supports HTML exporting. "
|
||||
return i18n("You can import bookmarks from any browser that supports HTML exporting. "
|
||||
"This file has usually these suffixes");
|
||||
}
|
||||
|
||||
|
@ -40,8 +42,8 @@ QString HtmlImporter::standardPath() const
|
|||
|
||||
QString HtmlImporter::getPath(QWidget* parent)
|
||||
{
|
||||
const QString filter = BookmarksImporter::tr("HTML Bookmarks") + QLatin1String(" (*.htm *.html)");
|
||||
m_path = QFileDialog::getOpenFileName(parent, BookmarksImporter::tr("Choose file..."), QDir::homePath(), filter);
|
||||
const QString filter = i18n("HTML Bookmarks") + QLatin1String(" (*.htm *.html)");
|
||||
m_path = QFileDialog::getOpenFileName(parent, i18n("Choose file..."), QDir::homePath(), filter);
|
||||
return m_path;
|
||||
}
|
||||
|
||||
|
@ -50,7 +52,7 @@ bool HtmlImporter::prepareImport()
|
|||
m_file.setFileName(m_path);
|
||||
|
||||
if (!m_file.open(QFile::ReadOnly)) {
|
||||
setError(BookmarksImporter::tr("Unable to open file."));
|
||||
setError(i18n("Unable to open file."));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include <QSettings>
|
||||
#include <QFileDialog>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
IeImporter::IeImporter(QObject* parent)
|
||||
: BookmarksImporter(parent)
|
||||
{
|
||||
|
@ -30,7 +32,7 @@ IeImporter::IeImporter(QObject* parent)
|
|||
|
||||
QString IeImporter::description() const
|
||||
{
|
||||
return BookmarksImporter::tr("Internet Explorer stores its bookmarks in <b>Favorites</b> folder. "
|
||||
return i18n("Internet Explorer stores its bookmarks in <b>Favorites</b> folder. "
|
||||
"This folder is usually located in");
|
||||
}
|
||||
|
||||
|
@ -41,7 +43,7 @@ QString IeImporter::standardPath() const
|
|||
|
||||
QString IeImporter::getPath(QWidget* parent)
|
||||
{
|
||||
m_path = QFileDialog::getExistingDirectory(parent, BookmarksImporter::tr("Choose file..."), standardPath());
|
||||
m_path = QFileDialog::getExistingDirectory(parent, i18n("Choose file..."), standardPath());
|
||||
return m_path;
|
||||
}
|
||||
|
||||
|
@ -49,7 +51,7 @@ bool IeImporter::prepareImport()
|
|||
{
|
||||
QDir dir(m_path);
|
||||
if (!dir.exists()) {
|
||||
setError(BookmarksImporter::tr("Directory does not exist."));
|
||||
setError(i18n("Directory does not exist."));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include <QFileDialog>
|
||||
#include <QTextStream>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
OperaImporter::OperaImporter(QObject* parent)
|
||||
: BookmarksImporter(parent)
|
||||
{
|
||||
|
@ -31,7 +33,7 @@ OperaImporter::OperaImporter(QObject* parent)
|
|||
|
||||
QString OperaImporter::description() const
|
||||
{
|
||||
return BookmarksImporter::tr("Opera stores its bookmarks in <b>bookmarks.adr</b> text file. "
|
||||
return i18n("Opera stores its bookmarks in <b>bookmarks.adr</b> text file. "
|
||||
"This file is usually located in");
|
||||
}
|
||||
|
||||
|
@ -46,7 +48,7 @@ QString OperaImporter::standardPath() const
|
|||
|
||||
QString OperaImporter::getPath(QWidget* parent)
|
||||
{
|
||||
m_path = QFileDialog::getOpenFileName(parent, BookmarksImporter::tr("Choose file..."), standardPath(), QStringLiteral("Bookmarks (*.adr)"));
|
||||
m_path = QFileDialog::getOpenFileName(parent, i18n("Choose file..."), standardPath(), QStringLiteral("Bookmarks (*.adr)"));
|
||||
return m_path;
|
||||
}
|
||||
|
||||
|
@ -55,19 +57,19 @@ bool OperaImporter::prepareImport()
|
|||
m_file.setFileName(m_path);
|
||||
|
||||
if (!m_file.open(QFile::ReadOnly)) {
|
||||
setError(BookmarksImporter::tr("Unable to open file."));
|
||||
setError(i18n("Unable to open file."));
|
||||
return false;
|
||||
}
|
||||
|
||||
m_stream.setDevice(&m_file);
|
||||
|
||||
if (m_stream.readLine() != QLatin1String("Opera Hotlist version 2.0")) {
|
||||
setError(BookmarksImporter::tr("File is not valid Opera bookmarks file!"));
|
||||
setError(i18n("File is not valid Opera bookmarks file!"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_stream.readLine().startsWith(QLatin1String("Options: encoding = utf8"))) {
|
||||
setError(BookmarksImporter::tr("Only UTF-8 encoded Opera bookmarks file is supported!"));
|
||||
setError(i18n("Only UTF-8 encoded Opera bookmarks file is supported!"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#include <QMenu>
|
||||
#include <QTimer>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
BookmarksManager::BookmarksManager(BrowserWindow* window, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::BookmarksManager)
|
||||
|
@ -102,16 +104,16 @@ void BookmarksManager::bookmarksSelected(const QList<BookmarkItem*> &items)
|
|||
void BookmarksManager::createContextMenu(const QPoint &pos)
|
||||
{
|
||||
QMenu menu;
|
||||
QAction* actNewTab = menu.addAction(IconProvider::newTabIcon(), tr("Open in new tab"));
|
||||
QAction* actNewWindow = menu.addAction(IconProvider::newWindowIcon(), tr("Open in new window"));
|
||||
QAction* actNewPrivateWindow = menu.addAction(IconProvider::privateBrowsingIcon(), tr("Open in new private window"));
|
||||
QAction* actNewTab = menu.addAction(IconProvider::newTabIcon(), i18n("Open in new tab"));
|
||||
QAction* actNewWindow = menu.addAction(IconProvider::newWindowIcon(), i18n("Open in new window"));
|
||||
QAction* actNewPrivateWindow = menu.addAction(IconProvider::privateBrowsingIcon(), i18n("Open in new private window"));
|
||||
|
||||
menu.addSeparator();
|
||||
QAction *actNewBookmark = menu.addAction(tr("New Bookmark"), this, SLOT(addBookmark()));
|
||||
QAction *actNewFolder = menu.addAction(tr("New Folder"), this, &BookmarksManager::addFolder);
|
||||
QAction *actNewSeparator = menu.addAction(tr("New Separator"), this, &BookmarksManager::addSeparator);
|
||||
QAction *actNewBookmark = menu.addAction(i18n("New Bookmark"), this, SLOT(addBookmark()));
|
||||
QAction *actNewFolder = menu.addAction(i18n("New Folder"), this, &BookmarksManager::addFolder);
|
||||
QAction *actNewSeparator = menu.addAction(i18n("New Separator"), this, &BookmarksManager::addSeparator);
|
||||
menu.addSeparator();
|
||||
QAction* actDelete = menu.addAction(QIcon::fromTheme(QSL("edit-delete")), tr("Delete"));
|
||||
QAction* actDelete = menu.addAction(QIcon::fromTheme(QSL("edit-delete")), i18n("Delete"));
|
||||
|
||||
connect(actNewTab, SIGNAL(triggered()), this, SLOT(openBookmarkInNewTab()));
|
||||
connect(actNewWindow, SIGNAL(triggered()), this, SLOT(openBookmarkInNewWindow()));
|
||||
|
@ -174,7 +176,7 @@ void BookmarksManager::openBookmarkInNewPrivateWindow(BookmarkItem* item)
|
|||
void BookmarksManager::addBookmark()
|
||||
{
|
||||
BookmarkItem* item = new BookmarkItem(BookmarkItem::Url);
|
||||
item->setTitle(tr("New Bookmark"));
|
||||
item->setTitle(i18n("New Bookmark"));
|
||||
item->setUrl(QUrl(QSL("http://")));
|
||||
addBookmark(item);
|
||||
}
|
||||
|
@ -182,7 +184,7 @@ void BookmarksManager::addBookmark()
|
|||
void BookmarksManager::addFolder()
|
||||
{
|
||||
BookmarkItem* item = new BookmarkItem(BookmarkItem::Folder);
|
||||
item->setTitle(tr("New Folder"));
|
||||
item->setTitle(i18n("New Folder"));
|
||||
addBookmark(item);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include "tabwidget.h"
|
||||
#include "iconprovider.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
BookmarksMenu::BookmarksMenu(QWidget* parent)
|
||||
: Menu(parent)
|
||||
, m_window(0)
|
||||
|
@ -162,11 +164,11 @@ void BookmarksMenu::openBookmarkInNewWindow(BookmarkItem* item)
|
|||
|
||||
void BookmarksMenu::init()
|
||||
{
|
||||
setTitle(tr("&Bookmarks"));
|
||||
setTitle(i18n("&Bookmarks"));
|
||||
|
||||
addAction(tr("Bookmark &This Page"), this, &BookmarksMenu::bookmarkPage)->setShortcut(QKeySequence("Ctrl+D"));
|
||||
addAction(tr("Bookmark &All Tabs"), this, &BookmarksMenu::bookmarkAllTabs);
|
||||
addAction(QIcon::fromTheme("bookmarks-organize"), tr("Organize &Bookmarks"), this, &BookmarksMenu::showBookmarksManager)->setShortcut(QKeySequence("Ctrl+Shift+O"));
|
||||
addAction(i18n("Bookmark &This Page"), this, &BookmarksMenu::bookmarkPage)->setShortcut(QKeySequence("Ctrl+D"));
|
||||
addAction(i18n("Bookmark &All Tabs"), this, &BookmarksMenu::bookmarkAllTabs);
|
||||
addAction(QIcon::fromTheme("bookmarks-organize"), i18n("Organize &Bookmarks"), this, &BookmarksMenu::showBookmarksManager)->setShortcut(QKeySequence("Ctrl+Shift+O"));
|
||||
addSeparator();
|
||||
|
||||
connect(this, SIGNAL(aboutToShow()), this, SLOT(aboutToShow()));
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include <QTimer>
|
||||
#include <QStyle>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
//#define BOOKMARKSMODEL_DEBUG
|
||||
|
||||
#ifdef BOOKMARKSMODEL_DEBUG
|
||||
|
@ -145,9 +147,9 @@ QVariant BookmarksModel::headerData(int section, Qt::Orientation orientation, in
|
|||
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
|
||||
switch (section) {
|
||||
case 0:
|
||||
return tr("Title");
|
||||
return i18n("Title");
|
||||
case 1:
|
||||
return tr("Address");
|
||||
return i18n("Address");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
#include <QTimer>
|
||||
#include <QFrame>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
BookmarksToolbar::BookmarksToolbar(BrowserWindow* window, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_window(window)
|
||||
|
@ -69,18 +71,18 @@ void BookmarksToolbar::contextMenuRequested(const QPoint &pos)
|
|||
m_clickedBookmark = button ? button->bookmark() : 0;
|
||||
|
||||
QMenu menu;
|
||||
QAction* actNewTab = menu.addAction(IconProvider::newTabIcon(), tr("Open in new tab"));
|
||||
QAction* actNewWindow = menu.addAction(IconProvider::newWindowIcon(), tr("Open in new window"));
|
||||
QAction* actNewPrivateWindow = menu.addAction(IconProvider::privateBrowsingIcon(), tr("Open in new private window"));
|
||||
QAction* actNewTab = menu.addAction(IconProvider::newTabIcon(), i18n("Open in new tab"));
|
||||
QAction* actNewWindow = menu.addAction(IconProvider::newWindowIcon(), i18n("Open in new window"));
|
||||
QAction* actNewPrivateWindow = menu.addAction(IconProvider::privateBrowsingIcon(), i18n("Open in new private window"));
|
||||
menu.addSeparator();
|
||||
QAction* actEdit = menu.addAction(tr("Edit"));
|
||||
QAction* actDelete = menu.addAction(QIcon::fromTheme("edit-delete"), tr("Delete"));
|
||||
QAction* actEdit = menu.addAction(i18n("Edit"));
|
||||
QAction* actDelete = menu.addAction(QIcon::fromTheme("edit-delete"), i18n("Delete"));
|
||||
menu.addSeparator();
|
||||
m_actShowOnlyIcons = menu.addAction(tr("Show Only Icons"));
|
||||
m_actShowOnlyIcons = menu.addAction(i18n("Show Only Icons"));
|
||||
m_actShowOnlyIcons->setCheckable(true);
|
||||
m_actShowOnlyIcons->setChecked(m_bookmarks->showOnlyIconsInToolbar());
|
||||
connect(m_actShowOnlyIcons, &QAction::toggled, m_bookmarks, &Bookmarks::setShowOnlyIconsInToolbar);
|
||||
m_actShowOnlyText = menu.addAction(tr("Show Only Text"));
|
||||
m_actShowOnlyText = menu.addAction(i18n("Show Only Text"));
|
||||
m_actShowOnlyText->setCheckable(true);
|
||||
m_actShowOnlyText->setChecked(m_bookmarks->showOnlyTextInToolbar());
|
||||
connect(m_actShowOnlyText, &QAction::toggled, m_bookmarks, &Bookmarks::setShowOnlyTextInToolbar);
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
#include <QDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
// BookmarksFoldersMenu
|
||||
BookmarksFoldersMenu::BookmarksFoldersMenu(QWidget* parent)
|
||||
: QMenu(parent)
|
||||
|
@ -73,7 +75,7 @@ void BookmarksFoldersMenu::init()
|
|||
|
||||
void BookmarksFoldersMenu::createMenu(QMenu* menu, BookmarkItem* parent)
|
||||
{
|
||||
QAction* act = menu->addAction(tr("Choose %1").arg(parent->title()));
|
||||
QAction* act = menu->addAction(i18n("Choose %1", parent->title()));
|
||||
act->setData(QVariant::fromValue<void*>(static_cast<void*>(parent)));
|
||||
connect(act, &QAction::triggered, this, &BookmarksFoldersMenu::folderChoosed);
|
||||
|
||||
|
@ -149,11 +151,11 @@ bool BookmarksTools::addBookmarkDialog(QWidget* parent, const QUrl &url, const Q
|
|||
layout->addWidget(folderButton);
|
||||
layout->addWidget(box);
|
||||
|
||||
label->setText(Bookmarks::tr("Choose name and location of this bookmark."));
|
||||
label->setText(i18n("Choose name and location of this bookmark."));
|
||||
edit->setText(title);
|
||||
edit->setCursorPosition(0);
|
||||
dialog->setWindowIcon(IconProvider::iconForUrl(url));
|
||||
dialog->setWindowTitle(Bookmarks::tr("Add New Bookmark"));
|
||||
dialog->setWindowTitle(i18n("Add New Bookmark"));
|
||||
|
||||
QSize size = dialog->size();
|
||||
size.setWidth(350);
|
||||
|
@ -193,8 +195,8 @@ bool BookmarksTools::bookmarkAllTabsDialog(QWidget* parent, TabWidget* tabWidget
|
|||
layout->addWidget(folderButton);
|
||||
layout->addWidget(box);
|
||||
|
||||
label->setText(Bookmarks::tr("Choose folder for bookmarks:"));
|
||||
dialog->setWindowTitle(Bookmarks::tr("Bookmark All Tabs"));
|
||||
label->setText(i18n("Choose folder for bookmarks:"));
|
||||
dialog->setWindowTitle(i18n("Bookmark All Tabs"));
|
||||
|
||||
QSize size = dialog->size();
|
||||
size.setWidth(350);
|
||||
|
@ -234,20 +236,20 @@ bool BookmarksTools::editBookmarkDialog(QWidget* parent, BookmarkItem *item)
|
|||
QObject::connect(box, &QDialogButtonBox::accepted, dialog, &QDialog::accept);
|
||||
QObject::connect(box, &QDialogButtonBox::rejected, dialog, &QDialog::reject);
|
||||
|
||||
layout->addRow(Bookmarks::tr("Title:"), title);
|
||||
layout->addRow(i18n("Title:"), title);
|
||||
title->setText(item->title());
|
||||
if (!item->isFolder()) {
|
||||
layout->addRow(Bookmarks::tr("Address:"), address);
|
||||
layout->addRow(i18n("Address:"), address);
|
||||
address->setText(item->urlString());
|
||||
layout->addRow(Bookmarks::tr("Keyword:"), keyword);
|
||||
layout->addRow(i18n("Keyword:"), keyword);
|
||||
keyword->setText(item->keyword());
|
||||
}
|
||||
layout->addRow(Bookmarks::tr("Description:"), description);
|
||||
layout->addRow(i18n("Description:"), description);
|
||||
description->document()->setPlainText(item->description());
|
||||
layout->addWidget(box);
|
||||
|
||||
dialog->setWindowIcon(item->icon());
|
||||
dialog->setWindowTitle(Bookmarks::tr("Edit Bookmark"));
|
||||
dialog->setWindowTitle(i18n("Edit Bookmark"));
|
||||
|
||||
dialog->exec();
|
||||
|
||||
|
@ -337,8 +339,8 @@ void BookmarksTools::openFolderInTabs(BrowserWindow* window, BookmarkItem* folde
|
|||
}
|
||||
|
||||
if (showWarning) {
|
||||
const auto button = QMessageBox::warning(window, Bookmarks::tr("Confirmation"),
|
||||
Bookmarks::tr("Are you sure you want to open all bookmarks from '%1' folder in tabs?").arg(folder->title()),
|
||||
const auto button = QMessageBox::warning(window, i18n("Confirmation"),
|
||||
i18n("Are you sure you want to open all bookmarks from '%1' folder in tabs?", folder->title()),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (button != QMessageBox::Yes) {
|
||||
return;
|
||||
|
@ -432,7 +434,7 @@ void BookmarksTools::addFolderContentsToMenu(QObject *receiver, Menu *menu, Book
|
|||
}
|
||||
|
||||
if (menu->isEmpty()) {
|
||||
menu->addAction(Bookmarks::tr("Empty"))->setDisabled(true);
|
||||
menu->addAction(i18n("Empty"))->setDisabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
#include <QTimer>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#define HIDE_DELAY 270
|
||||
|
||||
BookmarksWidget::BookmarksWidget(WebView* view, BookmarkItem* bookmark, QWidget* parent)
|
||||
|
@ -95,7 +97,7 @@ void BookmarksWidget::bookmarkEdited()
|
|||
}
|
||||
|
||||
m_edited = true;
|
||||
ui->bookmarksButton->setText(tr("Update Bookmark"));
|
||||
ui->bookmarksButton->setText(i18n("Update Bookmark"));
|
||||
ui->bookmarksButton->setFlat(true);
|
||||
}
|
||||
|
||||
|
@ -109,16 +111,16 @@ void BookmarksWidget::init()
|
|||
const SpeedDial::Page page = m_speedDial->pageForUrl(m_view->url());
|
||||
if (page.url.isEmpty()) {
|
||||
ui->speeddialButton->setFlat(true);
|
||||
ui->speeddialButton->setText(tr("Add to Speed Dial"));
|
||||
ui->speeddialButton->setText(i18n("Add to Speed Dial"));
|
||||
}
|
||||
else {
|
||||
ui->speeddialButton->setFlat(false);
|
||||
ui->speeddialButton->setText(tr("Remove from Speed Dial"));
|
||||
ui->speeddialButton->setText(i18n("Remove from Speed Dial"));
|
||||
}
|
||||
|
||||
// Init Bookmarks button
|
||||
if (m_bookmark) {
|
||||
ui->bookmarksButton->setText(tr("Remove from Bookmarks"));
|
||||
ui->bookmarksButton->setText(i18n("Remove from Bookmarks"));
|
||||
ui->bookmarksButton->setFlat(false);
|
||||
|
||||
Q_ASSERT(m_bookmark->parent());
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
#include <QInputDialog>
|
||||
#include <QCloseEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
CookieManager::CookieManager(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::CookieManager)
|
||||
|
@ -79,7 +81,7 @@ CookieManager::CookieManager(QWidget *parent)
|
|||
ui->filter3rdParty->hide();
|
||||
#endif
|
||||
|
||||
ui->search->setPlaceholderText(tr("Search"));
|
||||
ui->search->setPlaceholderText(i18n("Search"));
|
||||
ui->cookieTree->setDefaultItemShowMode(TreeWidget::ItemsCollapsed);
|
||||
ui->cookieTree->sortItems(0, Qt::AscendingOrder);
|
||||
ui->cookieTree->header()->setDefaultSectionSize(220);
|
||||
|
@ -104,8 +106,8 @@ CookieManager::CookieManager(QWidget *parent)
|
|||
|
||||
void CookieManager::removeAll()
|
||||
{
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Confirmation"),
|
||||
tr("Are you sure you want to delete all cookies on your computer?"), QMessageBox::Yes | QMessageBox::No);
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, i18n("Confirmation"),
|
||||
i18n("Are you sure you want to delete all cookies on your computer?"), QMessageBox::Yes | QMessageBox::No);
|
||||
if (button != QMessageBox::Yes) {
|
||||
return;
|
||||
}
|
||||
|
@ -150,14 +152,14 @@ void CookieManager::currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem
|
|||
}
|
||||
|
||||
if (current->text(1).isEmpty()) {
|
||||
ui->name->setText(tr("<cookie not selected>"));
|
||||
ui->value->setText(tr("<cookie not selected>"));
|
||||
ui->server->setText(tr("<cookie not selected>"));
|
||||
ui->path->setText(tr("<cookie not selected>"));
|
||||
ui->secure->setText(tr("<cookie not selected>"));
|
||||
ui->expiration->setText(tr("<cookie not selected>"));
|
||||
ui->name->setText(i18n("<cookie not selected>"));
|
||||
ui->value->setText(i18n("<cookie not selected>"));
|
||||
ui->server->setText(i18n("<cookie not selected>"));
|
||||
ui->path->setText(i18n("<cookie not selected>"));
|
||||
ui->secure->setText(i18n("<cookie not selected>"));
|
||||
ui->expiration->setText(i18n("<cookie not selected>"));
|
||||
|
||||
ui->removeOne->setText(tr("Remove cookies"));
|
||||
ui->removeOne->setText(i18n("Remove cookies"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -167,22 +169,22 @@ void CookieManager::currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem
|
|||
ui->value->setText(cookie.value());
|
||||
ui->server->setText(cookie.domain());
|
||||
ui->path->setText(cookie.path());
|
||||
cookie.isSecure() ? ui->secure->setText(tr("Secure only")) : ui->secure->setText(tr("All connections"));
|
||||
cookie.isSessionCookie() ? ui->expiration->setText(tr("Session cookie")) : ui->expiration->setText(QDateTime(cookie.expirationDate()).toString("hh:mm:ss dddd d. MMMM yyyy"));
|
||||
cookie.isSecure() ? ui->secure->setText(i18n("Secure only")) : ui->secure->setText(i18n("All connections"));
|
||||
cookie.isSessionCookie() ? ui->expiration->setText(i18n("Session cookie")) : ui->expiration->setText(QDateTime(cookie.expirationDate()).toString("hh:mm:ss dddd d. MMMM yyyy"));
|
||||
|
||||
ui->removeOne->setText(tr("Remove cookie"));
|
||||
ui->removeOne->setText(i18n("Remove cookie"));
|
||||
}
|
||||
|
||||
void CookieManager::addWhitelist()
|
||||
{
|
||||
const QString server = QInputDialog::getText(this, tr("Add to whitelist"), tr("Server:"));
|
||||
const QString server = QInputDialog::getText(this, i18n("Add to whitelist"), i18n("Server:"));
|
||||
|
||||
if (server.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ui->blackList->findItems(server, Qt::MatchFixedString).isEmpty()) {
|
||||
QMessageBox::information(this, tr("Already blacklisted!"), tr("The server \"%1\" is already in blacklist, please remove it first.").arg(server));
|
||||
QMessageBox::information(this, i18n("Already blacklisted!"), i18n("The server \"%1\" is already in blacklist, please remove it first.", server));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -198,7 +200,7 @@ void CookieManager::removeWhitelist()
|
|||
|
||||
void CookieManager::addBlacklist()
|
||||
{
|
||||
const QString server = QInputDialog::getText(this, tr("Add to blacklist"), tr("Server:"));
|
||||
const QString server = QInputDialog::getText(this, i18n("Add to blacklist"), i18n("Server:"));
|
||||
addBlacklist(server);
|
||||
}
|
||||
|
||||
|
@ -209,7 +211,7 @@ void CookieManager::addBlacklist(const QString &server)
|
|||
}
|
||||
|
||||
if (!ui->whiteList->findItems(server, Qt::MatchFixedString).isEmpty()) {
|
||||
QMessageBox::information(this, tr("Already whitelisted!"), tr("The server \"%1\" is already in whitelist, please remove it first.").arg(server));
|
||||
QMessageBox::information(this, i18n("Already whitelisted!"), i18n("The server \"%1\" is already in whitelist, please remove it first.", server));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
#include <QWebEngineDownloadItem>
|
||||
#include <QtWebEngineWidgetsVersion>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include "Shlwapi.h"
|
||||
#include "shellapi.h"
|
||||
|
@ -70,7 +72,7 @@ DownloadItem::DownloadItem(QListWidgetItem *item, QWebEngineDownloadItem* downlo
|
|||
ui->cancelButton->setPixmap(QIcon::fromTheme(QSL("process-stop")).pixmap(20, 20));
|
||||
ui->pauseResumeButton->setPixmap(QIcon::fromTheme(QSL("media-playback-pause")).pixmap(20, 20));
|
||||
ui->fileName->setText(m_fileName);
|
||||
ui->downloadInfo->setText(tr("Remaining time unavailable"));
|
||||
ui->downloadInfo->setText(i18n("Remaining time unavailable"));
|
||||
|
||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(customContextMenuRequested(QPoint)));
|
||||
|
@ -125,15 +127,15 @@ void DownloadItem::finished()
|
|||
switch (m_download->state()) {
|
||||
case QWebEngineDownloadItem::DownloadCompleted:
|
||||
success = true;
|
||||
ui->downloadInfo->setText(tr("Done - %1 (%2)").arg(host, QDateTime::currentDateTime().toString(Qt::DefaultLocaleShortDate)));
|
||||
ui->downloadInfo->setText(i18n("Done - %1 (%2)", host, QDateTime::currentDateTime().toString(Qt::DefaultLocaleShortDate)));
|
||||
break;
|
||||
|
||||
case QWebEngineDownloadItem::DownloadInterrupted:
|
||||
ui->downloadInfo->setText(tr("Error - %1").arg(host));
|
||||
ui->downloadInfo->setText(i18n("Error - %1", host));
|
||||
break;
|
||||
|
||||
case QWebEngineDownloadItem::DownloadCancelled:
|
||||
ui->downloadInfo->setText(tr("Cancelled - %1").arg(host));
|
||||
ui->downloadInfo->setText(i18n("Cancelled - %1", host));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -181,49 +183,43 @@ int DownloadItem::progress()
|
|||
|
||||
bool DownloadItem::isCancelled()
|
||||
{
|
||||
return ui->downloadInfo->text().startsWith(tr("Cancelled"));
|
||||
return ui->downloadInfo->text().startsWith(i18n("Cancelled"));
|
||||
}
|
||||
|
||||
QString DownloadItem::remaingTimeToString(QTime time)
|
||||
{
|
||||
if (time < QTime(0, 0, 10)) {
|
||||
return tr("few seconds");
|
||||
return i18n("few seconds");
|
||||
}
|
||||
else if (time < QTime(0, 1)) {
|
||||
//~ singular %n second
|
||||
//~ plural %n seconds
|
||||
return tr("%n seconds", "", time.second());
|
||||
return i18np("%1 second", "%1 seconds", time.second());
|
||||
}
|
||||
else if (time < QTime(1, 0)) {
|
||||
//~ singular %n minute
|
||||
//~ plural %n minutes
|
||||
return tr("%n minutes", "", time.minute());
|
||||
return i18np("%1 minute", "%1 minutes", time.minute());
|
||||
}
|
||||
else {
|
||||
//~ singular %n hour
|
||||
//~ plural %n hours
|
||||
return tr("%n hours", "", time.hour());
|
||||
return i18np("%1 hour", "%1 hours", time.hour());
|
||||
}
|
||||
}
|
||||
|
||||
QString DownloadItem::currentSpeedToString(double speed)
|
||||
{
|
||||
if (speed < 0) {
|
||||
return tr("Unknown speed");
|
||||
return i18n("Unknown speed");
|
||||
}
|
||||
|
||||
speed /= 1024; // kB
|
||||
if (speed < 1000) {
|
||||
return QString::number(speed, 'f', 0) + QLatin1String(" ") + tr("kB/s");
|
||||
return QString::number(speed, 'f', 0) + QLatin1String(" ") + i18n("kB/s");
|
||||
}
|
||||
|
||||
speed /= 1024; //MB
|
||||
if (speed < 1000) {
|
||||
return QString::number(speed, 'f', 2) + QLatin1String(" ") + tr("MB/s");
|
||||
return QString::number(speed, 'f', 2) + QLatin1String(" ") + i18n("MB/s");
|
||||
}
|
||||
|
||||
speed /= 1024; //GB
|
||||
return QString::number(speed, 'f', 2) + QLatin1String(" ") + tr("GB/s");
|
||||
return QString::number(speed, 'f', 2) + QLatin1String(" ") + i18n("GB/s");
|
||||
}
|
||||
|
||||
void DownloadItem::updateDownloadInfo(double currSpeed, qint64 received, qint64 total)
|
||||
|
@ -253,11 +249,11 @@ void DownloadItem::updateDownloadInfo(double currSpeed, qint64 received, qint64
|
|||
QString currSize = QzTools::fileSizeToString(received);
|
||||
QString fileSize = QzTools::fileSizeToString(total);
|
||||
|
||||
if (fileSize == tr("Unknown size")) {
|
||||
ui->downloadInfo->setText(tr("%2 - unknown size (%3)").arg(currSize, speed));
|
||||
if (fileSize == i18n("Unknown size")) {
|
||||
ui->downloadInfo->setText(i18n("%1 - unknown size (%2)", currSize, speed));
|
||||
}
|
||||
else {
|
||||
ui->downloadInfo->setText(tr("Remaining %1 - %2 of %3 (%4)").arg(remTime, currSize, fileSize, speed));
|
||||
ui->downloadInfo->setText(i18n("Remaining %1 - %2 of %3 (%4)", remTime, currSize, fileSize, speed));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,7 +270,7 @@ void DownloadItem::stop()
|
|||
ui->cancelButton->hide();
|
||||
ui->pauseResumeButton->hide();
|
||||
m_item->setSizeHint(sizeHint());
|
||||
ui->downloadInfo->setText(tr("Cancelled - %1").arg(m_download->url().host()));
|
||||
ui->downloadInfo->setText(i18n("Cancelled - %1", m_download->url().host()));
|
||||
m_download->cancel();
|
||||
m_downloading = false;
|
||||
|
||||
|
@ -290,7 +286,7 @@ void DownloadItem::pauseResume()
|
|||
} else {
|
||||
m_download->pause();
|
||||
ui->pauseResumeButton->setPixmap(QIcon::fromTheme(QSL("media-playback-start")).pixmap(20, 20));
|
||||
ui->downloadInfo->setText(tr("Paused - %1").arg(m_download->url().host()));
|
||||
ui->downloadInfo->setText(i18n("Paused - %1", m_download->url().host()));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -304,25 +300,25 @@ void DownloadItem::mouseDoubleClickEvent(QMouseEvent* e)
|
|||
void DownloadItem::customContextMenuRequested(const QPoint &pos)
|
||||
{
|
||||
QMenu menu;
|
||||
menu.addAction(QIcon::fromTheme("document-open"), tr("Open File"), this, &DownloadItem::openFile);
|
||||
menu.addAction(QIcon::fromTheme("document-open"), i18n("Open File"), this, &DownloadItem::openFile);
|
||||
|
||||
menu.addAction(tr("Open Folder"), this, &DownloadItem::openFolder);
|
||||
menu.addAction(i18n("Open Folder"), this, &DownloadItem::openFolder);
|
||||
menu.addSeparator();
|
||||
menu.addAction(QIcon::fromTheme("edit-copy"), tr("Copy Download Link"), this, &DownloadItem::copyDownloadLink);
|
||||
menu.addAction(QIcon::fromTheme("edit-copy"), i18n("Copy Download Link"), this, &DownloadItem::copyDownloadLink);
|
||||
menu.addSeparator();
|
||||
menu.addAction(QIcon::fromTheme("process-stop"), tr("Cancel downloading"), this, &DownloadItem::stop)->setEnabled(m_downloading);
|
||||
menu.addAction(QIcon::fromTheme("process-stop"), i18n("Cancel downloading"), this, &DownloadItem::stop)->setEnabled(m_downloading);
|
||||
|
||||
#if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
if (m_download->isPaused()) {
|
||||
menu.addAction(QIcon::fromTheme("media-playback-start"), tr("Resume downloading"), this, &DownloadItem::pauseResume)->setEnabled(m_downloading);
|
||||
menu.addAction(QIcon::fromTheme("media-playback-start"), i18n("Resume downloading"), this, &DownloadItem::pauseResume)->setEnabled(m_downloading);
|
||||
} else {
|
||||
menu.addAction(QIcon::fromTheme("media-playback-pause"), tr("Pause downloading"), this, &DownloadItem::pauseResume)->setEnabled(m_downloading);
|
||||
menu.addAction(QIcon::fromTheme("media-playback-pause"), i18n("Pause downloading"), this, &DownloadItem::pauseResume)->setEnabled(m_downloading);
|
||||
}
|
||||
#endif
|
||||
|
||||
menu.addAction(QIcon::fromTheme("list-remove"), tr("Remove From List"), this, &DownloadItem::clear)->setEnabled(!m_downloading);
|
||||
menu.addAction(QIcon::fromTheme("list-remove"), i18n("Remove From List"), this, &DownloadItem::clear)->setEnabled(!m_downloading);
|
||||
|
||||
if (m_downloading || ui->downloadInfo->text().startsWith(tr("Cancelled")) || ui->downloadInfo->text().startsWith(tr("Error"))) {
|
||||
if (m_downloading || ui->downloadInfo->text().startsWith(i18n("Cancelled")) || ui->downloadInfo->text().startsWith(i18n("Error"))) {
|
||||
menu.actions().at(0)->setEnabled(false);
|
||||
}
|
||||
menu.exec(mapToGlobal(pos));
|
||||
|
@ -348,7 +344,7 @@ void DownloadItem::openFile()
|
|||
QDesktopServices::openUrl(QUrl::fromLocalFile(info.absoluteFilePath()));
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(m_item->listWidget()->parentWidget(), tr("Not found"), tr("Sorry, the file \n %1 \n was not found!").arg(info.absoluteFilePath()));
|
||||
QMessageBox::warning(m_item->listWidget()->parentWidget(), i18n("Not found"), i18n("Sorry, the file \n %1 \n was not found!", info.absoluteFilePath()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
#include <QWinTaskbarProgress>
|
||||
#endif
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
DownloadManager::DownloadManager(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::DownloadManager)
|
||||
|
@ -221,7 +223,7 @@ void DownloadManager::timerEvent(QTimerEvent* e)
|
|||
if (e->timerId() == m_timer.timerId()) {
|
||||
if (!ui->list->count()) {
|
||||
ui->speedLabel->clear();
|
||||
setWindowTitle(tr("Download Manager"));
|
||||
setWindowTitle(i18n("Download Manager"));
|
||||
#ifdef Q_OS_WIN
|
||||
taskbarButton()->progress()->hide();
|
||||
#endif
|
||||
|
@ -259,11 +261,11 @@ void DownloadManager::timerEvent(QTimerEvent* e)
|
|||
}
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
ui->speedLabel->setText(tr("%1% of %2 files (%3) %4 remaining").arg(QString::number(progress), QString::number(progresses.count()),
|
||||
ui->speedLabel->setText(i18n("%1% of %2 files (%3) %4 remaining", progress, progresses.count(),
|
||||
DownloadItem::currentSpeedToString(speed),
|
||||
DownloadItem::remaingTimeToString(remaining)));
|
||||
#endif
|
||||
setWindowTitle(tr("%1% - Download Manager").arg(progress));
|
||||
setWindowTitle(i18n("%1% - Download Manager", progress));
|
||||
#ifdef Q_OS_WIN
|
||||
taskbarButton()->progress()->show();
|
||||
taskbarButton()->progress()->setValue(progress);
|
||||
|
@ -333,7 +335,7 @@ void DownloadManager::download(QWebEngineDownloadItem *downloadItem)
|
|||
break;
|
||||
|
||||
case Save:
|
||||
downloadPath = QFileDialog::getSaveFileName(mApp->activeWindow(), tr("Save file as..."), m_lastDownloadPath + QLatin1Char('/') + fileName);
|
||||
downloadPath = QFileDialog::getSaveFileName(mApp->activeWindow(), i18n("Save file as..."), m_lastDownloadPath + QLatin1Char('/') + fileName);
|
||||
|
||||
if (!downloadPath.isEmpty()) {
|
||||
m_lastDownloadPath = QFileInfo(downloadPath).absolutePath();
|
||||
|
@ -343,13 +345,13 @@ void DownloadManager::download(QWebEngineDownloadItem *downloadItem)
|
|||
break;
|
||||
|
||||
case SavePage: {
|
||||
const QString mhtml = tr("MIME HTML Archive (*.mhtml)");
|
||||
const QString htmlSingle = tr("HTML Page, single (*.html)");
|
||||
const QString htmlComplete = tr("HTML Page, complete (*.html)");
|
||||
const QString mhtml = i18n("MIME HTML Archive (*.mhtml)");
|
||||
const QString htmlSingle = i18n("HTML Page, single (*.html)");
|
||||
const QString htmlComplete = i18n("HTML Page, complete (*.html)");
|
||||
const QString filter = QStringLiteral("%1;;%2;;%3").arg(mhtml, htmlSingle, htmlComplete);
|
||||
|
||||
QString selectedFilter;
|
||||
downloadPath = QFileDialog::getSaveFileName(mApp->activeWindow(), tr("Save page as..."),
|
||||
downloadPath = QFileDialog::getSaveFileName(mApp->activeWindow(), i18n("Save page as..."),
|
||||
m_lastDownloadPath + QLatin1Char('/') + fileName,
|
||||
filter, &selectedFilter);
|
||||
|
||||
|
@ -443,14 +445,14 @@ void DownloadManager::downloadFinished(bool success)
|
|||
|
||||
if (downloadingAllFilesFinished) {
|
||||
if (success && qApp->activeWindow() != this) {
|
||||
mApp->desktopNotifications()->showNotification(QIcon::fromTheme(QSL("download"), QIcon(QSL(":icons/other/download.svg"))).pixmap(48), tr("Falkon: Download Finished"), tr("All files have been successfully downloaded."));
|
||||
mApp->desktopNotifications()->showNotification(QIcon::fromTheme(QSL("download"), QIcon(QSL(":icons/other/download.svg"))).pixmap(48), i18n("Falkon: Download Finished"), i18n("All files have been successfully downloaded."));
|
||||
if (!m_closeOnFinish) {
|
||||
raise();
|
||||
activateWindow();
|
||||
}
|
||||
}
|
||||
ui->speedLabel->clear();
|
||||
setWindowTitle(tr("Download Manager"));
|
||||
setWindowTitle(i18n("Download Manager"));
|
||||
#ifdef Q_OS_WIN
|
||||
taskbarButton()->progress()->hide();
|
||||
#endif
|
||||
|
@ -497,8 +499,8 @@ void DownloadManager::closeEvent(QCloseEvent* e)
|
|||
{
|
||||
if (mApp->windowCount() == 0) { // No main windows -> we are going to quit
|
||||
if (!canClose()) {
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Warning"),
|
||||
tr("Are you sure you want to quit? All uncompleted downloads will be cancelled!"), QMessageBox::Yes | QMessageBox::No);
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, i18n("Warning"),
|
||||
i18n("Are you sure you want to quit? All uncompleted downloads will be cancelled!"), QMessageBox::Yes | QMessageBox::No);
|
||||
if (button != QMessageBox::Yes) {
|
||||
e->ignore();
|
||||
return;
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include <QMimeDatabase>
|
||||
#include <QWebEngineDownloadItem>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
DownloadOptionsDialog::DownloadOptionsDialog(const QString &fileName, QWebEngineDownloadItem *downloadItem, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::DownloadOptionsDialog)
|
||||
|
@ -46,7 +48,7 @@ DownloadOptionsDialog::DownloadOptionsDialog(const QString &fileName, QWebEngine
|
|||
ui->iconLabel->setPixmap(fileIcon.pixmap(22));
|
||||
}
|
||||
|
||||
setWindowTitle(tr("Opening %1").arg(fileName));
|
||||
setWindowTitle(i18n("Opening %1", fileName));
|
||||
|
||||
ui->buttonBox->setFocus();
|
||||
|
||||
|
@ -109,7 +111,7 @@ int DownloadOptionsDialog::exec()
|
|||
void DownloadOptionsDialog::copyDownloadLink()
|
||||
{
|
||||
QApplication::clipboard()->setText(m_downloadItem->url().toString());
|
||||
ui->copyDownloadLink->setText(tr("Download link copied."));
|
||||
ui->copyDownloadLink->setText(i18n("Download link copied."));
|
||||
}
|
||||
|
||||
void DownloadOptionsDialog::emitDialogFinished(int status)
|
||||
|
|
|
@ -19,13 +19,15 @@
|
|||
#include "mainapplication.h"
|
||||
#include "downloadmanager.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
DownloadsButton::DownloadsButton(QObject *parent)
|
||||
: AbstractButtonInterface(parent)
|
||||
, m_manager(mApp->downloadManager())
|
||||
{
|
||||
setIcon(QIcon::fromTheme(QSL("edit-download"), QIcon(QSL(":icons/menu/download.svg"))));
|
||||
setTitle(tr("Downloads"));
|
||||
setToolTip(tr("Open Download Manager"));
|
||||
setTitle(i18n("Downloads"));
|
||||
setToolTip(i18n("Open Download Manager"));
|
||||
|
||||
connect(this, &AbstractButtonInterface::clicked, this, &DownloadsButton::clicked);
|
||||
connect(m_manager, &DownloadManager::downloadsCountChanged, this, &DownloadsButton::updateState);
|
||||
|
@ -40,7 +42,7 @@ QString DownloadsButton::id() const
|
|||
|
||||
QString DownloadsButton::name() const
|
||||
{
|
||||
return tr("Downloads");
|
||||
return i18n("Downloads");
|
||||
}
|
||||
|
||||
void DownloadsButton::updateState()
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include <QWebEngineProfile>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
History::History(QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_isSaving(true)
|
||||
|
@ -79,7 +81,7 @@ void History::addHistoryEntry(const QUrl &url, QString title)
|
|||
}
|
||||
|
||||
if (title.isEmpty()) {
|
||||
title = tr("Empty Page");
|
||||
title = i18n("Empty Page");
|
||||
}
|
||||
|
||||
auto job = new SqlQueryJob(QSL("SELECT id, count, date, title FROM history WHERE url=?"), this);
|
||||
|
@ -269,29 +271,29 @@ QString History::titleCaseLocalizedMonth(int month)
|
|||
{
|
||||
switch (month) {
|
||||
case 1:
|
||||
return tr("January");
|
||||
return i18n("January");
|
||||
case 2:
|
||||
return tr("February");
|
||||
return i18n("February");
|
||||
case 3:
|
||||
return tr("March");
|
||||
return i18n("March");
|
||||
case 4:
|
||||
return tr("April");
|
||||
return i18n("April");
|
||||
case 5:
|
||||
return tr("May");
|
||||
return i18n("May");
|
||||
case 6:
|
||||
return tr("June");
|
||||
return i18n("June");
|
||||
case 7:
|
||||
return tr("July");
|
||||
return i18n("July");
|
||||
case 8:
|
||||
return tr("August");
|
||||
return i18n("August");
|
||||
case 9:
|
||||
return tr("September");
|
||||
return i18n("September");
|
||||
case 10:
|
||||
return tr("October");
|
||||
return i18n("October");
|
||||
case 11:
|
||||
return tr("November");
|
||||
return i18n("November");
|
||||
case 12:
|
||||
return tr("December");
|
||||
return i18n("December");
|
||||
default:
|
||||
qWarning("Month number out of range!");
|
||||
return QString();
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
#include <QClipboard>
|
||||
#include <QKeyEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
HistoryManager::HistoryManager(BrowserWindow* window, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::HistoryManager)
|
||||
|
@ -75,8 +77,8 @@ QByteArray HistoryManager::saveState()
|
|||
|
||||
void HistoryManager::clearHistory()
|
||||
{
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Confirmation"),
|
||||
tr("Are you sure you want to delete all history?"), QMessageBox::Yes | QMessageBox::No);
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, i18n("Confirmation"),
|
||||
i18n("Are you sure you want to delete all history?"), QMessageBox::Yes | QMessageBox::No);
|
||||
if (button != QMessageBox::Yes) {
|
||||
return;
|
||||
}
|
||||
|
@ -142,16 +144,16 @@ void HistoryManager::openUrlInNewPrivateWindow(const QUrl &url)
|
|||
void HistoryManager::createContextMenu(const QPoint &pos)
|
||||
{
|
||||
QMenu menu;
|
||||
QAction* actNewTab = menu.addAction(IconProvider::newTabIcon(), tr("Open in new tab"));
|
||||
QAction* actNewWindow = menu.addAction(IconProvider::newWindowIcon(), tr("Open in new window"));
|
||||
QAction* actNewPrivateWindow = menu.addAction(IconProvider::privateBrowsingIcon(), tr("Open in new private window"));
|
||||
QAction* actNewTab = menu.addAction(IconProvider::newTabIcon(), i18n("Open in new tab"));
|
||||
QAction* actNewWindow = menu.addAction(IconProvider::newWindowIcon(), i18n("Open in new window"));
|
||||
QAction* actNewPrivateWindow = menu.addAction(IconProvider::privateBrowsingIcon(), i18n("Open in new private window"));
|
||||
|
||||
menu.addSeparator();
|
||||
QAction* actCopyUrl = menu.addAction(tr("Copy url"), this, &HistoryManager::copyUrl);
|
||||
QAction* actCopyTitle = menu.addAction(tr("Copy title"), this, &HistoryManager::copyTitle);
|
||||
QAction* actCopyUrl = menu.addAction(i18n("Copy url"), this, &HistoryManager::copyUrl);
|
||||
QAction* actCopyTitle = menu.addAction(i18n("Copy title"), this, &HistoryManager::copyTitle);
|
||||
|
||||
menu.addSeparator();
|
||||
QAction* actDelete = menu.addAction(QIcon::fromTheme(QSL("edit-delete")), tr("Delete"));
|
||||
QAction* actDelete = menu.addAction(QIcon::fromTheme(QSL("edit-delete")), i18n("Delete"));
|
||||
|
||||
connect(actNewTab, SIGNAL(triggered()), this, SLOT(openUrlInNewTab()));
|
||||
connect(actNewWindow, SIGNAL(triggered()), this, SLOT(openUrlInNewWindow()));
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
#include <QApplication>
|
||||
#include <QWebEngineHistory>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
HistoryMenu::HistoryMenu(QWidget* parent)
|
||||
: Menu(parent)
|
||||
{
|
||||
|
@ -132,7 +134,7 @@ void HistoryMenu::aboutToShowMostVisited()
|
|||
}
|
||||
|
||||
if (m_menuMostVisited->isEmpty()) {
|
||||
m_menuMostVisited->addAction(tr("Empty"))->setEnabled(false);
|
||||
m_menuMostVisited->addAction(i18n("Empty"))->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,12 +156,12 @@ void HistoryMenu::aboutToShowClosedTabs()
|
|||
}
|
||||
|
||||
if (m_menuClosedTabs->isEmpty()) {
|
||||
m_menuClosedTabs->addAction(tr("Empty"))->setEnabled(false);
|
||||
m_menuClosedTabs->addAction(i18n("Empty"))->setEnabled(false);
|
||||
}
|
||||
else {
|
||||
m_menuClosedTabs->addSeparator();
|
||||
m_menuClosedTabs->addAction(tr("Restore All Closed Tabs"), tabWidget, &TabWidget::restoreAllClosedTabs);
|
||||
m_menuClosedTabs->addAction(QIcon::fromTheme(QSL("edit-clear")), tr("Clear list"), tabWidget, &TabWidget::clearClosedTabsList);
|
||||
m_menuClosedTabs->addAction(i18n("Restore All Closed Tabs"), tabWidget, &TabWidget::restoreAllClosedTabs);
|
||||
m_menuClosedTabs->addAction(QIcon::fromTheme(QSL("edit-clear")), i18n("Clear list"), tabWidget, &TabWidget::clearClosedTabsList);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -183,11 +185,11 @@ void HistoryMenu::aboutToShowClosedWindows()
|
|||
}
|
||||
|
||||
if (m_menuClosedWindows->isEmpty()) {
|
||||
m_menuClosedWindows->addAction(tr("Empty"))->setEnabled(false);
|
||||
m_menuClosedWindows->addAction(i18n("Empty"))->setEnabled(false);
|
||||
} else {
|
||||
m_menuClosedWindows->addSeparator();
|
||||
m_menuClosedWindows->addAction(tr("Restore All Closed Windows"), manager, &ClosedWindowsManager::restoreAllClosedWindows);
|
||||
m_menuClosedWindows->addAction(QIcon::fromTheme(QSL("edit-clear")), tr("Clear list"), manager, &ClosedWindowsManager::clearClosedWindows);
|
||||
m_menuClosedWindows->addAction(i18n("Restore All Closed Windows"), manager, &ClosedWindowsManager::restoreAllClosedWindows);
|
||||
m_menuClosedWindows->addAction(QIcon::fromTheme(QSL("edit-clear")), i18n("Clear list"), manager, &ClosedWindowsManager::clearClosedWindows);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -233,18 +235,18 @@ void HistoryMenu::openUrlInNewWindow(const QUrl &url)
|
|||
|
||||
void HistoryMenu::init()
|
||||
{
|
||||
setTitle(tr("Hi&story"));
|
||||
setTitle(i18n("Hi&story"));
|
||||
|
||||
QAction* act = addAction(IconProvider::standardIcon(QStyle::SP_ArrowBack), tr("&Back"), this, &HistoryMenu::goBack);
|
||||
QAction* act = addAction(IconProvider::standardIcon(QStyle::SP_ArrowBack), i18n("&Back"), this, &HistoryMenu::goBack);
|
||||
act->setShortcut(QzTools::actionShortcut(QKeySequence::Back, Qt::ALT + Qt::Key_Left, QKeySequence::Forward, Qt::ALT + Qt::Key_Right));
|
||||
|
||||
act = addAction(IconProvider::standardIcon(QStyle::SP_ArrowForward), tr("&Forward"), this, &HistoryMenu::goForward);
|
||||
act = addAction(IconProvider::standardIcon(QStyle::SP_ArrowForward), i18n("&Forward"), this, &HistoryMenu::goForward);
|
||||
act->setShortcut(QzTools::actionShortcut(QKeySequence::Forward, Qt::ALT + Qt::Key_Right, QKeySequence::Back, Qt::ALT + Qt::Key_Left));
|
||||
|
||||
act = addAction(QIcon::fromTheme("go-home"), tr("&Home"), this, &HistoryMenu::goHome);
|
||||
act = addAction(QIcon::fromTheme("go-home"), i18n("&Home"), this, &HistoryMenu::goHome);
|
||||
act->setShortcut(QKeySequence(Qt::ALT + Qt::Key_Home));
|
||||
|
||||
act = addAction(QIcon::fromTheme("deep-history", QIcon(":/icons/menu/history.svg")), tr("Show &All History"), this, &HistoryMenu::showHistoryManager);
|
||||
act = addAction(QIcon::fromTheme("deep-history", QIcon(":/icons/menu/history.svg")), i18n("Show &All History"), this, &HistoryMenu::showHistoryManager);
|
||||
act->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_H));
|
||||
|
||||
addSeparator();
|
||||
|
@ -252,13 +254,13 @@ void HistoryMenu::init()
|
|||
connect(this, SIGNAL(aboutToShow()), this, SLOT(aboutToShow()));
|
||||
connect(this, SIGNAL(aboutToHide()), this, SLOT(aboutToHide()));
|
||||
|
||||
m_menuMostVisited = new Menu(tr("Most Visited"), this);
|
||||
m_menuMostVisited = new Menu(i18n("Most Visited"), this);
|
||||
connect(m_menuMostVisited, &QMenu::aboutToShow, this, &HistoryMenu::aboutToShowMostVisited);
|
||||
|
||||
m_menuClosedTabs = new Menu(tr("Closed Tabs"));
|
||||
m_menuClosedTabs = new Menu(i18n("Closed Tabs"));
|
||||
connect(m_menuClosedTabs, &QMenu::aboutToShow, this, &HistoryMenu::aboutToShowClosedTabs);
|
||||
|
||||
m_menuClosedWindows = new Menu(tr("Closed Windows"));
|
||||
m_menuClosedWindows = new Menu(i18n("Closed Windows"));
|
||||
connect(m_menuClosedWindows, &QMenu::aboutToShow, this, &HistoryMenu::aboutToShowClosedWindows);
|
||||
|
||||
addMenu(m_menuMostVisited);
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include <QDateTime>
|
||||
#include <QTimer>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
static QString dateTimeToString(const QDateTime &dateTime)
|
||||
{
|
||||
const QDateTime current = QDateTime::currentDateTime();
|
||||
|
@ -53,13 +55,13 @@ QVariant HistoryModel::headerData(int section, Qt::Orientation orientation, int
|
|||
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
|
||||
switch (section) {
|
||||
case 0:
|
||||
return tr("Title");
|
||||
return i18n("Title");
|
||||
case 1:
|
||||
return tr("Address");
|
||||
return i18n("Address");
|
||||
case 2:
|
||||
return tr("Visit Date");
|
||||
return i18n("Visit Date");
|
||||
case 3:
|
||||
return tr("Visit Count");
|
||||
return i18n("Visit Count");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -337,7 +339,7 @@ void HistoryModel::historyEntryAdded(const HistoryEntry &entry)
|
|||
m_todayItem = new HistoryItem(0);
|
||||
m_todayItem->setStartTimestamp(-1);
|
||||
m_todayItem->setEndTimestamp(QDateTime(QDate::currentDate()).toMSecsSinceEpoch());
|
||||
m_todayItem->title = tr("Today");
|
||||
m_todayItem->title = i18n("Today");
|
||||
|
||||
m_rootItem->prependChild(m_todayItem);
|
||||
|
||||
|
@ -468,17 +470,17 @@ void HistoryModel::init()
|
|||
if (timestampDate == today) {
|
||||
endTimestamp = QDateTime(today).toMSecsSinceEpoch();
|
||||
|
||||
itemName = tr("Today");
|
||||
itemName = i18n("Today");
|
||||
}
|
||||
else if (timestampDate >= week) {
|
||||
endTimestamp = QDateTime(week).toMSecsSinceEpoch();
|
||||
|
||||
itemName = tr("This Week");
|
||||
itemName = i18n("This Week");
|
||||
}
|
||||
else if (timestampDate.month() == month.month() && timestampDate.year() == month.year()) {
|
||||
endTimestamp = QDateTime(month).toMSecsSinceEpoch();
|
||||
|
||||
itemName = tr("This Month");
|
||||
itemName = i18n("This Month");
|
||||
}
|
||||
else {
|
||||
QDate startDate(timestampDate.year(), timestampDate.month(), timestampDate.daysInMonth());
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
#include <QMouseEvent>
|
||||
#include <QTextLayout>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
LocationCompleterDelegate::LocationCompleterDelegate(QObject *parent)
|
||||
: QStyledItemDelegate(parent)
|
||||
, m_rowHeight(0)
|
||||
|
@ -154,13 +156,13 @@ void LocationCompleterDelegate::paint(QPainter* painter, const QStyleOptionViewI
|
|||
if (!opt.state.testFlag(QStyle::State_Selected) && !opt.state.testFlag(QStyle::State_MouseOver)) {
|
||||
link.clear();
|
||||
} else if (isVisitSearchItem && (!isWebSearch || m_forceVisitItem)) {
|
||||
link = tr("Visit");
|
||||
link = i18n("Visit");
|
||||
} else {
|
||||
QString searchEngineName = loadAction.searchEngine.name;
|
||||
if (searchEngineName.isEmpty()) {
|
||||
searchEngineName = LocationBar::searchEngine().name;
|
||||
}
|
||||
link = tr("Search with %1").arg(searchEngineName);
|
||||
link = i18n("Search with %1", searchEngineName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,7 +196,7 @@ void LocationCompleterDelegate::paint(QPainter* painter, const QStyleOptionViewI
|
|||
|
||||
QRect textRect(linkRect);
|
||||
textRect.setX(textRect.x() + m_padding + 16 + m_padding);
|
||||
viewItemDrawText(painter, &opt, textRect, tr("Switch to tab"), textPalette.color(colorLinkRole));
|
||||
viewItemDrawText(painter, &opt, textRect, i18n("Switch to tab"), textPalette.color(colorLinkRole));
|
||||
} else if (isVisitSearchItem || isSearchSuggestion) {
|
||||
viewItemDrawText(painter, &opt, linkRect, link, textPalette.color(colorLinkRole));
|
||||
} else {
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
LocationCompleterView::LocationCompleterView()
|
||||
: QWidget(nullptr)
|
||||
{
|
||||
|
@ -70,12 +72,12 @@ LocationCompleterView::LocationCompleterView()
|
|||
|
||||
ToolButton *searchSettingsButton = new ToolButton(this);
|
||||
searchSettingsButton->setIcon(IconProvider::settingsIcon());
|
||||
searchSettingsButton->setToolTip(tr("Manage Search Engines"));
|
||||
searchSettingsButton->setToolTip(i18n("Manage Search Engines"));
|
||||
searchSettingsButton->setAutoRaise(true);
|
||||
searchSettingsButton->setIconSize(QSize(16, 16));
|
||||
connect(searchSettingsButton, &ToolButton::clicked, this, &LocationCompleterView::searchEnginesDialogRequested);
|
||||
|
||||
QLabel *searchLabel = new QLabel(tr("Search with:"));
|
||||
QLabel *searchLabel = new QLabel(i18n("Search with:"));
|
||||
m_searchEnginesLayout = new QHBoxLayout();
|
||||
|
||||
setupSearchEngines();
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
#include <QContextMenuEvent>
|
||||
#include <QStyleOptionFrameV3>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
LocationBar::LocationBar(QWidget *parent)
|
||||
: LineEdit(parent)
|
||||
, m_window(nullptr)
|
||||
|
@ -89,7 +91,7 @@ LocationBar::LocationBar(QWidget *parent)
|
|||
m_progressTimer->setSingleShot(true);
|
||||
connect(m_progressTimer, &QTimer::timeout, this, &LocationBar::hideProgress);
|
||||
|
||||
editAction(PasteAndGo)->setText(tr("Paste And &Go"));
|
||||
editAction(PasteAndGo)->setText(i18n("Paste And &Go"));
|
||||
editAction(PasteAndGo)->setIcon(QIcon::fromTheme(QSL("edit-paste")));
|
||||
connect(editAction(PasteAndGo), &QAction::triggered, this, &LocationBar::pasteAndGo);
|
||||
|
||||
|
@ -156,9 +158,9 @@ void LocationBar::setText(const QString &text)
|
|||
void LocationBar::updatePlaceHolderText()
|
||||
{
|
||||
if (qzSettings->searchFromAddressBar) {
|
||||
setPlaceholderText(tr("Enter address or search with %1").arg(searchEngine().name));
|
||||
setPlaceholderText(i18n("Enter address or search with %1", searchEngine().name));
|
||||
} else
|
||||
setPlaceholderText(tr("Enter address"));
|
||||
setPlaceholderText(i18n("Enter address"));
|
||||
}
|
||||
|
||||
void LocationBar::showCompletion(const QString &completion, bool completeDomain)
|
||||
|
|
|
@ -40,13 +40,15 @@
|
|||
#include <QMouseEvent>
|
||||
#include <QStyleOption>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
static QString titleForUrl(QString title, const QUrl &url)
|
||||
{
|
||||
if (title.isEmpty()) {
|
||||
title = url.toString(QUrl::RemoveFragment);
|
||||
}
|
||||
if (title.isEmpty()) {
|
||||
return NavigationBar::tr("Empty Page");
|
||||
return i18n("Empty Page");
|
||||
}
|
||||
return QzTools::truncatedText(title, 40);
|
||||
}
|
||||
|
@ -73,7 +75,7 @@ NavigationBar::NavigationBar(BrowserWindow* window)
|
|||
|
||||
m_buttonBack = new ToolButton(this);
|
||||
m_buttonBack->setObjectName("navigation-button-back");
|
||||
m_buttonBack->setToolTip(tr("Back"));
|
||||
m_buttonBack->setToolTip(i18n("Back"));
|
||||
m_buttonBack->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
m_buttonBack->setToolbarButtonLook(true);
|
||||
m_buttonBack->setShowMenuOnRightClick(true);
|
||||
|
@ -83,7 +85,7 @@ NavigationBar::NavigationBar(BrowserWindow* window)
|
|||
|
||||
m_buttonForward = new ToolButton(this);
|
||||
m_buttonForward->setObjectName("navigation-button-next");
|
||||
m_buttonForward->setToolTip(tr("Forward"));
|
||||
m_buttonForward->setToolTip(i18n("Forward"));
|
||||
m_buttonForward->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
m_buttonForward->setToolbarButtonLook(true);
|
||||
m_buttonForward->setShowMenuOnRightClick(true);
|
||||
|
@ -103,7 +105,7 @@ NavigationBar::NavigationBar(BrowserWindow* window)
|
|||
|
||||
ToolButton *buttonHome = new ToolButton(this);
|
||||
buttonHome->setObjectName("navigation-button-home");
|
||||
buttonHome->setToolTip(tr("Home"));
|
||||
buttonHome->setToolTip(i18n("Home"));
|
||||
buttonHome->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
buttonHome->setToolbarButtonLook(true);
|
||||
buttonHome->setAutoRaise(true);
|
||||
|
@ -111,7 +113,7 @@ NavigationBar::NavigationBar(BrowserWindow* window)
|
|||
|
||||
ToolButton *buttonAddTab = new ToolButton(this);
|
||||
buttonAddTab->setObjectName("navigation-button-addtab");
|
||||
buttonAddTab->setToolTip(tr("New Tab"));
|
||||
buttonAddTab->setToolTip(i18n("New Tab"));
|
||||
buttonAddTab->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
buttonAddTab->setToolbarButtonLook(true);
|
||||
buttonAddTab->setAutoRaise(true);
|
||||
|
@ -131,7 +133,7 @@ NavigationBar::NavigationBar(BrowserWindow* window)
|
|||
buttonTools->setObjectName("navigation-button-tools");
|
||||
buttonTools->setPopupMode(QToolButton::InstantPopup);
|
||||
buttonTools->setToolbarButtonLook(true);
|
||||
buttonTools->setToolTip(tr("Tools"));
|
||||
buttonTools->setToolTip(i18n("Tools"));
|
||||
buttonTools->setAutoRaise(true);
|
||||
buttonTools->setFocusPolicy(Qt::NoFocus);
|
||||
buttonTools->setShowMenuInside(true);
|
||||
|
@ -144,7 +146,7 @@ NavigationBar::NavigationBar(BrowserWindow* window)
|
|||
m_supMenu->setObjectName("navigation-button-supermenu");
|
||||
m_supMenu->setPopupMode(QToolButton::InstantPopup);
|
||||
m_supMenu->setToolbarButtonLook(true);
|
||||
m_supMenu->setToolTip(tr("Main Menu"));
|
||||
m_supMenu->setToolTip(i18n("Main Menu"));
|
||||
m_supMenu->setAutoRaise(true);
|
||||
m_supMenu->setFocusPolicy(Qt::NoFocus);
|
||||
m_supMenu->setMenu(m_window->superMenu());
|
||||
|
@ -161,7 +163,7 @@ NavigationBar::NavigationBar(BrowserWindow* window)
|
|||
|
||||
m_exitFullscreen = new ToolButton(this);
|
||||
m_exitFullscreen->setObjectName("navigation-button-exitfullscreen");
|
||||
m_exitFullscreen->setToolTip(tr("Exit Fullscreen"));
|
||||
m_exitFullscreen->setToolTip(i18n("Exit Fullscreen"));
|
||||
m_exitFullscreen->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
m_exitFullscreen->setToolbarButtonLook(true);
|
||||
m_exitFullscreen->setFocusPolicy(Qt::NoFocus);
|
||||
|
@ -187,13 +189,13 @@ NavigationBar::NavigationBar(BrowserWindow* window)
|
|||
connect(buttonAddTab, &ToolButton::middleMouseClicked, m_window->tabWidget(), &TabWidget::addTabFromClipboard);
|
||||
connect(m_exitFullscreen, &QAbstractButton::clicked, m_window, &BrowserWindow::toggleFullScreen);
|
||||
|
||||
addWidget(backNextWidget, QSL("button-backforward"), tr("Back and Forward buttons"));
|
||||
addWidget(m_reloadStop, QSL("button-reloadstop"), tr("Reload button"));
|
||||
addWidget(buttonHome, QSL("button-home"), tr("Home button"));
|
||||
addWidget(buttonAddTab, QSL("button-addtab"), tr("Add tab button"));
|
||||
addWidget(m_navigationSplitter, QSL("locationbar"), tr("Address and Search bar"));
|
||||
addWidget(buttonTools, QSL("button-tools"), tr("Tools button"));
|
||||
addWidget(m_exitFullscreen, QSL("button-exitfullscreen"), tr("Exit Fullscreen button"));
|
||||
addWidget(backNextWidget, QSL("button-backforward"), i18n("Back and Forward buttons"));
|
||||
addWidget(m_reloadStop, QSL("button-reloadstop"), i18n("Reload button"));
|
||||
addWidget(buttonHome, QSL("button-home"), i18n("Home button"));
|
||||
addWidget(buttonAddTab, QSL("button-addtab"), i18n("Add tab button"));
|
||||
addWidget(m_navigationSplitter, QSL("locationbar"), i18n("Address and Search bar"));
|
||||
addWidget(buttonTools, QSL("button-tools"), i18n("Tools button"));
|
||||
addWidget(m_exitFullscreen, QSL("button-exitfullscreen"), i18n("Exit Fullscreen button"));
|
||||
|
||||
loadSettings();
|
||||
}
|
||||
|
@ -390,7 +392,7 @@ void NavigationBar::aboutToShowHistoryBackMenu()
|
|||
}
|
||||
|
||||
m_menuBack->addSeparator();
|
||||
m_menuBack->addAction(QIcon::fromTheme(QSL("edit-clear")), tr("Clear history"), this, &NavigationBar::clearHistory);
|
||||
m_menuBack->addAction(QIcon::fromTheme(QSL("edit-clear")), i18n("Clear history"), this, &NavigationBar::clearHistory);
|
||||
}
|
||||
|
||||
void NavigationBar::aboutToShowHistoryNextMenu()
|
||||
|
@ -424,15 +426,15 @@ void NavigationBar::aboutToShowHistoryNextMenu()
|
|||
}
|
||||
|
||||
m_menuForward->addSeparator();
|
||||
m_menuForward->addAction(QIcon::fromTheme(QSL("edit-clear")), tr("Clear history"), this, &NavigationBar::clearHistory);
|
||||
m_menuForward->addAction(QIcon::fromTheme(QSL("edit-clear")), i18n("Clear history"), this, &NavigationBar::clearHistory);
|
||||
}
|
||||
|
||||
void NavigationBar::aboutToShowToolsMenu()
|
||||
{
|
||||
m_menuTools->clear();
|
||||
|
||||
m_window->createToolbarsMenu(m_menuTools->addMenu(tr("Toolbars")));
|
||||
m_window->createSidebarsMenu(m_menuTools->addMenu(tr("Sidebar")));
|
||||
m_window->createToolbarsMenu(m_menuTools->addMenu(i18n("Toolbars")));
|
||||
m_window->createSidebarsMenu(m_menuTools->addMenu(i18n("Sidebar")));
|
||||
m_menuTools->addSeparator();
|
||||
|
||||
for (const WidgetData &data : qAsConst(m_widgets)) {
|
||||
|
@ -447,7 +449,7 @@ void NavigationBar::aboutToShowToolsMenu()
|
|||
}
|
||||
|
||||
m_menuTools->addSeparator();
|
||||
m_menuTools->addAction(IconProvider::settingsIcon(), tr("Configure Toolbar"), this, &NavigationBar::openConfigurationDialog);
|
||||
m_menuTools->addAction(IconProvider::settingsIcon(), i18n("Configure Toolbar"), this, &NavigationBar::openConfigurationDialog);
|
||||
}
|
||||
|
||||
void NavigationBar::clearHistory()
|
||||
|
@ -461,7 +463,7 @@ void NavigationBar::contextMenuRequested(const QPoint &pos)
|
|||
QMenu menu;
|
||||
m_window->createToolbarsMenu(&menu);
|
||||
menu.addSeparator();
|
||||
menu.addAction(IconProvider::settingsIcon(), tr("Configure Toolbar"), this, &NavigationBar::openConfigurationDialog);
|
||||
menu.addAction(IconProvider::settingsIcon(), i18n("Configure Toolbar"), this, &NavigationBar::openConfigurationDialog);
|
||||
menu.exec(mapToGlobal(pos));
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#include <QTimer>
|
||||
#include <QStyle>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
ReloadStopButton::ReloadStopButton(QWidget* parent)
|
||||
: ToolButton(parent)
|
||||
, m_loadInProgress(false)
|
||||
|
@ -54,11 +56,11 @@ void ReloadStopButton::showReloadButton()
|
|||
void ReloadStopButton::updateButton()
|
||||
{
|
||||
if (m_loadInProgress) {
|
||||
setToolTip(tr("Stop"));
|
||||
setToolTip(i18n("Stop"));
|
||||
setObjectName(QSL("navigation-button-stop"));
|
||||
}
|
||||
else {
|
||||
setToolTip(tr("Reload"));
|
||||
setToolTip(i18n("Reload"));
|
||||
setObjectName(QSL("navigation-button-reload"));
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include <QApplication>
|
||||
#include <QContextMenuEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
SiteIcon::SiteIcon(LocationBar *parent)
|
||||
: ToolButton(parent)
|
||||
, m_window(nullptr)
|
||||
|
@ -37,7 +39,7 @@ SiteIcon::SiteIcon(LocationBar *parent)
|
|||
setObjectName("locationbar-siteicon");
|
||||
setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
setCursor(Qt::ArrowCursor);
|
||||
setToolTip(LocationBar::tr("Show information about this page"));
|
||||
setToolTip(i18n("Show information about this page"));
|
||||
setFocusPolicy(Qt::NoFocus);
|
||||
|
||||
m_updateTimer = new QTimer(this);
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
#include <QClipboard>
|
||||
#include <QContextMenuEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
WebSearchBar_Button::WebSearchBar_Button(QWidget* parent)
|
||||
: ClickableLabel(parent)
|
||||
{
|
||||
|
@ -97,7 +99,7 @@ WebSearchBar::WebSearchBar(BrowserWindow* window)
|
|||
connect(m_openSearchEngine, &OpenSearchEngine::suggestions, this, &WebSearchBar::addSuggestions);
|
||||
connect(this, &QLineEdit::textEdited, m_openSearchEngine, &OpenSearchEngine::requestSuggestions);
|
||||
|
||||
editAction(PasteAndGo)->setText(tr("Paste And &Search"));
|
||||
editAction(PasteAndGo)->setText(i18n("Paste And &Search"));
|
||||
editAction(PasteAndGo)->setIcon(QIcon::fromTheme(QSL("edit-paste")));
|
||||
connect(editAction(PasteAndGo), &QAction::triggered, this, &WebSearchBar::pasteAndGo);
|
||||
|
||||
|
@ -123,11 +125,11 @@ void WebSearchBar::aboutToShowMenu()
|
|||
if (title.isEmpty())
|
||||
title = m_window->weView()->title();
|
||||
|
||||
menu->addAction(m_window->weView()->icon(), tr("Add %1 ...").arg(title), this, &WebSearchBar::addEngineFromAction)->setData(url);
|
||||
menu->addAction(m_window->weView()->icon(), i18n("Add %1 ...", title), this, &WebSearchBar::addEngineFromAction)->setData(url);
|
||||
}
|
||||
|
||||
menu->addSeparator();
|
||||
menu->addAction(IconProvider::settingsIcon(), tr("Manage Search Engines"), this, &WebSearchBar::openSearchEnginesDialog);
|
||||
menu->addAction(IconProvider::settingsIcon(), i18n("Manage Search Engines"), this, &WebSearchBar::openSearchEnginesDialog);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -256,12 +258,12 @@ void WebSearchBar::contextMenuEvent(QContextMenuEvent* event)
|
|||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
menu->addSeparator();
|
||||
QAction* act = menu->addAction(tr("Show suggestions"));
|
||||
QAction* act = menu->addAction(i18n("Show suggestions"));
|
||||
act->setCheckable(true);
|
||||
act->setChecked(qzSettings->showWSBSearchSuggestions);
|
||||
connect(act, &QAction::triggered, this, &WebSearchBar::enableSearchSuggestions);
|
||||
|
||||
QAction* instantSearch = menu->addAction(tr("Search when engine changed"));
|
||||
QAction* instantSearch = menu->addAction(i18n("Search when engine changed"));
|
||||
instantSearch->setCheckable(true);
|
||||
instantSearch->setChecked(qzSettings->searchOnEngineChange);
|
||||
connect(instantSearch, &QAction::triggered, this, &WebSearchBar::instantSearchChanged);
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
#include <QWebEngineCertificateError>
|
||||
#include <QtWebEngineWidgetsVersion>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 12, 0)
|
||||
#include <QWebEngineUrlScheme>
|
||||
#endif
|
||||
|
@ -84,9 +86,9 @@ bool NetworkManager::certificateError(const QWebEngineCertificateError &error, Q
|
|||
if (m_ignoredSslErrors.contains(host) && m_ignoredSslErrors.value(host) == error.error())
|
||||
return true;
|
||||
|
||||
QString title = tr("SSL Certificate Error!");
|
||||
QString text1 = tr("The page you are trying to access has the following errors in the SSL certificate:");
|
||||
QString text2 = tr("Would you like to make an exception for this certificate?");
|
||||
QString title = i18n("SSL Certificate Error!");
|
||||
QString text1 = i18n("The page you are trying to access has the following errors in the SSL certificate:");
|
||||
QString text2 = i18n("Would you like to make an exception for this certificate?");
|
||||
|
||||
QString message = QSL("<b>%1</b><p>%2</p><ul><li>%3</li></ul><p>%4</p>").arg(title, text1, error.errorDescription(), text2);
|
||||
|
||||
|
@ -113,21 +115,21 @@ bool NetworkManager::certificateError(const QWebEngineCertificateError &error, Q
|
|||
void NetworkManager::authentication(const QUrl &url, QAuthenticator *auth, QWidget *parent)
|
||||
{
|
||||
QDialog* dialog = new QDialog(parent);
|
||||
dialog->setWindowTitle(tr("Authorization required"));
|
||||
dialog->setWindowTitle(i18n("Authorization required"));
|
||||
|
||||
QFormLayout* formLa = new QFormLayout(dialog);
|
||||
|
||||
QLabel* label = new QLabel(dialog);
|
||||
QLabel* userLab = new QLabel(dialog);
|
||||
QLabel* passLab = new QLabel(dialog);
|
||||
userLab->setText(tr("Username: "));
|
||||
passLab->setText(tr("Password: "));
|
||||
userLab->setText(i18n("Username: "));
|
||||
passLab->setText(i18n("Password: "));
|
||||
|
||||
QLineEdit* user = new QLineEdit(dialog);
|
||||
QLineEdit* pass = new QLineEdit(dialog);
|
||||
pass->setEchoMode(QLineEdit::Password);
|
||||
QCheckBox* save = new QCheckBox(dialog);
|
||||
save->setText(tr("Save username and password for this site"));
|
||||
save->setText(i18n("Save username and password for this site"));
|
||||
|
||||
QDialogButtonBox* box = new QDialogButtonBox(dialog);
|
||||
box->addButton(QDialogButtonBox::Ok);
|
||||
|
@ -135,8 +137,8 @@ void NetworkManager::authentication(const QUrl &url, QAuthenticator *auth, QWidg
|
|||
connect(box, &QDialogButtonBox::rejected, dialog, &QDialog::reject);
|
||||
connect(box, &QDialogButtonBox::accepted, dialog, &QDialog::accept);
|
||||
|
||||
label->setText(tr("A username and password are being requested by %1. "
|
||||
"The site says: \"%2\"").arg(url.host(), auth->realm().toHtmlEscaped()));
|
||||
label->setText(i18n("A username and password are being requested by %1. "
|
||||
"The site says: \"%2\"", url.host(), auth->realm().toHtmlEscaped()));
|
||||
|
||||
formLa->addRow(label);
|
||||
formLa->addRow(userLab, user);
|
||||
|
@ -199,15 +201,15 @@ void NetworkManager::proxyAuthentication(const QString &proxyHost, QAuthenticato
|
|||
}
|
||||
|
||||
QDialog* dialog = new QDialog(parent);
|
||||
dialog->setWindowTitle(tr("Proxy authorization required"));
|
||||
dialog->setWindowTitle(i18n("Proxy authorization required"));
|
||||
|
||||
QFormLayout* formLa = new QFormLayout(dialog);
|
||||
|
||||
QLabel* label = new QLabel(dialog);
|
||||
QLabel* userLab = new QLabel(dialog);
|
||||
QLabel* passLab = new QLabel(dialog);
|
||||
userLab->setText(tr("Username: "));
|
||||
passLab->setText(tr("Password: "));
|
||||
userLab->setText(i18n("Username: "));
|
||||
passLab->setText(i18n("Password: "));
|
||||
|
||||
QLineEdit* user = new QLineEdit(dialog);
|
||||
QLineEdit* pass = new QLineEdit(dialog);
|
||||
|
@ -219,7 +221,7 @@ void NetworkManager::proxyAuthentication(const QString &proxyHost, QAuthenticato
|
|||
connect(box, &QDialogButtonBox::rejected, dialog, &QDialog::reject);
|
||||
connect(box, &QDialogButtonBox::accepted, dialog, &QDialog::accept);
|
||||
|
||||
label->setText(tr("A username and password are being requested by proxy %1. ").arg(proxyHost));
|
||||
label->setText(i18n("A username and password are being requested by proxy %1.", proxyHost));
|
||||
formLa->addRow(label);
|
||||
formLa->addRow(userLab, user);
|
||||
formLa->addRow(passLab, pass);
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#include <QWebEngineProfile>
|
||||
#include <QWebEngineUrlRequestJob>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
static QString authorString(const char* name, const QString &mail)
|
||||
{
|
||||
return QSL("%1 <<a href=\"mailto:%2\">%2</a>>").arg(QString::fromUtf8(name), mail);
|
||||
|
@ -151,12 +153,12 @@ QString FalkonSchemeReply::startPage()
|
|||
sPage.append(QzTools::readAllFileContents(":html/start.html"));
|
||||
sPage.replace(QLatin1String("%ABOUT-IMG%"), QSL("qrc:icons/other/startpage.svg"));
|
||||
|
||||
sPage.replace(QLatin1String("%TITLE%"), tr("Start Page"));
|
||||
sPage.replace(QLatin1String("%BUTTON-LABEL%"), tr("Search on Web"));
|
||||
sPage.replace(QLatin1String("%SEARCH-BY%"), tr("Search results provided by DuckDuckGo"));
|
||||
sPage.replace(QLatin1String("%TITLE%"), i18n("Start Page"));
|
||||
sPage.replace(QLatin1String("%BUTTON-LABEL%"), i18n("Search on Web"));
|
||||
sPage.replace(QLatin1String("%SEARCH-BY%"), i18n("Search results provided by DuckDuckGo"));
|
||||
sPage.replace(QLatin1String("%WWW%"), Qz::WIKIADDRESS);
|
||||
sPage.replace(QLatin1String("%ABOUT-FALKON%"), tr("About Falkon"));
|
||||
sPage.replace(QLatin1String("%PRIVATE-BROWSING%"), mApp->isPrivate() ? tr("<h1>Private Browsing</h1>") : QString());
|
||||
sPage.replace(QLatin1String("%ABOUT-FALKON%"), i18n("About Falkon"));
|
||||
sPage.replace(QLatin1String("%PRIVATE-BROWSING%"), mApp->isPrivate() ? i18n("<h1>Private Browsing</h1>") : QString());
|
||||
sPage = QzTools::applyDirectionToPage(sPage);
|
||||
|
||||
return sPage;
|
||||
|
@ -171,20 +173,20 @@ QString FalkonSchemeReply::aboutPage()
|
|||
aPage.replace(QLatin1String("%ABOUT-IMG%"), QSL("qrc:icons/other/about.svg"));
|
||||
aPage.replace(QLatin1String("%COPYRIGHT-INCLUDE%"), QzTools::readAllFileContents(":html/copyright").toHtmlEscaped());
|
||||
|
||||
aPage.replace(QLatin1String("%TITLE%"), tr("About Falkon"));
|
||||
aPage.replace(QLatin1String("%ABOUT-FALKON%"), tr("About Falkon"));
|
||||
aPage.replace(QLatin1String("%INFORMATIONS-ABOUT-VERSION%"), tr("Information about version"));
|
||||
aPage.replace(QLatin1String("%COPYRIGHT%"), tr("Copyright"));
|
||||
aPage.replace(QLatin1String("%TITLE%"), i18n("About Falkon"));
|
||||
aPage.replace(QLatin1String("%ABOUT-FALKON%"), i18n("About Falkon"));
|
||||
aPage.replace(QLatin1String("%INFORMATIONS-ABOUT-VERSION%"), i18n("Information about version"));
|
||||
aPage.replace(QLatin1String("%COPYRIGHT%"), i18n("Copyright"));
|
||||
|
||||
aPage.replace(QLatin1String("%VERSION-INFO%"),
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Version"),
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(i18n("Version"),
|
||||
#ifdef FALKON_GIT_REVISION
|
||||
QString("%1 (%2)").arg(Qz::VERSION, FALKON_GIT_REVISION)));
|
||||
#else
|
||||
Qz::VERSION));
|
||||
#endif
|
||||
|
||||
aPage.replace(QLatin1String("%MAIN-DEVELOPER%"), tr("Main developer"));
|
||||
aPage.replace(QLatin1String("%MAIN-DEVELOPER%"), i18n("Main developer"));
|
||||
aPage.replace(QLatin1String("%MAIN-DEVELOPER-TEXT%"), authorString(Qz::AUTHOR, "nowrep@gmail.com"));
|
||||
aPage = QzTools::applyDirectionToPage(aPage);
|
||||
}
|
||||
|
@ -205,32 +207,32 @@ QString FalkonSchemeReply::speeddialPage()
|
|||
dPage.replace(QLatin1String("%LOADING-IMG%"), QLatin1String("qrc:html/loading.gif"));
|
||||
dPage.replace(QLatin1String("%IMG_SETTINGS%"), QLatin1String("qrc:html/configure.svg"));
|
||||
|
||||
dPage.replace(QLatin1String("%SITE-TITLE%"), tr("Speed Dial"));
|
||||
dPage.replace(QLatin1String("%ADD-TITLE%"), tr("Add New Page"));
|
||||
dPage.replace(QLatin1String("%TITLE-EDIT%"), tr("Edit"));
|
||||
dPage.replace(QLatin1String("%TITLE-REMOVE%"), tr("Remove"));
|
||||
dPage.replace(QLatin1String("%TITLE-RELOAD%"), tr("Reload"));
|
||||
dPage.replace(QLatin1String("%TITLE-WARN%"), tr("Are you sure you want to remove this speed dial?"));
|
||||
dPage.replace(QLatin1String("%TITLE-WARN-REL%"), tr("Are you sure you want to reload all speed dials?"));
|
||||
dPage.replace(QLatin1String("%TITLE-FETCHTITLE%"), tr("Load title from page"));
|
||||
dPage.replace(QLatin1String("%JAVASCRIPT-DISABLED%"), tr("SpeedDial requires enabled JavaScript."));
|
||||
dPage.replace(QLatin1String("%URL%"), tr("Url"));
|
||||
dPage.replace(QLatin1String("%TITLE%"), tr("Title"));
|
||||
dPage.replace(QLatin1String("%APPLY%"), tr("Apply"));
|
||||
dPage.replace(QLatin1String("%CANCEL%"), tr("Cancel"));
|
||||
dPage.replace(QLatin1String("%NEW-PAGE%"), tr("New Page"));
|
||||
dPage.replace(QLatin1String("%SETTINGS-TITLE%"), tr("Speed Dial settings"));
|
||||
dPage.replace(QLatin1String("%TXT_PLACEMENT%"), tr("Placement: "));
|
||||
dPage.replace(QLatin1String("%TXT_AUTO%"), tr("Auto"));
|
||||
dPage.replace(QLatin1String("%TXT_COVER%"), tr("Cover"));
|
||||
dPage.replace(QLatin1String("%TXT_FIT%"), tr("Fit"));
|
||||
dPage.replace(QLatin1String("%TXT_FWIDTH%"), tr("Fit Width"));
|
||||
dPage.replace(QLatin1String("%TXT_FHEIGHT%"), tr("Fit Height"));
|
||||
dPage.replace(QLatin1String("%TXT_NOTE%"), tr("Use custom wallpaper"));
|
||||
dPage.replace(QLatin1String("%TXT_SELECTIMAGE%"), tr("Click to select image"));
|
||||
dPage.replace(QLatin1String("%TXT_NRROWS%"), tr("Maximum pages in a row:"));
|
||||
dPage.replace(QLatin1String("%TXT_SDSIZE%"), tr("Change size of pages:"));
|
||||
dPage.replace(QLatin1String("%TXT_CNTRDLS%"), tr("Center speed dials"));
|
||||
dPage.replace(QLatin1String("%SITE-TITLE%"), i18n("Speed Dial"));
|
||||
dPage.replace(QLatin1String("%ADD-TITLE%"), i18n("Add New Page"));
|
||||
dPage.replace(QLatin1String("%TITLE-EDIT%"), i18n("Edit"));
|
||||
dPage.replace(QLatin1String("%TITLE-REMOVE%"), i18n("Remove"));
|
||||
dPage.replace(QLatin1String("%TITLE-RELOAD%"), i18n("Reload"));
|
||||
dPage.replace(QLatin1String("%TITLE-WARN%"), i18n("Are you sure you want to remove this speed dial?"));
|
||||
dPage.replace(QLatin1String("%TITLE-WARN-REL%"), i18n("Are you sure you want to reload all speed dials?"));
|
||||
dPage.replace(QLatin1String("%TITLE-FETCHTITLE%"), i18n("Load title from page"));
|
||||
dPage.replace(QLatin1String("%JAVASCRIPT-DISABLED%"), i18n("SpeedDial requires enabled JavaScript."));
|
||||
dPage.replace(QLatin1String("%URL%"), i18n("Url"));
|
||||
dPage.replace(QLatin1String("%TITLE%"), i18n("Title"));
|
||||
dPage.replace(QLatin1String("%APPLY%"), i18n("Apply"));
|
||||
dPage.replace(QLatin1String("%CANCEL%"), i18n("Cancel"));
|
||||
dPage.replace(QLatin1String("%NEW-PAGE%"), i18n("New Page"));
|
||||
dPage.replace(QLatin1String("%SETTINGS-TITLE%"), i18n("Speed Dial settings"));
|
||||
dPage.replace(QLatin1String("%TXT_PLACEMENT%"), i18n("Placement: "));
|
||||
dPage.replace(QLatin1String("%TXT_AUTO%"), i18n("Auto"));
|
||||
dPage.replace(QLatin1String("%TXT_COVER%"), i18n("Cover"));
|
||||
dPage.replace(QLatin1String("%TXT_FIT%"), i18n("Fit"));
|
||||
dPage.replace(QLatin1String("%TXT_FWIDTH%"), i18n("Fit Width"));
|
||||
dPage.replace(QLatin1String("%TXT_FHEIGHT%"), i18n("Fit Height"));
|
||||
dPage.replace(QLatin1String("%TXT_NOTE%"), i18n("Use custom wallpaper"));
|
||||
dPage.replace(QLatin1String("%TXT_SELECTIMAGE%"), i18n("Click to select image"));
|
||||
dPage.replace(QLatin1String("%TXT_NRROWS%"), i18n("Maximum pages in a row:"));
|
||||
dPage.replace(QLatin1String("%TXT_SDSIZE%"), i18n("Change size of pages:"));
|
||||
dPage.replace(QLatin1String("%TXT_CNTRDLS%"), i18n("Center speed dials"));
|
||||
dPage = QzTools::applyDirectionToPage(dPage);
|
||||
}
|
||||
|
||||
|
@ -255,16 +257,16 @@ QString FalkonSchemeReply::restorePage()
|
|||
if (rPage.isEmpty()) {
|
||||
rPage.append(QzTools::readAllFileContents(":html/restore.html"));
|
||||
rPage.replace(QLatin1String("%IMAGE%"), QzTools::pixmapToDataUrl(IconProvider::standardIcon(QStyle::SP_MessageBoxWarning).pixmap(45)).toString());
|
||||
rPage.replace(QLatin1String("%TITLE%"), tr("Restore Session"));
|
||||
rPage.replace(QLatin1String("%OOPS%"), tr("Oops, Falkon crashed."));
|
||||
rPage.replace(QLatin1String("%APOLOGIZE%"), tr("We apologize for this. Would you like to restore the last saved state?"));
|
||||
rPage.replace(QLatin1String("%TRY-REMOVING%"), tr("Try removing one or more tabs that you think cause troubles"));
|
||||
rPage.replace(QLatin1String("%START-NEW%"), tr("Or you can start completely new session"));
|
||||
rPage.replace(QLatin1String("%WINDOW%"), tr("Window"));
|
||||
rPage.replace(QLatin1String("%WINDOWS-AND-TABS%"), tr("Windows and Tabs"));
|
||||
rPage.replace(QLatin1String("%BUTTON-START-NEW%"), tr("Start New Session"));
|
||||
rPage.replace(QLatin1String("%BUTTON-RESTORE%"), tr("Restore"));
|
||||
rPage.replace(QLatin1String("%JAVASCRIPT-DISABLED%"), tr("Requires enabled JavaScript."));
|
||||
rPage.replace(QLatin1String("%TITLE%"), i18n("Restore Session"));
|
||||
rPage.replace(QLatin1String("%OOPS%"), i18n("Oops, Falkon crashed."));
|
||||
rPage.replace(QLatin1String("%APOLOGIZE%"), i18n("We apologize for this. Would you like to restore the last saved state?"));
|
||||
rPage.replace(QLatin1String("%TRY-REMOVING%"), i18n("Try removing one or more tabs that you think cause troubles"));
|
||||
rPage.replace(QLatin1String("%START-NEW%"), i18n("Or you can start completely new session"));
|
||||
rPage.replace(QLatin1String("%WINDOW%"), i18n("Window"));
|
||||
rPage.replace(QLatin1String("%WINDOWS-AND-TABS%"), i18n("Windows and Tabs"));
|
||||
rPage.replace(QLatin1String("%BUTTON-START-NEW%"), i18n("Start New Session"));
|
||||
rPage.replace(QLatin1String("%BUTTON-RESTORE%"), i18n("Restore"));
|
||||
rPage.replace(QLatin1String("%JAVASCRIPT-DISABLED%"), i18n("Requires enabled JavaScript."));
|
||||
rPage = QzTools::applyDirectionToPage(rPage);
|
||||
}
|
||||
|
||||
|
@ -279,21 +281,21 @@ QString FalkonSchemeReply::configPage()
|
|||
cPage.append(QzTools::readAllFileContents(":html/config.html"));
|
||||
cPage.replace(QLatin1String("%ABOUT-IMG%"), QSL("qrc:icons/other/about.svg"));
|
||||
|
||||
cPage.replace(QLatin1String("%TITLE%"), tr("Configuration Information"));
|
||||
cPage.replace(QLatin1String("%CONFIG%"), tr("Configuration Information"));
|
||||
cPage.replace(QLatin1String("%INFORMATIONS-ABOUT-VERSION%"), tr("Information about version"));
|
||||
cPage.replace(QLatin1String("%CONFIG-ABOUT%"), tr("This page contains information about Falkon's current configuration - relevant for troubleshooting. Please include this information when submitting bug reports."));
|
||||
cPage.replace(QLatin1String("%BROWSER-IDENTIFICATION%"), tr("Browser Identification"));
|
||||
cPage.replace(QLatin1String("%PATHS%"), tr("Paths"));
|
||||
cPage.replace(QLatin1String("%BUILD-CONFIG%"), tr("Build Configuration"));
|
||||
cPage.replace(QLatin1String("%PREFS%"), tr("Preferences"));
|
||||
cPage.replace(QLatin1String("%OPTION%"), tr("Option"));
|
||||
cPage.replace(QLatin1String("%VALUE%"), tr("Value"));
|
||||
cPage.replace(QLatin1String("%PLUGINS%"), tr("Extensions"));
|
||||
cPage.replace(QLatin1String("%PL-NAME%"), tr("Name"));
|
||||
cPage.replace(QLatin1String("%PL-VER%"), tr("Version"));
|
||||
cPage.replace(QLatin1String("%PL-AUTH%"), tr("Author"));
|
||||
cPage.replace(QLatin1String("%PL-DESC%"), tr("Description"));
|
||||
cPage.replace(QLatin1String("%TITLE%"), i18n("Configuration Information"));
|
||||
cPage.replace(QLatin1String("%CONFIG%"), i18n("Configuration Information"));
|
||||
cPage.replace(QLatin1String("%INFORMATIONS-ABOUT-VERSION%"), i18n("Information about version"));
|
||||
cPage.replace(QLatin1String("%CONFIG-ABOUT%"), i18n("This page contains information about Falkon's current configuration - relevant for troubleshooting. Please include this information when submitting bug reports."));
|
||||
cPage.replace(QLatin1String("%BROWSER-IDENTIFICATION%"), i18n("Browser Identification"));
|
||||
cPage.replace(QLatin1String("%PATHS%"), i18n("Paths"));
|
||||
cPage.replace(QLatin1String("%BUILD-CONFIG%"), i18n("Build Configuration"));
|
||||
cPage.replace(QLatin1String("%PREFS%"), i18n("Preferences"));
|
||||
cPage.replace(QLatin1String("%OPTION%"), i18n("Option"));
|
||||
cPage.replace(QLatin1String("%VALUE%"), i18n("Value"));
|
||||
cPage.replace(QLatin1String("%PLUGINS%"), i18n("Extensions"));
|
||||
cPage.replace(QLatin1String("%PL-NAME%"), i18n("Name"));
|
||||
cPage.replace(QLatin1String("%PL-VER%"), i18n("Version"));
|
||||
cPage.replace(QLatin1String("%PL-AUTH%"), i18n("Author"));
|
||||
cPage.replace(QLatin1String("%PL-DESC%"), i18n("Description"));
|
||||
|
||||
auto allPaths = [](DataPaths::Path type) {
|
||||
QString out;
|
||||
|
@ -308,46 +310,46 @@ QString FalkonSchemeReply::configPage()
|
|||
};
|
||||
|
||||
cPage.replace(QLatin1String("%VERSION-INFO%"),
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Application version"),
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(i18n("Application version"),
|
||||
#ifdef FALKON_GIT_REVISION
|
||||
QString("%1 (%2)").arg(Qz::VERSION, FALKON_GIT_REVISION)
|
||||
#else
|
||||
Qz::VERSION
|
||||
#endif
|
||||
) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Qt version"), qVersion()) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Platform"), QzTools::operatingSystemLong()));
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(i18n("Qt version"), qVersion()) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(i18n("Platform"), QzTools::operatingSystemLong()));
|
||||
|
||||
cPage.replace(QLatin1String("%PATHS-TEXT%"),
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Profile"), DataPaths::currentProfilePath()) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Settings"), DataPaths::currentProfilePath() + "/settings.ini") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Saved session"), SessionManager::defaultSessionPath()) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Data"), allPaths(DataPaths::AppData)) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Themes"), allPaths(DataPaths::Themes)) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Extensions"), allPaths(DataPaths::Plugins)));
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(i18n("Profile"), DataPaths::currentProfilePath()) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(i18n("Settings"), DataPaths::currentProfilePath() + "/settings.ini") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(i18n("Saved session"), SessionManager::defaultSessionPath()) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(i18n("Data"), allPaths(DataPaths::AppData)) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(i18n("Themes"), allPaths(DataPaths::Themes)) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(i18n("Extensions"), allPaths(DataPaths::Plugins)));
|
||||
|
||||
#ifdef QT_DEBUG
|
||||
QString debugBuild = tr("<b>Enabled</b>");
|
||||
QString debugBuild = i18n("<b>Enabled</b>");
|
||||
#else
|
||||
QString debugBuild = tr("Disabled");
|
||||
QString debugBuild = i18n("Disabled");
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#if defined(Q_OS_WIN) && defined(W7API)
|
||||
QString w7APIEnabled = tr("<b>Enabled</b>");
|
||||
QString w7APIEnabled = i18n("<b>Enabled</b>");
|
||||
#else
|
||||
QString w7APIEnabled = tr("Disabled");
|
||||
QString w7APIEnabled = i18n("Disabled");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
QString portableBuild = mApp->isPortable() ? tr("<b>Enabled</b>") : tr("Disabled");
|
||||
QString portableBuild = mApp->isPortable() ? i18n("<b>Enabled</b>") : i18n("Disabled");
|
||||
|
||||
cPage.replace(QLatin1String("%BUILD-CONFIG-TEXT%"),
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Debug build"), debugBuild) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(i18n("Debug build"), debugBuild) +
|
||||
#ifdef Q_OS_WIN
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Windows 7 API"), w7APIEnabled) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(i18n("Windows 7 API"), w7APIEnabled) +
|
||||
#endif
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Portable build"), portableBuild));
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(i18n("Portable build"), portableBuild));
|
||||
|
||||
cPage = QzTools::applyDirectionToPage(cPage);
|
||||
}
|
||||
|
@ -365,7 +367,7 @@ QString FalkonSchemeReply::configPage()
|
|||
}
|
||||
|
||||
if (pluginsString.isEmpty()) {
|
||||
pluginsString = QString("<tr><td colspan=4 class=\"no-available-plugins\">%1</td></tr>").arg(tr("No available extensions."));
|
||||
pluginsString = QString("<tr><td colspan=4 class=\"no-available-plugins\">%1</td></tr>").arg(i18n("No available extensions."));
|
||||
}
|
||||
|
||||
page.replace(QLatin1String("%PLUGINS-INFO%"), pluginsString);
|
||||
|
|
|
@ -29,7 +29,7 @@ SslErrorDialog::SslErrorDialog(QWidget* parent)
|
|||
ui->setupUi(this);
|
||||
ui->icon->setPixmap(IconProvider::standardIcon(QStyle::SP_MessageBoxCritical).pixmap(52));
|
||||
// Disabled until there is reliable way to save certificate error
|
||||
//ui->buttonBox->addButton(tr("Only for this session"), QDialogButtonBox::ApplyRole);
|
||||
//ui->buttonBox->addButton(i18n("Only for this session"), QDialogButtonBox::ApplyRole);
|
||||
ui->buttonBox->button(QDialogButtonBox::No)->setFocus();
|
||||
|
||||
connect(ui->buttonBox, &QDialogButtonBox::clicked, this, &SslErrorDialog::buttonClicked);
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include <QFile>
|
||||
#include <QDir>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(DISABLE_DBUS)
|
||||
#include <QDBusInterface>
|
||||
#endif
|
||||
|
@ -112,7 +114,7 @@ void DesktopNotificationsFactory::nativeNotificationPreview()
|
|||
|
||||
m_notifType = DesktopNative;
|
||||
const QPixmap icon = mApp->getWindow()->windowIcon().pixmap(64);
|
||||
showNotification(icon, QObject::tr("Native System Notification"), tr("Preview"));
|
||||
showNotification(icon, i18n("Native System Notification"), i18n("Preview"));
|
||||
m_notifType = type;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
#include <qiodevice.h>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
/*!
|
||||
\class OpenSearchReader
|
||||
\brief A class reading a search engine description from an external source
|
||||
|
@ -102,7 +104,7 @@ OpenSearchEngine* OpenSearchReader::read()
|
|||
if (!m_searchXml.contains(QLatin1String("http://a9.com/-/spec/opensearch/1.1/")) &&
|
||||
!m_searchXml.contains(QLatin1String("http://www.mozilla.org/2006/browser/search/"))
|
||||
) {
|
||||
raiseError(QObject::tr("The file is not an OpenSearch 1.1 file."));
|
||||
raiseError(i18n("The file is not an OpenSearch 1.1 file."));
|
||||
return engine;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
SearchEnginesDialog::SearchEnginesDialog(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::SearchEnginesDialog)
|
||||
|
@ -49,7 +51,7 @@ SearchEnginesDialog::SearchEnginesDialog(QWidget* parent)
|
|||
|
||||
void SearchEnginesDialog::addEngine()
|
||||
{
|
||||
EditSearchEngine dialog(tr("Add Search Engine"), this);
|
||||
EditSearchEngine dialog(i18n("Add Search Engine"), this);
|
||||
dialog.hideIconLabels();
|
||||
|
||||
if (dialog.exec() != QDialog::Accepted) {
|
||||
|
@ -86,9 +88,9 @@ void SearchEnginesDialog::removeEngine()
|
|||
|
||||
if (isDefaultEngine(item)) {
|
||||
SearchEngine en = getEngine(item);
|
||||
QMessageBox::warning(this, tr("Remove Engine"),
|
||||
tr("You can't remove the default search engine.<br>"
|
||||
"Set a different engine as default before removing %1.").arg(en.name));
|
||||
QMessageBox::warning(this, i18n("Remove Engine"),
|
||||
i18n("You can't remove the default search engine.<br>"
|
||||
"Set a different engine as default before removing %1.", en.name));
|
||||
}
|
||||
else {
|
||||
delete item;
|
||||
|
@ -104,7 +106,7 @@ void SearchEnginesDialog::editEngine()
|
|||
|
||||
SearchEngine engine = getEngine(item);
|
||||
|
||||
EditSearchEngine dialog(tr("Edit Search Engine"), this);
|
||||
EditSearchEngine dialog(i18n("Edit Search Engine"), this);
|
||||
|
||||
dialog.setName(engine.name);
|
||||
dialog.setUrl(engine.url);
|
||||
|
|
|
@ -31,9 +31,10 @@
|
|||
#include <QNetworkReply>
|
||||
#include <QMessageBox>
|
||||
#include <QBuffer>
|
||||
|
||||
#include <QUrlQuery>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#define ENSURE_LOADED if (!m_settingsLoaded) loadSettings();
|
||||
|
||||
static QIcon iconFromBase64(const QByteArray &data)
|
||||
|
@ -313,7 +314,7 @@ void SearchEnginesManager::addEngineFromForm(const QVariantMap &formData, WebVie
|
|||
engine.url.replace(inputName + QL1S("=SEARCH"), inputName + QL1S("=%s"));
|
||||
}
|
||||
|
||||
EditSearchEngine dialog(SearchEnginesDialog::tr("Add Search Engine"), view);
|
||||
EditSearchEngine dialog(i18n("Add Search Engine"), view);
|
||||
dialog.setName(engine.name);
|
||||
dialog.setIcon(engine.icon);
|
||||
dialog.setUrl(engine.url);
|
||||
|
@ -399,15 +400,15 @@ void SearchEnginesManager::replyFinished()
|
|||
|
||||
if (checkEngine(engine)) {
|
||||
addEngine(engine);
|
||||
QMessageBox::information(0, tr("Search Engine Added"), tr("Search Engine \"%1\" has been successfully added.").arg(engine->name()));
|
||||
QMessageBox::information(0, i18n("Search Engine Added"), i18n("Search Engine \"%1\" has been successfully added.", engine->name()));
|
||||
}
|
||||
}
|
||||
|
||||
bool SearchEnginesManager::checkEngine(OpenSearchEngine* engine)
|
||||
{
|
||||
if (!engine->isValid()) {
|
||||
QString errorString = tr("Search Engine is not valid!");
|
||||
QMessageBox::warning(0, tr("Error"), tr("Error while adding Search Engine <br><b>Error Message: </b> %1").arg(errorString));
|
||||
QString errorString = i18n("Search Engine is not valid!");
|
||||
QMessageBox::warning(0, i18n("Error"), i18n("Error while adding Search Engine <br><b>Error Message: </b> %1", errorString));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include <QWebEnginePage>
|
||||
#include <QWebEngineProfile>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
AboutDialog::AboutDialog(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::AboutDialog)
|
||||
|
@ -47,14 +49,14 @@ void AboutDialog::showAbout()
|
|||
{
|
||||
QString aboutHtml;
|
||||
aboutHtml += "<div style='margin:0px 20px;'>";
|
||||
aboutHtml += tr("<p><b>Application version %1</b><br/>").arg(
|
||||
aboutHtml += i18n("<p><b>Application version %1</b><br/>",
|
||||
#ifdef FALKON_GIT_REVISION
|
||||
QString("%1 (%2)").arg(Qz::VERSION, FALKON_GIT_REVISION)
|
||||
#else
|
||||
Qz::VERSION
|
||||
#endif
|
||||
);
|
||||
aboutHtml += tr("<b>QtWebEngine version %1</b></p>").arg(qVersion());
|
||||
aboutHtml += i18n("<b>QtWebEngine version %1</b></p>", qVersion());
|
||||
aboutHtml += QString("<p>© %1 %2<br/>").arg(Qz::COPYRIGHT, Qz::AUTHOR);
|
||||
aboutHtml += QString("<a href=%1>%1</a></p>").arg(Qz::WWWADDRESS);
|
||||
aboutHtml += "<p>" + mApp->userAgentManager()->defaultUserAgent() + "</p>";
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include <QMenu>
|
||||
#include <QCloseEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
BrowsingLibrary::BrowsingLibrary(BrowserWindow* window, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::BrowsingLibrary)
|
||||
|
@ -52,14 +54,14 @@ BrowsingLibrary::BrowsingLibrary(BrowserWindow* window, QWidget* parent)
|
|||
bookmarksIcon.addFile(QSL(":/icons/other/bigstar.svg"), QSize(), QIcon::Normal);
|
||||
bookmarksIcon.addFile(QSL(":/icons/other/bigstar-selected.svg"), QSize(), QIcon::Selected);
|
||||
|
||||
ui->tabs->AddTab(m_historyManager, historyIcon, tr("History"));
|
||||
ui->tabs->AddTab(m_bookmarksManager, bookmarksIcon, tr("Bookmarks"));
|
||||
ui->tabs->AddTab(m_historyManager, historyIcon, i18n("History"));
|
||||
ui->tabs->AddTab(m_bookmarksManager, bookmarksIcon, i18n("Bookmarks"));
|
||||
ui->tabs->SetMode(FancyTabWidget::Mode_LargeSidebar);
|
||||
ui->tabs->setFocus();
|
||||
|
||||
QMenu* m = new QMenu(this);
|
||||
m->addAction(tr("Import Bookmarks..."), this, &BrowsingLibrary::importBookmarks);
|
||||
m->addAction(tr("Export Bookmarks..."), this, &BrowsingLibrary::exportBookmarks);
|
||||
m->addAction(i18n("Import Bookmarks..."), this, &BrowsingLibrary::importBookmarks);
|
||||
m->addAction(i18n("Export Bookmarks..."), this, &BrowsingLibrary::exportBookmarks);
|
||||
ui->importExport->setMenu(m);
|
||||
|
||||
connect(ui->tabs, &FancyTabWidget::CurrentChanged, ui->searchLine, &QLineEdit::clear);
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
#include <QFileInfo>
|
||||
#include <QWebEngineProfile>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
ClearPrivateData::ClearPrivateData(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::ClearPrivateData)
|
||||
|
@ -151,7 +153,7 @@ void ClearPrivateData::dialogAccepted()
|
|||
QApplication::restoreOverrideCursor();
|
||||
|
||||
ui->clear->setEnabled(false);
|
||||
ui->clear->setText(tr("Done"));
|
||||
ui->clear->setText(i18n("Done"));
|
||||
|
||||
QTimer::singleShot(1000, this, &QWidget::close);
|
||||
}
|
||||
|
@ -169,7 +171,7 @@ void ClearPrivateData::optimizeDb()
|
|||
|
||||
mApp->restoreOverrideCursor();
|
||||
|
||||
QMessageBox::information(this, tr("Database Optimized"), tr("Database successfully optimized.<br/><br/><b>Database Size Before: </b>%1<br/><b>Database Size After: </b>%2").arg(sizeBefore, sizeAfter));
|
||||
QMessageBox::information(this, i18n("Database Optimized"), i18n("Database successfully optimized.<br/><br/><b>Database Size Before: </b>%1<br/><b>Database Size After: </b>%2", sizeBefore, sizeAfter));
|
||||
}
|
||||
|
||||
void ClearPrivateData::showCookieManager()
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include <QFileDialog>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
IconChooser::IconChooser(QWidget* parent)
|
||||
: QDialog(parent),
|
||||
ui(new Ui::IconChooser)
|
||||
|
@ -38,8 +40,8 @@ IconChooser::IconChooser(QWidget* parent)
|
|||
|
||||
void IconChooser::chooseFile()
|
||||
{
|
||||
const QString fileTypes = QString("%3(*.png *.jpg *.jpeg *.gif)").arg(tr("Image files"));
|
||||
const QString path = QzTools::getOpenFileName("IconChooser-ChangeIcon", this, tr("Choose icon..."), QDir::homePath(), fileTypes);
|
||||
const QString fileTypes = QString("%3(*.png *.jpg *.jpeg *.gif)").arg(i18n("Image files"));
|
||||
const QString path = QzTools::getOpenFileName("IconChooser-ChangeIcon", this, i18n("Choose icon..."), QDir::homePath(), fileTypes);
|
||||
|
||||
if (path.isEmpty()) {
|
||||
return;
|
||||
|
|
|
@ -23,11 +23,13 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <QDialogButtonBox>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
LicenseViewer::LicenseViewer(QWidget* parent)
|
||||
: QWidget()
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
setWindowTitle(tr("License Viewer"));
|
||||
setWindowTitle(i18n("License Viewer"));
|
||||
|
||||
m_textBrowser = new QTextBrowser(this);
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <QSettings>
|
||||
#include <QDir>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
RegisterQAppAssociation::RegisterQAppAssociation(QObject* parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
|
@ -107,8 +109,8 @@ bool RegisterQAppAssociation::registerAppCapabilities()
|
|||
capabilitiesKey = regLocalMachine.value("Software/RegisteredApplications/" + _appRegisteredName).toString();
|
||||
|
||||
if (capabilitiesKey.isEmpty()) {
|
||||
QMessageBox::warning(mApp->getWindow(), tr("Warning!"),
|
||||
tr("There are some problems. Please, reinstall Falkon.\n"
|
||||
QMessageBox::warning(mApp->getWindow(), i18n("Warning!"),
|
||||
i18n("There are some problems. Please, reinstall Falkon.\n"
|
||||
"Maybe relaunch with administrator right do a magic for you! ;)"));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
#include <QTimer>
|
||||
#include <QGraphicsPixmapItem>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
SiteInfo::SiteInfo(WebView *view)
|
||||
: QDialog(view)
|
||||
, ui(new Ui::SiteInfo)
|
||||
|
@ -64,9 +66,9 @@ SiteInfo::SiteInfo(WebView *view)
|
|||
ui->siteAddress->setText(m_view->url().toString());
|
||||
|
||||
if (m_view->url().scheme() == QL1S("https"))
|
||||
ui->securityLabel->setText(tr("<b>Connection is Encrypted.</b>"));
|
||||
ui->securityLabel->setText(i18n("<b>Connection is Encrypted.</b>"));
|
||||
else
|
||||
ui->securityLabel->setText(tr("<b>Connection Not Encrypted.</b>"));
|
||||
ui->securityLabel->setText(i18n("<b>Connection Not Encrypted.</b>"));
|
||||
|
||||
m_view->page()->runJavaScript(QSL("document.charset"), WebPage::SafeJsWorld, [this](const QVariant &res) {
|
||||
ui->encodingLabel->setText(res.toString());
|
||||
|
@ -153,10 +155,10 @@ void SiteInfo::imagesCustomContextMenuRequested(const QPoint &p)
|
|||
}
|
||||
|
||||
QMenu menu;
|
||||
menu.addAction(QIcon::fromTheme("edit-copy"), tr("Copy Image Location"), this, SLOT(copyActionData()))->setData(item->text(1));
|
||||
menu.addAction(tr("Copy Image Name"), this, SLOT(copyActionData()))->setData(item->text(0));
|
||||
menu.addAction(QIcon::fromTheme("edit-copy"), i18n("Copy Image Location"), this, SLOT(copyActionData()))->setData(item->text(1));
|
||||
menu.addAction(i18n("Copy Image Name"), this, SLOT(copyActionData()))->setData(item->text(0));
|
||||
menu.addSeparator();
|
||||
menu.addAction(QIcon::fromTheme("document-save"), tr("Save Image to Disk"), this, SLOT(saveImage()));
|
||||
menu.addAction(QIcon::fromTheme("document-save"), i18n("Save Image to Disk"), this, SLOT(saveImage()));
|
||||
menu.exec(ui->treeImages->viewport()->mapToGlobal(p));
|
||||
}
|
||||
|
||||
|
@ -183,7 +185,7 @@ void SiteInfo::saveImage()
|
|||
return;
|
||||
|
||||
if (!pixmapItem || pixmapItem->pixmap().isNull()) {
|
||||
QMessageBox::warning(this, tr("Error!"), tr("This preview is not available!"));
|
||||
QMessageBox::warning(this, i18n("Error!"), i18n("This preview is not available!"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -194,7 +196,7 @@ void SiteInfo::saveImage()
|
|||
imageFileName.append(QL1S(".png"));
|
||||
}
|
||||
|
||||
QString filePath = QzTools::getSaveFileName("SiteInfo-DownloadImage", this, tr("Save image..."),
|
||||
QString filePath = QzTools::getSaveFileName("SiteInfo-DownloadImage", this, i18n("Save image..."),
|
||||
QDir::homePath() + QDir::separator() + imageFileName,
|
||||
QSL("*.png"));
|
||||
if (filePath.isEmpty()) {
|
||||
|
@ -202,7 +204,7 @@ void SiteInfo::saveImage()
|
|||
}
|
||||
|
||||
if (!pixmapItem->pixmap().save(filePath, "PNG")) {
|
||||
QMessageBox::critical(this, tr("Error!"), tr("Cannot write to file!"));
|
||||
QMessageBox::critical(this, i18n("Error!"), i18n("Cannot write to file!"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -212,7 +214,7 @@ void SiteInfo::showLoadingText()
|
|||
delete ui->mediaPreview->scene();
|
||||
QGraphicsScene* scene = new QGraphicsScene(ui->mediaPreview);
|
||||
|
||||
scene->addText(tr("Loading..."));
|
||||
scene->addText(i18n("Loading..."));
|
||||
|
||||
ui->mediaPreview->setScene(scene);
|
||||
}
|
||||
|
@ -225,7 +227,7 @@ void SiteInfo::showPixmap(QPixmap pixmap)
|
|||
QGraphicsScene* scene = new QGraphicsScene(ui->mediaPreview);
|
||||
|
||||
if (pixmap.isNull())
|
||||
scene->addText(tr("Preview not available"));
|
||||
scene->addText(i18n("Preview not available"));
|
||||
else
|
||||
scene->addPixmap(pixmap);
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
#include <QToolTip>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
SiteInfoWidget::SiteInfoWidget(BrowserWindow* window, QWidget* parent)
|
||||
: LocationBarPopup(parent)
|
||||
, ui(new Ui::SiteInfoWidget)
|
||||
|
@ -39,14 +41,14 @@ SiteInfoWidget::SiteInfoWidget(BrowserWindow* window, QWidget* parent)
|
|||
|
||||
WebView* view = m_window->weView();
|
||||
|
||||
ui->titleLabel->setText(tr("<b>Site %1<b/>").arg(view->url().host()));
|
||||
ui->titleLabel->setText(i18n("<b>Site %1<b/>", view->url().host()));
|
||||
|
||||
if (view->url().scheme() == QL1S("https")) {
|
||||
ui->secureLabel->setText(tr("Your connection to this site is <b>secured</b>."));
|
||||
ui->secureLabel->setText(i18n("Your connection to this site is <b>secured</b>."));
|
||||
ui->secureIcon->setPixmap(QPixmap(":/icons/locationbar/safe.png"));
|
||||
}
|
||||
else {
|
||||
ui->secureLabel->setText(tr("Your connection to this site is <b>unsecured</b>."));
|
||||
ui->secureLabel->setText(i18n("Your connection to this site is <b>unsecured</b>."));
|
||||
ui->secureIcon->setPixmap(QPixmap(":/icons/locationbar/unsafe.png"));
|
||||
}
|
||||
|
||||
|
@ -61,26 +63,26 @@ SiteInfoWidget::SiteInfoWidget(BrowserWindow* window, QWidget* parent)
|
|||
if (query.next()) {
|
||||
int count = query.value(0).toInt();
|
||||
if (count > 3) {
|
||||
ui->historyLabel->setText(tr("This is your <b>%1</b> visit of this site.").arg(QString::number(count) + "."));
|
||||
ui->historyLabel->setText(i18n("This is your <b>%1.</b> visit of this site.", count));
|
||||
ui->historyIcon->setPixmap(QPixmap(":/icons/locationbar/visit3.png"));
|
||||
}
|
||||
else if (count == 0) {
|
||||
ui->historyLabel->setText(tr("You have <b>never</b> visited this site before."));
|
||||
ui->historyLabel->setText(i18n("You have <b>never</b> visited this site before."));
|
||||
ui->historyIcon->setPixmap(QPixmap(":/icons/locationbar/visit1.png"));
|
||||
}
|
||||
else {
|
||||
ui->historyIcon->setPixmap(QPixmap(":/icons/locationbar/visit2.png"));
|
||||
QString text;
|
||||
if (count == 1) {
|
||||
text = tr("first");
|
||||
text = i18n("first");
|
||||
}
|
||||
else if (count == 2) {
|
||||
text = tr("second");
|
||||
text = i18n("second");
|
||||
}
|
||||
else if (count == 3) {
|
||||
text = tr("third");
|
||||
text = i18n("third");
|
||||
}
|
||||
ui->historyLabel->setText(tr("This is your <b>%1</b> visit of this site.").arg(text));
|
||||
ui->historyLabel->setText(i18n("This is your <b>%1</b> visit of this site.", text));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,8 +105,8 @@ void SiteInfoWidget::updateProtocolHandler()
|
|||
const QUrl registeredUrl = mApp->protocolHandlerManager()->protocolHandlers().value(scheme);
|
||||
|
||||
if (!scheme.isEmpty() && registeredUrl != page->registerProtocolHandlerRequestUrl()) {
|
||||
ui->protocolHandlerLabel->setText(tr("Register as <b>%1</b> links handler").arg(page->registerProtocolHandlerRequestScheme()));
|
||||
ui->protocolHandlerButton->setText(tr("Register"));
|
||||
ui->protocolHandlerLabel->setText(i18n("Register as <b>%1</b> links handler", page->registerProtocolHandlerRequestScheme()));
|
||||
ui->protocolHandlerButton->setText(i18n("Register"));
|
||||
} else {
|
||||
ui->protocolHandlerLabel->hide();
|
||||
ui->protocolHandlerButton->hide();
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
#include <QTimer>
|
||||
#include <QMouseEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
class StatusBarButton : public ClickableLabel
|
||||
{
|
||||
public:
|
||||
|
@ -247,7 +249,7 @@ void StatusBar::mousePressEvent(QMouseEvent *event)
|
|||
{
|
||||
if (event->button() == Qt::RightButton) {
|
||||
QMenu context;
|
||||
context.addAction(tr("Hide"), m_window, &BrowserWindow::toggleShowStatusBar);
|
||||
context.addAction(i18n("Hide"), m_window, &BrowserWindow::toggleShowStatusBar);
|
||||
context.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <QNetworkRequest>
|
||||
#include <QNetworkReply>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
Updater::Version::Version(const QString &s)
|
||||
: isValid(false)
|
||||
, majorVersion(-1)
|
||||
|
@ -148,7 +150,7 @@ void Updater::downCompleted()
|
|||
Version updated(html);
|
||||
|
||||
if (current.isValid && updated.isValid && current < updated) {
|
||||
mApp->desktopNotifications()->showNotification(QIcon(":icons/falkon.svg").pixmap(48), tr("Update available"), tr("New version of Falkon is ready to download."));
|
||||
mApp->desktopNotifications()->showNotification(QIcon(":icons/falkon.svg").pixmap(48), i18n("Update available"), i18n("New version of Falkon is ready to download."));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,5 +159,5 @@ void Updater::downCompleted()
|
|||
|
||||
void Updater::downloadNewVersion()
|
||||
{
|
||||
m_window->tabWidget()->addView(QUrl::fromEncoded(QByteArray(Qz::WWWADDRESS) + QByteArray("/download")), tr("Update"), Qz::NT_NotSelectedTab);
|
||||
m_window->tabWidget()->addView(QUrl::fromEncoded(QByteArray(Qz::WWWADDRESS) + QByteArray("/download")), i18n("Update"), Qz::NT_NotSelectedTab);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
#include <QUrlQuery>
|
||||
#include <QNetworkReply>
|
||||
|
||||
#include <KArchive/KZip>
|
||||
#include <KZip>
|
||||
#include <KLocalizedString>
|
||||
|
||||
Q_GLOBAL_STATIC(OcsSupport, qz_ocs_support)
|
||||
|
||||
|
@ -120,7 +121,7 @@ OcsSupport *OcsSupport::instance()
|
|||
void OcsSupport::installTheme(const KArchiveDirectory *directory)
|
||||
{
|
||||
auto showError = []() {
|
||||
mApp->desktopNotifications()->showNotification(tr("Installation failed"), tr("Failed to install theme"));
|
||||
mApp->desktopNotifications()->showNotification(i18n("Installation failed"), i18n("Failed to install theme"));
|
||||
};
|
||||
|
||||
if (directory->entries().size() != 1) {
|
||||
|
@ -144,7 +145,7 @@ void OcsSupport::installTheme(const KArchiveDirectory *directory)
|
|||
|
||||
if (QFileInfo::exists(targetDir + QL1C('/') + name)) {
|
||||
qWarning() << "Theme" << name << "already exists";
|
||||
mApp->desktopNotifications()->showNotification(tr("Installation failed"), tr("Theme is already installed"));
|
||||
mApp->desktopNotifications()->showNotification(i18n("Installation failed"), i18n("Theme is already installed"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -156,13 +157,13 @@ void OcsSupport::installTheme(const KArchiveDirectory *directory)
|
|||
|
||||
qInfo() << "Theme installed to" << targetDir;
|
||||
|
||||
mApp->desktopNotifications()->showNotification(tr("Theme installed"), tr("'%1' was successfully installed").arg(metaData.name()));
|
||||
mApp->desktopNotifications()->showNotification(i18n("Theme installed"), i18n("'%1' was successfully installed", metaData.name()));
|
||||
}
|
||||
|
||||
void OcsSupport::installExtension(const KArchiveDirectory *directory)
|
||||
{
|
||||
auto showError = []() {
|
||||
mApp->desktopNotifications()->showNotification(tr("Installation failed"), tr("Failed to install extension"));
|
||||
mApp->desktopNotifications()->showNotification(i18n("Installation failed"), i18n("Failed to install extension"));
|
||||
};
|
||||
|
||||
if (directory->entries().size() != 1) {
|
||||
|
@ -200,7 +201,7 @@ void OcsSupport::installExtension(const KArchiveDirectory *directory)
|
|||
|
||||
if (QFileInfo::exists(targetDir + QL1S("/") + name)) {
|
||||
qWarning() << "Extension" << name << "already exists";
|
||||
mApp->desktopNotifications()->showNotification(tr("Installation failed"), tr("Extension is already installed"));
|
||||
mApp->desktopNotifications()->showNotification(i18n("Installation failed"), i18n("Extension is already installed"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -219,5 +220,5 @@ void OcsSupport::installExtension(const KArchiveDirectory *directory)
|
|||
return;
|
||||
}
|
||||
|
||||
mApp->desktopNotifications()->showNotification(tr("Extension installed"), tr("'%1' was successfully installed").arg(metaData.name()));
|
||||
mApp->desktopNotifications()->showNotification(i18n("Extension installed"), i18n("'%1' was successfully installed", metaData.name()));
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#include <QImage>
|
||||
#include <QJsonDocument>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#define ENSURE_LOADED if (!m_loaded) loadSettings();
|
||||
|
||||
SpeedDial::SpeedDial(QObject* parent)
|
||||
|
@ -277,8 +279,8 @@ void SpeedDial::removeImageForUrl(const QString &url)
|
|||
|
||||
QStringList SpeedDial::getOpenFileName()
|
||||
{
|
||||
const QString fileTypes = QString("%3(*.png *.jpg *.jpeg *.bmp *.gif *.svg *.tiff)").arg(tr("Image files"));
|
||||
const QString image = QzTools::getOpenFileName("SpeedDial-GetOpenFileName", 0, tr("Click to select image..."), QDir::homePath(), fileTypes);
|
||||
const QString fileTypes = QString("%3(*.png *.jpg *.jpeg *.bmp *.gif *.svg *.tiff)").arg(i18n("Image files"));
|
||||
const QString image = QzTools::getOpenFileName("SpeedDial-GetOpenFileName", 0, i18n("Click to select image..."), QDir::homePath(), fileTypes);
|
||||
|
||||
if (image.isEmpty())
|
||||
return QStringList();
|
||||
|
@ -333,7 +335,7 @@ void SpeedDial::thumbnailCreated(const QPixmap &pixmap)
|
|||
|
||||
if (pixmap.isNull()) {
|
||||
fileName = ":/html/broken-page.svg";
|
||||
title = tr("Unable to load");
|
||||
title = i18n("Unable to load");
|
||||
}
|
||||
else {
|
||||
if (!pixmap.save(fileName, "PNG")) {
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
#include <QContextMenuEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
PopupWebView::PopupWebView(QWidget* parent)
|
||||
: WebView(parent)
|
||||
, m_menu(new Menu(this))
|
||||
|
@ -97,7 +99,7 @@ void PopupWebView::_contextMenuEvent(QContextMenuEvent *event)
|
|||
|
||||
if (WebInspector::isEnabled()) {
|
||||
m_menu->addSeparator();
|
||||
m_menu->addAction(tr("Inspect Element"), this, &PopupWebView::inspectElement);
|
||||
m_menu->addAction(i18n("Inspect Element"), this, &PopupWebView::inspectElement);
|
||||
}
|
||||
|
||||
if (!m_menu->isEmpty()) {
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
#include <QCloseEvent>
|
||||
#include <QMenuBar>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
PopupWindow::PopupWindow(PopupWebView* view)
|
||||
: QWidget()
|
||||
, m_view(view)
|
||||
|
@ -80,14 +82,14 @@ PopupWindow::PopupWindow(PopupWebView* view)
|
|||
|
||||
m_menuBar = new QMenuBar(this);
|
||||
|
||||
QMenu* menuFile = new QMenu(tr("File"));
|
||||
menuFile->addAction(QIcon::fromTheme("mail-message-new"), tr("Send Link..."), m_view, &WebView::sendPageByMail);
|
||||
menuFile->addAction(QIcon::fromTheme("document-print"), tr("&Print..."), m_view, &WebView::printPage)->setShortcut(QKeySequence("Ctrl+P"));
|
||||
QMenu* menuFile = new QMenu(i18n("File"));
|
||||
menuFile->addAction(QIcon::fromTheme("mail-message-new"), i18n("Send Link..."), m_view, &WebView::sendPageByMail);
|
||||
menuFile->addAction(QIcon::fromTheme("document-print"), i18n("&Print..."), m_view, &WebView::printPage)->setShortcut(QKeySequence("Ctrl+P"));
|
||||
menuFile->addSeparator();
|
||||
menuFile->addAction(QIcon::fromTheme("window-close"), tr("Close"), this, &QWidget::close)->setShortcut(QKeySequence("Ctrl+W"));
|
||||
menuFile->addAction(QIcon::fromTheme("window-close"), i18n("Close"), this, &QWidget::close)->setShortcut(QKeySequence("Ctrl+W"));
|
||||
m_menuBar->addMenu(menuFile);
|
||||
|
||||
m_menuEdit = new QMenu(tr("Edit"));
|
||||
m_menuEdit = new QMenu(i18n("Edit"));
|
||||
m_menuEdit->addAction(m_view->pageAction(QWebEnginePage::Undo));
|
||||
m_menuEdit->addAction(m_view->pageAction(QWebEnginePage::Redo));
|
||||
m_menuEdit->addSeparator();
|
||||
|
@ -96,20 +98,20 @@ PopupWindow::PopupWindow(PopupWebView* view)
|
|||
m_menuEdit->addAction(m_view->pageAction(QWebEnginePage::Paste));
|
||||
m_menuEdit->addSeparator();
|
||||
m_menuEdit->addAction(m_view->pageAction(QWebEnginePage::SelectAll));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-find"), tr("Find"), this, &PopupWindow::searchOnPage)->setShortcut(QKeySequence("Ctrl+F"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-find"), i18n("Find"), this, &PopupWindow::searchOnPage)->setShortcut(QKeySequence("Ctrl+F"));
|
||||
m_menuBar->addMenu(m_menuEdit);
|
||||
|
||||
m_menuView = new QMenu(tr("View"));
|
||||
m_actionStop = m_menuView->addAction(QIcon::fromTheme(QSL("process-stop")), tr("&Stop"), m_view, &QWebEngineView::stop);
|
||||
m_menuView = new QMenu(i18n("View"));
|
||||
m_actionStop = m_menuView->addAction(QIcon::fromTheme(QSL("process-stop")), i18n("&Stop"), m_view, &QWebEngineView::stop);
|
||||
m_actionStop->setShortcut(QKeySequence("Esc"));
|
||||
m_actionReload = m_menuView->addAction(QIcon::fromTheme(QSL("view-refresh")), tr("&Reload"), m_view, &QWebEngineView::reload);
|
||||
m_actionReload = m_menuView->addAction(QIcon::fromTheme(QSL("view-refresh")), i18n("&Reload"), m_view, &QWebEngineView::reload);
|
||||
m_actionReload->setShortcut(QKeySequence("F5"));
|
||||
m_menuView->addSeparator();
|
||||
m_menuView->addAction(QIcon::fromTheme("zoom-in"), tr("Zoom &In"), m_view, &WebView::zoomIn)->setShortcut(QKeySequence("Ctrl++"));
|
||||
m_menuView->addAction(QIcon::fromTheme("zoom-out"), tr("Zoom &Out"), m_view, &WebView::zoomOut)->setShortcut(QKeySequence("Ctrl+-"));
|
||||
m_menuView->addAction(QIcon::fromTheme("zoom-original"), tr("Reset"), m_view, &WebView::zoomReset)->setShortcut(QKeySequence("Ctrl+0"));
|
||||
m_menuView->addAction(QIcon::fromTheme("zoom-in"), i18n("Zoom &In"), m_view, &WebView::zoomIn)->setShortcut(QKeySequence("Ctrl++"));
|
||||
m_menuView->addAction(QIcon::fromTheme("zoom-out"), i18n("Zoom &Out"), m_view, &WebView::zoomOut)->setShortcut(QKeySequence("Ctrl+-"));
|
||||
m_menuView->addAction(QIcon::fromTheme("zoom-original"), i18n("Reset"), m_view, &WebView::zoomReset)->setShortcut(QKeySequence("Ctrl+0"));
|
||||
m_menuView->addSeparator();
|
||||
m_menuView->addAction(QIcon::fromTheme("text-html"), tr("&Page Source"), m_view, &WebView::showSource)->setShortcut(QKeySequence("Ctrl+U"));
|
||||
m_menuView->addAction(QIcon::fromTheme("text-html"), i18n("&Page Source"), m_view, &WebView::showSource)->setShortcut(QKeySequence("Ctrl+U"));
|
||||
m_menuBar->addMenu(m_menuView);
|
||||
|
||||
// Make shortcuts available even with hidden menubar
|
||||
|
@ -268,7 +270,7 @@ void PopupWindow::searchOnPage()
|
|||
|
||||
void PopupWindow::titleChanged()
|
||||
{
|
||||
setWindowTitle(tr("%1 - Falkon").arg(m_view->title()));
|
||||
setWindowTitle(i18n("%1 - Falkon", m_view->title()));
|
||||
}
|
||||
|
||||
void PopupWindow::setWindowGeometry(QRect newRect)
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
#include "networkmanager.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
QStringList AcceptLanguage::defaultLanguage()
|
||||
{
|
||||
QString longCode = QLocale::system().name().replace(QLatin1Char('_'), QLatin1Char('-'));
|
||||
|
@ -96,7 +98,7 @@ AcceptLanguage::AcceptLanguage(QWidget* parent)
|
|||
QString label;
|
||||
|
||||
if (loc.language() == QLocale::C) {
|
||||
label = tr("Personal [%1]").arg(code);
|
||||
label = i18n("Personal [%1]", code);
|
||||
}
|
||||
else {
|
||||
label = QString("%1/%2 [%3]").arg(loc.languageToString(loc.language()), loc.countryToString(loc.country()), code);
|
||||
|
@ -157,7 +159,7 @@ void AcceptLanguage::addLanguage()
|
|||
}
|
||||
|
||||
if (!acceptLangUi.ownDefinition->text().isEmpty()) {
|
||||
QString title = tr("Personal [%1]").arg(acceptLangUi.ownDefinition->text());
|
||||
QString title = i18n("Personal [%1]", acceptLangUi.ownDefinition->text());
|
||||
ui->listWidget->addItem(title);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
#include <QFileDialog>
|
||||
#include <QClipboard>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
AutoFillManager::AutoFillManager(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::AutoFillManager)
|
||||
|
@ -64,10 +66,10 @@ AutoFillManager::AutoFillManager(QWidget* parent)
|
|||
connect(ui->treePass, &TreeWidget::customContextMenuRequested, this, &AutoFillManager::passwordContextMenu);
|
||||
|
||||
QMenu* menu = new QMenu(this);
|
||||
menu->addAction(tr("Import Passwords from File..."), this, &AutoFillManager::importPasswords);
|
||||
menu->addAction(tr("Export Passwords to File..."), this, &AutoFillManager::exportPasswords);
|
||||
menu->addAction(i18n("Import Passwords from File..."), this, &AutoFillManager::importPasswords);
|
||||
menu->addAction(i18n("Export Passwords to File..."), this, &AutoFillManager::exportPasswords);
|
||||
ui->importExport->setMenu(menu);
|
||||
ui->search->setPlaceholderText(tr("Search"));
|
||||
ui->search->setPlaceholderText(i18n("Search"));
|
||||
|
||||
// Password backends
|
||||
ui->currentBackend->setText(QString("<b>%1</b>").arg(m_passwordManager->activeBackend()->name()));
|
||||
|
@ -79,7 +81,7 @@ AutoFillManager::AutoFillManager(QWidget* parent)
|
|||
|
||||
void AutoFillManager::loadPasswords()
|
||||
{
|
||||
ui->showPasswords->setText(tr("Show Passwords"));
|
||||
ui->showPasswords->setText(i18n("Show Passwords"));
|
||||
m_passwordsShown = false;
|
||||
|
||||
QVector<PasswordEntry> allEntries = mApp->autoFill()->getAllFormData();
|
||||
|
@ -127,7 +129,7 @@ void AutoFillManager::changePasswordBackend()
|
|||
items << i.value()->name();
|
||||
}
|
||||
|
||||
QString item = QInputDialog::getItem(this, tr("Change backend..."), tr("Change backend:"), items, current, false);
|
||||
QString item = QInputDialog::getItem(this, i18n("Change backend..."), i18n("Change backend:"), items, current, false);
|
||||
|
||||
// Switch backends
|
||||
if (!item.isEmpty()) {
|
||||
|
@ -168,7 +170,7 @@ void AutoFillManager::showPasswords()
|
|||
item->setText(2, "*****");
|
||||
}
|
||||
|
||||
ui->showPasswords->setText(tr("Show Passwords"));
|
||||
ui->showPasswords->setText(i18n("Show Passwords"));
|
||||
m_passwordsShown = false;
|
||||
|
||||
return;
|
||||
|
@ -176,7 +178,7 @@ void AutoFillManager::showPasswords()
|
|||
|
||||
m_passwordsShown = true;
|
||||
|
||||
int result = QMessageBox::question(this, tr("Show Passwords"), tr("Are you sure that you want to show all passwords?"),
|
||||
int result = QMessageBox::question(this, i18n("Show Passwords"), i18n("Are you sure that you want to show all passwords?"),
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
||||
if (result != QMessageBox::Yes) {
|
||||
return;
|
||||
|
@ -191,7 +193,7 @@ void AutoFillManager::showPasswords()
|
|||
item->setText(2, item->data(0, Qt::UserRole + 10).value<PasswordEntry>().password);
|
||||
}
|
||||
|
||||
ui->showPasswords->setText(tr("Hide Passwords"));
|
||||
ui->showPasswords->setText(i18n("Hide Passwords"));
|
||||
}
|
||||
|
||||
void AutoFillManager::copyPassword()
|
||||
|
@ -229,8 +231,8 @@ void AutoFillManager::removePass()
|
|||
|
||||
void AutoFillManager::removeAllPass()
|
||||
{
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Confirmation"),
|
||||
tr("Are you sure you want to delete all passwords on your computer?"), QMessageBox::Yes | QMessageBox::No);
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, i18n("Confirmation"),
|
||||
i18n("Are you sure you want to delete all passwords on your computer?"), QMessageBox::Yes | QMessageBox::No);
|
||||
if (button != QMessageBox::Yes) {
|
||||
return;
|
||||
}
|
||||
|
@ -249,7 +251,7 @@ void AutoFillManager::editPass()
|
|||
PasswordEntry entry = curItem->data(0, Qt::UserRole + 10).value<PasswordEntry>();
|
||||
|
||||
bool ok;
|
||||
QString text = QInputDialog::getText(this, tr("Edit password"), tr("Change password:"), QLineEdit::Normal, entry.password, &ok);
|
||||
QString text = QInputDialog::getText(this, i18n("Edit password"), i18n("Change password:"), QLineEdit::Normal, entry.password, &ok);
|
||||
|
||||
if (ok && !text.isEmpty() && text != entry.password) {
|
||||
QByteArray oldPass = "=" + PasswordManager::urlEncodePassword(entry.password);
|
||||
|
@ -298,7 +300,7 @@ void AutoFillManager::showExceptions()
|
|||
|
||||
void AutoFillManager::importPasswords()
|
||||
{
|
||||
m_fileName = QzTools::getOpenFileName("AutoFill-ImportPasswords", this, tr("Choose file..."), QDir::homePath() + "/passwords.xml", "*.xml");
|
||||
m_fileName = QzTools::getOpenFileName("AutoFill-ImportPasswords", this, i18n("Choose file..."), QDir::homePath() + "/passwords.xml", "*.xml");
|
||||
|
||||
if (m_fileName.isEmpty()) {
|
||||
return;
|
||||
|
@ -309,7 +311,7 @@ void AutoFillManager::importPasswords()
|
|||
|
||||
void AutoFillManager::exportPasswords()
|
||||
{
|
||||
m_fileName = QzTools::getSaveFileName("AutoFill-ExportPasswords", this, tr("Choose file..."), QDir::homePath() + "/passwords.xml", "*.xml");
|
||||
m_fileName = QzTools::getSaveFileName("AutoFill-ExportPasswords", this, i18n("Choose file..."), QDir::homePath() + "/passwords.xml", "*.xml");
|
||||
|
||||
if (m_fileName.isEmpty()) {
|
||||
return;
|
||||
|
@ -323,7 +325,7 @@ void AutoFillManager::slotImportPasswords()
|
|||
QFile file(m_fileName);
|
||||
|
||||
if (!file.open(QFile::ReadOnly)) {
|
||||
ui->importExportLabel->setText(tr("Cannot read file!"));
|
||||
ui->importExportLabel->setText(i18n("Cannot read file!"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -332,7 +334,7 @@ void AutoFillManager::slotImportPasswords()
|
|||
bool status = mApp->autoFill()->importPasswords(file.readAll());
|
||||
file.close();
|
||||
|
||||
ui->importExportLabel->setText(status ? tr("Successfully imported") : tr("Error while importing!"));
|
||||
ui->importExportLabel->setText(status ? i18n("Successfully imported") : i18n("Error while importing!"));
|
||||
loadPasswords();
|
||||
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
@ -343,7 +345,7 @@ void AutoFillManager::slotExportPasswords()
|
|||
QFile file(m_fileName);
|
||||
|
||||
if (!file.open(QFile::WriteOnly)) {
|
||||
ui->importExportLabel->setText(tr("Cannot write to file!"));
|
||||
ui->importExportLabel->setText(i18n("Cannot write to file!"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -352,7 +354,7 @@ void AutoFillManager::slotExportPasswords()
|
|||
file.write(mApp->autoFill()->exportPasswords());
|
||||
file.close();
|
||||
|
||||
ui->importExportLabel->setText(tr("Successfully exported"));
|
||||
ui->importExportLabel->setText(i18n("Successfully exported"));
|
||||
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
@ -369,10 +371,10 @@ void AutoFillManager::passwordContextMenu(const QPoint &pos)
|
|||
{
|
||||
QMenu *menu = new QMenu;
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
menu->addAction(tr("Copy Username"), this, &AutoFillManager::copyUsername);
|
||||
menu->addAction(tr("Copy Password"), this, &AutoFillManager::copyPassword);
|
||||
menu->addAction(i18n("Copy Username"), this, &AutoFillManager::copyUsername);
|
||||
menu->addAction(i18n("Copy Password"), this, &AutoFillManager::copyPassword);
|
||||
menu->addSeparator();
|
||||
menu->addAction(tr("Edit Password"), this, &AutoFillManager::editPass);
|
||||
menu->addAction(i18n("Edit Password"), this, &AutoFillManager::editPass);
|
||||
menu->popup(ui->treePass->viewport()->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
#include <QMessageBox>
|
||||
#include <QTimer>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
PluginsManager::PluginsManager(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::PluginsList)
|
||||
|
@ -194,7 +196,7 @@ void PluginsManager::itemChanged(QListWidgetItem* item)
|
|||
|
||||
if (item->checkState() == Qt::Checked && !plugin.isLoaded()) {
|
||||
item->setCheckState(Qt::Unchecked);
|
||||
QMessageBox::critical(this, tr("Error!"), tr("Cannot load extension!"));
|
||||
QMessageBox::critical(this, i18n("Error!"), i18n("Cannot load extension!"));
|
||||
}
|
||||
|
||||
item->setData(Qt::UserRole + 10, QVariant::fromValue(plugin));
|
||||
|
@ -233,8 +235,8 @@ void PluginsManager::removeClicked()
|
|||
|
||||
Plugins::Plugin plugin = item->data(Qt::UserRole + 10).value<Plugins::Plugin>();
|
||||
|
||||
const auto button = QMessageBox::warning(this, tr("Confirmation"),
|
||||
tr("Are you sure you want to remove '%1'?").arg(plugin.pluginSpec.name),
|
||||
const auto button = QMessageBox::warning(this, i18n("Confirmation"),
|
||||
i18n("Are you sure you want to remove '%1'?", plugin.pluginSpec.name),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (button != QMessageBox::Yes) {
|
||||
return;
|
||||
|
|
|
@ -61,6 +61,8 @@
|
|||
#include <QLibraryInfo>
|
||||
#include <QtWebEngineWidgetsVersion>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
static QString createLanguageItem(const QString &lang)
|
||||
{
|
||||
QLocale locale(lang);
|
||||
|
@ -156,11 +158,11 @@ Preferences::Preferences(BrowserWindow* window)
|
|||
ui->checkDefaultBrowser->setChecked(settings.value("Web-Browser-Settings/CheckDefaultBrowser",
|
||||
DEFAULT_CHECK_DEFAULTBROWSER).toBool());
|
||||
if (mApp->associationManager()->isDefaultForAllCapabilities()) {
|
||||
ui->checkNowDefaultBrowser->setText(tr("Default"));
|
||||
ui->checkNowDefaultBrowser->setText(i18n("Default"));
|
||||
ui->checkNowDefaultBrowser->setEnabled(false);
|
||||
}
|
||||
else {
|
||||
ui->checkNowDefaultBrowser->setText(tr("Set as default"));
|
||||
ui->checkNowDefaultBrowser->setText(i18n("Set as default"));
|
||||
ui->checkNowDefaultBrowser->setEnabled(true);
|
||||
connect(ui->checkNowDefaultBrowser, SIGNAL(clicked()), this, SLOT(makeFalkonDefault()));
|
||||
}
|
||||
|
@ -539,7 +541,7 @@ Preferences::Preferences(BrowserWindow* window)
|
|||
|
||||
void Preferences::chooseExternalDownloadManager()
|
||||
{
|
||||
QString path = QzTools::getOpenFileName("Preferences-ExternalDownloadManager", this, tr("Choose executable location..."), QDir::homePath());
|
||||
QString path = QzTools::getOpenFileName("Preferences-ExternalDownloadManager", this, i18n("Choose executable location..."), QDir::homePath());
|
||||
if (path.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
@ -582,8 +584,8 @@ void Preferences::showNotificationPreview()
|
|||
}
|
||||
|
||||
m_notification = new DesktopNotification(true);
|
||||
m_notification.data()->setHeading(tr("OSD Notification"));
|
||||
m_notification.data()->setText(tr("Drag it on the screen to place it where you want."));
|
||||
m_notification.data()->setHeading(i18n("OSD Notification"));
|
||||
m_notification.data()->setText(i18n("Drag it on the screen to place it where you want."));
|
||||
m_notification.data()->move(m_notifPosition);
|
||||
m_notification.data()->show();
|
||||
}
|
||||
|
@ -596,7 +598,7 @@ void Preferences::makeFalkonDefault()
|
|||
{
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_OS2)
|
||||
disconnect(ui->checkNowDefaultBrowser, SIGNAL(clicked()), this, SLOT(makeFalkonDefault()));
|
||||
ui->checkNowDefaultBrowser->setText(tr("Default"));
|
||||
ui->checkNowDefaultBrowser->setText(i18n("Default"));
|
||||
ui->checkNowDefaultBrowser->setEnabled(false);
|
||||
|
||||
if (!mApp->associationManager()->showNativeDefaultAppSettingsUi())
|
||||
|
@ -632,7 +634,7 @@ void Preferences::useActualNewTab()
|
|||
|
||||
void Preferences::chooseDownPath()
|
||||
{
|
||||
QString userFileName = QzTools::getExistingDirectory("Preferences-ChooseDownPath", this, tr("Choose download location..."), QDir::homePath());
|
||||
QString userFileName = QzTools::getExistingDirectory("Preferences-ChooseDownPath", this, i18n("Choose download location..."), QDir::homePath());
|
||||
if (userFileName.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
@ -646,7 +648,7 @@ void Preferences::chooseDownPath()
|
|||
|
||||
void Preferences::chooseUserStyleClicked()
|
||||
{
|
||||
QString file = QzTools::getOpenFileName("Preferences-UserStyle", this, tr("Choose stylesheet location..."), QDir::homePath(), "*.css");
|
||||
QString file = QzTools::getOpenFileName("Preferences-UserStyle", this, i18n("Choose stylesheet location..."), QDir::homePath(), "*.css");
|
||||
if (file.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
@ -657,7 +659,7 @@ void Preferences::deleteHtml5storage()
|
|||
{
|
||||
ClearPrivateData::clearLocalStorage();
|
||||
|
||||
ui->deleteHtml5storage->setText(tr("Deleted"));
|
||||
ui->deleteHtml5storage->setText(i18n("Deleted"));
|
||||
ui->deleteHtml5storage->setEnabled(false);
|
||||
}
|
||||
|
||||
|
@ -753,7 +755,7 @@ void Preferences::afterLaunchChanged(int value)
|
|||
|
||||
void Preferences::changeCachePathClicked()
|
||||
{
|
||||
QString path = QzTools::getExistingDirectory("Preferences-CachePath", this, tr("Choose cache path..."), ui->cachePath->text());
|
||||
QString path = QzTools::getExistingDirectory("Preferences-CachePath", this, i18n("Choose cache path..."), ui->cachePath->text());
|
||||
if (path.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
@ -784,7 +786,7 @@ void Preferences::buttonClicked(QAbstractButton* button)
|
|||
|
||||
void Preferences::createProfile()
|
||||
{
|
||||
QString name = QInputDialog::getText(this, tr("New Profile"), tr("Enter the new profile's name:"));
|
||||
QString name = QInputDialog::getText(this, i18n("New Profile"), i18n("Enter the new profile's name:"));
|
||||
name = QzTools::filterCharsFromFilename(name);
|
||||
|
||||
if (name.isEmpty()) {
|
||||
|
@ -794,12 +796,12 @@ void Preferences::createProfile()
|
|||
int res = ProfileManager::createProfile(name);
|
||||
|
||||
if (res == -1) {
|
||||
QMessageBox::warning(this, tr("Error!"), tr("This profile already exists!"));
|
||||
QMessageBox::warning(this, i18n("Error!"), i18n("This profile already exists!"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (res != 0) {
|
||||
QMessageBox::warning(this, tr("Error!"), tr("Cannot create profile directory!"));
|
||||
QMessageBox::warning(this, i18n("Error!"), i18n("Cannot create profile directory!"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -810,8 +812,8 @@ void Preferences::createProfile()
|
|||
void Preferences::deleteProfile()
|
||||
{
|
||||
QString name = ui->startProfile->currentText();
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Confirmation"),
|
||||
tr("Are you sure you want to permanently delete \"%1\" profile? This action cannot be undone!").arg(name), QMessageBox::Yes | QMessageBox::No);
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, i18n("Confirmation"),
|
||||
i18n("Are you sure you want to permanently delete \"%1\" profile? This action cannot be undone!", name), QMessageBox::Yes | QMessageBox::No);
|
||||
if (button != QMessageBox::Yes) {
|
||||
return;
|
||||
}
|
||||
|
@ -826,7 +828,7 @@ void Preferences::startProfileIndexChanged(int index)
|
|||
const bool current = ui->startProfile->itemText(index) == ProfileManager::currentProfile();
|
||||
|
||||
ui->deleteProfile->setEnabled(!current);
|
||||
ui->cannotDeleteActiveProfileLabel->setText(current ? tr("Note: You cannot delete active profile.") : QString());
|
||||
ui->cannotDeleteActiveProfileLabel->setText(current ? i18n("Note: You cannot delete active profile.") : QString());
|
||||
}
|
||||
|
||||
void Preferences::closeEvent(QCloseEvent* event)
|
||||
|
@ -1081,7 +1083,7 @@ void Preferences::setProgressBarColorIcon(QColor color)
|
|||
|
||||
void Preferences::selectCustomProgressBarColor()
|
||||
{
|
||||
QColor newColor = QColorDialog::getColor(ui->customColorToolButton->property("ProgressColor").value<QColor>(), this, tr("Select Color"));
|
||||
QColor newColor = QColorDialog::getColor(ui->customColorToolButton->property("ProgressColor").value<QColor>(), this, i18n("Select Color"));
|
||||
if (newColor.isValid()) {
|
||||
setProgressBarColorIcon(newColor);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include <QDir>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
ThemeManager::ThemeManager(QWidget* parent, Preferences* preferences)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::ThemeManager)
|
||||
|
@ -96,8 +98,8 @@ void ThemeManager::removeTheme()
|
|||
}
|
||||
Theme currentTheme = m_themeHash[currentItem->data(Qt::UserRole).toString()];
|
||||
|
||||
const auto button = QMessageBox::warning(this, tr("Confirmation"),
|
||||
tr("Are you sure you want to remove '%1'?").arg(currentTheme.name),
|
||||
const auto button = QMessageBox::warning(this, i18n("Confirmation"),
|
||||
i18n("Are you sure you want to remove '%1'?", currentTheme.name),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (button != QMessageBox::Yes) {
|
||||
return;
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <QLineEdit>
|
||||
#include <QLabel>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
UserAgentDialog::UserAgentDialog(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::UserAgentDialog)
|
||||
|
@ -96,7 +98,7 @@ void UserAgentDialog::addSite()
|
|||
QString site;
|
||||
QString userAgent;
|
||||
|
||||
if (showEditDialog(tr("Add new site"), &site, &userAgent)) {
|
||||
if (showEditDialog(i18n("Add new site"), &site, &userAgent)) {
|
||||
QTableWidgetItem* siteItem = new QTableWidgetItem(site);
|
||||
QTableWidgetItem* userAgentItem = new QTableWidgetItem(userAgent);
|
||||
|
||||
|
@ -134,7 +136,7 @@ void UserAgentDialog::editSite()
|
|||
QString site = siteItem->text();
|
||||
QString userAgent = userAgentItem->text();
|
||||
|
||||
if (showEditDialog(tr("Edit site"), &site, &userAgent)) {
|
||||
if (showEditDialog(i18n("Edit site"), &site, &userAgent)) {
|
||||
siteItem->setText(site);
|
||||
userAgentItem->setText(userAgent);
|
||||
}
|
||||
|
@ -213,8 +215,8 @@ bool UserAgentDialog::showEditDialog(const QString &title, QString* rSite, QStri
|
|||
connect(box, &QDialogButtonBox::rejected, dialog, &QDialog::reject);
|
||||
connect(box, &QDialogButtonBox::accepted, dialog, &QDialog::accept);
|
||||
|
||||
layout->addRow(new QLabel(tr("Site domain: ")), editSite);
|
||||
layout->addRow(new QLabel(tr("User Agent: ")), editAgent);
|
||||
layout->addRow(new QLabel(i18n("Site domain: ")), editSite);
|
||||
layout->addRow(new QLabel(i18n("User Agent: ")), editAgent);
|
||||
layout->addRow(box);
|
||||
|
||||
editSite->setText(*rSite);
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <QSaveFile>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
SessionManager::SessionManager(QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_firstBackupSession(DataPaths::currentProfilePath() + QL1S("/session.dat.old"))
|
||||
|
@ -123,9 +125,9 @@ void SessionManager::renameSession(QString sessionFilePath, SessionFlags flags)
|
|||
}
|
||||
|
||||
bool ok;
|
||||
const QString suggestedName = QFileInfo(sessionFilePath).completeBaseName() + (flags.testFlag(CloneSession) ? tr("_cloned") : tr("_renamed"));
|
||||
QString newName = QInputDialog::getText(mApp->activeWindow(), (flags.testFlag(CloneSession) ? tr("Clone Session") : tr("Rename Session")),
|
||||
tr("Please enter a new name:"), QLineEdit::Normal,
|
||||
const QString suggestedName = QFileInfo(sessionFilePath).completeBaseName() + (flags.testFlag(CloneSession) ? i18nc("suffix for cloned session name", "_cloned") : i18nc("suffix for renamed session name", "_renamed"));
|
||||
QString newName = QInputDialog::getText(mApp->activeWindow(), (flags.testFlag(CloneSession) ? i18n("Clone Session") : i18n("Rename Session")),
|
||||
i18n("Please enter a new name:"), QLineEdit::Normal,
|
||||
suggestedName, &ok);
|
||||
|
||||
if (!ok)
|
||||
|
@ -133,19 +135,19 @@ void SessionManager::renameSession(QString sessionFilePath, SessionFlags flags)
|
|||
|
||||
const QString newSessionPath = QString("%1/%2.dat").arg(DataPaths::path(DataPaths::Sessions)).arg(newName);
|
||||
if (QFile::exists(newSessionPath)) {
|
||||
QMessageBox::information(mApp->activeWindow(), tr("Error!"), tr("The session file \"%1\" exists. Please enter another name.").arg(newName));
|
||||
QMessageBox::information(mApp->activeWindow(), i18n("Error!"), i18n("The session file \"%1\" exists. Please enter another name.", newName));
|
||||
renameSession(sessionFilePath, flags);
|
||||
return;
|
||||
}
|
||||
|
||||
if (flags.testFlag(CloneSession)) {
|
||||
if (!QFile::copy(sessionFilePath, newSessionPath)) {
|
||||
QMessageBox::information(mApp->activeWindow(), tr("Error!"), tr("An error occurred when cloning session file."));
|
||||
QMessageBox::information(mApp->activeWindow(), i18n("Error!"), i18n("An error occurred when cloning session file."));
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!QFile::rename(sessionFilePath, newSessionPath)) {
|
||||
QMessageBox::information(mApp->activeWindow(), tr("Error!"), tr("An error occurred when renaming session file."));
|
||||
QMessageBox::information(mApp->activeWindow(), i18n("Error!"), i18n("An error occurred when renaming session file."));
|
||||
return;
|
||||
}
|
||||
if (isActive(sessionFilePath)) {
|
||||
|
@ -158,16 +160,16 @@ void SessionManager::renameSession(QString sessionFilePath, SessionFlags flags)
|
|||
void SessionManager::saveSession()
|
||||
{
|
||||
bool ok;
|
||||
QString sessionName = QInputDialog::getText(mApp->activeWindow(), tr("Save Session"),
|
||||
tr("Please enter a name to save session:"), QLineEdit::Normal,
|
||||
tr("Saved Session (%1)").arg(QDateTime::currentDateTime().toString("dd MMM yyyy HH-mm-ss")), &ok);
|
||||
QString sessionName = QInputDialog::getText(mApp->activeWindow(), i18n("Save Session"),
|
||||
i18n("Please enter a name to save session:"), QLineEdit::Normal,
|
||||
i18n("Saved Session (%1)", QDateTime::currentDateTime().toString("dd MMM yyyy HH-mm-ss")), &ok);
|
||||
|
||||
if (!ok)
|
||||
return;
|
||||
|
||||
const QString filePath = QString("%1/%2.dat").arg(DataPaths::path(DataPaths::Sessions)).arg(sessionName);
|
||||
if (QFile::exists(filePath)) {
|
||||
QMessageBox::information(mApp->activeWindow(), tr("Error!"), tr("The session file \"%1\" exists. Please enter another name.").arg(sessionName));
|
||||
QMessageBox::information(mApp->activeWindow(), i18n("Error!"), i18n("The session file \"%1\" exists. Please enter another name.", sessionName));
|
||||
saveSession();
|
||||
return;
|
||||
}
|
||||
|
@ -177,7 +179,7 @@ void SessionManager::saveSession()
|
|||
|
||||
void SessionManager::replaceSession(const QString &filePath)
|
||||
{
|
||||
QMessageBox::StandardButton result = QMessageBox::information(mApp->activeWindow(), tr("Restore Backup"), tr("Are you sure you want to replace current session?"),
|
||||
QMessageBox::StandardButton result = QMessageBox::information(mApp->activeWindow(), i18n("Restore Backup"), i18n("Are you sure you want to replace current session?"),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (result == QMessageBox::Yes) {
|
||||
openSession(filePath, ReplaceSession);
|
||||
|
@ -196,8 +198,8 @@ void SessionManager::cloneSession(const QString &filePath)
|
|||
|
||||
void SessionManager::deleteSession(const QString &filePath)
|
||||
{
|
||||
QMessageBox::StandardButton result = QMessageBox::information(mApp->activeWindow(), tr("Delete Session"), tr("Are you sure you want to delete session '%1'?")
|
||||
.arg(QFileInfo(filePath).completeBaseName()), QMessageBox::Yes | QMessageBox::No);
|
||||
QMessageBox::StandardButton result = QMessageBox::information(mApp->activeWindow(), i18n("Delete Session"), i18n("Are you sure you want to delete session '%1'?",
|
||||
QFileInfo(filePath).completeBaseName()), QMessageBox::Yes | QMessageBox::No);
|
||||
if (result == QMessageBox::Yes) {
|
||||
QFile::remove(filePath);
|
||||
}
|
||||
|
@ -206,16 +208,16 @@ void SessionManager::deleteSession(const QString &filePath)
|
|||
void SessionManager::newSession()
|
||||
{
|
||||
bool ok;
|
||||
QString sessionName = QInputDialog::getText(mApp->activeWindow(), tr("New Session"),
|
||||
tr("Please enter a name to create new session:"), QLineEdit::Normal,
|
||||
tr("New Session (%1)").arg(QDateTime::currentDateTime().toString("dd MMM yyyy HH-mm-ss")), &ok);
|
||||
QString sessionName = QInputDialog::getText(mApp->activeWindow(), i18n("New Session"),
|
||||
i18n("Please enter a name to create new session:"), QLineEdit::Normal,
|
||||
i18n("New Session (%1)", QDateTime::currentDateTime().toString("dd MMM yyyy HH-mm-ss")), &ok);
|
||||
|
||||
if (!ok)
|
||||
return;
|
||||
|
||||
const QString filePath = QString("%1/%2.dat").arg(DataPaths::path(DataPaths::Sessions)).arg(sessionName);
|
||||
if (QFile::exists(filePath)) {
|
||||
QMessageBox::information(mApp->activeWindow(), tr("Error!"), tr("The session file \"%1\" exists. Please enter another name.").arg(sessionName));
|
||||
QMessageBox::information(mApp->activeWindow(), i18n("Error!"), i18n("The session file \"%1\" exists. Please enter another name.", sessionName));
|
||||
newSession();
|
||||
return;
|
||||
}
|
||||
|
@ -240,14 +242,14 @@ QList<SessionManager::SessionMetaData> SessionManager::sessionMetaData(bool with
|
|||
|
||||
if (withBackups && QFile::exists(m_firstBackupSession)) {
|
||||
SessionMetaData data;
|
||||
data.name = tr("Backup 1");
|
||||
data.name = i18n("Backup 1");
|
||||
data.filePath = m_firstBackupSession;
|
||||
data.isBackup = true;
|
||||
out.append(data);
|
||||
}
|
||||
if (withBackups && QFile::exists(m_secondBackupSession)) {
|
||||
SessionMetaData data;
|
||||
data.name = tr("Backup 2");
|
||||
data.name = i18n("Backup 2");
|
||||
data.filePath = m_secondBackupSession;
|
||||
data.isBackup = true;
|
||||
out.append(data);
|
||||
|
@ -287,7 +289,7 @@ void SessionManager::fillSessionsMetaDataListIfNeeded()
|
|||
metaData.name = fileInfo.completeBaseName();
|
||||
|
||||
if (fileInfo == QFileInfo(defaultSessionPath())) {
|
||||
metaData.name = tr("Default Session");
|
||||
metaData.name = i18n("Default Session");
|
||||
metaData.isDefault = true;
|
||||
} else if (fileNames.contains(fileInfo.completeBaseName())) {
|
||||
metaData.name = fileInfo.fileName();
|
||||
|
@ -390,7 +392,7 @@ QString SessionManager::askSessionFromUser()
|
|||
fillSessionsMetaDataListIfNeeded();
|
||||
|
||||
QDialog dialog(mApp->getWindow(), Qt::WindowStaysOnTopHint);
|
||||
QLabel label(tr("Please select the startup session:"), &dialog);
|
||||
QLabel label(i18n("Please select the startup session:"), &dialog);
|
||||
QComboBox comboBox(&dialog);
|
||||
QDialogButtonBox buttonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, &dialog);
|
||||
connect(&buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
|
||||
|
@ -409,7 +411,7 @@ QString SessionManager::askSessionFromUser()
|
|||
comboBox.addItem(metaData.name, metaData.filePath);
|
||||
}
|
||||
else {
|
||||
comboBox.insertItem(0, tr("%1 (last session)").arg(metaData.name), metaData.filePath);
|
||||
comboBox.insertItem(0, i18n("%1 (last session)", metaData.name), metaData.filePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include <QFileInfo>
|
||||
#include <QDateTime>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
SessionManagerDialog::SessionManagerDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::SessionManagerDialog)
|
||||
|
@ -137,7 +139,7 @@ void SessionManagerDialog::updateButtons()
|
|||
ui->cloneButton->setEnabled(item && !isBackup);
|
||||
ui->deleteButton->setEnabled(item && !isBackup && !isDefault && !isActive);
|
||||
ui->switchToButton->setEnabled(item && !isActive);
|
||||
ui->switchToButton->setText(isBackup ? tr("Restore") : tr("Switch To"));
|
||||
ui->switchToButton->setText(isBackup ? i18n("Restore") : i18n("Switch To"));
|
||||
}
|
||||
|
||||
void SessionManagerDialog::updateItem(QTreeWidgetItem *item)
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
#include <QMenu>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
BookmarksSidebar::BookmarksSidebar(BrowserWindow* window, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::BookmarksSideBar)
|
||||
|
@ -100,12 +102,12 @@ void BookmarksSidebar::deleteBookmarks()
|
|||
void BookmarksSidebar::createContextMenu(const QPoint &pos)
|
||||
{
|
||||
QMenu menu;
|
||||
QAction* actNewTab = menu.addAction(IconProvider::newTabIcon(), tr("Open in new tab"));
|
||||
QAction* actNewWindow = menu.addAction(IconProvider::newWindowIcon(), tr("Open in new window"));
|
||||
QAction* actNewPrivateWindow = menu.addAction(IconProvider::privateBrowsingIcon(), tr("Open in new private window"));
|
||||
QAction* actNewTab = menu.addAction(IconProvider::newTabIcon(), i18n("Open in new tab"));
|
||||
QAction* actNewWindow = menu.addAction(IconProvider::newWindowIcon(), i18n("Open in new window"));
|
||||
QAction* actNewPrivateWindow = menu.addAction(IconProvider::privateBrowsingIcon(), i18n("Open in new private window"));
|
||||
|
||||
menu.addSeparator();
|
||||
QAction* actDelete = menu.addAction(QIcon::fromTheme("edit-delete"), tr("Delete"));
|
||||
QAction* actDelete = menu.addAction(QIcon::fromTheme("edit-delete"), i18n("Delete"));
|
||||
|
||||
connect(actNewTab, SIGNAL(triggered()), this, SLOT(openBookmarkInNewTab()));
|
||||
connect(actNewWindow, SIGNAL(triggered()), this, SLOT(openBookmarkInNewWindow()));
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include "qzsettings.h"
|
||||
#include "iconprovider.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
HistorySideBar::HistorySideBar(BrowserWindow* window, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::HistorySideBar)
|
||||
|
@ -82,12 +84,12 @@ void HistorySideBar::openUrlInNewPrivateWindow(const QUrl &url)
|
|||
void HistorySideBar::createContextMenu(const QPoint &pos)
|
||||
{
|
||||
QMenu menu;
|
||||
QAction* actNewTab = menu.addAction(IconProvider::newTabIcon(), tr("Open in new tab"));
|
||||
QAction* actNewWindow = menu.addAction(IconProvider::newWindowIcon(), tr("Open in new window"));
|
||||
QAction* actNewPrivateWindow = menu.addAction(IconProvider::privateBrowsingIcon(), tr("Open in new private window"));
|
||||
QAction* actNewTab = menu.addAction(IconProvider::newTabIcon(), i18n("Open in new tab"));
|
||||
QAction* actNewWindow = menu.addAction(IconProvider::newWindowIcon(), i18n("Open in new window"));
|
||||
QAction* actNewPrivateWindow = menu.addAction(IconProvider::privateBrowsingIcon(), i18n("Open in new private window"));
|
||||
|
||||
menu.addSeparator();
|
||||
QAction* actDelete = menu.addAction(QIcon::fromTheme(QSL("edit-delete")), tr("Delete"));
|
||||
QAction* actDelete = menu.addAction(QIcon::fromTheme(QSL("edit-delete")), i18n("Delete"));
|
||||
|
||||
connect(actNewTab, SIGNAL(triggered()), this, SLOT(openUrlInNewTab()));
|
||||
connect(actNewWindow, SIGNAL(triggered()), this, SLOT(openUrlInNewWindow()));
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include <QMenu>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
QHash<QString, QPointer<SideBarInterface> > s_sidebars;
|
||||
|
||||
SideBar::SideBar(SideBarManager* manager, BrowserWindow* window)
|
||||
|
@ -62,14 +64,14 @@ void SideBar::setWidget(QWidget* widget)
|
|||
|
||||
void SideBar::showBookmarks()
|
||||
{
|
||||
m_titleBar->setTitle(tr("Bookmarks"));
|
||||
m_titleBar->setTitle(i18n("Bookmarks"));
|
||||
BookmarksSidebar* bar = new BookmarksSidebar(m_window);
|
||||
setWidget(bar);
|
||||
}
|
||||
|
||||
void SideBar::showHistory()
|
||||
{
|
||||
m_titleBar->setTitle(tr("History"));
|
||||
m_titleBar->setTitle(i18n("History"));
|
||||
HistorySideBar* bar = new HistorySideBar(m_window);
|
||||
setWidget(bar);
|
||||
}
|
||||
|
@ -104,14 +106,14 @@ void SideBarManager::createMenu(QMenu* menu)
|
|||
|
||||
QActionGroup *group = new QActionGroup(menu);
|
||||
|
||||
QAction* act = menu->addAction(SideBar::tr("Bookmarks"), this, &SideBarManager::slotShowSideBar);
|
||||
QAction* act = menu->addAction(i18n("Bookmarks"), this, &SideBarManager::slotShowSideBar);
|
||||
act->setCheckable(true);
|
||||
act->setShortcut(QKeySequence("Ctrl+Shift+B"));
|
||||
act->setData("Bookmarks");
|
||||
act->setChecked(m_activeBar == QL1S("Bookmarks"));
|
||||
group->addAction(act);
|
||||
|
||||
act = menu->addAction(SideBar::tr("History"), this, &SideBarManager::slotShowSideBar);
|
||||
act = menu->addAction(i18n("History"), this, &SideBarManager::slotShowSideBar);
|
||||
act->setCheckable(true);
|
||||
act->setShortcut(QKeySequence("Ctrl+H"));
|
||||
act->setData("History");
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
#include <QHBoxLayout>
|
||||
#include <QDrag>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#define MIMETYPE QSL("application/falkon.tabbar.tab")
|
||||
|
||||
class TabBarTabMetrics : public QWidget
|
||||
|
@ -108,7 +110,7 @@ TabBar::TabBar(BrowserWindow* window, TabWidget* tabWidget)
|
|||
|
||||
// ComboTabBar features
|
||||
setUsesScrollButtons(true);
|
||||
setCloseButtonsToolTip(BrowserWindow::tr("Close Tab"));
|
||||
setCloseButtonsToolTip(i18n("Close Tab"));
|
||||
connect(this, &ComboTabBar::overFlowChanged, this, &TabBar::overflowChanged);
|
||||
|
||||
tabMetrics()->init();
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "iconprovider.h"
|
||||
#include "checkboxdialog.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
TabContextMenu::TabContextMenu(int index, BrowserWindow *window, Options options)
|
||||
: QMenu()
|
||||
|
@ -60,7 +61,7 @@ static bool canCloseTabs(const QString &settingsKey, const QString &title, const
|
|||
dialog.setDefaultButton(QMessageBox::No);
|
||||
dialog.setWindowTitle(title);
|
||||
dialog.setText(description);
|
||||
dialog.setCheckBoxText(TabBar::tr("Don't ask again"));
|
||||
dialog.setCheckBoxText(i18n("Don't ask again"));
|
||||
dialog.setIcon(QMessageBox::Question);
|
||||
|
||||
if (dialog.exec() != QMessageBox::Yes) {
|
||||
|
@ -77,7 +78,7 @@ static bool canCloseTabs(const QString &settingsKey, const QString &title, const
|
|||
|
||||
void TabContextMenu::closeAllButCurrent()
|
||||
{
|
||||
if (canCloseTabs(QLatin1String("AskOnClosingAllButCurrent"), tr("Close Tabs"), tr("Do you really want to close other tabs?"))) {
|
||||
if (canCloseTabs(QLatin1String("AskOnClosingAllButCurrent"), i18n("Close Tabs"), i18n("Do you really want to close other tabs?"))) {
|
||||
emit closeAllButCurrent(m_clickedTab);
|
||||
}
|
||||
}
|
||||
|
@ -85,10 +86,10 @@ void TabContextMenu::closeAllButCurrent()
|
|||
void TabContextMenu::closeToRight()
|
||||
{
|
||||
const QString label = m_options & HorizontalTabs
|
||||
? tr("Do you really want to close all tabs to the right?")
|
||||
: tr("Do you really want to close all tabs to the bottom?");
|
||||
? i18n("Do you really want to close all tabs to the right?")
|
||||
: i18n("Do you really want to close all tabs to the bottom?");
|
||||
|
||||
if (canCloseTabs(QLatin1String("AskOnClosingToRight"), tr("Close Tabs"), label)) {
|
||||
if (canCloseTabs(QLatin1String("AskOnClosingToRight"), i18n("Close Tabs"), label)) {
|
||||
emit closeToRight(m_clickedTab);
|
||||
}
|
||||
}
|
||||
|
@ -96,10 +97,10 @@ void TabContextMenu::closeToRight()
|
|||
void TabContextMenu::closeToLeft()
|
||||
{
|
||||
const QString label = m_options & HorizontalTabs
|
||||
? tr("Do you really want to close all tabs to the left?")
|
||||
: tr("Do you really want to close all tabs to the top?");
|
||||
? i18n("Do you really want to close all tabs to the left?")
|
||||
: i18n("Do you really want to close all tabs to the top?");
|
||||
|
||||
if (canCloseTabs(QLatin1String("AskOnClosingToLeft"), tr("Close Tabs"), label)) {
|
||||
if (canCloseTabs(QLatin1String("AskOnClosingToLeft"), i18n("Close Tabs"), label)) {
|
||||
emit closeToLeft(m_clickedTab);
|
||||
}
|
||||
}
|
||||
|
@ -114,46 +115,46 @@ void TabContextMenu::init()
|
|||
}
|
||||
|
||||
if (m_window->weView(m_clickedTab)->isLoading()) {
|
||||
addAction(QIcon::fromTheme(QSL("process-stop")), tr("&Stop Tab"), this, SLOT(stopTab()));
|
||||
addAction(QIcon::fromTheme(QSL("process-stop")), i18n("&Stop Tab"), this, SLOT(stopTab()));
|
||||
}
|
||||
else {
|
||||
addAction(QIcon::fromTheme(QSL("view-refresh")), tr("&Reload Tab"), this, SLOT(reloadTab()));
|
||||
addAction(QIcon::fromTheme(QSL("view-refresh")), i18n("&Reload Tab"), this, SLOT(reloadTab()));
|
||||
}
|
||||
|
||||
addAction(QIcon::fromTheme("tab-duplicate"), tr("&Duplicate Tab"), this, SLOT(duplicateTab()));
|
||||
addAction(QIcon::fromTheme("tab-duplicate"), i18n("&Duplicate Tab"), this, SLOT(duplicateTab()));
|
||||
|
||||
if (m_options & ShowDetachTabAction && (mApp->windowCount() > 1 || tabWidget->count() > 1)) {
|
||||
addAction(QIcon::fromTheme("tab-detach"), tr("D&etach Tab"), this, SLOT(detachTab()));
|
||||
addAction(QIcon::fromTheme("tab-detach"), i18n("D&etach Tab"), this, SLOT(detachTab()));
|
||||
}
|
||||
|
||||
addAction(webTab->isPinned() ? tr("Un&pin Tab") : tr("&Pin Tab"), this, &TabContextMenu::pinTab);
|
||||
addAction(webTab->isMuted() ? tr("Un&mute Tab") : tr("&Mute Tab"), this, &TabContextMenu::muteTab);
|
||||
addAction(webTab->isPinned() ? i18n("Un&pin Tab") : i18n("&Pin Tab"), this, &TabContextMenu::pinTab);
|
||||
addAction(webTab->isMuted() ? i18n("Un&mute Tab") : i18n("&Mute Tab"), this, &TabContextMenu::muteTab);
|
||||
|
||||
if (!webTab->isRestored()) {
|
||||
addAction(tr("Load Tab"), this, SLOT(loadTab()));
|
||||
addAction(i18n("Load Tab"), this, SLOT(loadTab()));
|
||||
} else {
|
||||
addAction(tr("Unload Tab"), this, SLOT(unloadTab()));
|
||||
addAction(i18n("Unload Tab"), this, SLOT(unloadTab()));
|
||||
}
|
||||
|
||||
addSeparator();
|
||||
addAction(tr("Re&load All Tabs"), tabWidget, &TabWidget::reloadAllTabs);
|
||||
addAction(tr("Bookmark &All Tabs"), m_window, &BrowserWindow::bookmarkAllTabs);
|
||||
addAction(i18n("Re&load All Tabs"), tabWidget, &TabWidget::reloadAllTabs);
|
||||
addAction(i18n("Bookmark &All Tabs"), m_window, &BrowserWindow::bookmarkAllTabs);
|
||||
addSeparator();
|
||||
|
||||
if (m_options & ShowCloseOtherTabsActions) {
|
||||
addAction(tr("Close Ot&her Tabs"), this, SLOT(closeAllButCurrent()));
|
||||
addAction(m_options & HorizontalTabs ? tr("Close Tabs To The Right") : tr("Close Tabs To The Bottom"), this, SLOT(closeToRight()));
|
||||
addAction(m_options & HorizontalTabs ? tr("Close Tabs To The Left") : tr("Close Tabs To The Top"), this, SLOT(closeToLeft()));
|
||||
addAction(i18n("Close Ot&her Tabs"), this, SLOT(closeAllButCurrent()));
|
||||
addAction(m_options & HorizontalTabs ? i18n("Close Tabs To The Right") : i18n("Close Tabs To The Bottom"), this, SLOT(closeToRight()));
|
||||
addAction(m_options & HorizontalTabs ? i18n("Close Tabs To The Left") : i18n("Close Tabs To The Top"), this, SLOT(closeToLeft()));
|
||||
addSeparator();
|
||||
}
|
||||
|
||||
addAction(m_window->action(QSL("Other/RestoreClosedTab")));
|
||||
addAction(QIcon::fromTheme("window-close"), tr("Cl&ose Tab"), this, &TabContextMenu::closeTab);
|
||||
addAction(QIcon::fromTheme("window-close"), i18n("Cl&ose Tab"), this, &TabContextMenu::closeTab);
|
||||
} else {
|
||||
addAction(IconProvider::newTabIcon(), tr("&New tab"), m_window, &BrowserWindow::addTab);
|
||||
addAction(IconProvider::newTabIcon(), i18n("&New tab"), m_window, &BrowserWindow::addTab);
|
||||
addSeparator();
|
||||
addAction(tr("Reloa&d All Tabs"), tabWidget, &TabWidget::reloadAllTabs);
|
||||
addAction(tr("Bookmark &All Tabs"), m_window, &BrowserWindow::bookmarkAllTabs);
|
||||
addAction(i18n("Reloa&d All Tabs"), tabWidget, &TabWidget::reloadAllTabs);
|
||||
addAction(i18n("Bookmark &All Tabs"), m_window, &BrowserWindow::bookmarkAllTabs);
|
||||
addSeparator();
|
||||
addAction(m_window->action(QSL("Other/RestoreClosedTab")));
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include <QToolTip>
|
||||
#include <QMouseEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
TabIcon::TabIcon(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_tab(0)
|
||||
|
@ -165,7 +167,7 @@ bool TabIcon::event(QEvent *event)
|
|||
if (event->type() == QEvent::ToolTip) {
|
||||
QHelpEvent *e = static_cast<QHelpEvent*>(event);
|
||||
if (m_audioIconDisplayed && m_audioIconRect.contains(e->pos())) {
|
||||
QToolTip::showText(e->globalPos(), m_tab->isMuted() ? tr("Unmute Tab") : tr("Mute Tab"), this);
|
||||
QToolTip::showText(e->globalPos(), m_tab->isMuted() ? i18n("Unmute Tab") : i18n("Mute Tab"), this);
|
||||
event->accept();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
#include <QWebEngineHistory>
|
||||
#include <QClipboard>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
AddTabButton::AddTabButton(TabWidget* tabWidget, TabBar* tabBar)
|
||||
: ToolButton(tabBar)
|
||||
, m_tabBar(tabBar)
|
||||
|
@ -49,7 +51,7 @@ AddTabButton::AddTabButton(TabWidget* tabWidget, TabBar* tabBar)
|
|||
setAutoRaise(true);
|
||||
setFocusPolicy(Qt::NoFocus);
|
||||
setAcceptDrops(true);
|
||||
setToolTip(TabWidget::tr("New Tab"));
|
||||
setToolTip(i18n("New Tab"));
|
||||
}
|
||||
|
||||
void AddTabButton::wheelEvent(QWheelEvent* event)
|
||||
|
@ -124,7 +126,7 @@ TabWidget::TabWidget(BrowserWindow *window, QWidget *parent)
|
|||
m_buttonClosedTabs->setObjectName("tabwidget-button-closedtabs");
|
||||
m_buttonClosedTabs->setMenu(m_menuClosedTabs);
|
||||
m_buttonClosedTabs->setPopupMode(QToolButton::InstantPopup);
|
||||
m_buttonClosedTabs->setToolTip(tr("Closed tabs"));
|
||||
m_buttonClosedTabs->setToolTip(i18n("Closed tabs"));
|
||||
m_buttonClosedTabs->setAutoRaise(true);
|
||||
m_buttonClosedTabs->setFocusPolicy(Qt::NoFocus);
|
||||
m_buttonClosedTabs->setShowMenuInside(true);
|
||||
|
@ -135,7 +137,7 @@ TabWidget::TabWidget(BrowserWindow *window, QWidget *parent)
|
|||
m_buttonListTabs->setObjectName("tabwidget-button-opentabs");
|
||||
m_buttonListTabs->setMenu(m_menuTabs);
|
||||
m_buttonListTabs->setPopupMode(QToolButton::InstantPopup);
|
||||
m_buttonListTabs->setToolTip(tr("List of tabs"));
|
||||
m_buttonListTabs->setToolTip(i18n("List of tabs"));
|
||||
m_buttonListTabs->setAutoRaise(true);
|
||||
m_buttonListTabs->setFocusPolicy(Qt::NoFocus);
|
||||
m_buttonListTabs->setShowMenuInside(true);
|
||||
|
@ -292,12 +294,12 @@ void TabWidget::aboutToShowClosedTabsMenu()
|
|||
}
|
||||
|
||||
if (m_menuClosedTabs->isEmpty()) {
|
||||
m_menuClosedTabs->addAction(tr("Empty"))->setEnabled(false);
|
||||
m_menuClosedTabs->addAction(i18n("Empty"))->setEnabled(false);
|
||||
}
|
||||
else {
|
||||
m_menuClosedTabs->addSeparator();
|
||||
m_menuClosedTabs->addAction(tr("Restore All Closed Tabs"), this, &TabWidget::restoreAllClosedTabs);
|
||||
m_menuClosedTabs->addAction(QIcon::fromTheme(QSL("edit-clear")), tr("Clear list"), this, &TabWidget::clearClosedTabsList);
|
||||
m_menuClosedTabs->addAction(i18n("Restore All Closed Tabs"), this, &TabWidget::restoreAllClosedTabs);
|
||||
m_menuClosedTabs->addAction(QIcon::fromTheme(QSL("edit-clear")), i18n("Clear list"), this, &TabWidget::clearClosedTabsList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <QMenu>
|
||||
#include <QPointer>
|
||||
#include <KLocalizedString>
|
||||
|
||||
#include "tabstackedwidget.h"
|
||||
#include "toolbutton.h"
|
||||
|
@ -103,7 +104,7 @@ public:
|
|||
|
||||
public Q_SLOTS:
|
||||
int addView(const LoadRequest &req, const Qz::NewTabPositionFlags &openFlags, bool selectLine = false, bool pinned = false);
|
||||
int addView(const LoadRequest &req, const QString &title = tr("New tab"), const Qz::NewTabPositionFlags &openFlags = Qz::NT_SelectedTab, bool selectLine = false, int position = -1, bool pinned = false);
|
||||
int addView(const LoadRequest &req, const QString &title = i18n("New tab"), const Qz::NewTabPositionFlags &openFlags = Qz::NT_SelectedTab, bool selectLine = false, int position = -1, bool pinned = false);
|
||||
int addView(WebTab *tab, const Qz::NewTabPositionFlags &openFlags);
|
||||
int insertView(int index, WebTab *tab, const Qz::NewTabPositionFlags &openFlags);
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#include <QByteArray>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
//////////////////////////////////////////////
|
||||
/// Version 1:
|
||||
/// init(): n=5, EVP_CIPHER=EVP_aes_256_cbc(), EVP_MD=EVP_sha256(), Random IV
|
||||
|
@ -144,7 +146,7 @@ QByteArray AesInterface::decrypt(const QByteArray &cipherData, const QByteArray
|
|||
}
|
||||
|
||||
if (cipherSections.at(0).toInt() > AesInterface::VERSION) {
|
||||
QMessageBox::information(0, tr("Warning!"), tr("Data has been encrypted with a newer version of Falkon."
|
||||
QMessageBox::information(0, i18n("Warning!"), i18n("Data has been encrypted with a newer version of Falkon."
|
||||
"\nPlease install latest version of Falkon."));
|
||||
return QByteArray();
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include <QSslCertificate>
|
||||
#include <QDateTime>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
QString CertificateInfoWidget::certificateItemText(const QSslCertificate &cert)
|
||||
{
|
||||
QString commonName = cert.subjectInfo(QSslCertificate::CommonName).isEmpty() ? QString() : cert.subjectInfo(QSslCertificate::CommonName).at(0);
|
||||
|
@ -297,7 +299,7 @@ QString CertificateInfoWidget::clearCertSpecialSymbols(const QStringList &string
|
|||
QString CertificateInfoWidget::showCertInfo(const QString &string)
|
||||
{
|
||||
if (string.isEmpty()) {
|
||||
return QObject::tr("<not set in certificate>");
|
||||
return i18n("<not set in certificate>");
|
||||
}
|
||||
else {
|
||||
return clearCertSpecialSymbols(string);
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#include "mainapplication.h"
|
||||
#include "html5permissionsmanager.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
HTML5PermissionsDialog::HTML5PermissionsDialog(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::HTML5PermissionsDialog)
|
||||
|
@ -56,7 +58,7 @@ void HTML5PermissionsDialog::showFeaturePermissions(QWebEnginePage::Feature feat
|
|||
foreach (const QString &site, m_granted.value(feature)) {
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem(ui->treeWidget);
|
||||
item->setText(0, site);
|
||||
item->setText(1, tr("Allow"));
|
||||
item->setText(1, i18n("Allow"));
|
||||
item->setData(0, Qt::UserRole + 10, Allow);
|
||||
ui->treeWidget->addTopLevelItem(item);
|
||||
}
|
||||
|
@ -64,7 +66,7 @@ void HTML5PermissionsDialog::showFeaturePermissions(QWebEnginePage::Feature feat
|
|||
foreach (const QString &site, m_denied.value(feature)) {
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem(ui->treeWidget);
|
||||
item->setText(0, site);
|
||||
item->setText(1, tr("Deny"));
|
||||
item->setText(1, i18n("Deny"));
|
||||
item->setData(0, Qt::UserRole + 10, Deny);
|
||||
ui->treeWidget->addTopLevelItem(item);
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include <QTimer>
|
||||
#include <QWebEnginePage>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
HTML5PermissionsNotification::HTML5PermissionsNotification(const QUrl &origin, QWebEnginePage* page, const QWebEnginePage::Feature &feature)
|
||||
: AnimatedWidget(AnimatedWidget::Down, 300, 0)
|
||||
, ui(new Ui::HTML5PermissionsNotification)
|
||||
|
@ -36,31 +38,31 @@ HTML5PermissionsNotification::HTML5PermissionsNotification(const QUrl &origin, Q
|
|||
|
||||
ui->close->setIcon(IconProvider::standardIcon(QStyle::SP_DialogCloseButton));
|
||||
|
||||
const QString site = m_origin.host().isEmpty() ? tr("this site") : QString("<b>%1</b>").arg(m_origin.host());
|
||||
const QString site = m_origin.host().isEmpty() ? i18n("this site") : QString("<b>%1</b>").arg(m_origin.host());
|
||||
|
||||
switch (feature) {
|
||||
case QWebEnginePage::Notifications:
|
||||
ui->textLabel->setText(tr("Allow %1 to show desktop notifications?").arg(site));
|
||||
ui->textLabel->setText(i18n("Allow %1 to show desktop notifications?", site));
|
||||
break;
|
||||
|
||||
case QWebEnginePage::Geolocation:
|
||||
ui->textLabel->setText(tr("Allow %1 to locate your position?").arg(site));
|
||||
ui->textLabel->setText(i18n("Allow %1 to locate your position?", site));
|
||||
break;
|
||||
|
||||
case QWebEnginePage::MediaAudioCapture:
|
||||
ui->textLabel->setText(tr("Allow %1 to use your microphone?").arg(site));
|
||||
ui->textLabel->setText(i18n("Allow %1 to use your microphone?", site));
|
||||
break;
|
||||
|
||||
case QWebEnginePage::MediaVideoCapture:
|
||||
ui->textLabel->setText(tr("Allow %1 to use your camera?").arg(site));
|
||||
ui->textLabel->setText(i18n("Allow %1 to use your camera?", site));
|
||||
break;
|
||||
|
||||
case QWebEnginePage::MediaAudioVideoCapture:
|
||||
ui->textLabel->setText(tr("Allow %1 to use your microphone and camera?").arg(site));
|
||||
ui->textLabel->setText(i18n("Allow %1 to use your microphone and camera?", site));
|
||||
break;
|
||||
|
||||
case QWebEnginePage::MouseLock:
|
||||
ui->textLabel->setText(tr("Allow %1 to hide your pointer?").arg(site));
|
||||
ui->textLabel->setText(i18n("Allow %1 to hide your pointer?", site));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
#include <QMessageBox>
|
||||
#include <QUrlQuery>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#ifdef QZ_WS_X11
|
||||
#include <QX11Info>
|
||||
#include <xcb/xcb.h>
|
||||
|
@ -374,21 +376,21 @@ QString QzTools::alignTextToWidth(const QString &string, const QString &text, co
|
|||
QString QzTools::fileSizeToString(qint64 size)
|
||||
{
|
||||
if (size < 0) {
|
||||
return QObject::tr("Unknown size");
|
||||
return i18n("Unknown size");
|
||||
}
|
||||
|
||||
double _size = size / 1024.0; // KB
|
||||
if (_size < 1000) {
|
||||
return QString::number(_size > 1 ? _size : 1, 'f', 0) + " " + QObject::tr("KB");
|
||||
return QString::number(_size > 1 ? _size : 1, 'f', 0) + " " + i18n("KB");
|
||||
}
|
||||
|
||||
_size /= 1024; // MB
|
||||
if (_size < 1000) {
|
||||
return QString::number(_size, 'f', 1) + " " + QObject::tr("MB");
|
||||
return QString::number(_size, 'f', 1) + " " + i18n("MB");
|
||||
}
|
||||
|
||||
_size /= 1024; // GB
|
||||
return QString::number(_size, 'f', 2) + " " + QObject::tr("GB");
|
||||
return QString::number(_size, 'f', 2) + " " + i18n("GB");
|
||||
}
|
||||
|
||||
QPixmap QzTools::createPixmapForSite(const QIcon &icon, const QString &title, const QString &url)
|
||||
|
@ -847,11 +849,11 @@ bool QzTools::startExternalProcess(const QString &executable, const QString &arg
|
|||
|
||||
if (!success) {
|
||||
QString info = "<ul><li><b>%1</b>%2</li><li><b>%3</b>%4</li></ul>";
|
||||
info = info.arg(QObject::tr("Executable: "), executable,
|
||||
QObject::tr("Arguments: "), arguments.join(QLatin1String(" ")));
|
||||
info = info.arg(i18n("Executable: "), executable,
|
||||
i18n("Arguments: "), arguments.join(QLatin1String(" ")));
|
||||
|
||||
QMessageBox::critical(0, QObject::tr("Cannot start external program"),
|
||||
QObject::tr("Cannot start external program! %1").arg(info));
|
||||
QMessageBox::critical(0, i18n("Cannot start external program"),
|
||||
i18n("Cannot start external program! %1", info));
|
||||
}
|
||||
|
||||
return success;
|
||||
|
|
|
@ -60,6 +60,8 @@
|
|||
#include <QUrlQuery>
|
||||
#include <QtWebEngineWidgetsVersion>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 11, 0)
|
||||
#include <QWebEngineRegisterProtocolHandlerRequest>
|
||||
#endif
|
||||
|
@ -336,13 +338,13 @@ void WebPage::handleUnknownProtocol(const QUrl &url)
|
|||
dialog.setDefaultButton(QMessageBox::Yes);
|
||||
|
||||
const QString wrappedUrl = QzTools::alignTextToWidth(url.toString(), "<br/>", dialog.fontMetrics(), 450);
|
||||
const QString text = tr("Falkon cannot handle <b>%1:</b> links. The requested link "
|
||||
const QString text = i18n("Falkon cannot handle <b>%1:</b> links. The requested link "
|
||||
"is <ul><li>%2</li></ul>Do you want Falkon to try "
|
||||
"open this link in system application?").arg(protocol, wrappedUrl);
|
||||
"open this link in system application?", protocol, wrappedUrl);
|
||||
|
||||
dialog.setText(text);
|
||||
dialog.setCheckBoxText(tr("Remember my choice for this protocol"));
|
||||
dialog.setWindowTitle(tr("External Protocol Request"));
|
||||
dialog.setCheckBoxText(i18n("Remember my choice for this protocol"));
|
||||
dialog.setWindowTitle(i18n("External Protocol Request"));
|
||||
dialog.setIcon(QMessageBox::Question);
|
||||
|
||||
switch (dialog.exec()) {
|
||||
|
@ -422,11 +424,11 @@ void WebPage::renderProcessTerminated(QWebEnginePage::RenderProcessTerminationSt
|
|||
QTimer::singleShot(0, this, [this]() {
|
||||
QString page = QzTools::readAllFileContents(":html/tabcrash.html");
|
||||
page.replace(QL1S("%IMAGE%"), QzTools::pixmapToDataUrl(IconProvider::standardIcon(QStyle::SP_MessageBoxWarning).pixmap(45)).toString());
|
||||
page.replace(QL1S("%TITLE%"), tr("Failed loading page"));
|
||||
page.replace(QL1S("%HEADING%"), tr("Failed loading page"));
|
||||
page.replace(QL1S("%LI-1%"), tr("Something went wrong while loading this page."));
|
||||
page.replace(QL1S("%LI-2%"), tr("Try reloading the page or closing some tabs to make more memory available."));
|
||||
page.replace(QL1S("%RELOAD-PAGE%"), tr("Reload page"));
|
||||
page.replace(QL1S("%TITLE%"), i18n("Failed loading page"));
|
||||
page.replace(QL1S("%HEADING%"), i18n("Failed loading page"));
|
||||
page.replace(QL1S("%LI-1%"), i18n("Something went wrong while loading this page."));
|
||||
page.replace(QL1S("%LI-2%"), i18n("Try reloading the page or closing some tabs to make more memory available."));
|
||||
page.replace(QL1S("%RELOAD-PAGE%"), i18n("Reload page"));
|
||||
page = QzTools::applyDirectionToPage(page);
|
||||
setHtml(page.toUtf8(), url());
|
||||
});
|
||||
|
@ -488,11 +490,11 @@ QStringList WebPage::chooseFiles(QWebEnginePage::FileSelectionMode mode, const Q
|
|||
|
||||
switch (mode) {
|
||||
case FileSelectOpen:
|
||||
files = QStringList(QzTools::getOpenFileName("WebPage-ChooseFile", view(), tr("Choose file..."), suggestedFileName));
|
||||
files = QStringList(QzTools::getOpenFileName("WebPage-ChooseFile", view(), i18n("Choose file..."), suggestedFileName));
|
||||
break;
|
||||
|
||||
case FileSelectOpenMultiple:
|
||||
files = QzTools::getOpenFileNames("WebPage-ChooseFile", view(), tr("Choose files..."), suggestedFileName);
|
||||
files = QzTools::getOpenFileNames("WebPage-ChooseFile", view(), i18n("Choose files..."), suggestedFileName);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -632,7 +634,7 @@ void WebPage::javaScriptAlert(const QUrl &securityOrigin, const QString &msg)
|
|||
}
|
||||
|
||||
if (!kEnableJsNonBlockDialogs) {
|
||||
QString title = tr("JavaScript alert");
|
||||
QString title = i18n("JavaScript alert");
|
||||
if (!url().host().isEmpty()) {
|
||||
title.append(QString(" - %1").arg(url().host()));
|
||||
}
|
||||
|
@ -641,7 +643,7 @@ void WebPage::javaScriptAlert(const QUrl &securityOrigin, const QString &msg)
|
|||
dialog.setDefaultButton(QMessageBox::Ok);
|
||||
dialog.setWindowTitle(title);
|
||||
dialog.setText(msg);
|
||||
dialog.setCheckBoxText(tr("Prevent this page from creating additional dialogs"));
|
||||
dialog.setCheckBoxText(i18n("Prevent this page from creating additional dialogs"));
|
||||
dialog.setIcon(QMessageBox::Information);
|
||||
dialog.exec();
|
||||
|
||||
|
|
|
@ -52,6 +52,8 @@
|
|||
#include <QQuickWidget>
|
||||
#include <QtWebEngineWidgetsVersion>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
bool WebView::s_forceContextMenuOnMouseRelease = false;
|
||||
|
||||
WebView::WebView(QWidget* parent)
|
||||
|
@ -123,7 +125,7 @@ QString WebView::title(bool allowEmpty) const
|
|||
}
|
||||
|
||||
if (title.isEmpty() || title == QL1S("about:blank")) {
|
||||
return tr("Empty Page");
|
||||
return i18n("Empty Page");
|
||||
}
|
||||
|
||||
return title;
|
||||
|
@ -388,7 +390,7 @@ void WebView::printPage()
|
|||
Q_ASSERT(m_page);
|
||||
|
||||
QPrinter *printer = new QPrinter();
|
||||
printer->setCreator(tr("Falkon %1 (%2)").arg(Qz::VERSION, Qz::WWWADDRESS));
|
||||
printer->setCreator(i18n("Falkon %1 (%2)", Qz::VERSION, Qz::WWWADDRESS));
|
||||
printer->setDocName(QzTools::filterCharsFromFilename(title()));
|
||||
|
||||
QPrintDialog *dialog = new QPrintDialog(printer, this);
|
||||
|
@ -691,7 +693,7 @@ void WebView::createContextMenu(QMenu *menu, WebHitTestResult &hitTest)
|
|||
}
|
||||
|
||||
if (menu->actions().isEmpty()) {
|
||||
menu->addAction(tr("No suggestions"))->setEnabled(false);
|
||||
menu->addAction(i18n("No suggestions"))->setEnabled(false);
|
||||
}
|
||||
|
||||
menu->addSeparator();
|
||||
|
@ -742,21 +744,21 @@ void WebView::createContextMenu(QMenu *menu, WebHitTestResult &hitTest)
|
|||
|
||||
void WebView::createPageContextMenu(QMenu* menu)
|
||||
{
|
||||
QAction* action = menu->addAction(tr("&Back"), this, SLOT(back()));
|
||||
QAction* action = menu->addAction(i18n("&Back"), this, SLOT(back()));
|
||||
action->setIcon(IconProvider::standardIcon(QStyle::SP_ArrowBack));
|
||||
action->setEnabled(history()->canGoBack());
|
||||
|
||||
action = menu->addAction(tr("&Forward"), this, SLOT(forward()));
|
||||
action = menu->addAction(i18n("&Forward"), this, SLOT(forward()));
|
||||
action->setIcon(IconProvider::standardIcon(QStyle::SP_ArrowForward));
|
||||
action->setEnabled(history()->canGoForward());
|
||||
|
||||
// Special menu for Speed Dial page
|
||||
if (url().toString() == QL1S("falkon:speeddial")) {
|
||||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme("list-add"), tr("&Add New Page"), this, &WebView::addSpeedDial);
|
||||
menu->addAction(IconProvider::settingsIcon(), tr("&Configure Speed Dial"), this, &WebView::configureSpeedDial);
|
||||
menu->addAction(QIcon::fromTheme("list-add"), i18n("&Add New Page"), this, &WebView::addSpeedDial);
|
||||
menu->addAction(IconProvider::settingsIcon(), i18n("&Configure Speed Dial"), this, &WebView::configureSpeedDial);
|
||||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme(QSL("view-refresh")), tr("Reload All Dials"), this, &WebView::reloadAllSpeedDials);
|
||||
menu->addAction(QIcon::fromTheme(QSL("view-refresh")), i18n("Reload All Dials"), this, &WebView::reloadAllSpeedDials);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -775,43 +777,43 @@ void WebView::createPageContextMenu(QMenu* menu)
|
|||
});
|
||||
|
||||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme("bookmark-new"), tr("Book&mark page"), this, &WebView::bookmarkLink);
|
||||
menu->addAction(QIcon::fromTheme("document-save"), tr("&Save page as..."), this, &WebView::savePageAs);
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy page link"), this, &WebView::copyLinkToClipboard)->setData(url());
|
||||
menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send page link..."), this, &WebView::sendPageByMail);
|
||||
menu->addAction(QIcon::fromTheme("bookmark-new"), i18n("Book&mark page"), this, &WebView::bookmarkLink);
|
||||
menu->addAction(QIcon::fromTheme("document-save"), i18n("&Save page as..."), this, &WebView::savePageAs);
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), i18n("&Copy page link"), this, &WebView::copyLinkToClipboard)->setData(url());
|
||||
menu->addAction(QIcon::fromTheme("mail-message-new"), i18n("Send page link..."), this, &WebView::sendPageByMail);
|
||||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme("edit-select-all"), tr("Select &all"), this, &WebView::editSelectAll);
|
||||
menu->addAction(QIcon::fromTheme("edit-select-all"), i18n("Select &all"), this, &WebView::editSelectAll);
|
||||
menu->addSeparator();
|
||||
|
||||
const QString scheme = url().scheme();
|
||||
|
||||
if (scheme != QL1S("view-source") && WebPage::internalSchemes().contains(scheme)) {
|
||||
menu->addAction(QIcon::fromTheme("text-html"), tr("Show so&urce code"), this, &WebView::showSource);
|
||||
menu->addAction(QIcon::fromTheme("text-html"), i18n("Show so&urce code"), this, &WebView::showSource);
|
||||
}
|
||||
|
||||
if (SiteInfo::canShowSiteInfo(url()))
|
||||
menu->addAction(QIcon::fromTheme("dialog-information"), tr("Show info ab&out site"), this, &WebView::showSiteInfo);
|
||||
menu->addAction(QIcon::fromTheme("dialog-information"), i18n("Show info ab&out site"), this, &WebView::showSiteInfo);
|
||||
}
|
||||
|
||||
void WebView::createLinkContextMenu(QMenu* menu, const WebHitTestResult &hitTest)
|
||||
{
|
||||
menu->addSeparator();
|
||||
Action* act = new Action(IconProvider::newTabIcon(), tr("Open link in new &tab"));
|
||||
Action* act = new Action(IconProvider::newTabIcon(), i18n("Open link in new &tab"));
|
||||
act->setData(hitTest.linkUrl());
|
||||
connect(act, SIGNAL(triggered()), this, SLOT(userDefinedOpenUrlInNewTab()));
|
||||
connect(act, SIGNAL(ctrlTriggered()), this, SLOT(userDefinedOpenUrlInBgTab()));
|
||||
menu->addAction(act);
|
||||
menu->addAction(IconProvider::newWindowIcon(), tr("Open link in new &window"), this, &WebView::openUrlInNewWindow)->setData(hitTest.linkUrl());
|
||||
menu->addAction(IconProvider::privateBrowsingIcon(), tr("Open link in &private window"), mApp, SLOT(startPrivateBrowsing()))->setData(hitTest.linkUrl());
|
||||
menu->addAction(IconProvider::newWindowIcon(), i18n("Open link in new &window"), this, &WebView::openUrlInNewWindow)->setData(hitTest.linkUrl());
|
||||
menu->addAction(IconProvider::privateBrowsingIcon(), i18n("Open link in &private window"), mApp, SLOT(startPrivateBrowsing()))->setData(hitTest.linkUrl());
|
||||
menu->addSeparator();
|
||||
|
||||
QVariantList bData;
|
||||
bData << hitTest.linkUrl() << hitTest.linkTitle();
|
||||
menu->addAction(QIcon::fromTheme("bookmark-new"), tr("B&ookmark link"), this, &WebView::bookmarkLink)->setData(bData);
|
||||
menu->addAction(QIcon::fromTheme("bookmark-new"), i18n("B&ookmark link"), this, &WebView::bookmarkLink)->setData(bData);
|
||||
|
||||
menu->addAction(QIcon::fromTheme("document-save"), tr("&Save link as..."), this, &WebView::downloadLinkToDisk);
|
||||
menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send link..."), this, &WebView::sendTextByMail)->setData(hitTest.linkUrl().toEncoded());
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy link address"), this, &WebView::copyLinkToClipboard)->setData(hitTest.linkUrl());
|
||||
menu->addAction(QIcon::fromTheme("document-save"), i18n("&Save link as..."), this, &WebView::downloadLinkToDisk);
|
||||
menu->addAction(QIcon::fromTheme("mail-message-new"), i18n("Send link..."), this, &WebView::sendTextByMail)->setData(hitTest.linkUrl().toEncoded());
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), i18n("&Copy link address"), this, &WebView::copyLinkToClipboard)->setData(hitTest.linkUrl());
|
||||
menu->addSeparator();
|
||||
|
||||
if (!selectedText().isEmpty()) {
|
||||
|
@ -824,17 +826,17 @@ void WebView::createImageContextMenu(QMenu* menu, const WebHitTestResult &hitTes
|
|||
{
|
||||
menu->addSeparator();
|
||||
if (hitTest.imageUrl() != url()) {
|
||||
Action *act = new Action(tr("Show i&mage"));
|
||||
Action *act = new Action(i18n("Show i&mage"));
|
||||
act->setData(hitTest.imageUrl());
|
||||
connect(act, &QAction::triggered, this, &WebView::openActionUrl);
|
||||
connect(act, SIGNAL(ctrlTriggered()), this, SLOT(userDefinedOpenUrlInNewTab()));
|
||||
menu->addAction(act);
|
||||
}
|
||||
menu->addAction(tr("Copy image"), this, &WebView::copyImageToClipboard);
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), tr("Copy image ad&dress"), this, &WebView::copyLinkToClipboard)->setData(hitTest.imageUrl());
|
||||
menu->addAction(i18n("Copy image"), this, &WebView::copyImageToClipboard);
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), i18n("Copy image ad&dress"), this, &WebView::copyLinkToClipboard)->setData(hitTest.imageUrl());
|
||||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme("document-save"), tr("&Save image as..."), this, &WebView::downloadImageToDisk);
|
||||
menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send image..."), this, &WebView::sendTextByMail)->setData(hitTest.imageUrl().toEncoded());
|
||||
menu->addAction(QIcon::fromTheme("document-save"), i18n("&Save image as..."), this, &WebView::downloadImageToDisk);
|
||||
menu->addAction(QIcon::fromTheme("mail-message-new"), i18n("Send image..."), this, &WebView::sendTextByMail)->setData(hitTest.imageUrl().toEncoded());
|
||||
menu->addSeparator();
|
||||
|
||||
if (!selectedText().isEmpty()) {
|
||||
|
@ -853,7 +855,7 @@ void WebView::createSelectedTextContextMenu(QMenu* menu, const WebHitTestResult
|
|||
if (!menu->actions().contains(pageAction(QWebEnginePage::Copy))) {
|
||||
menu->addAction(pageAction(QWebEnginePage::Copy));
|
||||
}
|
||||
menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send text..."), this, &WebView::sendTextByMail)->setData(selectedText);
|
||||
menu->addAction(QIcon::fromTheme("mail-message-new"), i18n("Send text..."), this, &WebView::sendTextByMail)->setData(selectedText);
|
||||
menu->addSeparator();
|
||||
|
||||
// #379: Remove newlines
|
||||
|
@ -865,7 +867,7 @@ void WebView::createSelectedTextContextMenu(QMenu* menu, const WebHitTestResult
|
|||
QUrl guessedUrl = QUrl::fromUserInput(selectedString);
|
||||
|
||||
if (isUrlValid(guessedUrl)) {
|
||||
Action* act = new Action(QIcon::fromTheme("document-open-remote"), tr("Go to &web address"));
|
||||
Action* act = new Action(QIcon::fromTheme("document-open-remote"), i18n("Go to &web address"));
|
||||
act->setData(guessedUrl);
|
||||
|
||||
connect(act, &QAction::triggered, this, &WebView::openActionUrl);
|
||||
|
@ -879,13 +881,13 @@ void WebView::createSelectedTextContextMenu(QMenu* menu, const WebHitTestResult
|
|||
selectedText.replace(QLatin1Char('\n'), QLatin1Char(' ')).replace(QLatin1Char('\t'), QLatin1Char(' '));
|
||||
|
||||
SearchEngine engine = mApp->searchEnginesManager()->defaultEngine();
|
||||
Action* act = new Action(engine.icon, tr("Search \"%1 ..\" with %2").arg(selectedText, engine.name));
|
||||
Action* act = new Action(engine.icon, i18n("Search \"%1 ..\" with %2", selectedText, engine.name));
|
||||
connect(act, &QAction::triggered, this, &WebView::searchSelectedText);
|
||||
connect(act, &Action::ctrlTriggered, this, &WebView::searchSelectedTextInBackgroundTab);
|
||||
menu->addAction(act);
|
||||
|
||||
// Search with ...
|
||||
Menu* swMenu = new Menu(tr("Search with..."), menu);
|
||||
Menu* swMenu = new Menu(i18n("Search with..."), menu);
|
||||
swMenu->setCloseOnMiddleClick(true);
|
||||
SearchEnginesManager* searchManager = mApp->searchEnginesManager();
|
||||
foreach (const SearchEngine &en, searchManager->allEngines()) {
|
||||
|
@ -906,12 +908,12 @@ void WebView::createMediaContextMenu(QMenu *menu, const WebHitTestResult &hitTes
|
|||
bool muted = hitTest.mediaMuted();
|
||||
|
||||
menu->addSeparator();
|
||||
menu->addAction(paused ? tr("&Play") : tr("&Pause"), this, &WebView::toggleMediaPause)->setIcon(QIcon::fromTheme(paused ? "media-playback-start" : "media-playback-pause"));
|
||||
menu->addAction(muted ? tr("Un&mute") : tr("&Mute"), this, &WebView::toggleMediaMute)->setIcon(QIcon::fromTheme(muted ? "audio-volume-muted" : "audio-volume-high"));
|
||||
menu->addAction(paused ? i18n("&Play") : i18n("&Pause"), this, &WebView::toggleMediaPause)->setIcon(QIcon::fromTheme(paused ? "media-playback-start" : "media-playback-pause"));
|
||||
menu->addAction(muted ? i18n("Un&mute") : i18n("&Mute"), this, &WebView::toggleMediaMute)->setIcon(QIcon::fromTheme(muted ? "audio-volume-muted" : "audio-volume-high"));
|
||||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy Media Address"), this, &WebView::copyLinkToClipboard)->setData(hitTest.mediaUrl());
|
||||
menu->addAction(QIcon::fromTheme("mail-message-new"), tr("&Send Media Address"), this, &WebView::sendTextByMail)->setData(hitTest.mediaUrl().toEncoded());
|
||||
menu->addAction(QIcon::fromTheme("document-save"), tr("Save Media To &Disk"), this, &WebView::downloadMediaToDisk);
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), i18n("&Copy Media Address"), this, &WebView::copyLinkToClipboard)->setData(hitTest.mediaUrl());
|
||||
menu->addAction(QIcon::fromTheme("mail-message-new"), i18n("&Send Media Address"), this, &WebView::sendTextByMail)->setData(hitTest.mediaUrl().toEncoded());
|
||||
menu->addAction(QIcon::fromTheme("document-save"), i18n("Save Media To &Disk"), this, &WebView::downloadMediaToDisk);
|
||||
}
|
||||
|
||||
void WebView::checkForForm(QAction *action, const QPoint &pos)
|
||||
|
@ -930,7 +932,7 @@ void WebView::checkForForm(QAction *action, const QPoint &pos)
|
|||
if (!url.isEmpty() && (method == QL1S("get") || method == QL1S("post"))) {
|
||||
act->setVisible(true);
|
||||
act->setIcon(QIcon::fromTheme(QSL("edit-find"), QIcon(QSL(":icons/menu/search-icon.svg"))));
|
||||
act->setText(tr("Create Search Engine"));
|
||||
act->setText(i18n("Create Search Engine"));
|
||||
connect(act.data(), &QAction::triggered, this, &WebView::createSearchEngine);
|
||||
}
|
||||
});
|
||||
|
@ -971,47 +973,47 @@ void WebView::toggleMediaMute()
|
|||
void WebView::initializeActions()
|
||||
{
|
||||
QAction* undoAction = pageAction(QWebEnginePage::Undo);
|
||||
undoAction->setText(tr("&Undo"));
|
||||
undoAction->setText(i18n("&Undo"));
|
||||
undoAction->setShortcut(QKeySequence("Ctrl+Z"));
|
||||
undoAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
undoAction->setIcon(QIcon::fromTheme(QSL("edit-undo")));
|
||||
|
||||
QAction* redoAction = pageAction(QWebEnginePage::Redo);
|
||||
redoAction->setText(tr("&Redo"));
|
||||
redoAction->setText(i18n("&Redo"));
|
||||
redoAction->setShortcut(QKeySequence("Ctrl+Shift+Z"));
|
||||
redoAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
redoAction->setIcon(QIcon::fromTheme(QSL("edit-redo")));
|
||||
|
||||
QAction* cutAction = pageAction(QWebEnginePage::Cut);
|
||||
cutAction->setText(tr("&Cut"));
|
||||
cutAction->setText(i18n("&Cut"));
|
||||
cutAction->setShortcut(QKeySequence("Ctrl+X"));
|
||||
cutAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
cutAction->setIcon(QIcon::fromTheme(QSL("edit-cut")));
|
||||
|
||||
QAction* copyAction = pageAction(QWebEnginePage::Copy);
|
||||
copyAction->setText(tr("&Copy"));
|
||||
copyAction->setText(i18n("&Copy"));
|
||||
copyAction->setShortcut(QKeySequence("Ctrl+C"));
|
||||
copyAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
copyAction->setIcon(QIcon::fromTheme(QSL("edit-copy")));
|
||||
|
||||
QAction* pasteAction = pageAction(QWebEnginePage::Paste);
|
||||
pasteAction->setText(tr("&Paste"));
|
||||
pasteAction->setText(i18n("&Paste"));
|
||||
pasteAction->setShortcut(QKeySequence("Ctrl+V"));
|
||||
pasteAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
pasteAction->setIcon(QIcon::fromTheme(QSL("edit-paste")));
|
||||
|
||||
QAction* selectAllAction = pageAction(QWebEnginePage::SelectAll);
|
||||
selectAllAction->setText(tr("Select All"));
|
||||
selectAllAction->setText(i18n("Select All"));
|
||||
selectAllAction->setShortcut(QKeySequence("Ctrl+A"));
|
||||
selectAllAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
selectAllAction->setIcon(QIcon::fromTheme(QSL("edit-select-all")));
|
||||
|
||||
QAction* reloadAction = pageAction(QWebEnginePage::Reload);
|
||||
reloadAction->setText(tr("&Reload"));
|
||||
reloadAction->setText(i18n("&Reload"));
|
||||
reloadAction->setIcon(QIcon::fromTheme(QSL("view-refresh")));
|
||||
|
||||
QAction* stopAction = pageAction(QWebEnginePage::Stop);
|
||||
stopAction->setText(tr("S&top"));
|
||||
stopAction->setText(i18n("S&top"));
|
||||
stopAction->setIcon(QIcon::fromTheme(QSL("process-stop")));
|
||||
|
||||
// Make action shortcuts available for webview
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#include <QHostInfo>
|
||||
#include <QContextMenuEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
TabbedWebView::TabbedWebView(WebTab* webTab)
|
||||
: WebView(webTab)
|
||||
, m_window(0)
|
||||
|
@ -191,7 +193,7 @@ void TabbedWebView::_contextMenuEvent(QContextMenuEvent *event)
|
|||
|
||||
if (WebInspector::isEnabled()) {
|
||||
m_menu->addSeparator();
|
||||
m_menu->addAction(tr("Inspect Element"), this, &TabbedWebView::inspectElement);
|
||||
m_menu->addAction(i18n("Inspect Element"), this, &TabbedWebView::inspectElement);
|
||||
}
|
||||
|
||||
if (!m_menu->isEmpty()) {
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
#include <QTimer>
|
||||
#include <QSplitter>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
static const int savedTabVersion = 6;
|
||||
|
||||
WebTab::SavedTab::SavedTab()
|
||||
|
@ -621,7 +623,7 @@ void WebTab::titleWasChanged(const QString &title)
|
|||
}
|
||||
|
||||
if (m_isCurrentTab) {
|
||||
m_window->setWindowTitle(tr("%1 - Falkon").arg(title));
|
||||
m_window->setWindowTitle(i18n("%1 - Falkon", title));
|
||||
}
|
||||
|
||||
m_tabBar->setTabText(tabIndex(), title);
|
||||
|
|
|
@ -10,7 +10,6 @@ if (WIN32)
|
|||
set(SRCS ${SRCS} version.rc)
|
||||
configure_file(falkonversion.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/falkonversion.h)
|
||||
endif()
|
||||
ecm_create_qm_loader(SRCS falkon_qt)
|
||||
add_executable(falkon ${SRCS})
|
||||
|
||||
target_link_libraries(falkon FalkonPrivate)
|
||||
|
@ -32,13 +31,7 @@ endif()
|
|||
if (UNIX AND NOT APPLE)
|
||||
install(TARGETS falkon ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/falkon)
|
||||
if (KF5I18n_FOUND)
|
||||
ki18n_install(${CMAKE_SOURCE_DIR}/po)
|
||||
endif()
|
||||
ecm_install_po_files_as_qm(${CMAKE_SOURCE_DIR}/poqm)
|
||||
|
||||
install(PROGRAMS ../../linux/applications/org.kde.falkon.desktop DESTINATION ${KDE_INSTALL_APPDIR})
|
||||
|
||||
install(FILES ../../linux/pixmaps/falkon.png DESTINATION ${KDE_INSTALL_DATADIR}/pixmaps)
|
||||
|
||||
ecm_install_icons(ICONS
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user