[libcalamares] Be less chatty in Python scripts

- When finding the gettext path, the debug output was very
   chatty and didn't include an indication that it was looking
   for translations.
This commit is contained in:
Adriaan de Groot 2019-01-08 10:51:53 +01:00
parent 9d871fb9db
commit 093240c131

View File

@ -275,16 +275,21 @@ gettext_path()
} }
_add_localedirs( candidatePaths, QDir().canonicalPath() ); // . _add_localedirs( candidatePaths, QDir().canonicalPath() ); // .
cDebug() << "Standard paths" << candidatePaths; cDebug() << "Determining gettext path from" << candidatePaths;
for ( auto lang : _gettext_languages() ) QStringList candidateLanguages = _gettext_languages();
for ( const auto& lang : candidateLanguages )
for ( auto localedir : candidatePaths ) for ( auto localedir : candidatePaths )
{ {
QDir ldir( localedir ); QDir ldir( localedir );
cDebug() << "Checking" << lang << "in" <<ldir.canonicalPath();
if ( ldir.cd( lang ) ) if ( ldir.cd( lang ) )
{
cDebug() << " .. Found" << lang << "in" << ldir.canonicalPath();
return bp::object( localedir.toStdString() ); return bp::object( localedir.toStdString() );
}
} }
cDebug() << " .. None found for" << candidateLanguages;
return bp::object(); // None return bp::object(); // None
} }