1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

Make GnomeKeyring and KWallet plugins translatable.

This commit is contained in:
nowrep 2013-06-08 21:04:58 +02:00
parent f149aaebf2
commit 8e9ea139db
5 changed files with 45 additions and 9 deletions

View File

@ -62,6 +62,13 @@ bool GnomeKeyringPlugin::testPlugin()
return (QupZilla::VERSION == QLatin1String("1.5.0"));
}
QTranslator* GnomeKeyringPlugin::getTranslator(const QString &locale)
{
QTranslator* translator = new QTranslator(this);
translator->load(locale, ":/gkp/locale/");
return translator;
}
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(GnomeKeyringPasswords, GnomeKeyringPlugin)
#endif

View File

@ -39,6 +39,8 @@ public:
void unload();
bool testPlugin();
QTranslator* getTranslator(const QString &locale);
private:
GnomeKeyringPasswordBackend* m_backend;

View File

@ -62,10 +62,18 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GM_Icon</name>
<message>
<location filename="../gm_icon.cpp" line="29"/>
<source>Open GreaseMonkey settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GM_Manager</name>
<message>
<location filename="../gm_manager.cpp" line="185"/>
<location filename="../gm_manager.cpp" line="194"/>
<source>GreaseMonkey</source>
<translation type="unfinished"></translation>
</message>
@ -134,42 +142,52 @@
<context>
<name>GM_SettingsScriptInfo</name>
<message>
<location filename="../settings/gm_settingsscriptinfo.ui" line="19"/>
<location filename="../settings/gm_settingsscriptinfo.ui" line="85"/>
<source>Name:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/gm_settingsscriptinfo.ui" line="29"/>
<location filename="../settings/gm_settingsscriptinfo.ui" line="55"/>
<source>Version:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/gm_settingsscriptinfo.ui" line="39"/>
<location filename="../settings/gm_settingsscriptinfo.ui" line="115"/>
<source>URL:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/gm_settingsscriptinfo.ui" line="49"/>
<location filename="../settings/gm_settingsscriptinfo.ui" line="138"/>
<source>Namespace:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/gm_settingsscriptinfo.ui" line="155"/>
<source>Edit in text editor</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/gm_settingsscriptinfo.ui" line="65"/>
<source>Start at:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/gm_settingsscriptinfo.ui" line="59"/>
<location filename="../settings/gm_settingsscriptinfo.ui" line="45"/>
<source>Description:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/gm_settingsscriptinfo.ui" line="69"/>
<location filename="../settings/gm_settingsscriptinfo.ui" line="19"/>
<source>Runs at:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/gm_settingsscriptinfo.ui" line="79"/>
<location filename="../settings/gm_settingsscriptinfo.ui" line="128"/>
<source>Does not run at:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/gm_settingsscriptinfo.cpp" line="27"/>
<location filename="../settings/gm_settingsscriptinfo.cpp" line="43"/>
<source>Script Details of %1</source>
<translation type="unfinished"></translation>
</message>

View File

@ -62,6 +62,13 @@ bool KWalletPlugin::testPlugin()
return (QupZilla::VERSION == QLatin1String("1.5.0"));
}
QTranslator* KWalletPlugin::getTranslator(const QString &locale)
{
QTranslator* translator = new QTranslator(this);
translator->load(locale, ":/kwp/locale/");
return translator;
}
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(KWalletPasswords, KWalletPlugin)
#endif

View File

@ -39,6 +39,8 @@ public:
void unload();
bool testPlugin();
QTranslator* getTranslator(const QString &locale);
private:
KWalletPasswordBackend* m_backend;