Merge branch 'issue-1769' into calamares

FIXES #1769
This commit is contained in:
Adriaan de Groot 2021-09-06 13:21:14 +02:00
commit 0851a8a6a4
3 changed files with 15 additions and 18 deletions

View File

@ -21,6 +21,9 @@ This release contains contributions from (alphabetically by first name):
## Modules ##
- BTRFS partitions are no longer listed as "check in phase 2" in
the *fstab* module. (Thanks Nico)
- The *keyboard* module (and *keyboardq*) now pick an English layout
(with Rupee) for keyboards when the language is English and locale is India,
rather than Hindi layout.
- The *localeq* module had the i18n.qml rewritten to make it easier
to customize. A bug in the layout has been fixed, and the overall
look has been updated.
@ -44,7 +47,6 @@ This release contains contributions from (alphabetically by first name):
(Thanks Anke)
# 3.2.41.1 (2021-08-05) #
This is a hotfix release for a crash in the *partition* module, reported on

View File

@ -467,12 +467,12 @@ Config::guessLocaleKeyboardLayout()
{ "ar_TN", arabic },
{ "ar_YE", arabic },
{ "ca_ES", "cat_ES" }, /* Catalan */
{ "as_ES", "ast_ES" }, /* Asturian */
{ "en_CA", "us" }, /* Canadian English */
{ "el_CY", "gr" }, /* Greek in Cyprus */
{ "el_GR", "gr" }, /* Greek in Greeze */
{ "el_GR", "gr" }, /* Greek in Greece */
{ "ig_NG", "igbo_NG" }, /* Igbo in Nigeria */
{ "ha_NG", "hausa_NG" } /* Hausa */
{ "ha_NG", "hausa_NG" }, /* Hausa */
{ "en_IN", "eng_in" }, /* India, English with Rupee */
} );
// Try to preselect a layout, depending on language and locale
@ -508,14 +508,7 @@ Config::guessLocaleKeyboardLayout()
}
if ( !lang.isEmpty() )
{
const auto langParts = lang.split( '_', SplitSkipEmptyParts );
// Note that this his string is not fit for display purposes!
// It doesn't come from QLocale::nativeCountryName.
QString country = QLocale::countryToString( QLocale( lang ).country() );
cDebug() << Logger::SubEntry << "extracted country" << country << "::" << langParts;
guessLayout( langParts, m_keyboardLayoutsModel, m_keyboardVariantsModel );
guessLayout( lang.split( '_', SplitSkipEmptyParts ), m_keyboardLayoutsModel, m_keyboardVariantsModel );
}
}

View File

@ -124,10 +124,7 @@ KeyBoardPreview::loadCodes()
return false;
}
QStringList param;
param << "-model"
<< "pc106"
<< "-layout" << layout << "-compact";
QStringList param { "-model", "pc106", "-layout", layout, "-compact" };
if ( !variant.isEmpty() )
{
param << "-variant" << variant;
@ -140,13 +137,18 @@ KeyBoardPreview::loadCodes()
process.start( "ckbcomp", param );
if ( !process.waitForStarted() )
{
cWarning() << "ckbcomp not found , keyboard preview disabled";
static bool need_warning = true;
if ( need_warning )
{
cWarning() << "ckbcomp not found , keyboard preview disabled";
need_warning = false;
}
return false;
}
if ( !process.waitForFinished() )
{
cWarning() << "ckbcomp failed, keyboard preview disabled";
cWarning() << "ckbcomp failed, keyboard preview skipped for" << layout << variant;
return false;
}