diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2013-12-21 17:55:43 +0100 |
---|---|---|
committer | Michal Labedzki <michal.labedzki@tieto.com> | 2014-11-04 08:21:55 +0000 |
commit | 5025bc258cdeabbd498919d5c6b4554accdad842 (patch) | |
tree | 53301fcaa347e0a933086ce102b56b27e13aeee9 /ui/qt/wireshark_application.h | |
parent | 15e78de432f55f5478f1b3994f3d7e060b60508d (diff) | |
download | wireshark-5025bc258cdeabbd498919d5c6b4554accdad842.tar.gz |
Qt: Dynamic languages
- get language as soon as possible (before creating any Qt objects) to make all
translations working
- dynamic list of supported languages
- runtime change of GUI language (no need to restart application)
- add flags icons support
- search for *.qm languages in buildin resources, then
data dir called "languages" (main directory in sources or
/usr/share/wireshark/languages), then user directory
(UNIX: ~/.wireshark/languages); "languages" directory should contains
files wireshark_xx.qm where xx is language code (en, en_GB, etc.),
and optional xx.svg for flag icon
- try to fix some untranslated manually-created UI items
(need manual reset text of those components)
Change-Id: I62ca8a8cddce47cec9dbcad6b0bd68b6cfd92229
Reviewed-on: https://code.wireshark.org/review/5041
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'ui/qt/wireshark_application.h')
-rw-r--r-- | ui/qt/wireshark_application.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/qt/wireshark_application.h b/ui/qt/wireshark_application.h index a56d6c6c7f..a6764cf137 100644 --- a/ui/qt/wireshark_application.h +++ b/ui/qt/wireshark_application.h @@ -43,6 +43,8 @@ #include <QSocketNotifier> #include <QThread> #include <QTimer> +#include <QTranslator> + // Recent items: // - Read from prefs @@ -93,6 +95,10 @@ public: const QIcon &normalIcon() const { return normal_icon_; } const QIcon &captureIcon() const { return capture_icon_; } + QTranslator translator; + QTranslator translatorQt; + void loadLanguage(const QString& language); + private: bool initialized_; QFont mono_font_; |