Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Falkon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Antonio Rojas
Falkon
Commits
2cce43a1
Unverified
Commit
2cce43a1
authored
Apr 22, 2019
by
David Rosca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugins: Port to KI18n
parent
0d3fea1c
Changes
52
Hide whitespace changes
Inline
Side-by-side
Showing
52 changed files
with
241 additions
and
192 deletions
+241
-192
CMakeLists.txt
CMakeLists.txt
+3
-3
src/lib/Messages.sh
src/lib/Messages.sh
+1
-1
src/plugins/AutoScroll/CMakeLists.txt
src/plugins/AutoScroll/CMakeLists.txt
+3
-3
src/plugins/AutoScroll/Messages.sh
src/plugins/AutoScroll/Messages.sh
+1
-1
src/plugins/FlashCookieManager/CMakeLists.txt
src/plugins/FlashCookieManager/CMakeLists.txt
+3
-1
src/plugins/FlashCookieManager/Messages.sh
src/plugins/FlashCookieManager/Messages.sh
+1
-1
src/plugins/FlashCookieManager/fcm_dialog.cpp
src/plugins/FlashCookieManager/fcm_dialog.cpp
+21
-19
src/plugins/FlashCookieManager/fcm_notification.cpp
src/plugins/FlashCookieManager/fcm_notification.cpp
+4
-2
src/plugins/FlashCookieManager/fcm_plugin.cpp
src/plugins/FlashCookieManager/fcm_plugin.cpp
+8
-6
src/plugins/GreaseMonkey/CMakeLists.txt
src/plugins/GreaseMonkey/CMakeLists.txt
+3
-3
src/plugins/GreaseMonkey/Messages.sh
src/plugins/GreaseMonkey/Messages.sh
+1
-1
src/plugins/GreaseMonkey/gm_addscriptdialog.cpp
src/plugins/GreaseMonkey/gm_addscriptdialog.cpp
+6
-4
src/plugins/GreaseMonkey/gm_icon.cpp
src/plugins/GreaseMonkey/gm_icon.cpp
+5
-3
src/plugins/GreaseMonkey/gm_manager.cpp
src/plugins/GreaseMonkey/gm_manager.cpp
+4
-2
src/plugins/GreaseMonkey/gm_notification.cpp
src/plugins/GreaseMonkey/gm_notification.cpp
+4
-2
src/plugins/GreaseMonkey/settings/gm_settings.cpp
src/plugins/GreaseMonkey/settings/gm_settings.cpp
+5
-3
src/plugins/GreaseMonkey/settings/gm_settingsscriptinfo.cpp
src/plugins/GreaseMonkey/settings/gm_settingsscriptinfo.cpp
+3
-1
src/plugins/KDEFrameworksIntegration/CMakeLists.txt
src/plugins/KDEFrameworksIntegration/CMakeLists.txt
+2
-2
src/plugins/KDEFrameworksIntegration/Messages.sh
src/plugins/KDEFrameworksIntegration/Messages.sh
+1
-1
src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.cpp
...EFrameworksIntegration/kdeframeworksintegrationplugin.cpp
+3
-1
src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp
...ugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp
+2
-1
src/plugins/MouseGestures/CMakeLists.txt
src/plugins/MouseGestures/CMakeLists.txt
+3
-3
src/plugins/MouseGestures/Messages.sh
src/plugins/MouseGestures/Messages.sh
+1
-1
src/plugins/PIM/CMakeLists.txt
src/plugins/PIM/CMakeLists.txt
+3
-3
src/plugins/PIM/Messages.sh
src/plugins/PIM/Messages.sh
+1
-1
src/plugins/PIM/PIM_handler.cpp
src/plugins/PIM/PIM_handler.cpp
+18
-16
src/plugins/PyFalkon/CMakeLists.txt
src/plugins/PyFalkon/CMakeLists.txt
+10
-10
src/plugins/PyFalkon/typesystem_pyfalkon.xml
src/plugins/PyFalkon/typesystem_pyfalkon.xml
+1
-7
src/plugins/StatusBarIcons/CMakeLists.txt
src/plugins/StatusBarIcons/CMakeLists.txt
+3
-3
src/plugins/StatusBarIcons/Messages.sh
src/plugins/StatusBarIcons/Messages.sh
+1
-1
src/plugins/StatusBarIcons/sbi_imagesicon.cpp
src/plugins/StatusBarIcons/sbi_imagesicon.cpp
+8
-6
src/plugins/StatusBarIcons/sbi_javascripticon.cpp
src/plugins/StatusBarIcons/sbi_javascripticon.cpp
+8
-6
src/plugins/StatusBarIcons/sbi_networkicon.cpp
src/plugins/StatusBarIcons/sbi_networkicon.cpp
+11
-9
src/plugins/StatusBarIcons/sbi_networkicondialog.cpp
src/plugins/StatusBarIcons/sbi_networkicondialog.cpp
+4
-2
src/plugins/StatusBarIcons/sbi_zoomwidget.cpp
src/plugins/StatusBarIcons/sbi_zoomwidget.cpp
+3
-1
src/plugins/TabManager/CMakeLists.txt
src/plugins/TabManager/CMakeLists.txt
+3
-3
src/plugins/TabManager/Messages.sh
src/plugins/TabManager/Messages.sh
+1
-1
src/plugins/TabManager/tabmanagerwidget.cpp
src/plugins/TabManager/tabmanagerwidget.cpp
+17
-16
src/plugins/TabManager/tabmanagerwidgetcontroller.cpp
src/plugins/TabManager/tabmanagerwidgetcontroller.cpp
+7
-6
src/plugins/TabManager/tldextractor/tldextractor.cpp
src/plugins/TabManager/tldextractor/tldextractor.cpp
+10
-8
src/plugins/TestPlugin/CMakeLists.txt
src/plugins/TestPlugin/CMakeLists.txt
+2
-2
src/plugins/TestPlugin/Messages.sh
src/plugins/TestPlugin/Messages.sh
+1
-1
src/plugins/TestPlugin/testplugin.cpp
src/plugins/TestPlugin/testplugin.cpp
+6
-4
src/plugins/TestPlugin/testplugin_sidebar.cpp
src/plugins/TestPlugin/testplugin_sidebar.cpp
+4
-2
src/plugins/VerticalTabs/CMakeLists.txt
src/plugins/VerticalTabs/CMakeLists.txt
+3
-3
src/plugins/VerticalTabs/Messages.sh
src/plugins/VerticalTabs/Messages.sh
+1
-1
src/plugins/VerticalTabs/tablistview.cpp
src/plugins/VerticalTabs/tablistview.cpp
+3
-1
src/plugins/VerticalTabs/tabtreeview.cpp
src/plugins/VerticalTabs/tabtreeview.cpp
+9
-7
src/plugins/VerticalTabs/verticaltabscontroller.cpp
src/plugins/VerticalTabs/verticaltabscontroller.cpp
+3
-1
src/plugins/VerticalTabs/verticaltabsschemehandler.cpp
src/plugins/VerticalTabs/verticaltabsschemehandler.cpp
+4
-2
src/plugins/VerticalTabs/verticaltabssettings.cpp
src/plugins/VerticalTabs/verticaltabssettings.cpp
+4
-2
src/plugins/VerticalTabs/verticaltabswidget.cpp
src/plugins/VerticalTabs/verticaltabswidget.cpp
+4
-2
No files found.
CMakeLists.txt
View file @
2cce43a1
...
...
@@ -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
)
...
...
src/lib/Messages.sh
View file @
2cce43a1
#! /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
src/plugins/AutoScroll/CMakeLists.txt
View file @
2cce43a1
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
...
...
src/plugins/AutoScroll/Messages.sh
View file @
2cce43a1
#! /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
src/plugins/FlashCookieManager/CMakeLists.txt
View file @
2cce43a1
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
...
...
src/plugins/FlashCookieManager/Messages.sh
View file @
2cce43a1
#! /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
src/plugins/FlashCookieManager/fcm_dialog.cpp
View file @
2cce43a1
...
...
@@ -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
);
...
...
src/plugins/FlashCookieManager/fcm_notification.cpp
View file @
2cce43a1
...
...
@@ -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
()));
...
...
src/plugins/FlashCookieManager/fcm_plugin.cpp
View file @
2cce43a1
...
...
@@ -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"
))
{
...
...
src/plugins/GreaseMonkey/CMakeLists.txt
View file @
2cce43a1
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
...
...
src/plugins/GreaseMonkey/Messages.sh
View file @
2cce43a1
#! /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
src/plugins/GreaseMonkey/gm_addscriptdialog.cpp
View file @
2cce43a1
...
...
@@ -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
);
...
...
src/plugins/GreaseMonkey/gm_icon.cpp
View file @
2cce43a1
...
...
@@ -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
()
...
...
src/plugins/GreaseMonkey/gm_manager.cpp
View file @
2cce43a1
...
...
@@ -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
()
...
...
src/plugins/GreaseMonkey/gm_notification.cpp
View file @
2cce43a1
...
...
@@ -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
);
...
...
src/plugins/GreaseMonkey/settings/gm_settings.cpp
View file @
2cce43a1
...
...
@@ -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
;
...
...
src/plugins/GreaseMonkey/settings/gm_settingsscriptinfo.cpp
View file @
2cce43a1
...
...
@@ -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
());
...
...
src/plugins/KDEFrameworksIntegration/CMakeLists.txt
View file @
2cce43a1
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
)
...
...
src/plugins/KDEFrameworksIntegration/Messages.sh
View file @
2cce43a1
#! /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
src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.cpp
View file @
2cce43a1
...
...
@@ -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"
));
...
...
src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp
View file @
2cce43a1
...
...
@@ -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
)
...
...
src/plugins/MouseGestures/CMakeLists.txt
View file @
2cce43a1
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
...
...
src/plugins/MouseGestures/Messages.sh
View file @
2cce43a1
#! /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
src/plugins/PIM/CMakeLists.txt
View file @
2cce43a1
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
...
...
src/plugins/PIM/Messages.sh
View file @
2cce43a1
#! /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
src/plugins/PIM/PIM_handler.cpp
View file @
2cce43a1
...
...
@@ -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"
);