2022-09-28 Fred Gleason <fredg@paravelsystems.com>

* Added an 'RDTranslator' class.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2022-09-28 11:36:06 -04:00
parent b18e1dbca8
commit fef674a2ad
22 changed files with 128 additions and 313 deletions

View File

@@ -2,7 +2,7 @@
//
// A Dedicated Cart Wall Utility for Rivendell.
//
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2022 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -371,28 +371,6 @@ int main(int argc,char *argv[])
QApplication::setStyle(RD_GUI_STYLE);
QApplication a(argc,argv);
//
// Load Translations
//
QString loc=RDApplication::locale();
if(!loc.isEmpty()) {
QTranslator qt(0);
qt.load(QString("/usr/share/qt4/translations/qt_")+loc,".");
a.installTranslator(&qt);
QTranslator rd(0);
rd.load(QString(PREFIX)+QString("/share/rivendell/librd_")+loc,".");
a.installTranslator(&rd);
QTranslator rdhpi(0);
rdhpi.load(QString(PREFIX)+QString("/share/rivendell/librdhpi_")+loc,".");
a.installTranslator(&rdhpi);
QTranslator tr(0);
tr.load(QString(PREFIX)+QString("/share/rivendell/rdpanel_")+loc,".");
a.installTranslator(&tr);
}
RDConfig *config=new RDConfig();
config->load();
MainWidget *w=new MainWidget(config);