Wireshark-commits: [Wireshark-commits] master 5025bc2: Qt: Dynamic languages
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 4 Nov 2014 08:21:58 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=5025bc258cdeabbd498919d5c6b4554accdad842
Submitter: Michal Labedzki (michal.labedzki@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

5025bc2 by Michal Labedzki (michal.labedzki@xxxxxxxxx):

    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@xxxxxxxxx>
    Reviewed-by: Michal Labedzki <michal.labedzki@xxxxxxxxx>
    

Actions performed:

    from  15e78de   Lua: Register dissectors only once.
    adds  5025bc2   Qt: Dynamic languages


Summary of changes:
 doc/README.qt                           |   29 +++++--
 epan/prefs.c                            |   18 -----
 image/languages/de.svg                  |    9 +++
 image/languages/en.svg                  |   10 +++
 image/languages/fr.svg                  |    6 ++
 image/languages/it.svg                  |    6 ++
 image/languages/ja_JP.svg               |    6 ++
 image/languages/languages.qrc           |   11 +++
 image/languages/pl.svg                  |    1 +
 image/languages/zh_CN.svg               |   15 ++++
 ui/CMakeLists.txt                       |    1 +
 ui/Makefile.common                      |    2 +
 ui/language.c                           |  135 +++++++++++++++++++++++++++++++
 globals.h => ui/language.h              |   19 ++---
 ui/qt/CMakeLists.txt                    |    1 +
 ui/qt/Makefile.common                   |    1 +
 ui/qt/Wireshark.pro                     |    1 +
 ui/qt/capture_interfaces_dialog.cpp     |   16 ++++
 ui/qt/capture_interfaces_dialog.h       |    1 +
 ui/qt/display_filter_edit.cpp           |   22 +++++
 ui/qt/display_filter_edit.h             |    2 +
 ui/qt/main.cpp                          |   48 +++--------
 ui/qt/main_welcome.cpp                  |   16 ++++
 ui/qt/main_welcome.h                    |    1 +
 ui/qt/main_window.cpp                   |   13 ++-
 ui/qt/main_window.h                     |    2 +-
 ui/qt/main_window.ui                    |   30 +++++++
 ui/qt/main_window_preferences_frame.cpp |   58 ++++++++++++-
 ui/qt/main_window_preferences_frame.h   |    1 -
 ui/qt/main_window_preferences_frame.ui  |   48 +----------
 ui/qt/packet_list.cpp                   |   59 +++++++++-----
 ui/qt/preferences_dialog.cpp            |    6 +-
 ui/qt/proto_tree.cpp                    |   40 ++++++---
 ui/qt/proto_tree.h                      |    6 +-
 ui/qt/search_frame.cpp                  |   16 ++++
 ui/qt/search_frame.h                    |    4 +-
 ui/qt/summary_dialog.cpp                |   16 ++++
 ui/qt/summary_dialog.h                  |    1 +
 ui/qt/wireshark_application.cpp         |   40 +++++++++
 ui/qt/wireshark_application.h           |    6 ++
 40 files changed, 560 insertions(+), 163 deletions(-)
 create mode 100644 image/languages/de.svg
 create mode 100644 image/languages/en.svg
 create mode 100644 image/languages/fr.svg
 create mode 100644 image/languages/it.svg
 create mode 100644 image/languages/ja_JP.svg
 create mode 100644 image/languages/languages.qrc
 create mode 100644 image/languages/pl.svg
 create mode 100644 image/languages/zh_CN.svg
 create mode 100644 ui/language.c
 copy globals.h => ui/language.h (82%)