Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
Falkon
Commits
2cce43a1
Unverified
Commit
2cce43a1
authored
Apr 22, 2019
by
David Rosca
Browse files
plugins: Port to KI18n
parent
0d3fea1c
Changes
52
Hide whitespace changes
Inline
Side-by-side
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"
));
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment