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

* Fixed a bug in the i18n system that would throw warnings when
	attempting to load the (non-existent) English translation.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2022-09-29 14:27:30 -04:00
parent af4fec015f
commit e19c613dba
2 changed files with 9 additions and 4 deletions

View File

@@ -31,10 +31,12 @@ RDTranslator::RDTranslator(const QString &cmdname,QObject *parent)
d_command_name=cmdname;
QString loc=RDApplication::locale().left(2)+".qm";
LoadTranslation("qt_"+loc,"/usr/share/qt5/translations");
LoadTranslation("librd_"+loc,"/usr/share/rivendell");
LoadTranslation("rdhpi_"+loc,"/usr/share/rivendell");
LoadTranslation(d_command_name+"_"+loc,"/usr/share/rivendell");
if(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");
LoadTranslation(d_command_name+"_"+loc,"/usr/share/rivendell");
}
}