Merge branch 'locale-fixes'
This commit is contained in:
commit
f1bb16c4df
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
#include "GlobalStorage.h"
|
#include "GlobalStorage.h"
|
||||||
|
|
||||||
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
#ifdef WITH_PYTHON
|
#ifdef WITH_PYTHON
|
||||||
#include "PythonHelper.h"
|
#include "PythonHelper.h"
|
||||||
|
|
||||||
@ -80,6 +82,15 @@ GlobalStorage::value( const QString& key ) const
|
|||||||
return m.value( key );
|
return m.value( key );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
GlobalStorage::debugDump() const
|
||||||
|
{
|
||||||
|
for ( auto it = m.cbegin(); it != m.cend(); ++it )
|
||||||
|
{
|
||||||
|
cDebug() << it.key() << '\t' << it.value();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Calamares
|
} // namespace Calamares
|
||||||
|
|
||||||
#ifdef WITH_PYTHON
|
#ifdef WITH_PYTHON
|
||||||
|
@ -57,6 +57,8 @@ public:
|
|||||||
int remove( const QString& key );
|
int remove( const QString& key );
|
||||||
QVariant value( const QString& key ) const;
|
QVariant value( const QString& key ) const;
|
||||||
|
|
||||||
|
void debugDump() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void changed();
|
void changed();
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||||
|
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||||
*
|
*
|
||||||
* Calamares is free software: you can redistribute it and/or modify
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -51,14 +52,14 @@ ViewModule::loadSelf()
|
|||||||
PluginFactory* pf = qobject_cast< PluginFactory* >( m_loader->instance() );
|
PluginFactory* pf = qobject_cast< PluginFactory* >( m_loader->instance() );
|
||||||
if ( !pf )
|
if ( !pf )
|
||||||
{
|
{
|
||||||
cDebug() << Q_FUNC_INFO << m_loader->errorString();
|
cDebug() << Q_FUNC_INFO << "No factory:" << m_loader->errorString();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_viewStep = pf->create< Calamares::ViewStep >();
|
m_viewStep = pf->create< Calamares::ViewStep >();
|
||||||
if ( !m_viewStep )
|
if ( !m_viewStep )
|
||||||
{
|
{
|
||||||
cDebug() << Q_FUNC_INFO << m_loader->errorString();
|
cDebug() << Q_FUNC_INFO << "create() failed" << m_loader->errorString();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// cDebug() << "ViewModule loading self for instance" << instanceKey()
|
// cDebug() << "ViewModule loading self for instance" << instanceKey()
|
||||||
|
@ -323,6 +323,7 @@ KeyboardPage::onListVariantCurrentItemChanged( QListWidgetItem* current, QListWi
|
|||||||
QProcess::execute( QString( "setxkbmap -layout \"%1\" -variant \"%2\"" )
|
QProcess::execute( QString( "setxkbmap -layout \"%1\" -variant \"%2\"" )
|
||||||
.arg( layout, variant ).toUtf8() );
|
.arg( layout, variant ).toUtf8() );
|
||||||
cDebug() << "xkbmap selection changed to: " << layout << "-" << variant;
|
cDebug() << "xkbmap selection changed to: " << layout << "-" << variant;
|
||||||
|
m_setxkbmapTimer.disconnect( this );
|
||||||
} );
|
} );
|
||||||
m_setxkbmapTimer.start( QApplication::keyboardInputInterval() );
|
m_setxkbmapTimer.start( QApplication::keyboardInputInterval() );
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||||
*
|
*
|
||||||
* Calamares is free software: you can redistribute it and/or modify
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -171,9 +172,7 @@ LocalePage::LocalePage( QWidget* parent )
|
|||||||
!dlg->selectedLCLocale().isEmpty() )
|
!dlg->selectedLCLocale().isEmpty() )
|
||||||
{
|
{
|
||||||
m_selectedLocaleConfiguration.lang = dlg->selectedLCLocale();
|
m_selectedLocaleConfiguration.lang = dlg->selectedLCLocale();
|
||||||
m_localeLabel->setText( tr( "The system language will be set to %1." )
|
this->updateLocaleLabels();
|
||||||
.arg( prettyLCLocale(
|
|
||||||
m_selectedLocaleConfiguration.lang ) ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dlg->deleteLater();
|
dlg->deleteLater();
|
||||||
@ -203,9 +202,7 @@ LocalePage::LocalePage( QWidget* parent )
|
|||||||
m_selectedLocaleConfiguration.lc_measurement = dlg->selectedLCLocale();
|
m_selectedLocaleConfiguration.lc_measurement = dlg->selectedLCLocale();
|
||||||
m_selectedLocaleConfiguration.lc_identification = dlg->selectedLCLocale();
|
m_selectedLocaleConfiguration.lc_identification = dlg->selectedLCLocale();
|
||||||
|
|
||||||
m_formatsLabel->setText( tr( "The numbers and dates locale will be set to %1." )
|
this->updateLocaleLabels();
|
||||||
.arg( prettyLCLocale(
|
|
||||||
m_selectedLocaleConfiguration.lc_numeric ) ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dlg->deleteLater();
|
dlg->deleteLater();
|
||||||
@ -350,14 +347,16 @@ LocalePage::init( const QString& initialRegion,
|
|||||||
if ( m_localeGenLines.isEmpty() )
|
if ( m_localeGenLines.isEmpty() )
|
||||||
{
|
{
|
||||||
cDebug() << "WARNING: cannot acquire a list of available locales."
|
cDebug() << "WARNING: cannot acquire a list of available locales."
|
||||||
<< "The locale and localecfg modules will be broken as long as this "
|
<< "The locale and localecfg modules will be broken as long as this "
|
||||||
"system does not provide"
|
"system does not provide"
|
||||||
<< " * a /usr/share/i18n/SUPPORTED file"
|
<< "\n\t "
|
||||||
<< "\tOR"
|
<< "* a well-formed"
|
||||||
<< " * a well-formed /etc/locale.gen"
|
<< supported.fileName()
|
||||||
<< "\tOR"
|
<< "\n\tOR"
|
||||||
<< " * a complete pre-compiled locale-gen database which allows complete locale -a output.";
|
<< "* a well-formed"
|
||||||
|
<< (localeGenPath.isEmpty() ? QLatin1Literal("/etc/locale.gen") : localeGenPath)
|
||||||
|
<< "\n\tOR"
|
||||||
|
<< "* a complete pre-compiled locale-gen database which allows complete locale -a output.";
|
||||||
return; // something went wrong and there's nothing we can do about it.
|
return; // something went wrong and there's nothing we can do about it.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -432,14 +431,7 @@ LocalePage::guessLocaleConfiguration()
|
|||||||
// If we cannot say anything about available locales
|
// If we cannot say anything about available locales
|
||||||
if ( m_localeGenLines.isEmpty() )
|
if ( m_localeGenLines.isEmpty() )
|
||||||
{
|
{
|
||||||
cDebug() << "WARNING: cannot acquire a list of available locales."
|
cDebug() << "WARNING: guessLocaleConfiguration can't guess from an empty list.";
|
||||||
<< "The locale and localecfg modules will be broken as long as this "
|
|
||||||
"system does not provide"
|
|
||||||
<< " * a /usr/share/i18n/SUPPORTED file"
|
|
||||||
<< "\tOR"
|
|
||||||
<< " * a well-formed /etc/locale.gen"
|
|
||||||
<< "\tOR"
|
|
||||||
<< " * a complete pre-compiled locale-gen database which allows complete locale -a output.";
|
|
||||||
return LocaleConfiguration::createDefault();
|
return LocaleConfiguration::createDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
Loading…
Reference in New Issue
Block a user