mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
Correctly allow to choose from multiple localizations for the same language, but different dialect in Preferences.
This commit is contained in:
parent
caf21a0e8a
commit
905c6cd450
|
@ -57,9 +57,11 @@ Preferences::Preferences( QWidget * parent, Config::Preferences const & p ):
|
|||
if ( lang == "qt" )
|
||||
continue; // We skip qt's own localizations
|
||||
|
||||
sortedLocs[ Language::localizedNameForId( LangCoder::code2toInt( lang.toAscii().data() ) ) ]
|
||||
= QPair< QIcon, QString >( QIcon( QString( ":/flags/%1.png" ).arg( i->mid( 3, 2 ).toLower() ) ),
|
||||
i->mid( 0, i->size() - 3 ) );
|
||||
sortedLocs.insertMulti(
|
||||
Language::localizedNameForId( LangCoder::code2toInt( lang.toAscii().data() ) ),
|
||||
QPair< QIcon, QString >(
|
||||
QIcon( QString( ":/flags/%1.png" ).arg( i->mid( 3, 2 ).toLower() ) ),
|
||||
i->mid( 0, i->size() - 3 ) ) );
|
||||
}
|
||||
|
||||
for( QMap< QString, QPair< QIcon, QString > >::iterator i = sortedLocs.begin();
|
||||
|
|
Loading…
Reference in a new issue