Skip to content
Permalink
Browse files
don't warn about missing translation for C locale
  • Loading branch information
jef-n committed Feb 8, 2014
1 parent 7b45b40 commit b7a693754892d2e3cafb79fee330db1c4dc369d6
Showing with 23 additions and 20 deletions.
  1. +23 −20 src/app/main.cpp
@@ -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

0 comments on commit b7a6937

Please sign in to comment.