mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 01:45:36 -04:00
locale: Don't assume 2-letter language codes.
Some languages have 3-letter codes. So instead of splitting the output of QLocale::name, use QLocale::language and the static QLocale::languageToString.
This commit is contained in:
parent
d2288d0961
commit
bcbe5103b9
1 changed files with 1 additions and 1 deletions
|
@ -290,7 +290,7 @@ LocalePage::guessLCLocale()
|
||||||
QStringList linesForLanguage;
|
QStringList linesForLanguage;
|
||||||
foreach ( QString line, m_localeGenLines )
|
foreach ( QString line, m_localeGenLines )
|
||||||
{
|
{
|
||||||
if ( line.startsWith( myLocale.name().left( 2 ) ) )
|
if ( line.startsWith( QLocale::languageToString( myLocale.language() ) ) )
|
||||||
linesForLanguage.append( line );
|
linesForLanguage.append( line );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue