mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Added logging for translation search
This commit is contained in:
parent
494274ee46
commit
434163461e
@ -165,6 +165,7 @@ void MainWindow::updateTranslation()
|
|||||||
{
|
{
|
||||||
#ifdef ENABLE_QT_TRANSLATIONS
|
#ifdef ENABLE_QT_TRANSLATIONS
|
||||||
std::string translationFile = settings["general"]["language"].String() + ".qm";
|
std::string translationFile = settings["general"]["language"].String() + ".qm";
|
||||||
|
logGlobal->info("Loading translation '%s'", translationFile);
|
||||||
|
|
||||||
QVector<QString> searchPaths;
|
QVector<QString> searchPaths;
|
||||||
|
|
||||||
@ -174,8 +175,10 @@ void MainWindow::updateTranslation()
|
|||||||
|
|
||||||
for(auto const & string : boost::adaptors::reverse(searchPaths))
|
for(auto const & string : boost::adaptors::reverse(searchPaths))
|
||||||
{
|
{
|
||||||
|
logGlobal->info("Searching for translation at '%s'", string.toStdString());
|
||||||
if (translator.load(string))
|
if (translator.load(string))
|
||||||
{
|
{
|
||||||
|
logGlobal->info("Translation found");
|
||||||
if (!qApp->installTranslator(&translator))
|
if (!qApp->installTranslator(&translator))
|
||||||
logGlobal->error("Failed to install translator");
|
logGlobal->error("Failed to install translator");
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user