mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
Skip Qt's own localizations when searching for localization files.
This commit is contained in:
parent
cb1234ace1
commit
d4b325a41e
|
@ -53,6 +53,10 @@ Preferences::Preferences( QWidget * parent, Config::Preferences const & p ):
|
||||||
{
|
{
|
||||||
// Here we assume the xx_YY naming, where xx is language and YY is region.
|
// Here we assume the xx_YY naming, where xx is language and YY is region.
|
||||||
QString lang = i->mid( 0, 2 );
|
QString lang = i->mid( 0, 2 );
|
||||||
|
|
||||||
|
if ( lang == "qt" )
|
||||||
|
continue; // We skip qt's own locations
|
||||||
|
|
||||||
sortedLocs[ Language::localizedNameForId( LangCoder::code2toInt( lang.toAscii().data() ) ) ]
|
sortedLocs[ Language::localizedNameForId( LangCoder::code2toInt( lang.toAscii().data() ) ) ]
|
||||||
= QPair< QIcon, QString >( QIcon( QString( ":/flags/%1.png" ).arg( i->mid( 3, 2 ).toLower() ) ),
|
= QPair< QIcon, QString >( QIcon( QString( ":/flags/%1.png" ).arg( i->mid( 3, 2 ).toLower() ) ),
|
||||||
i->mid( 0, i->size() - 3 ) );
|
i->mid( 0, i->size() - 3 ) );
|
||||||
|
|
Loading…
Reference in a new issue