diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-07-21 14:38:08 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-07-21 14:38:08 +0000 |
| commit | 0006966c0f307ec7dff51130ce26bbe3c7061418 (patch) | |
| tree | a9a760770de8b91c543e1308392bf2ec9e926a58 /src/plugins/General | |
| parent | 20967c016b4c63b75cb0af2b0f3ccc006addd6df (diff) | |
| download | qmmp-0006966c0f307ec7dff51130ce26bbe3c7061418.tar.gz qmmp-0006966c0f307ec7dff51130ce26bbe3c7061418.tar.bz2 qmmp-0006966c0f307ec7dff51130ce26bbe3c7061418.zip | |
changed translation api
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8196 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General')
34 files changed, 18 insertions, 188 deletions
diff --git a/src/plugins/General/converter/converterfactory.cpp b/src/plugins/General/converter/converterfactory.cpp index cda17108c..0254cda82 100644 --- a/src/plugins/General/converter/converterfactory.cpp +++ b/src/plugins/General/converter/converterfactory.cpp @@ -18,7 +18,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ - #include <QMessageBox> #include "converterhelper.h" #include "converterfactory.h" @@ -28,6 +27,7 @@ const GeneralProperties ConverterFactory::properties() const GeneralProperties properties; properties.name = tr("Converter Plugin"); properties.shortName = "converter"; + properties.translation = QLatin1String(":/converter_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -53,11 +53,3 @@ void ConverterFactory::showAbout(QWidget *parent) "using external command-line encoders") +"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } - -QTranslator *ConverterFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/converter_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/converter/converterfactory.h b/src/plugins/General/converter/converterfactory.h index 88017bfcf..83a7f3bf3 100644 --- a/src/plugins/General/converter/converterfactory.h +++ b/src/plugins/General/converter/converterfactory.h @@ -20,9 +20,7 @@ #ifndef CONVERTERFACTORY_H #define CONVERTERFACTORY_H - #include <QObject> -#include <QTranslator> #include <QDialog> #include <qmmpui/general.h> #include <qmmpui/generalfactory.h> @@ -40,7 +38,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); }; #endif diff --git a/src/plugins/General/copypaste/copypastefactory.cpp b/src/plugins/General/copypaste/copypastefactory.cpp index bbd189c55..458d6a764 100644 --- a/src/plugins/General/copypaste/copypastefactory.cpp +++ b/src/plugins/General/copypaste/copypastefactory.cpp @@ -28,6 +28,7 @@ const GeneralProperties CopyPasteFactory::properties() const GeneralProperties properties; properties.name = tr("Copy/Paste Plugin"); properties.shortName = "copypaste"; + properties.translation = QLatin1String(":/copypaste_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -51,11 +52,3 @@ void CopyPasteFactory::showAbout(QWidget *parent) tr("This plugin allows one to copy selected tracks from one playlist to another")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } - -QTranslator *CopyPasteFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/copypaste_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/copypaste/copypastefactory.h b/src/plugins/General/copypaste/copypastefactory.h index 0b8f5c7fa..1dda634e4 100644 --- a/src/plugins/General/copypaste/copypastefactory.h +++ b/src/plugins/General/copypaste/copypastefactory.h @@ -24,7 +24,6 @@ @author Ilya Kotov <forkotov02@ya.ru> */ #include <QObject> -#include <QTranslator> #include <QDialog> #include <qmmpui/general.h> #include <qmmpui/generalfactory.h> @@ -39,7 +38,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); }; #endif // COPYPASTEFACTORY_H diff --git a/src/plugins/General/covermanager/covermanagerfactory.cpp b/src/plugins/General/covermanager/covermanagerfactory.cpp index 1bdc22f99..ef79a0520 100644 --- a/src/plugins/General/covermanager/covermanagerfactory.cpp +++ b/src/plugins/General/covermanager/covermanagerfactory.cpp @@ -29,6 +29,7 @@ const GeneralProperties CoverManagerFactory::properties() const GeneralProperties properties; properties.name = tr("Cover Manager Plugin"); properties.shortName = "cover_manager"; + properties.translation = QLatin1String(":/covermanager_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -51,11 +52,3 @@ void CoverManagerFactory::showAbout(QWidget *parent) tr("Qmmp Cover Manager Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } - -QTranslator *CoverManagerFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/covermanager_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/covermanager/covermanagerfactory.h b/src/plugins/General/covermanager/covermanagerfactory.h index c0394cc75..c9c78a277 100644 --- a/src/plugins/General/covermanager/covermanagerfactory.h +++ b/src/plugins/General/covermanager/covermanagerfactory.h @@ -24,7 +24,6 @@ @author Ilya Kotov <forkotov02@ya.ru> */ #include <QObject> -#include <QTranslator> #include <qmmpui/general.h> #include <qmmpui/generalfactory.h> @@ -39,8 +38,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); - }; #endif diff --git a/src/plugins/General/fileops/fileopsfactory.cpp b/src/plugins/General/fileops/fileopsfactory.cpp index 799d9e3db..12dfd08a0 100644 --- a/src/plugins/General/fileops/fileopsfactory.cpp +++ b/src/plugins/General/fileops/fileopsfactory.cpp @@ -29,6 +29,7 @@ const GeneralProperties FileOpsFactory::properties() const GeneralProperties properties; properties.name = tr("File Operations Plugin"); properties.shortName = "fileops"; + properties.translation = QLatin1String(":/fileops_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -51,11 +52,3 @@ void FileOpsFactory::showAbout(QWidget *parent) tr("Qmmp File Operations Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } - -QTranslator *FileOpsFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/fileops_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/fileops/fileopsfactory.h b/src/plugins/General/fileops/fileopsfactory.h index 5d070c2a6..1118b67b9 100644 --- a/src/plugins/General/fileops/fileopsfactory.h +++ b/src/plugins/General/fileops/fileopsfactory.h @@ -24,7 +24,6 @@ @author Ilya Kotov <forkotov02@ya.ru> */ #include <QObject> -#include <QTranslator> #include <QDialog> #include <qmmpui/general.h> @@ -40,7 +39,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); }; #endif diff --git a/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp b/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp index 82c535c28..5e9ba1c7b 100644 --- a/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp +++ b/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp @@ -18,7 +18,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ - #include <QMessageBox> #include <qmmp/qmmp.h> #include "mediakeys.h" @@ -29,6 +28,7 @@ const GeneralProperties GnomeHotkeyFactory::properties() const GeneralProperties properties; properties.name = tr("Gnome Hotkey Plugin"); properties.shortName = "gnomehotkey"; + properties.translation = QLatin1String(":/gnomehotkey_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -53,11 +53,3 @@ void GnomeHotkeyFactory::showAbout(QWidget *parent) tr("This plugin adds support of the GNOME/Cinnamon hotkeys") + "\n" + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } - -QTranslator *GnomeHotkeyFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/gnomehotkey_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/gnomehotkey/gnomehotkeyfactory.h b/src/plugins/General/gnomehotkey/gnomehotkeyfactory.h index 0210dde80..ebe082435 100644 --- a/src/plugins/General/gnomehotkey/gnomehotkeyfactory.h +++ b/src/plugins/General/gnomehotkey/gnomehotkeyfactory.h @@ -22,7 +22,6 @@ #include <QObject> -#include <QTranslator> #include <qmmpui/general.h> #include <qmmpui/generalfactory.h> @@ -39,8 +38,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); - }; #endif diff --git a/src/plugins/General/hal/halfactory.cpp b/src/plugins/General/hal/halfactory.cpp index cbdd0d825..6046ba105 100644 --- a/src/plugins/General/hal/halfactory.cpp +++ b/src/plugins/General/hal/halfactory.cpp @@ -18,7 +18,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ - #include <QMessageBox> #include <qmmp/qmmp.h> #include "settingsdialog.h" @@ -30,6 +29,7 @@ const GeneralProperties HalFactory::properties() const GeneralProperties properties; properties.name = tr("HAL Plugin"); properties.shortName = "hal"; + properties.translation = QLatin1String(":/hal_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -54,11 +54,3 @@ void HalFactory::showAbout(QWidget *parent) tr("Written by: Ilya Kotov <forkotov02@ya.ru>") + "\n" + tr("Based on Solid (KDE hardware library)")); } - -QTranslator *HalFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/hal_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/hal/halfactory.h b/src/plugins/General/hal/halfactory.h index 02c063993..a2b8b5ed9 100644 --- a/src/plugins/General/hal/halfactory.h +++ b/src/plugins/General/hal/halfactory.h @@ -24,8 +24,6 @@ @author Ilya Kotov <forkotov02@ya.ru> */ #include <QObject> -#include <QTranslator> - #include <qmmpui/general.h> #include <qmmpui/generalfactory.h> @@ -39,8 +37,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); - }; #endif diff --git a/src/plugins/General/hotkey/hotkeyfactory.cpp b/src/plugins/General/hotkey/hotkeyfactory.cpp index 72c3ed9ab..7092e1d06 100644 --- a/src/plugins/General/hotkey/hotkeyfactory.cpp +++ b/src/plugins/General/hotkey/hotkeyfactory.cpp @@ -30,6 +30,7 @@ const GeneralProperties HotkeyFactory::properties() const GeneralProperties properties; properties.name = tr("Global Hotkey Plugin"); properties.shortName = "hotkey"; + properties.translation = QLatin1String(":/hotkey_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -59,11 +60,3 @@ void HotkeyFactory::showAbout(QWidget *parent) tr("This plugin adds support for multimedia keys or global key combinations")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } - -QTranslator *HotkeyFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/hotkey_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/hotkey/hotkeyfactory.h b/src/plugins/General/hotkey/hotkeyfactory.h index d4f1618a5..98e8cbcac 100644 --- a/src/plugins/General/hotkey/hotkeyfactory.h +++ b/src/plugins/General/hotkey/hotkeyfactory.h @@ -24,8 +24,6 @@ @author Ilya Kotov <forkotov02@ya.ru> */ #include <QObject> -#include <QTranslator> - #include <qmmpui/general.h> #include <qmmpui/generalfactory.h> @@ -39,7 +37,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); }; #endif diff --git a/src/plugins/General/kdenotify/kdenotifyfactory.cpp b/src/plugins/General/kdenotify/kdenotifyfactory.cpp index c36ec0675..1597f3eb6 100644 --- a/src/plugins/General/kdenotify/kdenotifyfactory.cpp +++ b/src/plugins/General/kdenotify/kdenotifyfactory.cpp @@ -28,6 +28,7 @@ const GeneralProperties KdeNotifyFactory::properties() const GeneralProperties properties; properties.name = tr("KDE notification plugin"); properties.shortName = "kdenotify_icon"; + properties.translation = QLatin1String(":/kdenotify_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -50,11 +51,3 @@ void KdeNotifyFactory::showAbout(QWidget *parent) tr("KDE notification plugin for Qmmp") + "<br>" "Artur Guzik <a.guzik88@gmail.com>"); } - -QTranslator *KdeNotifyFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/kdenotify_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/kdenotify/kdenotifyfactory.h b/src/plugins/General/kdenotify/kdenotifyfactory.h index 1c6f7543a..083a95e6c 100644 --- a/src/plugins/General/kdenotify/kdenotifyfactory.h +++ b/src/plugins/General/kdenotify/kdenotifyfactory.h @@ -22,7 +22,6 @@ #define KDENOTIFYFACTORY_H #include <QObject> -#include <QTranslator> #include <QDialog> #include <qmmpui/general.h> @@ -38,7 +37,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); }; #endif // KDENOTIFYFACTORY_H diff --git a/src/plugins/General/lyrics/lyricsfactory.cpp b/src/plugins/General/lyrics/lyricsfactory.cpp index 60cb001f1..cf1440469 100644 --- a/src/plugins/General/lyrics/lyricsfactory.cpp +++ b/src/plugins/General/lyrics/lyricsfactory.cpp @@ -28,6 +28,7 @@ const GeneralProperties LyricsFactory::properties() const GeneralProperties properties; properties.name = tr("Lyrics Plugin"); properties.shortName = "lyrics"; + properties.translation = QLatin1String(":/lyrics_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -52,11 +53,3 @@ void LyricsFactory::showAbout(QWidget *parent) tr("This plugin retrieves lyrics from LyricWiki")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } - -QTranslator *LyricsFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/lyrics_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/lyrics/lyricsfactory.h b/src/plugins/General/lyrics/lyricsfactory.h index 6d61e864c..fdcddb897 100644 --- a/src/plugins/General/lyrics/lyricsfactory.h +++ b/src/plugins/General/lyrics/lyricsfactory.h @@ -24,7 +24,6 @@ @author Ilya Kotov <forkotov02@ya.ru> */ #include <QObject> -#include <QTranslator> #include <QDialog> #include <qmmpui/general.h> @@ -40,7 +39,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); }; #endif diff --git a/src/plugins/General/mpris/mprisfactory.cpp b/src/plugins/General/mpris/mprisfactory.cpp index 30c013713..645d42480 100644 --- a/src/plugins/General/mpris/mprisfactory.cpp +++ b/src/plugins/General/mpris/mprisfactory.cpp @@ -29,6 +29,7 @@ const GeneralProperties MPRISFactory::properties() const GeneralProperties properties; properties.name = tr("MPRIS Plugin"); properties.shortName = "mpris"; + properties.translation = QLatin1String(":/mpris_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -51,11 +52,3 @@ void MPRISFactory::showAbout(QWidget *parent) tr("Qmmp MPRIS Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } - -QTranslator *MPRISFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/mpris_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/mpris/mprisfactory.h b/src/plugins/General/mpris/mprisfactory.h index 7d1fd85e3..28abf020e 100644 --- a/src/plugins/General/mpris/mprisfactory.h +++ b/src/plugins/General/mpris/mprisfactory.h @@ -24,7 +24,6 @@ @author Ilya Kotov <forkotov02@ya.ru> */ #include <QObject> -#include <QTranslator> #include <qmmpui/general.h> #include <qmmpui/generalfactory.h> @@ -39,8 +38,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); - }; #endif diff --git a/src/plugins/General/notifier/notifierfactory.cpp b/src/plugins/General/notifier/notifierfactory.cpp index 1e6f47d36..e69aa2b20 100644 --- a/src/plugins/General/notifier/notifierfactory.cpp +++ b/src/plugins/General/notifier/notifierfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 by Ilya Kotov * + * Copyright (C) 2008-2018 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -18,7 +18,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ - #include <QMessageBox> #include "notifier.h" #include "settingsdialog.h" @@ -29,6 +28,7 @@ const GeneralProperties NotifierFactory::properties() const GeneralProperties properties; properties.name = tr("Notifier Plugin"); properties.shortName = "notifier"; + properties.translation = QLatin1String(":/notifier_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -51,11 +51,3 @@ void NotifierFactory::showAbout(QWidget *parent) tr("Qmmp Notifier Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } - -QTranslator *NotifierFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/notifier_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/notifier/notifierfactory.h b/src/plugins/General/notifier/notifierfactory.h index a968c9c67..764ed45f5 100644 --- a/src/plugins/General/notifier/notifierfactory.h +++ b/src/plugins/General/notifier/notifierfactory.h @@ -24,7 +24,6 @@ @author Ilya Kotov <forkotov02@ya.ru> */ #include <QObject> -#include <QTranslator> #include <QDialog> #include <qmmpui/general.h> @@ -40,7 +39,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); }; #endif diff --git a/src/plugins/General/rgscan/rgscanfactory.cpp b/src/plugins/General/rgscan/rgscanfactory.cpp index 1bc3545fe..fe89a62c1 100644 --- a/src/plugins/General/rgscan/rgscanfactory.cpp +++ b/src/plugins/General/rgscan/rgscanfactory.cpp @@ -18,7 +18,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ - #include <QMessageBox> #include "rgscanhelper.h" #include "rgscanfactory.h" @@ -28,6 +27,7 @@ const GeneralProperties RGScanFactory::properties() const GeneralProperties properties; properties.name = tr("ReplayGain Scanner Plugin"); properties.shortName = "rgscan"; + properties.translation = QLatin1String(":/rgscan_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -57,11 +57,3 @@ void RGScanFactory::showAbout(QWidget *parent) tr("Frank Klemm")); } - -QTranslator *RGScanFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/rgscan_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/rgscan/rgscanfactory.h b/src/plugins/General/rgscan/rgscanfactory.h index ecd75a49a..63c900b7d 100644 --- a/src/plugins/General/rgscan/rgscanfactory.h +++ b/src/plugins/General/rgscan/rgscanfactory.h @@ -21,7 +21,6 @@ #define RGSCANFACTORY_H #include <QObject> -#include <QTranslator> #include <QDialog> #include <qmmpui/general.h> #include <qmmpui/generalfactory.h> @@ -39,7 +38,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); }; #endif diff --git a/src/plugins/General/scrobbler/scrobblerfactory.cpp b/src/plugins/General/scrobbler/scrobblerfactory.cpp index 4cfced38c..d79b26e50 100644 --- a/src/plugins/General/scrobbler/scrobblerfactory.cpp +++ b/src/plugins/General/scrobbler/scrobblerfactory.cpp @@ -30,6 +30,7 @@ const GeneralProperties ScrobblerFactory::properties() const GeneralProperties properties; properties.name = tr("Scrobbler Plugin"); properties.shortName = "scrobbler"; + properties.translation = QLatin1String(":/scrobbler_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -52,11 +53,3 @@ void ScrobblerFactory::showAbout(QWidget *parent) tr("Qmmp AudioScrobbler Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } - -QTranslator *ScrobblerFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/scrobbler_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/scrobbler/scrobblerfactory.h b/src/plugins/General/scrobbler/scrobblerfactory.h index d41d674ca..9b07a927e 100644 --- a/src/plugins/General/scrobbler/scrobblerfactory.h +++ b/src/plugins/General/scrobbler/scrobblerfactory.h @@ -24,7 +24,6 @@ @author Ilya Kotov <forkotov02@ya.ru> */ #include <QObject> -#include <QTranslator> #include <qmmpui/general.h> #include <qmmpui/generalfactory.h> @@ -39,8 +38,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); - }; #endif diff --git a/src/plugins/General/statusicon/statusiconfactory.cpp b/src/plugins/General/statusicon/statusiconfactory.cpp index bdc5acb84..26b0f4641 100644 --- a/src/plugins/General/statusicon/statusiconfactory.cpp +++ b/src/plugins/General/statusicon/statusiconfactory.cpp @@ -18,7 +18,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ - #include <QMessageBox> #include "statusicon.h" #include "settingsdialog.h" @@ -32,6 +31,7 @@ const GeneralProperties StatusIconFactory::properties() const properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = true; + properties.translation = QLatin1String(":/statusicon_plugin_"); return properties; } @@ -53,11 +53,3 @@ void StatusIconFactory::showAbout(QWidget *parent) tr("Ilya Kotov <forkotov02@ya.ru>")+"\n"+ tr("Artur Guzik <a.guzik88@gmail.com>")); } - -QTranslator *StatusIconFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/statusicon_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/statusicon/statusiconfactory.h b/src/plugins/General/statusicon/statusiconfactory.h index af6f2ae92..434929d73 100644 --- a/src/plugins/General/statusicon/statusiconfactory.h +++ b/src/plugins/General/statusicon/statusiconfactory.h @@ -24,7 +24,6 @@ @author Ilya Kotov <forkotov02@ya.ru> */ #include <QObject> -#include <QTranslator> #include <QDialog> #include <qmmpui/general.h> @@ -40,8 +39,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); - }; #endif diff --git a/src/plugins/General/streambrowser/streambrowserfactory.cpp b/src/plugins/General/streambrowser/streambrowserfactory.cpp index 8c4b53fbe..4cdbd12cc 100644 --- a/src/plugins/General/streambrowser/streambrowserfactory.cpp +++ b/src/plugins/General/streambrowser/streambrowserfactory.cpp @@ -28,6 +28,7 @@ const GeneralProperties StreamBrowserFactory::properties() const GeneralProperties properties; properties.name = tr("Stream Browser Plugin"); properties.shortName = "streambrowser"; + properties.translation = QLatin1String(":/streambrowser_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -52,11 +53,3 @@ void StreamBrowserFactory::showAbout(QWidget *parent) tr("This plugin allows one to add stream from IceCast stream directory")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } - -QTranslator *StreamBrowserFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/streambrowser_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/streambrowser/streambrowserfactory.h b/src/plugins/General/streambrowser/streambrowserfactory.h index fcaba574c..320bb77ba 100644 --- a/src/plugins/General/streambrowser/streambrowserfactory.h +++ b/src/plugins/General/streambrowser/streambrowserfactory.h @@ -24,7 +24,6 @@ @author Ilya Kotov <forkotov02@ya.ru> */ #include <QObject> -#include <QTranslator> #include <QDialog> #include <qmmpui/general.h> @@ -40,7 +39,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); }; #endif diff --git a/src/plugins/General/trackchange/trackchangefactory.cpp b/src/plugins/General/trackchange/trackchangefactory.cpp index dcbf6000b..806f3f073 100644 --- a/src/plugins/General/trackchange/trackchangefactory.cpp +++ b/src/plugins/General/trackchange/trackchangefactory.cpp @@ -29,6 +29,7 @@ const GeneralProperties TrackChangeFactory::properties() const GeneralProperties properties; properties.name = tr("Track Change Plugin"); properties.shortName = "trackchange"; + properties.translation = QLatin1String(":/trackchange_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -52,11 +53,3 @@ void TrackChangeFactory::showAbout(QWidget *parent) tr("This plugin executes external command when current track is changed") + "\n" + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } - -QTranslator *TrackChangeFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/trackchange_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/trackchange/trackchangefactory.h b/src/plugins/General/trackchange/trackchangefactory.h index 482d973b6..955053a72 100644 --- a/src/plugins/General/trackchange/trackchangefactory.h +++ b/src/plugins/General/trackchange/trackchangefactory.h @@ -24,7 +24,6 @@ @author Ilya Kotov <forkotov02@ya.ru> */ #include <QObject> -#include <QTranslator> #include <QDialog> #include <qmmpui/general.h> #include <qmmpui/generalfactory.h> @@ -39,7 +38,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); }; #endif diff --git a/src/plugins/General/udisks2/udisks2factory.cpp b/src/plugins/General/udisks2/udisks2factory.cpp index 0548b8932..4be6d28f2 100644 --- a/src/plugins/General/udisks2/udisks2factory.cpp +++ b/src/plugins/General/udisks2/udisks2factory.cpp @@ -18,7 +18,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ - #include <QMessageBox> #include <qmmp/qmmp.h> #include "settingsdialog.h" @@ -30,6 +29,7 @@ const GeneralProperties UDisks2Factory::properties() const GeneralProperties properties; properties.name = tr("UDisks2 Plugin"); properties.shortName = "udisks2"; + properties.translation = QLatin1String(":/udisks2_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -53,11 +53,3 @@ void UDisks2Factory::showAbout(QWidget *parent) tr("This plugin provides removable devices detection using UDisks2") + "\n" + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } - -QTranslator *UDisks2Factory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/udisks2_plugin_") + locale); - return translator; -} diff --git a/src/plugins/General/udisks2/udisks2factory.h b/src/plugins/General/udisks2/udisks2factory.h index e4d1f94ff..cdf1081fb 100644 --- a/src/plugins/General/udisks2/udisks2factory.h +++ b/src/plugins/General/udisks2/udisks2factory.h @@ -24,7 +24,6 @@ @author Ilya Kotov <forkotov02@ya.ru> */ #include <QObject> -#include <QTranslator> #include <qmmpui/general.h> #include <qmmpui/generalfactory.h> @@ -39,8 +38,6 @@ public: QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); - QTranslator *createTranslator(QObject *parent); - }; #endif |
