mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-19 18:26:34 +01:00
plugins: Port to KI18n
This commit is contained in:
parent
0d3fea1c93
commit
2cce43a1c3
@ -89,10 +89,10 @@ endif()
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
# Mandatory: KF5
|
||||
find_package(KF5 REQUIRED COMPONENTS I18n Archive)
|
||||
|
||||
# Optional: KWallet, KIO, KCrash, KCoreAddons
|
||||
set(KF5_MIN_VERSION "5.54.0")
|
||||
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS I18n Archive)
|
||||
|
||||
# Optional: KWallet, KIO, KCrash, KCoreAddons, KPurpose
|
||||
find_package(KF5Wallet ${KF5_MIN_VERSION} CONFIG)
|
||||
set_package_properties(KF5Wallet PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL)
|
||||
find_package(KF5KIO ${KF5_MIN_VERSION} CONFIG)
|
||||
|
@ -1,3 +1,3 @@
|
||||
#! /bin/sh
|
||||
$EXTRACTRC `find . -name \*.ui` >> rc.cpp
|
||||
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h'` -o $podir/falkon.pot
|
||||
$XGETTEXT `find . -name '*.cpp' -o -name '*.h'` -o $podir/falkon.pot
|
||||
|
@ -1,3 +1,5 @@
|
||||
add_definitions(-DTRANSLATION_DOMAIN="falkon_autoscroll")
|
||||
|
||||
set( AutoScroll_SRCS
|
||||
autoscrollplugin.cpp
|
||||
autoscroller.cpp
|
||||
@ -5,12 +7,10 @@ set( AutoScroll_SRCS
|
||||
autoscrollsettings.cpp
|
||||
)
|
||||
|
||||
ecm_create_qm_loader( AutoScroll_SRCS falkon_autoscroll_qt )
|
||||
|
||||
set( AutoScroll_UIS
|
||||
autoscrollsettings.ui
|
||||
)
|
||||
qt5_wrap_ui(UIS ${AutoScroll_UIS})
|
||||
ki18n_wrap_ui(UIS ${AutoScroll_UIS})
|
||||
|
||||
set( AutoScroll_RSCS
|
||||
autoscroll.qrc
|
||||
|
@ -1,2 +1,2 @@
|
||||
#! /bin/sh
|
||||
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_autoscroll_qt.pot
|
||||
$XGETTEXT `find . -name '*.cpp' -o -name '*.h'` -o $podir/falkon_autoscroll.pot
|
||||
|
@ -1,3 +1,5 @@
|
||||
add_definitions(-DTRANSLATION_DOMAIN="falkon_flashcookiemanager")
|
||||
|
||||
set( FlashCookieManager_SRCS
|
||||
fcm_plugin.cpp
|
||||
fcm_dialog.cpp
|
||||
@ -10,7 +12,7 @@ set( FlashCookieManager_UIS
|
||||
fcm_dialog.ui
|
||||
fcm_notification.ui
|
||||
)
|
||||
qt5_wrap_ui(UIS ${FlashCookieManager_UIS})
|
||||
ki18n_wrap_ui(UIS ${FlashCookieManager_UIS})
|
||||
|
||||
set( FlashCookieManager_RSCS
|
||||
flashcookiemanager.qrc
|
||||
|
@ -1,2 +1,2 @@
|
||||
#! /bin/sh
|
||||
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_flashcookiemanager_qt.pot
|
||||
$XGETTEXT `find . -name '*.cpp' -o -name '*.h'` -o $podir/falkon_flashcookiemanager.pot
|
||||
|
@ -31,6 +31,8 @@
|
||||
#include <QCloseEvent>
|
||||
#include <QMenu>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
FCM_Dialog::FCM_Dialog(FCM_Plugin* manager, QWidget* parent)
|
||||
: QDialog(parent, Qt::WindowStaysOnTopHint)
|
||||
, ui(new Ui::FCM_Dialog)
|
||||
@ -73,7 +75,7 @@ FCM_Dialog::FCM_Dialog(FCM_Plugin* manager, QWidget* parent)
|
||||
|
||||
ui->labelNotification->setEnabled(ui->autoMode->isChecked());
|
||||
|
||||
ui->search->setPlaceholderText(tr("Search"));
|
||||
ui->search->setPlaceholderText(i18n("Search"));
|
||||
ui->flashCookieTree->setDefaultItemShowMode(TreeWidget::ItemsCollapsed);
|
||||
ui->flashCookieTree->sortItems(0, Qt::AscendingOrder);
|
||||
ui->flashCookieTree->header()->setDefaultSectionSize(220);
|
||||
@ -90,8 +92,8 @@ FCM_Dialog::FCM_Dialog(FCM_Plugin* manager, QWidget* parent)
|
||||
|
||||
void FCM_Dialog::removeAll()
|
||||
{
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Confirmation"),
|
||||
tr("Are you sure you want to delete all flash 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 flash cookies on your computer?"), QMessageBox::Yes | QMessageBox::No);
|
||||
if (button != QMessageBox::Yes) {
|
||||
return;
|
||||
}
|
||||
@ -148,12 +150,12 @@ void FCM_Dialog::currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* p
|
||||
ui->textEdit->clear();
|
||||
const QVariant data = current->data(0, Qt::UserRole + 10);
|
||||
if (data.isNull()) {
|
||||
ui->name->setText(tr("<flash cookie not selected>"));
|
||||
ui->size->setText(tr("<flash cookie not selected>"));
|
||||
ui->server->setText(tr("<flash cookie not selected>"));
|
||||
ui->lastModified->setText(tr("<flash cookie not selected>"));
|
||||
ui->name->setText(i18n("<flash cookie not selected>"));
|
||||
ui->size->setText(i18n("<flash cookie not selected>"));
|
||||
ui->server->setText(i18n("<flash cookie not selected>"));
|
||||
ui->lastModified->setText(i18n("<flash cookie not selected>"));
|
||||
|
||||
ui->removeOne->setText(tr("Remove flash cookies"));
|
||||
ui->removeOne->setText(i18n("Remove flash cookies"));
|
||||
ui->path->hide();
|
||||
ui->labelPath->hide();
|
||||
return;
|
||||
@ -163,16 +165,16 @@ void FCM_Dialog::currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* p
|
||||
|
||||
QString suffix;
|
||||
if (flashCookie.path.startsWith(m_manager->flashPlayerDataPath() + QL1S("/macromedia.com/support/flashplayer/sys"))) {
|
||||
suffix = tr(" (settings)");
|
||||
suffix = i18n(" (settings)");
|
||||
}
|
||||
ui->name->setText(flashCookie.name + suffix);
|
||||
ui->size->setText(QString::number(flashCookie.size) + tr(" Byte"));
|
||||
ui->size->setText(QString::number(flashCookie.size) + i18n(" Byte"));
|
||||
ui->textEdit->setPlainText(flashCookie.contents);
|
||||
ui->server->setText(flashCookie.origin);
|
||||
ui->path->setText(QString("<a href=\"%1\">%2</a>").arg(QUrl::fromLocalFile(flashCookie.path).toString()).arg(QDir::toNativeSeparators(flashCookie.path)));
|
||||
ui->lastModified->setText(flashCookie.lastModification.toString());
|
||||
|
||||
ui->removeOne->setText(tr("Remove flash cookie"));
|
||||
ui->removeOne->setText(i18n("Remove flash cookie"));
|
||||
|
||||
ui->labelPath->show();
|
||||
ui->path->show();
|
||||
@ -234,11 +236,11 @@ void FCM_Dialog::refreshFlashCookiesTree()
|
||||
|
||||
QString suffix;
|
||||
if (flashCookie.path.startsWith(m_manager->flashPlayerDataPath() + QL1S("/macromedia.com/support/flashplayer/sys"))) {
|
||||
suffix = tr(" (settings)");
|
||||
suffix = i18n(" (settings)");
|
||||
}
|
||||
|
||||
if (m_manager->newCookiesList().contains(flashCookie.path + QL1C('/') + flashCookie.name)) {
|
||||
suffix += tr(" [new]");
|
||||
suffix += i18n(" [new]");
|
||||
QFont font = item->font(0);
|
||||
font.setBold(true);
|
||||
item->setFont(0, font);
|
||||
@ -274,7 +276,7 @@ void FCM_Dialog::refreshFilters()
|
||||
|
||||
void FCM_Dialog::addWhitelist()
|
||||
{
|
||||
const QString origin = QInputDialog::getText(this, tr("Add to whitelist"), tr("Origin:"));
|
||||
const QString origin = QInputDialog::getText(this, i18n("Add to whitelist"), i18n("Origin:"));
|
||||
|
||||
addWhitelist(origin);
|
||||
}
|
||||
@ -286,7 +288,7 @@ void FCM_Dialog::addWhitelist(const QString &origin)
|
||||
}
|
||||
|
||||
if (!ui->blackList->findItems(origin, Qt::MatchFixedString).isEmpty()) {
|
||||
QMessageBox::information(this, tr("Already whitelisted!"), tr("The server \"%1\" is already in blacklist, please remove it first.").arg(origin));
|
||||
QMessageBox::information(this, i18n("Already whitelisted!"), i18n("The server \"%1\" is already in blacklist, please remove it first.", origin));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -302,7 +304,7 @@ void FCM_Dialog::removeWhitelist()
|
||||
|
||||
void FCM_Dialog::addBlacklist()
|
||||
{
|
||||
const QString origin = QInputDialog::getText(this, tr("Add to blacklist"), tr("Origin:"));
|
||||
const QString origin = QInputDialog::getText(this, i18n("Add to blacklist"), i18n("Origin:"));
|
||||
|
||||
addBlacklist(origin);
|
||||
}
|
||||
@ -314,7 +316,7 @@ void FCM_Dialog::addBlacklist(const QString &origin)
|
||||
}
|
||||
|
||||
if (!ui->whiteList->findItems(origin, Qt::MatchFixedString).isEmpty()) {
|
||||
QMessageBox::information(this, tr("Already whitelisted!"), tr("The origin \"%1\" is already in whitelist, please remove it first.").arg(origin));
|
||||
QMessageBox::information(this, i18n("Already whitelisted!"), i18n("The origin \"%1\" is already in whitelist, please remove it first.", origin));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -371,8 +373,8 @@ void FCM_Dialog::reloadFromDisk()
|
||||
void FCM_Dialog::cookieTreeContextMenuRequested(const QPoint &pos)
|
||||
{
|
||||
QMenu menu;
|
||||
QAction* actAddBlacklist = menu.addAction(tr("Add to blacklist"));
|
||||
QAction* actAddWhitelist = menu.addAction(tr("Add to whitelist"));
|
||||
QAction* actAddBlacklist = menu.addAction(i18n("Add to blacklist"));
|
||||
QAction* actAddWhitelist = menu.addAction(i18n("Add to whitelist"));
|
||||
|
||||
QTreeWidgetItem* item = ui->flashCookieTree->itemAt(pos);
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include "iconprovider.h"
|
||||
#include "fcm_plugin.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
FCM_Notification::FCM_Notification(FCM_Plugin* manager, int newOriginsCount)
|
||||
: AnimatedWidget(AnimatedWidget::Down, 300, 0)
|
||||
, ui(new Ui::FCM_Notification)
|
||||
@ -31,10 +33,10 @@ FCM_Notification::FCM_Notification(FCM_Plugin* manager, int newOriginsCount)
|
||||
ui->close->setIcon(IconProvider::standardIcon(QStyle::SP_DialogCloseButton));
|
||||
|
||||
if (newOriginsCount == 1) {
|
||||
ui->textLabel->setText(tr("A new flash cookie was detected"));
|
||||
ui->textLabel->setText(i18n("A new flash cookie was detected"));
|
||||
}
|
||||
else {
|
||||
ui->textLabel->setText(tr("%1 new flash cookies were detected").arg(newOriginsCount));
|
||||
ui->textLabel->setText(i18n("%1 new flash cookies were detected", newOriginsCount));
|
||||
}
|
||||
connect(ui->buttonView, SIGNAL(clicked()), m_manager, SLOT(showFlashCookieManager()));
|
||||
connect(ui->buttonView, SIGNAL(clicked()), this, SLOT(hide()));
|
||||
|
@ -34,6 +34,8 @@
|
||||
#include <QDir>
|
||||
#include <QMenu>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
||||
#include <QProcessEnvironment>
|
||||
#endif
|
||||
@ -55,7 +57,7 @@ public:
|
||||
|
||||
QString name() const override
|
||||
{
|
||||
return tr("Flash Cookie Manager button");
|
||||
return i18n("Flash Cookie Manager button");
|
||||
}
|
||||
};
|
||||
|
||||
@ -123,7 +125,7 @@ void FCM_Plugin::showSettings(QWidget* parent)
|
||||
|
||||
void FCM_Plugin::populateExtensionsMenu(QMenu* menu)
|
||||
{
|
||||
QAction* showFCM = new QAction(QIcon(":/flashcookiemanager/data/flash-cookie-manager.png"), tr("Flash Cookie Manager"), menu);
|
||||
QAction* showFCM = new QAction(QIcon(":/flashcookiemanager/data/flash-cookie-manager.png"), i18n("Flash Cookie Manager"), menu);
|
||||
connect(showFCM, &QAction::triggered, this, &FCM_Plugin::showFlashCookieManager);
|
||||
menu->addAction(showFCM);
|
||||
}
|
||||
@ -353,8 +355,8 @@ AbstractButtonInterface* FCM_Plugin::createStatusBarIcon(BrowserWindow* mainWind
|
||||
|
||||
FCM_Button* icon = new FCM_Button(this);
|
||||
icon->setIcon(QIcon(QSL(":/flashcookiemanager/data/flash-cookie-manager.png")));
|
||||
icon->setTitle(tr("Flash Cookie Manager"));
|
||||
icon->setToolTip(tr("Show Flash Cookie Manager"));
|
||||
icon->setTitle(i18n("Flash Cookie Manager"));
|
||||
icon->setToolTip(i18n("Show Flash Cookie Manager"));
|
||||
connect(icon, &AbstractButtonInterface::clicked, this, &FCM_Plugin::showFlashCookieManager);
|
||||
|
||||
m_statusBarIcons.insert(mainWindow, icon);
|
||||
@ -435,7 +437,7 @@ QString FCM_Plugin::extractOriginFrom(const QString &path)
|
||||
else if (path.startsWith(flashPlayerDataPath() + QL1S("/macromedia.com/support/flashplayer/sys/"))) {
|
||||
origin.remove(flashPlayerDataPath() + QL1S("/macromedia.com/support/flashplayer/sys/"));
|
||||
if (origin == QL1S("settings.sol")) {
|
||||
return tr("!default");
|
||||
return i18n("!default");
|
||||
}
|
||||
else if (origin.startsWith(QL1C('#'))) {
|
||||
origin.remove(0, 1);
|
||||
@ -447,7 +449,7 @@ QString FCM_Plugin::extractOriginFrom(const QString &path)
|
||||
|
||||
int index = origin.indexOf(QL1C('/'));
|
||||
if (index == -1) {
|
||||
return tr("!other");
|
||||
return i18n("!other");
|
||||
}
|
||||
origin = origin.remove(index, origin.size());
|
||||
if (origin == QL1S("localhost") || origin == QL1S("local")) {
|
||||
|
@ -1,3 +1,5 @@
|
||||
add_definitions(-DTRANSLATION_DOMAIN="falkon_greasemonkey")
|
||||
|
||||
include_directories(settings)
|
||||
|
||||
set( GreaseMonkey_SRCS
|
||||
@ -15,15 +17,13 @@ set( GreaseMonkey_SRCS
|
||||
settings/gm_settingslistwidget.cpp
|
||||
)
|
||||
|
||||
ecm_create_qm_loader( GreaseMonkey_SRCS falkon_greasemonkey_qt )
|
||||
|
||||
set( GreaseMonkey_UIS
|
||||
gm_addscriptdialog.ui
|
||||
gm_notification.ui
|
||||
settings/gm_settings.ui
|
||||
settings/gm_settingsscriptinfo.ui
|
||||
)
|
||||
qt5_wrap_ui(UIS ${GreaseMonkey_UIS})
|
||||
ki18n_wrap_ui(UIS ${GreaseMonkey_UIS})
|
||||
|
||||
set( GreaseMonkey_RSCS
|
||||
greasemonkey.qrc
|
||||
|
@ -1,2 +1,2 @@
|
||||
#! /bin/sh
|
||||
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_greasemonkey_qt.pot
|
||||
$XGETTEXT `find . -name '*.cpp' -o -name '*.h'` -o $podir/falkon_greasemonkey.pot
|
||||
|
@ -31,6 +31,8 @@
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
GM_AddScriptDialog::GM_AddScriptDialog(GM_Manager* manager, GM_Script* script, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::GM_AddScriptDialog)
|
||||
@ -47,11 +49,11 @@ GM_AddScriptDialog::GM_AddScriptDialog(GM_Manager* manager, GM_Script* script, Q
|
||||
const QStringList exclude = script->exclude();
|
||||
|
||||
if (!include.isEmpty()) {
|
||||
runsAt = tr("<p>runs at<br/><i>%1</i></p>").arg(include.join("<br/>"));
|
||||
runsAt = i18n("<p>runs at<br/><i>%1</i></p>", include.join("<br/>"));
|
||||
}
|
||||
|
||||
if (!exclude.isEmpty()) {
|
||||
dontRunsAt = tr("<p>does not run at<br/><i>%1</i></p>").arg(exclude.join("<br/>"));
|
||||
dontRunsAt = i18n("<p>does not run at<br/><i>%1</i></p>", exclude.join("<br/>"));
|
||||
}
|
||||
|
||||
QString scriptInfo = QString("<b>%1</b> %2<br/>%3 %4 %5").arg(script->name(), script->version(), script->description(), runsAt, dontRunsAt);
|
||||
@ -81,10 +83,10 @@ void GM_AddScriptDialog::showSource()
|
||||
|
||||
void GM_AddScriptDialog::accepted()
|
||||
{
|
||||
QString message = tr("Cannot install script");
|
||||
QString message = i18n("Cannot install script");
|
||||
|
||||
if (m_manager->addScript(m_script)) {
|
||||
message = tr("'%1' installed successfully").arg(m_script->name());
|
||||
message = i18n("'%1' installed successfully", m_script->name());
|
||||
}
|
||||
|
||||
m_manager->showNotification(message);
|
||||
|
@ -20,13 +20,15 @@
|
||||
|
||||
#include "webview.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
GM_Icon::GM_Icon(GM_Manager *manager)
|
||||
: AbstractButtonInterface(manager)
|
||||
, m_manager(manager)
|
||||
{
|
||||
setIcon(QIcon(":gm/data/icon.svg"));
|
||||
setTitle(tr("GreaseMonkey"));
|
||||
setToolTip(tr("Open GreaseMonkey settings"));
|
||||
setTitle(i18n("GreaseMonkey"));
|
||||
setToolTip(i18n("Open GreaseMonkey settings"));
|
||||
|
||||
connect(this, &AbstractButtonInterface::clicked, this, &GM_Icon::openSettings);
|
||||
}
|
||||
@ -38,7 +40,7 @@ QString GM_Icon::id() const
|
||||
|
||||
QString GM_Icon::name() const
|
||||
{
|
||||
return tr("GreaseMonkey Icon");
|
||||
return i18n("GreaseMonkey Icon");
|
||||
}
|
||||
|
||||
void GM_Icon::openSettings()
|
||||
|
@ -39,6 +39,8 @@
|
||||
#include <QWebEngineProfile>
|
||||
#include <QWebEngineScriptCollection>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
GM_Manager::GM_Manager(const QString &sPath, QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_settingsPath(sPath)
|
||||
@ -74,7 +76,7 @@ void GM_Manager::downloadScript(const QUrl &url)
|
||||
deleteScript = dialog.exec() != QDialog::Accepted;
|
||||
}
|
||||
else {
|
||||
showNotification(tr("'%1' is already installed").arg(script->name()));
|
||||
showNotification(i18n("'%1' is already installed", script->name()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,7 +229,7 @@ void GM_Manager::showNotification(const QString &message, const QString &title)
|
||||
{
|
||||
QIcon icon(":gm/data/icon.svg");
|
||||
|
||||
mApp->desktopNotifications()->showNotification(icon.pixmap(48), title.isEmpty() ? tr("GreaseMonkey") : title, message);
|
||||
mApp->desktopNotifications()->showNotification(icon.pixmap(48), title.isEmpty() ? i18n("GreaseMonkey") : title, message);
|
||||
}
|
||||
|
||||
void GM_Manager::load()
|
||||
|
@ -24,6 +24,8 @@
|
||||
|
||||
#include <QFile>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
GM_Notification::GM_Notification(GM_Manager* manager, const QString &tmpfileName, const QString &fileName)
|
||||
: AnimatedWidget(AnimatedWidget::Down, 300, 0)
|
||||
, ui(new Ui::GM_Notification)
|
||||
@ -48,7 +50,7 @@ void GM_Notification::installScript()
|
||||
bool success = false;
|
||||
|
||||
GM_Script* script = 0;
|
||||
QString message = tr("Cannot install script");
|
||||
QString message = i18n("Cannot install script");
|
||||
|
||||
if (QFile::copy(m_tmpFileName, m_fileName)) {
|
||||
script = new GM_Script(m_manager, m_fileName);
|
||||
@ -56,7 +58,7 @@ void GM_Notification::installScript()
|
||||
}
|
||||
|
||||
if (success) {
|
||||
message = tr("'%1' installed successfully").arg(script->name());
|
||||
message = i18n("'%1' installed successfully", script->name());
|
||||
}
|
||||
|
||||
m_manager->showNotification(message);
|
||||
|
@ -28,6 +28,8 @@
|
||||
#include <QMessageBox>
|
||||
#include <QInputDialog>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
GM_Settings::GM_Settings(GM_Manager* manager, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::GM_Settings)
|
||||
@ -88,8 +90,8 @@ void GM_Settings::removeItem(QListWidgetItem* item)
|
||||
return;
|
||||
}
|
||||
|
||||
QMessageBox::StandardButton button = QMessageBox::question(this, tr("Remove script"),
|
||||
tr("Are you sure you want to remove '%1'?").arg(script->name()),
|
||||
QMessageBox::StandardButton button = QMessageBox::question(this, i18n("Remove script"),
|
||||
i18n("Are you sure you want to remove '%1'?", script->name()),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
|
||||
if (button == QMessageBox::Yes) {
|
||||
@ -119,7 +121,7 @@ void GM_Settings::openScriptsDirectory()
|
||||
|
||||
void GM_Settings::newScript()
|
||||
{
|
||||
const QString name = QInputDialog::getText(this, tr("Add script"), tr("Choose name for script:"));
|
||||
const QString name = QInputDialog::getText(this, i18n("Add script"), i18n("Choose name for script:"));
|
||||
if (name.isEmpty())
|
||||
return;
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include <QDesktopServices>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
GM_SettingsScriptInfo::GM_SettingsScriptInfo(GM_Script* script, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::GM_SettingsScriptInfo)
|
||||
@ -42,7 +44,7 @@ void GM_SettingsScriptInfo::editInTextEditor()
|
||||
|
||||
void GM_SettingsScriptInfo::loadScript()
|
||||
{
|
||||
setWindowTitle(tr("Script Details of %1").arg(m_script->name()));
|
||||
setWindowTitle(i18n("Script Details of %1", m_script->name()));
|
||||
|
||||
ui->name->setText(m_script->name());
|
||||
ui->nspace->setText(m_script->nameSpace());
|
||||
|
@ -1,11 +1,11 @@
|
||||
add_definitions(-DTRANSLATION_DOMAIN="falkon_kdeframeworksintegration")
|
||||
|
||||
set(KDEFrameworksIntegration_SRCS
|
||||
kdeframeworksintegrationplugin.cpp
|
||||
kwalletpasswordbackend.cpp
|
||||
kioschemehandler.cpp
|
||||
)
|
||||
|
||||
ecm_create_qm_loader(KDEFrameworksIntegration_SRCS falkon_kdeframeworksintegration_qt)
|
||||
|
||||
set(KDEFrameworksIntegration_RSCS
|
||||
kdeframeworksintegration.qrc
|
||||
)
|
||||
|
@ -1,2 +1,2 @@
|
||||
#! /bin/sh
|
||||
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_kdeframeworksintegration_qt.pot
|
||||
$XGETTEXT `find . -name '*.cpp' -o -name '*.h'` -o $podir/falkon_kdeframeworksintegration.pot
|
||||
|
@ -36,6 +36,8 @@
|
||||
#include <QWebEngineProfile>
|
||||
#include <QMenu>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
KDEFrameworksIntegrationPlugin::KDEFrameworksIntegrationPlugin()
|
||||
: QObject()
|
||||
{
|
||||
@ -66,7 +68,7 @@ void KDEFrameworksIntegrationPlugin::init(InitState state, const QString &settin
|
||||
}
|
||||
|
||||
m_sharePageMenu = new Purpose::Menu();
|
||||
m_sharePageMenu->setTitle(tr("Share page"));
|
||||
m_sharePageMenu->setTitle(i18n("Share page"));
|
||||
m_sharePageMenu->setIcon(QIcon::fromTheme(QStringLiteral("document-share")));
|
||||
m_sharePageMenu->model()->setPluginType(QStringLiteral("ShareUrl"));
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <QDateTime>
|
||||
|
||||
#include <KWallet>
|
||||
#include <KLocalizedString>
|
||||
|
||||
static PasswordEntry decodeEntry(const QByteArray &data)
|
||||
{
|
||||
@ -48,7 +49,7 @@ KWalletPasswordBackend::KWalletPasswordBackend()
|
||||
|
||||
QString KWalletPasswordBackend::name() const
|
||||
{
|
||||
return KDEFrameworksIntegrationPlugin::tr("KWallet");
|
||||
return i18n("KWallet");
|
||||
}
|
||||
|
||||
QVector<PasswordEntry> KWalletPasswordBackend::getEntries(const QUrl &url)
|
||||
|
@ -1,3 +1,5 @@
|
||||
add_definitions(-DTRANSLATION_DOMAIN="falkon_mousegestures")
|
||||
|
||||
include_directories(3rdparty)
|
||||
|
||||
set( MouseGestures_HDRS
|
||||
@ -14,12 +16,10 @@ set( MouseGestures_SRCS
|
||||
mousegesturessettingsdialog.cpp
|
||||
)
|
||||
|
||||
ecm_create_qm_loader( MouseGestures_SRCS falkon_mousegestures_qt )
|
||||
|
||||
set( MouseGestures_UIS
|
||||
mousegesturessettingsdialog.ui
|
||||
)
|
||||
qt5_wrap_ui(UIS ${MouseGestures_UIS})
|
||||
ki18n_wrap_ui(UIS ${MouseGestures_UIS})
|
||||
|
||||
set( MouseGestures_RSCS
|
||||
mousegestures.qrc
|
||||
|
@ -1,2 +1,2 @@
|
||||
#! /bin/sh
|
||||
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_mousegestures_qt.pot
|
||||
$XGETTEXT `find . -name '*.cpp' -o -name '*.h'` -o $podir/falkon_mousegestures.pot
|
||||
|
@ -1,15 +1,15 @@
|
||||
add_definitions(-DTRANSLATION_DOMAIN="falkon_pim")
|
||||
|
||||
set( PIM_SRCS
|
||||
PIM_plugin.cpp
|
||||
PIM_handler.cpp
|
||||
PIM_settings.cpp
|
||||
)
|
||||
|
||||
ecm_create_qm_loader( PIM_SRCS falkon_pim_qt )
|
||||
|
||||
set( PIM_UIS
|
||||
PIM_settings.ui
|
||||
)
|
||||
qt5_wrap_ui(UIS ${PIM_UIS})
|
||||
ki18n_wrap_ui(UIS ${PIM_UIS})
|
||||
|
||||
set( PIM_RSCS
|
||||
PIM_res.qrc
|
||||
|
@ -1,2 +1,2 @@
|
||||
#! /bin/sh
|
||||
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_pim_qt.pot
|
||||
$XGETTEXT `find . -name '*.cpp' -o -name '*.h'` -o $podir/falkon_pim.pot
|
||||
|
@ -28,6 +28,8 @@
|
||||
#include <QToolTip>
|
||||
#include <QKeyEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
PIM_Handler::PIM_Handler(const QString &sPath, QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_settingsFile(sPath + QL1S("/extensions.ini"))
|
||||
@ -56,20 +58,20 @@ void PIM_Handler::loadSettings()
|
||||
m_allInfo[PI_Special3] = settings.value("Special3", QString()).toString();
|
||||
settings.endGroup();
|
||||
|
||||
m_translations[PI_LastName] = tr("Last Name");
|
||||
m_translations[PI_FirstName] = tr("First Name");
|
||||
m_translations[PI_Email] = tr("E-mail");
|
||||
m_translations[PI_Mobile] = tr("Mobile");
|
||||
m_translations[PI_Phone] = tr("Phone");
|
||||
m_translations[PI_Address] = tr("Address");
|
||||
m_translations[PI_City] = tr("City");
|
||||
m_translations[PI_Zip] = tr("ZIP Code");
|
||||
m_translations[PI_State] = tr("State/Region");
|
||||
m_translations[PI_Country] = tr("Country");
|
||||
m_translations[PI_HomePage] = tr("Home Page");
|
||||
m_translations[PI_Special1] = tr("Custom 1");
|
||||
m_translations[PI_Special2] = tr("Custom 2");
|
||||
m_translations[PI_Special3] = tr("Custom 3");
|
||||
m_translations[PI_LastName] = i18n("Last Name");
|
||||
m_translations[PI_FirstName] = i18n("First Name");
|
||||
m_translations[PI_Email] = i18n("E-mail");
|
||||
m_translations[PI_Mobile] = i18n("Mobile");
|
||||
m_translations[PI_Phone] = i18n("Phone");
|
||||
m_translations[PI_Address] = i18n("Address");
|
||||
m_translations[PI_City] = i18n("City");
|
||||
m_translations[PI_Zip] = i18n("ZIP Code");
|
||||
m_translations[PI_State] = i18n("State/Region");
|
||||
m_translations[PI_Country] = i18n("Country");
|
||||
m_translations[PI_HomePage] = i18n("Home Page");
|
||||
m_translations[PI_Special1] = i18n("Custom 1");
|
||||
m_translations[PI_Special2] = i18n("Custom 2");
|
||||
m_translations[PI_Special3] = i18n("Custom 3");
|
||||
|
||||
m_infoMatches[PI_LastName] << "lastname" << "surname";
|
||||
m_infoMatches[PI_FirstName] << "firstname" << "name";
|
||||
@ -111,7 +113,7 @@ void PIM_Handler::populateWebViewMenu(QMenu* menu, WebView* view, const WebHitTe
|
||||
loadSettings();
|
||||
}
|
||||
|
||||
QMenu* pimMenu = new QMenu(tr("Insert Personal Information"));
|
||||
QMenu* pimMenu = new QMenu(i18n("Insert Personal Information"));
|
||||
pimMenu->setIcon(QIcon(":/PIM/data/PIM.png"));
|
||||
|
||||
if (!m_allInfo[PI_FirstName].isEmpty() && !m_allInfo[PI_LastName].isEmpty()) {
|
||||
@ -132,7 +134,7 @@ void PIM_Handler::populateWebViewMenu(QMenu* menu, WebView* view, const WebHitTe
|
||||
}
|
||||
|
||||
pimMenu->addSeparator();
|
||||
pimMenu->addAction(tr("Edit"), this, SLOT(showSettings()));
|
||||
pimMenu->addAction(i18n("Edit"), this, SLOT(showSettings()));
|
||||
|
||||
menu->addMenu(pimMenu);
|
||||
menu->addSeparator();
|
||||
|
@ -3,7 +3,7 @@ if(POLICY CMP0071)
|
||||
cmake_policy(SET CMP0071 NEW)
|
||||
endif()
|
||||
|
||||
# Get all relevant Qt include dirs, to pass them on to shiboken.
|
||||
# Get all relevant include dirs, to pass them on to shiboken.
|
||||
get_property(QT_CORE_INCLUDE_DIRS TARGET Qt5::Core PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_property(QT_GUI_INCLUDE_DIRS TARGET Qt5::Gui PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_property(QT_SQL_INCLUDE_DIRS TARGET Qt5::Sql PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
@ -11,7 +11,9 @@ get_property(QT_WIDGETS_INCLUDE_DIRS TARGET Qt5::Widgets PROPERTY INTERFACE_INCL
|
||||
get_property(QT_NETWORK_INCLUDE_DIRS TARGET Qt5::Network PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_property(QT_WEBENGINECORE_INCLUDE_DIRS TARGET Qt5::WebEngineCore PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_property(QT_WEBENGINEWIDGETS_INCLUDE_DIRS TARGET Qt5::WebEngineWidgets PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
set(QT_INCLUDE_DIRS
|
||||
get_property(KF5_I18N_INCLUDE_DIRS TARGET KF5::I18n PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_property(FalkonPrivate_INCLUDE_DIRS TARGET FalkonPrivate PROPERTY INCLUDE_DIRECTORIES)
|
||||
set(INCLUDE_DIRS
|
||||
${QT_CORE_INCLUDE_DIRS}
|
||||
${QT_GUI_INCLUDE_DIRS}
|
||||
${QT_SQL_INCLUDE_DIRS}
|
||||
@ -19,14 +21,12 @@ set(QT_INCLUDE_DIRS
|
||||
${QT_NETWORK_INCLUDE_DIRS}
|
||||
${QT_WEBENGINECORE_INCLUDE_DIRS}
|
||||
${QT_WEBENGINEWIDGETS_INCLUDE_DIRS}
|
||||
${KF5_I18N_INCLUDE_DIRS}
|
||||
${FalkonPrivate_INCLUDE_DIRS}
|
||||
)
|
||||
set(INCLUDES "")
|
||||
foreach(INCLUDE_DIR ${QT_INCLUDE_DIRS})
|
||||
list(APPEND INCLUDES "-I${INCLUDE_DIR}")
|
||||
endforeach()
|
||||
get_property(FalkonPrivate_INCLUDE_DIRS TARGET FalkonPrivate PROPERTY INCLUDE_DIRECTORIES)
|
||||
foreach(INCLUDE_DIR ${FalkonPrivate_INCLUDE_DIRS})
|
||||
list(APPEND INCLUDES "-I${INCLUDE_DIR}")
|
||||
set(SHIBOKEN_INCLUDES "")
|
||||
foreach(INCLUDE_DIR ${INCLUDE_DIRS})
|
||||
list(APPEND SHIBOKEN_INCLUDES "-I${INCLUDE_DIR}")
|
||||
endforeach()
|
||||
|
||||
# Set up the options to pass to shiboken.
|
||||
@ -36,7 +36,7 @@ set(TYPESYSTEM_FILE ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_pyfalkon.xml)
|
||||
set(SHIBOKEN_OPTIONS --generator-set=shiboken --enable-parent-ctor-heuristic
|
||||
--enable-pyside-extensions --enable-return-value-heuristic --use-isnull-as-nb_nonzero
|
||||
--avoid-protected-hack
|
||||
${INCLUDES}
|
||||
${SHIBOKEN_INCLUDES}
|
||||
-T${PYSIDE_TYPESYSTEMS}
|
||||
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
|
||||
--api-version="${Qt5_VERSION_MAJOR}.${Qt5_VERSION_MINOR}"
|
||||
|
@ -166,13 +166,7 @@
|
||||
<object-type name="TabMruModel"/>
|
||||
<object-type name="TabStackedWidget"/>
|
||||
<object-type name="TabTreeModel"/>
|
||||
<object-type name="TabWidget">
|
||||
<modify-function signature="addView(LoadRequest,QString,QFlags<Qz::NewTabPositionFlag>,bool,int,bool)">
|
||||
<modify-argument index="2">
|
||||
<replace-default-expression with="TabWidget::tr("New tab")"/>
|
||||
</modify-argument>
|
||||
</modify-function>
|
||||
</object-type>
|
||||
<object-type name="TabWidget"/>
|
||||
|
||||
<object-type name="AbstractButtonInterface">
|
||||
<object-type name="ClickController"/>
|
||||
|
@ -1,3 +1,5 @@
|
||||
add_definitions(-DTRANSLATION_DOMAIN="falkon_statusbaricons")
|
||||
|
||||
set( StatusBarIcons_SRCS
|
||||
statusbariconsplugin.cpp
|
||||
sbi_iconsmanager.cpp
|
||||
@ -13,14 +15,12 @@ set( StatusBarIcons_SRCS
|
||||
sbi_zoomwidget.cpp
|
||||
)
|
||||
|
||||
ecm_create_qm_loader( StatusBarIcons_SRCS falkon_statusbaricons_qt )
|
||||
|
||||
set( StatusBarIcons_UIS
|
||||
sbi_proxywidget.ui
|
||||
sbi_networkicondialog.ui
|
||||
sbi_settingsdialog.ui
|
||||
)
|
||||
qt5_wrap_ui(UIS ${StatusBarIcons_UIS})
|
||||
ki18n_wrap_ui(UIS ${StatusBarIcons_UIS})
|
||||
|
||||
set( StatusBarIcons_RSCS
|
||||
statusbaricons.qrc
|
||||
|
@ -1,2 +1,2 @@
|
||||
#! /bin/sh
|
||||
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_statusbaricons_qt.pot
|
||||
$XGETTEXT `find . -name '*.cpp' -o -name '*.h'` -o $podir/falkon_statusbaricons.pot
|
||||
|
@ -26,12 +26,14 @@
|
||||
#include <QSettings>
|
||||
#include <QMenu>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
SBI_ImagesIcon::SBI_ImagesIcon(BrowserWindow* window, const QString &settingsPath)
|
||||
: SBI_Icon(window, settingsPath)
|
||||
{
|
||||
setObjectName(QSL("sbi_imagesicon"));
|
||||
setCursor(Qt::PointingHandCursor);
|
||||
setToolTip(tr("Modify images loading settings per-site and globally"));
|
||||
setToolTip(i18n("Modify images loading settings per-site and globally"));
|
||||
|
||||
m_icon = QIcon::fromTheme("image-x-generic", QIcon(":sbi/data/images.png"));
|
||||
setPixmap(m_icon.pixmap(16));
|
||||
@ -55,19 +57,19 @@ void SBI_ImagesIcon::showMenu(const QPoint &point)
|
||||
boldFont.setBold(true);
|
||||
|
||||
QMenu menu;
|
||||
menu.addAction(m_icon, tr("Current Page Settings"))->setFont(boldFont);
|
||||
menu.addAction(m_icon, i18n("Current Page Settings"))->setFont(boldFont);
|
||||
|
||||
if (testCurrentPageWebAttribute(QWebEngineSettings::AutoLoadImages)) {
|
||||
menu.addAction(tr("Disable loading images (temporarily)"), this, &SBI_ImagesIcon::toggleLoadingImages);
|
||||
menu.addAction(i18n("Disable loading images (temporarily)"), this, &SBI_ImagesIcon::toggleLoadingImages);
|
||||
}
|
||||
else {
|
||||
menu.addAction(tr("Enable loading images (temporarily)"), this, &SBI_ImagesIcon::toggleLoadingImages);
|
||||
menu.addAction(i18n("Enable loading images (temporarily)"), this, &SBI_ImagesIcon::toggleLoadingImages);
|
||||
}
|
||||
|
||||
menu.addSeparator();
|
||||
menu.addAction(m_icon, tr("Global Settings"))->setFont(boldFont);
|
||||
menu.addAction(m_icon, i18n("Global Settings"))->setFont(boldFont);
|
||||
|
||||
QAction* act = menu.addAction(tr("Automatically load images"));
|
||||
QAction* act = menu.addAction(i18n("Automatically load images"));
|
||||
act->setCheckable(true);
|
||||
act->setChecked(m_loadingImages);
|
||||
connect(act, &QAction::toggled, this, &SBI_ImagesIcon::setGlobalLoadingImages);
|
||||
|
@ -26,12 +26,14 @@
|
||||
#include <QWebEngineSettings>
|
||||
#include <QMenu>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
SBI_JavaScriptIcon::SBI_JavaScriptIcon(BrowserWindow* window)
|
||||
: SBI_Icon(window)
|
||||
{
|
||||
setObjectName(QSL("sbi_javascripticon"));
|
||||
setCursor(Qt::PointingHandCursor);
|
||||
setToolTip(tr("Modify JavaScript settings per-site and globally"));
|
||||
setToolTip(i18n("Modify JavaScript settings per-site and globally"));
|
||||
|
||||
m_icon = QIcon::fromTheme("application-x-javascript", QIcon(":sbi/data/javascript.png"));
|
||||
setPixmap(m_icon.pixmap(16));
|
||||
@ -48,13 +50,13 @@ void SBI_JavaScriptIcon::showMenu(const QPoint &point)
|
||||
boldFont.setBold(true);
|
||||
|
||||
QMenu menu;
|
||||
menu.addAction(m_icon, tr("Current Page Settings"))->setFont(boldFont);
|
||||
menu.addAction(m_icon, i18n("Current Page Settings"))->setFont(boldFont);
|
||||
|
||||
if (testCurrentPageWebAttribute(QWebEngineSettings::JavascriptEnabled)) {
|
||||
menu.addAction(tr("Disable JavaScript (temporarily)"), this, &SBI_JavaScriptIcon::toggleJavaScript);
|
||||
menu.addAction(i18n("Disable JavaScript (temporarily)"), this, &SBI_JavaScriptIcon::toggleJavaScript);
|
||||
}
|
||||
else {
|
||||
menu.addAction(tr("Enable JavaScript (temporarily)"), this, &SBI_JavaScriptIcon::toggleJavaScript);
|
||||
menu.addAction(i18n("Enable JavaScript (temporarily)"), this, &SBI_JavaScriptIcon::toggleJavaScript);
|
||||
}
|
||||
|
||||
// JavaScript needs to be always enabled for falkon: sites
|
||||
@ -63,8 +65,8 @@ void SBI_JavaScriptIcon::showMenu(const QPoint &point)
|
||||
}
|
||||
|
||||
menu.addSeparator();
|
||||
menu.addAction(m_icon, tr("Global Settings"))->setFont(boldFont);
|
||||
menu.addAction(tr("Manage JavaScript settings"), this, &SBI_JavaScriptIcon::openJavaScriptSettings);
|
||||
menu.addAction(m_icon, i18n("Global Settings"))->setFont(boldFont);
|
||||
menu.addAction(i18n("Manage JavaScript settings"), this, &SBI_JavaScriptIcon::openJavaScriptSettings);
|
||||
menu.exec(point);
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include <QMenu>
|
||||
#include <QNetworkConfigurationManager>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
SBI_NetworkIcon::SBI_NetworkIcon(BrowserWindow* window)
|
||||
: SBI_Icon(window)
|
||||
, m_networkConfiguration(new QNetworkConfigurationManager(this))
|
||||
@ -62,9 +64,9 @@ void SBI_NetworkIcon::showMenu(const QPoint &pos)
|
||||
boldFont.setBold(true);
|
||||
|
||||
QMenu menu;
|
||||
menu.addAction(QIcon::fromTheme("preferences-system-network", QIcon(":sbi/data/preferences-network.png")), tr("Proxy Configuration"))->setFont(boldFont);
|
||||
menu.addAction(QIcon::fromTheme("preferences-system-network", QIcon(":sbi/data/preferences-network.png")), i18n("Proxy Configuration"))->setFont(boldFont);
|
||||
|
||||
QMenu* proxyMenu = menu.addMenu(tr("Select proxy"));
|
||||
QMenu* proxyMenu = menu.addMenu(i18n("Select proxy"));
|
||||
|
||||
const QHash<QString, SBI_NetworkProxy*> &proxies = SBINetManager->proxies();
|
||||
|
||||
@ -78,11 +80,11 @@ void SBI_NetworkIcon::showMenu(const QPoint &pos)
|
||||
}
|
||||
|
||||
if (proxyMenu->actions().count() == 0) {
|
||||
proxyMenu->addAction(tr("Empty"))->setEnabled(false);
|
||||
proxyMenu->addAction(i18n("Empty"))->setEnabled(false);
|
||||
}
|
||||
|
||||
menu.addSeparator();
|
||||
menu.addAction(tr("Manage proxies"), this, &SBI_NetworkIcon::showDialog);
|
||||
menu.addAction(i18n("Manage proxies"), this, &SBI_NetworkIcon::showDialog);
|
||||
menu.exec(pos);
|
||||
}
|
||||
|
||||
@ -98,23 +100,23 @@ void SBI_NetworkIcon::updateToolTip()
|
||||
QString tooltip = tr("Shows network status and manages proxy<br/><br/><b>Network:</b><br/>%1<br/><br/><b>Proxy:</b><br/>%2");
|
||||
|
||||
if (m_networkConfiguration->isOnline()) {
|
||||
tooltip = tooltip.arg(tr("Connected"));
|
||||
tooltip = tooltip.arg(i18n("Connected"));
|
||||
}
|
||||
else {
|
||||
tooltip = tooltip.arg(tr("Offline"));
|
||||
tooltip = tooltip.arg(i18n("Offline"));
|
||||
}
|
||||
|
||||
switch (QNetworkProxy::applicationProxy().type()) {
|
||||
case QNetworkProxy::DefaultProxy:
|
||||
tooltip = tooltip.arg(tr("System proxy"));
|
||||
tooltip = tooltip.arg(i18n("System proxy"));
|
||||
break;
|
||||
|
||||
case QNetworkProxy::NoProxy:
|
||||
tooltip = tooltip.arg(tr("No proxy"));
|
||||
tooltip = tooltip.arg(i18n("No proxy"));
|
||||
break;
|
||||
|
||||
default:
|
||||
tooltip = tooltip.arg(tr("User defined"));
|
||||
tooltip = tooltip.arg(i18n("User defined"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include <QInputDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
SBI_NetworkIconDialog::SBI_NetworkIconDialog(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::SBI_NetworkIconDialog)
|
||||
@ -54,7 +56,7 @@ SBI_NetworkIconDialog::SBI_NetworkIconDialog(QWidget* parent)
|
||||
|
||||
void SBI_NetworkIconDialog::addProxy()
|
||||
{
|
||||
const QString name = QInputDialog::getText(this, tr("Add proxy"), tr("Name of proxy:"));
|
||||
const QString name = QInputDialog::getText(this, i18n("Add proxy"), i18n("Name of proxy:"));
|
||||
if (name.isEmpty() || ui->comboBox->findText(name) > -1) {
|
||||
return;
|
||||
}
|
||||
@ -67,7 +69,7 @@ void SBI_NetworkIconDialog::addProxy()
|
||||
|
||||
void SBI_NetworkIconDialog::removeProxy()
|
||||
{
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Remove current proxy"), tr("Are you sure you want to remove current proxy?"),
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, i18n("Remove current proxy"), i18n("Are you sure you want to remove current proxy?"),
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
||||
|
||||
if (button != QMessageBox::Yes) {
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include "browserwindow.h"
|
||||
#include "tabwidget.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
SBI_ZoomWidget::SBI_ZoomWidget(BrowserWindow* parent)
|
||||
: QSlider(parent)
|
||||
, m_window(parent)
|
||||
@ -45,7 +47,7 @@ void SBI_ZoomWidget::valueChanged(int value)
|
||||
|
||||
if (view) {
|
||||
view->setZoomLevel(value);
|
||||
setToolTip(tr("Zoom: %1%").arg(view->zoomFactor() * 100));
|
||||
setToolTip(i18n("Zoom: %1%", view->zoomFactor() * 100));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
add_definitions(-DTRANSLATION_DOMAIN="falkon_tabmanager")
|
||||
|
||||
set( TabManager_SRCS
|
||||
tabmanagerplugin.cpp
|
||||
tabmanagerwidget.cpp
|
||||
@ -7,13 +9,11 @@ set( TabManager_SRCS
|
||||
tldextractor/tldextractor.cpp
|
||||
)
|
||||
|
||||
ecm_create_qm_loader( TabManager_SRCS falkon_tabmanager_qt )
|
||||
|
||||
set( TabManager_UIS
|
||||
tabmanagerwidget.ui
|
||||
tabmanagersettings.ui
|
||||
)
|
||||
qt5_wrap_ui(UIS ${TabManager_UIS})
|
||||
ki18n_wrap_ui(UIS ${TabManager_UIS})
|
||||
|
||||
set( TabManager_RSCS
|
||||
tabmanagerplugin.qrc
|
||||
|
@ -1,2 +1,2 @@
|
||||
#! /bin/sh
|
||||
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_tabmanager_qt.pot
|
||||
$XGETTEXT `find . -name '*.cpp' -o -name '*.h'` -o $podir/falkon_tabmanager.pot
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include <QLabel>
|
||||
#include <QMimeData>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
TLDExtractor* TabManagerWidget::s_tldExtractor = 0;
|
||||
|
||||
@ -108,13 +109,13 @@ QString TabManagerWidget::domainFromUrl(const QUrl &url, bool useHostName)
|
||||
QString urlString = url.toString();
|
||||
|
||||
if (url.scheme() == "file") {
|
||||
return tr("Local File System:");
|
||||
return i18n("Local File System:");
|
||||
}
|
||||
else if (url.scheme() == "falkon" || urlString.isEmpty()) {
|
||||
return tr("Falkon:");
|
||||
return i18n("Falkon:");
|
||||
}
|
||||
else if (url.scheme() == "ftp") {
|
||||
appendString.prepend(tr(" [FTP]"));
|
||||
appendString.prepend(i18n(" [FTP]"));
|
||||
}
|
||||
|
||||
QString host = url.host();
|
||||
@ -303,18 +304,18 @@ void TabManagerWidget::customContextMenuRequested(const QPoint &pos)
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
QAction* action;
|
||||
QMenu groupTypeSubmenu(tr("Group by"));
|
||||
action = groupTypeSubmenu.addAction(tr("&Window"), this, &TabManagerWidget::changeGroupType);
|
||||
QMenu groupTypeSubmenu(i18n("Group by"));
|
||||
action = groupTypeSubmenu.addAction(i18n("&Window"), this, &TabManagerWidget::changeGroupType);
|
||||
action->setData(GroupByWindow);
|
||||
action->setCheckable(true);
|
||||
action->setChecked(m_groupType == GroupByWindow);
|
||||
|
||||
action = groupTypeSubmenu.addAction(tr("&Domain"), this, &TabManagerWidget::changeGroupType);
|
||||
action = groupTypeSubmenu.addAction(i18n("&Domain"), this, &TabManagerWidget::changeGroupType);
|
||||
action->setData(GroupByDomain);
|
||||
action->setCheckable(true);
|
||||
action->setChecked(m_groupType == GroupByDomain);
|
||||
|
||||
action = groupTypeSubmenu.addAction(tr("&Host"), this, &TabManagerWidget::changeGroupType);
|
||||
action = groupTypeSubmenu.addAction(i18n("&Host"), this, &TabManagerWidget::changeGroupType);
|
||||
action->setData(GroupByHost);
|
||||
action->setCheckable(true);
|
||||
action->setChecked(m_groupType == GroupByHost);
|
||||
@ -322,16 +323,16 @@ void TabManagerWidget::customContextMenuRequested(const QPoint &pos)
|
||||
menu->addMenu(&groupTypeSubmenu);
|
||||
|
||||
if (m_isDefaultWidget) {
|
||||
menu->addAction(QIcon(":/tabmanager/data/side-by-side.png"), tr("&Show side by side"), this, &TabManagerWidget::showSideBySide)->setObjectName("sideBySide");
|
||||
menu->addAction(QIcon(":/tabmanager/data/side-by-side.png"), i18n("&Show side by side"), this, &TabManagerWidget::showSideBySide)->setObjectName("sideBySide");
|
||||
}
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
if (isTabSelected()) {
|
||||
menu->addAction(QIcon(":/tabmanager/data/tab-detach.png"), tr("&Detach checked tabs"), this, &TabManagerWidget::processActions)->setObjectName("detachSelection");
|
||||
menu->addAction(QIcon(":/tabmanager/data/tab-bookmark.png"), tr("Book&mark checked tabs"), this, &TabManagerWidget::processActions)->setObjectName("bookmarkSelection");
|
||||
menu->addAction(QIcon(":/tabmanager/data/tab-close.png"), tr("&Close checked tabs"), this, &TabManagerWidget::processActions)->setObjectName("closeSelection");
|
||||
menu->addAction(tr("&Unload checked tabs"), this, &TabManagerWidget::processActions)->setObjectName("unloadSelection");
|
||||
menu->addAction(QIcon(":/tabmanager/data/tab-detach.png"), i18n("&Detach checked tabs"), this, &TabManagerWidget::processActions)->setObjectName("detachSelection");
|
||||
menu->addAction(QIcon(":/tabmanager/data/tab-bookmark.png"), i18n("Book&mark checked tabs"), this, &TabManagerWidget::processActions)->setObjectName("bookmarkSelection");
|
||||
menu->addAction(QIcon(":/tabmanager/data/tab-close.png"), i18n("&Close checked tabs"), this, &TabManagerWidget::processActions)->setObjectName("closeSelection");
|
||||
menu->addAction(i18n("&Unload checked tabs"), this, &TabManagerWidget::processActions)->setObjectName("unloadSelection");
|
||||
}
|
||||
|
||||
menu->exec(ui->treeWidget->viewport()->mapToGlobal(pos));
|
||||
@ -583,8 +584,8 @@ bool TabManagerWidget::bookmarkSelectedTabs(const QHash<BrowserWindow*, WebTab*>
|
||||
layout->addWidget(folderButton);
|
||||
layout->addWidget(box);
|
||||
|
||||
label->setText(tr("Choose folder for bookmarks:"));
|
||||
dialog->setWindowTitle(tr("Bookmark Selected Tabs"));
|
||||
label->setText(i18n("Choose folder for bookmarks:"));
|
||||
dialog->setWindowTitle(i18n("Bookmark Selected Tabs"));
|
||||
|
||||
QSize size = dialog->size();
|
||||
size.setWidth(350);
|
||||
@ -702,8 +703,8 @@ QTreeWidgetItem* TabManagerWidget::groupByWindow()
|
||||
BrowserWindow* mainWin = windows.at(win);
|
||||
TabItem* winItem = new TabItem(ui->treeWidget, true, false);
|
||||
winItem->setBrowserWindow(mainWin);
|
||||
winItem->setText(0, tr("Window %1").arg(QString::number(win + 1)));
|
||||
winItem->setToolTip(0, tr("Double click to switch"));
|
||||
winItem->setText(0, i18n("Window %1", win + 1));
|
||||
winItem->setToolTip(0, i18n("Double click to switch"));
|
||||
winItem->setIsActiveOrCaption(win == currentWindowIdx);
|
||||
|
||||
QList<WebTab*> tabs = mainWin->tabWidget()->allTabs();
|
||||
|
@ -29,9 +29,10 @@
|
||||
#include <QDesktopWidget>
|
||||
#include <QAction>
|
||||
#include <QStyle>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
class TabManagerButton : public AbstractButtonInterface
|
||||
{
|
||||
public:
|
||||
@ -47,7 +48,7 @@ public:
|
||||
|
||||
QString name() const override
|
||||
{
|
||||
return tr("Tab Manager button");
|
||||
return i18n("Tab Manager button");
|
||||
}
|
||||
};
|
||||
|
||||
@ -65,12 +66,12 @@ TabManagerWidgetController::~TabManagerWidgetController()
|
||||
|
||||
QString TabManagerWidgetController::title() const
|
||||
{
|
||||
return tr("Tab Manager");
|
||||
return i18n("Tab Manager");
|
||||
}
|
||||
|
||||
QAction* TabManagerWidgetController::createMenuAction()
|
||||
{
|
||||
QAction* act = new QAction(tr("Tab Manager"), this);
|
||||
QAction* act = new QAction(i18n("Tab Manager"), this);
|
||||
act->setCheckable(true);
|
||||
act->setIcon(QIcon(":tabmanager/data/tabmanager.png"));
|
||||
act->setShortcut(QKeySequence("Ctrl+Shift+M"));
|
||||
@ -96,8 +97,8 @@ AbstractButtonInterface* TabManagerWidgetController::createStatusBarIcon(Browser
|
||||
|
||||
TabManagerButton* icon = new TabManagerButton(this);
|
||||
icon->setIcon(QPixmap(":tabmanager/data/tabmanager.png"));
|
||||
icon->setTitle(tr("Tab Manager"));
|
||||
icon->setToolTip(tr("Show Tab Manager"));
|
||||
icon->setTitle(i18n("Tab Manager"));
|
||||
icon->setToolTip(i18n("Show Tab Manager"));
|
||||
connect(icon, &AbstractButtonInterface::clicked, this, [=](AbstractButtonInterface::ClickController *c) {
|
||||
if (!defaultTabManager()) {
|
||||
return;
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include <QMessageBox>
|
||||
#include <QUrl>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
TLDExtractor* TLDExtractor::s_instance = 0;
|
||||
|
||||
TLDExtractor::TLDExtractor(QObject* parent)
|
||||
@ -257,10 +259,10 @@ void TLDExtractor::loadData()
|
||||
|
||||
if (!parsedDataFileExist) {
|
||||
const QString tldDataFileDownloadLink = QLatin1String("http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1");
|
||||
QMessageBox::information(0, tr("File not found!"),
|
||||
tr("File \'effective_tld_names.dat\' was not found!\n"
|
||||
"You can download it from \'<a href=\"%1\"><b>here</b></a>\' to one of the following paths:\n%2")
|
||||
.arg(tldDataFileDownloadLink).arg(m_dataSearchPaths.join("\n")));
|
||||
QMessageBox::information(0, i18n("File not found!"),
|
||||
i18n("File \'effective_tld_names.dat\' was not found!\n"
|
||||
"You can download it from \'<a href=\"%1\"><b>here</b></a>\' to one of the following paths:\n%2",
|
||||
tldDataFileDownloadLink, m_dataSearchPaths.join("\n")));
|
||||
|
||||
return;
|
||||
}
|
||||
@ -360,10 +362,10 @@ bool TLDExtractor::test()
|
||||
if (!testDataFileExist) {
|
||||
const QString testFileDownloadLink = QLatin1String("http://mxr.mozilla.org/mozilla-central/source/netwerk/test/unit/data/test_psl.txt?raw=1");
|
||||
|
||||
QMessageBox::information(0, tr("File not found!"),
|
||||
tr("File \'test_psl.txt\' was not found!\n"
|
||||
"You can download it from \'<a href=\"%1\"><b>here</b></a>\' to one of the following paths:\n%2")
|
||||
.arg(testFileDownloadLink).arg(m_dataSearchPaths.join("\n")));
|
||||
QMessageBox::information(0, i18n("File not found!"),
|
||||
i18n("File \'test_psl.txt\' was not found!\n"
|
||||
"You can download it from \'<a href=\"%1\"><b>here</b></a>\' to one of the following paths:\n%2",
|
||||
testFileDownloadLink, m_dataSearchPaths.join("\n")));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
add_definitions(-DTRANSLATION_DOMAIN="falkon_testplugin")
|
||||
|
||||
set( TestPlugin_SRCS
|
||||
testplugin.cpp
|
||||
testplugin_sidebar.cpp
|
||||
)
|
||||
|
||||
ecm_create_qm_loader( TestPlugin_SRCS falkon_testplugin_qt )
|
||||
|
||||
add_library(TestPlugin MODULE ${TestPlugin_SRCS} ${RSCS})
|
||||
install(TARGETS TestPlugin DESTINATION ${FALKON_INSTALL_PLUGINDIR})
|
||||
target_link_libraries(TestPlugin FalkonPrivate)
|
||||
|
@ -1,2 +1,2 @@
|
||||
#! /bin/sh
|
||||
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_testplugin_qt.pot
|
||||
$XGETTEXT `find . -name '*.cpp' -o -name '*.h'` -o $podir/falkon_testplugin.pot
|
||||
|
@ -28,6 +28,8 @@
|
||||
#include <QMenu>
|
||||
#include <QPushButton>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
TestPlugin::TestPlugin()
|
||||
: QObject()
|
||||
, m_view(0)
|
||||
@ -95,7 +97,7 @@ void TestPlugin::showSettings(QWidget* parent)
|
||||
if (!m_settings) {
|
||||
m_settings = new QDialog(parent);
|
||||
QPushButton* b = new QPushButton("Example Plugin v0.0.1");
|
||||
QPushButton* closeButton = new QPushButton(tr("Close"));
|
||||
QPushButton* closeButton = new QPushButton(i18n("Close"));
|
||||
QLabel* label = new QLabel();
|
||||
label->setPixmap(QPixmap(":icons/other/about.svg"));
|
||||
|
||||
@ -106,7 +108,7 @@ void TestPlugin::showSettings(QWidget* parent)
|
||||
m_settings.data()->setLayout(l);
|
||||
|
||||
m_settings.data()->setAttribute(Qt::WA_DeleteOnClose);
|
||||
m_settings.data()->setWindowTitle(tr("Example Plugin Settings"));
|
||||
m_settings.data()->setWindowTitle(i18n("Example Plugin Settings"));
|
||||
m_settings.data()->setWindowIcon(QIcon(":icons/falkon.svg"));
|
||||
connect(closeButton, SIGNAL(clicked()), m_settings.data(), SLOT(close()));
|
||||
}
|
||||
@ -136,7 +138,7 @@ void TestPlugin::populateWebViewMenu(QMenu* menu, WebView* view, const WebHitTes
|
||||
title += " on input";
|
||||
}
|
||||
|
||||
menu->addAction(tr("My first plugin action") + title, this, SLOT(actionSlot()));
|
||||
menu->addAction(i18n("My first plugin action") + title, this, SLOT(actionSlot()));
|
||||
}
|
||||
|
||||
bool TestPlugin::mousePress(Qz::ObjectName type, QObject* obj, QMouseEvent* event)
|
||||
@ -151,5 +153,5 @@ bool TestPlugin::mousePress(Qz::ObjectName type, QObject* obj, QMouseEvent* even
|
||||
|
||||
void TestPlugin::actionSlot()
|
||||
{
|
||||
QMessageBox::information(m_view, tr("Hello"), tr("First plugin action works :-)"));
|
||||
QMessageBox::information(m_view, i18n("Hello"), i18n("First plugin action works :-)"));
|
||||
}
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
TestPlugin_Sidebar::TestPlugin_Sidebar(QObject* parent)
|
||||
: SideBarInterface(parent)
|
||||
{
|
||||
@ -29,7 +31,7 @@ TestPlugin_Sidebar::TestPlugin_Sidebar(QObject* parent)
|
||||
|
||||
QString TestPlugin_Sidebar::title() const
|
||||
{
|
||||
return tr("Testing Sidebar");
|
||||
return i18n("Testing Sidebar");
|
||||
}
|
||||
|
||||
QAction* TestPlugin_Sidebar::createMenuAction()
|
||||
@ -37,7 +39,7 @@ QAction* TestPlugin_Sidebar::createMenuAction()
|
||||
// The action must be parented to some object from plugin, otherwise
|
||||
// there may be a crash when unloading the plugin.
|
||||
|
||||
QAction* act = new QAction(tr("Testing Sidebar"), this);
|
||||
QAction* act = new QAction(i18n("Testing Sidebar"), this);
|
||||
act->setCheckable(true);
|
||||
|
||||
return act;
|
||||
|
@ -1,3 +1,5 @@
|
||||
add_definitions(-DTRANSLATION_DOMAIN="falkon_verticaltabs")
|
||||
|
||||
set( VerticalTabs_SRCS
|
||||
verticaltabsplugin.cpp
|
||||
verticaltabscontroller.cpp
|
||||
@ -12,12 +14,10 @@ set( VerticalTabs_SRCS
|
||||
verticaltabsschemehandler.cpp
|
||||
)
|
||||
|
||||
ecm_create_qm_loader( VerticalTabs_SRCS falkon_verticaltabs_qt )
|
||||
|
||||
set( VerticalTabs_UIS
|
||||
verticaltabssettings.ui
|
||||
)
|
||||
qt5_wrap_ui(UIS ${VerticalTabs_UIS})
|
||||
ki18n_wrap_ui(UIS ${VerticalTabs_UIS})
|
||||
|
||||
set( VerticalTabs_RSCS
|
||||
verticaltabs.qrc
|
||||
|
@ -1,2 +1,2 @@
|
||||
#! /bin/sh
|
||||
$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_verticaltabs_qt.pot
|
||||
$XGETTEXT `find . -name '*.cpp' -o -name '*.h'` -o $podir/falkon_verticaltabs.pot
|
||||
|
@ -27,6 +27,8 @@
|
||||
#include <QToolTip>
|
||||
#include <QHoverEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
TabListView::TabListView(BrowserWindow *window, QWidget *parent)
|
||||
: QListView(parent)
|
||||
, m_window(window)
|
||||
@ -193,7 +195,7 @@ bool TabListView::viewportEvent(QEvent *event)
|
||||
DelegateButton button = buttonAt(he->pos(), index);
|
||||
if (button == AudioButton) {
|
||||
const bool muted = index.data(TabModel::AudioMutedRole).toBool();
|
||||
QToolTip::showText(he->globalPos(), muted ? tr("Unmute Tab") : tr("Mute Tab"), this, visualRect(index));
|
||||
QToolTip::showText(he->globalPos(), muted ? i18n("Unmute Tab") : i18n("Mute Tab"), this, visualRect(index));
|
||||
he->accept();
|
||||
return true;
|
||||
} else if (button == NoButton) {
|
||||
|
@ -28,6 +28,8 @@
|
||||
#include <QToolTip>
|
||||
#include <QHoverEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
TabTreeView::TabTreeView(BrowserWindow *window, QWidget *parent)
|
||||
: QTreeView(parent)
|
||||
, m_window(window)
|
||||
@ -303,11 +305,11 @@ bool TabTreeView::viewportEvent(QEvent *event)
|
||||
DelegateButton button = buttonAt(he->pos(), index);
|
||||
if (button == AudioButton) {
|
||||
const bool muted = index.data(TabModel::AudioMutedRole).toBool();
|
||||
QToolTip::showText(he->globalPos(), muted ? tr("Unmute Tab") : tr("Mute Tab"), this, visualRect(index));
|
||||
QToolTip::showText(he->globalPos(), muted ? i18n("Unmute Tab") : i18n("Mute Tab"), this, visualRect(index));
|
||||
he->accept();
|
||||
return true;
|
||||
} else if (button == CloseButton) {
|
||||
QToolTip::showText(he->globalPos(), tr("Close Tab"), this, visualRect(index));
|
||||
QToolTip::showText(he->globalPos(), i18n("Close Tab"), this, visualRect(index));
|
||||
he->accept();
|
||||
return true;
|
||||
} else if (button == NoButton) {
|
||||
@ -374,21 +376,21 @@ void TabTreeView::addMenuActions(QMenu *menu, const QModelIndex &index)
|
||||
}
|
||||
|
||||
menu->addSeparator();
|
||||
QMenu *m = menu->addMenu(tr("Tab Tree"));
|
||||
QMenu *m = menu->addMenu(i18n("Tab Tree"));
|
||||
|
||||
if (index.isValid() && model()->rowCount(index) > 0) {
|
||||
QPersistentModelIndex pindex = index;
|
||||
m->addAction(tr("Close Tree"), this, [=]() {
|
||||
m->addAction(i18n("Close Tree"), this, [=]() {
|
||||
closeTree(pindex);
|
||||
});
|
||||
m->addAction(tr("Unload Tree"), this, [=]() {
|
||||
m->addAction(i18n("Unload Tree"), this, [=]() {
|
||||
unloadTree(pindex);
|
||||
});
|
||||
}
|
||||
|
||||
m->addSeparator();
|
||||
m->addAction(tr("Expand All"), this, &TabTreeView::expandAll);
|
||||
m->addAction(tr("Collapse All"), this, &TabTreeView::collapseAll);
|
||||
m->addAction(i18n("Expand All"), this, &TabTreeView::expandAll);
|
||||
m->addAction(i18n("Collapse All"), this, &TabTreeView::collapseAll);
|
||||
}
|
||||
|
||||
void TabTreeView::reverseTraverse(const QModelIndex &root, const std::function<void(const QModelIndex&)> &callback) const
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include <QAction>
|
||||
#include <QKeyEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
VerticalTabsController::VerticalTabsController(VerticalTabsPlugin *plugin)
|
||||
: SideBarInterface(plugin)
|
||||
, m_plugin(plugin)
|
||||
@ -32,7 +34,7 @@ VerticalTabsController::VerticalTabsController(VerticalTabsPlugin *plugin)
|
||||
|
||||
QString VerticalTabsController::title() const
|
||||
{
|
||||
return tr("Vertical Tabs");
|
||||
return i18n("Vertical Tabs");
|
||||
}
|
||||
|
||||
QAction *VerticalTabsController::createMenuAction()
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include <QUrlQuery>
|
||||
#include <QWebEngineUrlRequestJob>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
VerticalTabsSchemeHandler::VerticalTabsSchemeHandler(QObject *parent)
|
||||
: ExtensionSchemeHandler(parent)
|
||||
{
|
||||
@ -44,7 +46,7 @@ QByteArray VerticalTabsSchemeHandler::indexPage() const
|
||||
{
|
||||
QString page = QzTools::readAllFileContents(QSL(":verticaltabs/data/index.html"));
|
||||
|
||||
page.replace(QSL("%NAME%"), tr("Vertical Tabs"));
|
||||
page.replace(QSL("%NAME%"), i18n("Vertical Tabs"));
|
||||
|
||||
return page.toUtf8();
|
||||
}
|
||||
@ -54,7 +56,7 @@ QByteArray VerticalTabsSchemeHandler::groupPage() const
|
||||
QString page = QzTools::readAllFileContents(QSL(":verticaltabs/data/group.html"));
|
||||
|
||||
page.replace(QSL("%FAVICON%"), QzTools::pixmapToDataUrl(QIcon(QSL(":verticaltabs/data/group.svg")).pixmap(16)).toString());
|
||||
page.replace(QSL("%NEW-GROUP%"), tr("New Group"));
|
||||
page.replace(QSL("%NEW-GROUP%"), i18n("New Group"));
|
||||
|
||||
return page.toUtf8();
|
||||
}
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include <QDir>
|
||||
#include <QFileDialog>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
VerticalTabsSettings::VerticalTabsSettings(VerticalTabsPlugin *plugin, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::VerticalTabsSettings)
|
||||
@ -58,7 +60,7 @@ void VerticalTabsSettings::themeValueChanged(int index)
|
||||
{
|
||||
const int customIndex = ui->theme->count() - 1;
|
||||
if (index == customIndex) {
|
||||
const QString path = QFileDialog::getOpenFileName(this, tr("Theme file"), QDir::homePath(), {QSL("*.css")});
|
||||
const QString path = QFileDialog::getOpenFileName(this, i18n("Theme file"), QDir::homePath(), {QSL("*.css")});
|
||||
if (path.isEmpty()) {
|
||||
loadThemes();
|
||||
} else {
|
||||
@ -83,7 +85,7 @@ void VerticalTabsSettings::loadThemes()
|
||||
}
|
||||
}
|
||||
ui->theme->setToolTip(m_plugin->theme());
|
||||
ui->theme->addItem(tr("Custom..."), found ? QString() : m_plugin->theme());
|
||||
ui->theme->addItem(i18n("Custom..."), found ? QString() : m_plugin->theme());
|
||||
if (!found) {
|
||||
ui->theme->setCurrentIndex(ui->theme->count() - 1);
|
||||
}
|
||||
|
@ -32,6 +32,8 @@
|
||||
#include <QVBoxLayout>
|
||||
#include <QWheelEvent>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
VerticalTabsWidget::VerticalTabsWidget(BrowserWindow *window)
|
||||
: QWidget()
|
||||
, m_window(window)
|
||||
@ -55,7 +57,7 @@ VerticalTabsWidget::VerticalTabsWidget(BrowserWindow *window)
|
||||
buttonAddTab->setObjectName(QSL("verticaltabs-button-addtab"));
|
||||
buttonAddTab->setAutoRaise(true);
|
||||
buttonAddTab->setFocusPolicy(Qt::NoFocus);
|
||||
buttonAddTab->setToolTip(tr("New Tab"));
|
||||
buttonAddTab->setToolTip(i18n("New Tab"));
|
||||
buttonAddTab->setIcon(QIcon::fromTheme(QSL("list-add")));
|
||||
buttonAddTab->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
connect(buttonAddTab, &QAbstractButton::clicked, m_window, &BrowserWindow::addTab);
|
||||
@ -197,7 +199,7 @@ void VerticalTabsWidget::updateGroupMenu()
|
||||
}
|
||||
|
||||
m_groupMenu->addSeparator();
|
||||
m_groupMenu->addAction(tr("Add New Group..."), this, [this]() {
|
||||
m_groupMenu->addAction(i18n("Add New Group..."), this, [this]() {
|
||||
m_window->tabWidget()->addView(QUrl(QSL("extension://verticaltabs/group")), Qz::NT_SelectedTab);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user