Skip to content

Commit

Permalink
don't warn about missing translation for C locale
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 8, 2014
1 parent 7b45b40 commit b7a6937
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions src/app/main.cpp
Expand Up @@ -790,28 +790,31 @@ int main( int argc, char *argv[] )
}

QTranslator qgistor( 0 );
if ( qgistor.load( QString( "qgis_" ) + myTranslationCode, i18nPath ) )
if ( myTranslationCode != "C" )
{
myApp.installTranslator( &qgistor );
}
else
{
qWarning( "loading of qgis translation failed [%s]", QString( "%1/qgis_%2" ).arg( i18nPath ).arg( myTranslationCode ).toLocal8Bit().constData() );
}
if ( qgistor.load( QString( "qgis_" ) + myTranslationCode, i18nPath ) )
{
myApp.installTranslator( &qgistor );
}
else
{
qWarning( "loading of qgis translation failed [%s]", QString( "%1/qgis_%2" ).arg( i18nPath ).arg( myTranslationCode ).toLocal8Bit().constData() );
}

/* Translation file for Qt.
* The strings from the QMenuBar context section are used by Qt/Mac to shift
* the About, Preferences and Quit items to the Mac Application menu.
* These items must be translated identically in both qt_ and qgis_ files.
*/
QTranslator qttor( 0 );
if ( qttor.load( QString( "qt_" ) + myTranslationCode, QLibraryInfo::location( QLibraryInfo::TranslationsPath ) ) )
{
myApp.installTranslator( &qttor );
}
else
{
qWarning( "loading of qt translation failed [%s]", QString( "%1/qt_%2" ).arg( QLibraryInfo::location( QLibraryInfo::TranslationsPath ) ).arg( myTranslationCode ).toLocal8Bit().constData() );
/* Translation file for Qt.
* The strings from the QMenuBar context section are used by Qt/Mac to shift
* the About, Preferences and Quit items to the Mac Application menu.
* These items must be translated identically in both qt_ and qgis_ files.
*/
QTranslator qttor( 0 );
if ( qttor.load( QString( "qt_" ) + myTranslationCode, QLibraryInfo::location( QLibraryInfo::TranslationsPath ) ) )
{
myApp.installTranslator( &qttor );
}
else
{
qWarning( "loading of qt translation failed [%s]", QString( "%1/qt_%2" ).arg( QLibraryInfo::location( QLibraryInfo::TranslationsPath ) ).arg( myTranslationCode ).toLocal8Bit().constData() );
}
}

//set up splash screen
Expand Down

0 comments on commit b7a6937

Please sign in to comment.