diff --git a/src/engine/translations.h b/src/engine/translations.h index dc0313040a..ab99bb03b9 100644 --- a/src/engine/translations.h +++ b/src/engine/translations.h @@ -33,8 +33,8 @@ namespace Translation // Sets the language with the given name as the current language if the translation for this language is // already cached and valid, otherwise does nothing. Returns a pair of two flags, the first of which is // set to true if the translation for the given language is already present in the cache (even if this - // translation is invalid), and the second is set to true if this translation is both present in the cache - // and valid. + // translation is invalid), and the second is set to true if the current language has been successfully + // set. std::pair setLanguage( const std::string_view name ); // Sets the language with the given name as the current language if the translation for this language is diff --git a/src/fheroes2/system/settings.cpp b/src/fheroes2/system/settings.cpp index d5bb828646..c2315b0981 100644 --- a/src/fheroes2/system/settings.cpp +++ b/src/fheroes2/system/settings.cpp @@ -514,8 +514,8 @@ bool Settings::setGameLanguage( const std::string & language ) } // First, let's see if the translation for the requested language is already cached - if ( const auto [isCached, isValid] = Translation::setLanguage( language ); isCached ) { - return isValid; + if ( const auto [isCached, isSet] = Translation::setLanguage( language ); isCached ) { + return isSet; } const std::string fileName = std::string( _gameLanguage ).append( ".mo" );