Mercurial > hg > octave-lyh
changeset 16858:cd29604214c5
Use the Qscintilla langiage file if available
* resource-manager.cc./.h(config_translators): besides the qt and custom gui
language file, load qscintilla language file, too
* octave-gui.cc(octave_start_gui): call new config_translator function and
install translator for qscintilla, too
author | Torsten <ttl@justmail.de> |
---|---|
date | Thu, 27 Jun 2013 20:37:51 +0200 |
parents | 804d26cf8e5b |
children | 54c370a00a4a |
files | libgui/src/octave-gui.cc libgui/src/resource-manager.cc libgui/src/resource-manager.h |
diffstat | 3 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/octave-gui.cc +++ b/libgui/src/octave-gui.cc @@ -105,10 +105,11 @@ else { // install translators for the gui and qt text - QTranslator gui_translator, qt_translator; - resource_manager::config_translators (&gui_translator,&qt_translator); - application.installTranslator (&qt_translator); - application.installTranslator (&gui_translator); + QTranslator gui_tr, qt_tr, qsci_tr; + resource_manager::config_translators (&qt_tr,&qsci_tr,&gui_tr); + application.installTranslator (&qt_tr); + application.installTranslator (&qsci_tr); + application.installTranslator (&gui_tr); // update network-settings resource_manager::update_network_settings ();
--- a/libgui/src/resource-manager.cc +++ b/libgui/src/resource-manager.cc @@ -83,7 +83,9 @@ } void -resource_manager::config_translators (QTranslator *qt_tr,QTranslator *gui_tr) +resource_manager::config_translators (QTranslator *qt_tr, + QTranslator *qsci_tr, + QTranslator *gui_tr) { QSettings *settings = resource_manager::get_settings (); // FIXME -- what should happen if settings is 0? @@ -94,6 +96,9 @@ // load the translator file for qt strings qt_tr->load("qt_" + language, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + // load the translator file for qscintilla settings + qsci_tr->load("qscintilla_" + language, + QLibraryInfo::location(QLibraryInfo::TranslationsPath)); // load the translator file for gui strings gui_tr->load (language, get_gui_translation_dir ()); }
--- a/libgui/src/resource-manager.h +++ b/libgui/src/resource-manager.h @@ -68,7 +68,7 @@ static QString get_gui_translation_dir (void); - static void config_translators (QTranslator*, QTranslator*); + static void config_translators (QTranslator*, QTranslator*, QTranslator*); static void update_network_settings (void) {