[QGIS Commit] r15796 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Apr 21 08:14:50 EDT 2011


Author: jef
Date: 2011-04-21 05:14:50 -0700 (Thu, 21 Apr 2011)
New Revision: 15796

Modified:
   trunk/qgis/src/app/main.cpp
Log:
add runtime warning if loading of translation fails

Modified: trunk/qgis/src/app/main.cpp
===================================================================
--- trunk/qgis/src/app/main.cpp	2011-04-21 12:13:03 UTC (rev 15795)
+++ trunk/qgis/src/app/main.cpp	2011-04-21 12:14:50 UTC (rev 15796)
@@ -521,6 +521,10 @@
   {
     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
@@ -532,6 +536,10 @@
   {
     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
   QString mySplashPath( QgsApplication::splashPath() );



More information about the QGIS-commit mailing list