From 4d33b0431027d54b5d3411d174c75f0dfdacb461 Mon Sep 17 00:00:00 2001 From: nowrep Date: Sun, 2 Jun 2013 17:50:28 +0200 Subject: [PATCH] [StatusBarIcons] Make plugin translatable. --- src/plugins/StatusBarIcons/statusbariconsplugin.cpp | 7 +++++++ src/plugins/StatusBarIcons/statusbariconsplugin.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/plugins/StatusBarIcons/statusbariconsplugin.cpp b/src/plugins/StatusBarIcons/statusbariconsplugin.cpp index 4ca1ee464..0285332c4 100644 --- a/src/plugins/StatusBarIcons/statusbariconsplugin.cpp +++ b/src/plugins/StatusBarIcons/statusbariconsplugin.cpp @@ -75,6 +75,13 @@ bool StatusBarIconsPlugin::testPlugin() return (QupZilla::VERSION == QLatin1String("1.5.0")); } +QTranslator *StatusBarIconsPlugin::getTranslator(const QString &locale) +{ + QTranslator* translator = new QTranslator(this); + translator->load(locale, ":/sbi/locale/"); + return translator; +} + void StatusBarIconsPlugin::showSettings(QWidget* parent) { SBI_SettingsDialog dialog(m_manager, parent); diff --git a/src/plugins/StatusBarIcons/statusbariconsplugin.h b/src/plugins/StatusBarIcons/statusbariconsplugin.h index 45deb1b7f..25b7a439a 100644 --- a/src/plugins/StatusBarIcons/statusbariconsplugin.h +++ b/src/plugins/StatusBarIcons/statusbariconsplugin.h @@ -39,6 +39,7 @@ public: void unload(); bool testPlugin(); + QTranslator* getTranslator(const QString &locale); void showSettings(QWidget* parent = 0); private: