Showing with 29 additions and 26 deletions.
  1. +23 −20 src/app/main.cpp
  2. +6 −6 src/app/qgisapp.cpp
43 changes: 23 additions & 20 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
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
12 changes: 6 additions & 6 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8673,13 +8673,13 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
{
mActionAddFeature->setIcon( QgsApplication::getThemeIcon( "/mActionCapturePolygon.png" ) );

mActionAddRing->setEnabled( isEditable && canAddFeatures );
mActionFillRing->setEnabled( isEditable && canAddFeatures );
mActionReshapeFeatures->setEnabled( isEditable && canAddFeatures );
mActionAddRing->setEnabled( isEditable && canChangeGeometry );
mActionFillRing->setEnabled( isEditable && canChangeGeometry );
mActionReshapeFeatures->setEnabled( isEditable && canChangeGeometry );
mActionSplitFeatures->setEnabled( isEditable && canAddFeatures );
mActionSplitParts->setEnabled( isEditable && canAddFeatures );
mActionSimplifyFeature->setEnabled( isEditable && canAddFeatures );
mActionDeleteRing->setEnabled( isEditable && canAddFeatures );
mActionSplitParts->setEnabled( isEditable && canChangeGeometry );
mActionSimplifyFeature->setEnabled( isEditable && canChangeGeometry );
mActionDeleteRing->setEnabled( isEditable && canChangeGeometry );
mActionOffsetCurve->setEnabled( false );
}

Expand Down