2023-06-01 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug that would cause 'failed to load translation file'
	warnings to be sent to the Apache error log.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2023-06-01 15:48:34 -04:00
parent ef6165184e
commit 210bb8bca7
59 changed files with 105 additions and 65 deletions

View File

@@ -26,13 +26,14 @@
RDTranslator *rdt=NULL;
RDTranslator::RDTranslator(const QString &cmdname,QObject *parent)
RDTranslator::RDTranslator(const QString &cmdname,bool use_translations,
QObject *parent)
: QObject(parent)
{
d_command_name=cmdname;
QString loc=RDApplication::locale().left(2)+".qm";
if(loc.left(2)!="en") { // There are no English translations
if(use_translations&&(loc.left(2)!="en")) { // There are no English translations
LoadTranslation("qt_"+loc,"/usr/share/qt5/translations");
LoadTranslation("librd_"+loc,"/usr/share/rivendell");
LoadTranslation("rdhpi_"+loc,"/usr/share/rivendell");