From b54273f904d1dbe2c451657ad6ca3f56d93f647e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 12 Oct 2020 14:33:09 +0200 Subject: [PATCH 01/78] [keyboard] Move all the keyboard (AbstractList)Models to the models file --- src/modules/keyboard/Config.cpp | 154 ------------------ src/modules/keyboard/Config.h | 57 ------- src/modules/keyboard/KeyboardLayoutModel.cpp | 155 +++++++++++++++++++ src/modules/keyboard/KeyboardLayoutModel.h | 57 +++++++ 4 files changed, 212 insertions(+), 211 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 11a20bbb7..e5574f186 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -23,160 +23,6 @@ #include #include -KeyboardModelsModel::KeyboardModelsModel( QObject* parent ) - : QAbstractListModel( parent ) -{ - detectModels(); -} - -void -KeyboardModelsModel::detectModels() -{ - beginResetModel(); - const auto models = KeyboardGlobal::getKeyboardModels(); - auto index = -1; - for ( const auto& key : models.keys() ) - { - index++; - m_list << QMap< QString, QString > { { "label", key }, { "key", models[ key ] } }; - if ( models[ key ] == "pc105" ) - { - this->setCurrentIndex( index ); - } - } - endResetModel(); -} - -void -KeyboardModelsModel::refresh() -{ - m_list.clear(); - setCurrentIndex( -1 ); - detectModels(); -} - -QVariant -KeyboardModelsModel::data( const QModelIndex& index, int role ) const -{ - if ( !index.isValid() ) - { - return QVariant(); - } - const auto item = m_list.at( index.row() ); - return role == Qt::DisplayRole ? item[ "label" ] : item[ "key" ]; -} - -int -KeyboardModelsModel::rowCount( const QModelIndex& ) const -{ - return m_list.count(); -} - -QHash< int, QByteArray > -KeyboardModelsModel::roleNames() const -{ - return { { Qt::DisplayRole, "label" }, { Qt::UserRole, "key" } }; -} - -int -KeyboardModelsModel::currentIndex() const -{ - return m_currentIndex; -} - -const QMap< QString, QString > -KeyboardModelsModel::item( const int& index ) const -{ - if ( index >= m_list.count() || index < 0 ) - { - return QMap< QString, QString >(); - } - - return m_list.at( index ); -} - -const QMap< QString, QString > -KeyboardVariantsModel::item( const int& index ) const -{ - if ( index >= m_list.count() || index < 0 ) - { - return QMap< QString, QString >(); - } - - return m_list.at( index ); -} - -void -KeyboardModelsModel::setCurrentIndex( const int& index ) -{ - if ( index >= m_list.count() || index < 0 ) - { - return; - } - - m_currentIndex = index; - emit currentIndexChanged( m_currentIndex ); -} - -KeyboardVariantsModel::KeyboardVariantsModel( QObject* parent ) - : QAbstractListModel( parent ) -{ -} - -int -KeyboardVariantsModel::currentIndex() const -{ - return m_currentIndex; -} - -void -KeyboardVariantsModel::setCurrentIndex( const int& index ) -{ - if ( index >= m_list.count() || index < 0 ) - { - return; - } - - m_currentIndex = index; - emit currentIndexChanged( m_currentIndex ); -} - -QVariant -KeyboardVariantsModel::data( const QModelIndex& index, int role ) const -{ - if ( !index.isValid() ) - { - return QVariant(); - } - const auto item = m_list.at( index.row() ); - return role == Qt::DisplayRole ? item[ "label" ] : item[ "key" ]; -} - -int -KeyboardVariantsModel::rowCount( const QModelIndex& ) const -{ - return m_list.count(); -} - -QHash< int, QByteArray > -KeyboardVariantsModel::roleNames() const -{ - return { { Qt::DisplayRole, "label" }, { Qt::UserRole, "key" } }; -} - -void -KeyboardVariantsModel::setVariants( QMap< QString, QString > variants ) -{ - m_list.clear(); - beginResetModel(); - for ( const auto& key : variants.keys() ) - { - const auto item = QMap< QString, QString > { { "label", key }, { "key", variants[ key ] } }; - m_list << item; - } - endResetModel(); -} - /* Returns stringlist with suitable setxkbmap command-line arguments * to set the given @p layout and @p variant. */ diff --git a/src/modules/keyboard/Config.h b/src/modules/keyboard/Config.h index 44a893faa..f02c08877 100644 --- a/src/modules/keyboard/Config.h +++ b/src/modules/keyboard/Config.h @@ -20,63 +20,6 @@ #include #include -class KeyboardModelsModel : public QAbstractListModel -{ - Q_OBJECT - Q_PROPERTY( int currentIndex WRITE setCurrentIndex READ currentIndex NOTIFY currentIndexChanged ) - -public: - explicit KeyboardModelsModel( QObject* parent = nullptr ); - int rowCount( const QModelIndex& = QModelIndex() ) const override; - QVariant data( const QModelIndex& index, int role ) const override; - - void setCurrentIndex( const int& index ); - int currentIndex() const; - const QMap< QString, QString > item( const int& index ) const; - -public slots: - void refresh(); - -protected: - QHash< int, QByteArray > roleNames() const override; - -private: - int m_currentIndex = -1; - QVector< QMap< QString, QString > > m_list; - void detectModels(); - -signals: - void currentIndexChanged( int index ); -}; - -class KeyboardVariantsModel : public QAbstractListModel -{ - Q_OBJECT - Q_PROPERTY( int currentIndex WRITE setCurrentIndex READ currentIndex NOTIFY currentIndexChanged ) - -public: - explicit KeyboardVariantsModel( QObject* parent = nullptr ); - void setVariants( QMap< QString, QString > variants ); - - int rowCount( const QModelIndex& = QModelIndex() ) const override; - QVariant data( const QModelIndex& index, int role ) const override; - - void setCurrentIndex( const int& index ); - int currentIndex() const; - - const QMap< QString, QString > item( const int& index ) const; - -protected: - QHash< int, QByteArray > roleNames() const override; - -private: - int m_currentIndex = -1; - QVector< QMap< QString, QString > > m_list; - -signals: - void currentIndexChanged( int index ); -}; - class Config : public QObject { Q_OBJECT diff --git a/src/modules/keyboard/KeyboardLayoutModel.cpp b/src/modules/keyboard/KeyboardLayoutModel.cpp index 5b92678f6..2a4ffa4d6 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.cpp +++ b/src/modules/keyboard/KeyboardLayoutModel.cpp @@ -99,3 +99,158 @@ KeyboardLayoutModel::currentIndex() const { return m_currentIndex; } + +KeyboardModelsModel::KeyboardModelsModel( QObject* parent ) + : QAbstractListModel( parent ) +{ + detectModels(); +} + +void +KeyboardModelsModel::detectModels() +{ + beginResetModel(); + const auto models = KeyboardGlobal::getKeyboardModels(); + auto index = -1; + for ( const auto& key : models.keys() ) + { + index++; + m_list << QMap< QString, QString > { { "label", key }, { "key", models[ key ] } }; + if ( models[ key ] == "pc105" ) + { + this->setCurrentIndex( index ); + } + } + endResetModel(); +} + +void +KeyboardModelsModel::refresh() +{ + m_list.clear(); + setCurrentIndex( -1 ); + detectModels(); +} + +QVariant +KeyboardModelsModel::data( const QModelIndex& index, int role ) const +{ + if ( !index.isValid() ) + { + return QVariant(); + } + const auto item = m_list.at( index.row() ); + return role == Qt::DisplayRole ? item[ "label" ] : item[ "key" ]; +} + +int +KeyboardModelsModel::rowCount( const QModelIndex& ) const +{ + return m_list.count(); +} + +QHash< int, QByteArray > +KeyboardModelsModel::roleNames() const +{ + return { { Qt::DisplayRole, "label" }, { Qt::UserRole, "key" } }; +} + +int +KeyboardModelsModel::currentIndex() const +{ + return m_currentIndex; +} + +const QMap< QString, QString > +KeyboardModelsModel::item( const int& index ) const +{ + if ( index >= m_list.count() || index < 0 ) + { + return QMap< QString, QString >(); + } + + return m_list.at( index ); +} + +const QMap< QString, QString > +KeyboardVariantsModel::item( const int& index ) const +{ + if ( index >= m_list.count() || index < 0 ) + { + return QMap< QString, QString >(); + } + + return m_list.at( index ); +} + +void +KeyboardModelsModel::setCurrentIndex( const int& index ) +{ + if ( index >= m_list.count() || index < 0 ) + { + return; + } + + m_currentIndex = index; + emit currentIndexChanged( m_currentIndex ); +} + +KeyboardVariantsModel::KeyboardVariantsModel( QObject* parent ) + : QAbstractListModel( parent ) +{ +} + +int +KeyboardVariantsModel::currentIndex() const +{ + return m_currentIndex; +} + +void +KeyboardVariantsModel::setCurrentIndex( const int& index ) +{ + if ( index >= m_list.count() || index < 0 ) + { + return; + } + + m_currentIndex = index; + emit currentIndexChanged( m_currentIndex ); +} + +QVariant +KeyboardVariantsModel::data( const QModelIndex& index, int role ) const +{ + if ( !index.isValid() ) + { + return QVariant(); + } + const auto item = m_list.at( index.row() ); + return role == Qt::DisplayRole ? item[ "label" ] : item[ "key" ]; +} + +int +KeyboardVariantsModel::rowCount( const QModelIndex& ) const +{ + return m_list.count(); +} + +QHash< int, QByteArray > +KeyboardVariantsModel::roleNames() const +{ + return { { Qt::DisplayRole, "label" }, { Qt::UserRole, "key" } }; +} + +void +KeyboardVariantsModel::setVariants( QMap< QString, QString > variants ) +{ + m_list.clear(); + beginResetModel(); + for ( const auto& key : variants.keys() ) + { + const auto item = QMap< QString, QString > { { "label", key }, { "key", variants[ key ] } }; + m_list << item; + } + endResetModel(); +} + diff --git a/src/modules/keyboard/KeyboardLayoutModel.h b/src/modules/keyboard/KeyboardLayoutModel.h index f4699c9f8..0fd662263 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.h +++ b/src/modules/keyboard/KeyboardLayoutModel.h @@ -51,4 +51,61 @@ signals: void currentIndexChanged( int index ); }; +class KeyboardModelsModel : public QAbstractListModel +{ + Q_OBJECT + Q_PROPERTY( int currentIndex WRITE setCurrentIndex READ currentIndex NOTIFY currentIndexChanged ) + +public: + explicit KeyboardModelsModel( QObject* parent = nullptr ); + int rowCount( const QModelIndex& = QModelIndex() ) const override; + QVariant data( const QModelIndex& index, int role ) const override; + + void setCurrentIndex( const int& index ); + int currentIndex() const; + const QMap< QString, QString > item( const int& index ) const; + +public slots: + void refresh(); + +protected: + QHash< int, QByteArray > roleNames() const override; + +private: + int m_currentIndex = -1; + QVector< QMap< QString, QString > > m_list; + void detectModels(); + +signals: + void currentIndexChanged( int index ); +}; + +class KeyboardVariantsModel : public QAbstractListModel +{ + Q_OBJECT + Q_PROPERTY( int currentIndex WRITE setCurrentIndex READ currentIndex NOTIFY currentIndexChanged ) + +public: + explicit KeyboardVariantsModel( QObject* parent = nullptr ); + void setVariants( QMap< QString, QString > variants ); + + int rowCount( const QModelIndex& = QModelIndex() ) const override; + QVariant data( const QModelIndex& index, int role ) const override; + + void setCurrentIndex( const int& index ); + int currentIndex() const; + + const QMap< QString, QString > item( const int& index ) const; + +protected: + QHash< int, QByteArray > roleNames() const override; + +private: + int m_currentIndex = -1; + QVector< QMap< QString, QString > > m_list; + +signals: + void currentIndexChanged( int index ); +}; + #endif // KEYBOARDLAYOUTMODEL_H From ec42e3294fdd707b897c2700cb481f0c5bebd18e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 12 Oct 2020 14:37:00 +0200 Subject: [PATCH 02/78] [keyboard] Refactor argument-lists for setxkbmap - separate functions for model, and layout+variant settings --- src/modules/keyboard/Config.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index e5574f186..10ad49b21 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -23,11 +23,22 @@ #include #include +/* Returns stringlist with suitable setxkbmap command-line arguments + * to set the given @p model. + */ +static inline QStringList +xkbmap_model_args( const QString& model ) +{ + QStringList r { "-model", model }; + return r; +} + + /* Returns stringlist with suitable setxkbmap command-line arguments * to set the given @p layout and @p variant. */ static inline QStringList -xkbmap_args( const QString& layout, const QString& variant ) +xkbmap_layout_args( const QString& layout, const QString& variant ) { QStringList r { "-layout", layout }; if ( !variant.isEmpty() ) @@ -49,7 +60,7 @@ Config::Config( QObject* parent ) connect( m_keyboardModelsModel, &KeyboardModelsModel::currentIndexChanged, [&]( int index ) { m_selectedModel = m_keyboardModelsModel->item( index ).value( "key", "pc105" ); // Set Xorg keyboard model - QProcess::execute( "setxkbmap", QStringList { "-model", m_selectedModel } ); + QProcess::execute( "setxkbmap", xkbmap_model_args( m_selectedModel ) ); emit prettyStatusChanged(); } ); @@ -70,7 +81,7 @@ Config::Config( QObject* parent ) } connect( &m_setxkbmapTimer, &QTimer::timeout, this, [=] { - QProcess::execute( "setxkbmap", xkbmap_args( m_selectedLayout, m_selectedVariant ) ); + QProcess::execute( "setxkbmap", xkbmap_layout_args( m_selectedLayout, m_selectedVariant ) ); cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant; m_setxkbmapTimer.disconnect( this ); } ); From 0f6602cad7d180098d37f3bd4cb587103b59bd7d Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 12 Oct 2020 15:58:26 +0200 Subject: [PATCH 03/78] [keyboard] Improve xkb parsing --- src/modules/keyboard/Config.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 10ad49b21..403f696a9 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -138,18 +138,25 @@ Config::init() { const QStringList list = QString( process.readAll() ).split( "\n", SplitSkipEmptyParts ); - for ( QString line : list ) + // A typical line looks like + // xkb_symbols { include "pc+latin+ru:2+inet(evdev)+group(alt_shift_toggle)+ctrl(swapcaps)" }; + for ( const auto& line : list ) { - line = line.trimmed(); - if ( !line.startsWith( "xkb_symbols" ) ) + if ( !line.trimmed().startsWith( "xkb_symbols" ) ) { continue; } - line = line.remove( "}" ).remove( "{" ).remove( ";" ); - line = line.mid( line.indexOf( "\"" ) + 1 ); + int firstQuote = line.indexOf('"'); + int lastQuote = line.lastIndexOf('"'); - QStringList split = line.split( "+", SplitSkipEmptyParts ); + if (firstQuote < 0 || lastQuote < 0 || lastQuote <= firstQuote) + { + continue; + } + + QStringList split = line.mid(firstQuote+1, lastQuote-firstQuote).split( "+", SplitSkipEmptyParts ); + cDebug() << split; if ( split.size() >= 2 ) { currentLayout = split.at( 1 ); From c7c7e6a6c14d8e73fc1f0234613aee66775955c9 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 12 Oct 2020 16:30:06 +0200 Subject: [PATCH 04/78] [keyboard] Move configuration to the Config object - information from the configuration file -> Config object - job creation -> Config object Ignore keyboardq for now. --- src/modules/keyboard/CMakeLists.txt | 1 + src/modules/keyboard/Config.cpp | 47 +++++++++++++++++-- src/modules/keyboard/Config.h | 11 ++++- src/modules/keyboard/KeyboardViewStep.cpp | 42 ++--------------- src/modules/keyboard/KeyboardViewStep.h | 8 +--- src/modules/keyboardq/KeyboardQmlViewStep.cpp | 2 +- 6 files changed, 60 insertions(+), 51 deletions(-) diff --git a/src/modules/keyboard/CMakeLists.txt b/src/modules/keyboard/CMakeLists.txt index e9037bc03..32e9a0592 100644 --- a/src/modules/keyboard/CMakeLists.txt +++ b/src/modules/keyboard/CMakeLists.txt @@ -7,6 +7,7 @@ calamares_add_plugin( keyboard TYPE viewmodule EXPORT_MACRO PLUGINDLLEXPORT_PRO SOURCES + Config.cpp KeyboardViewStep.cpp KeyboardPage.cpp KeyboardLayoutModel.cpp diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 403f696a9..7f7eb7b27 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -18,6 +18,7 @@ #include "utils/Logger.h" #include "utils/Retranslator.h" #include "utils/String.h" +#include "utils/Variant.h" #include #include @@ -214,16 +215,16 @@ Config::prettyStatus() const } Calamares::JobList -Config::createJobs( const QString& xOrgConfFileName, const QString& convertedKeymapPath, bool writeEtcDefaultKeyboard ) +Config::createJobs() { QList< Calamares::job_ptr > list; Calamares::Job* j = new SetKeyboardLayoutJob( m_selectedModel, m_selectedLayout, m_selectedVariant, - xOrgConfFileName, - convertedKeymapPath, - writeEtcDefaultKeyboard ); + m_xOrgConfFileName, + m_convertedKeymapPath, + m_writeEtcDefaultKeyboard ); list.append( Calamares::job_ptr( j ) ); return list; @@ -393,3 +394,41 @@ Config::updateVariants( const QPersistentModelIndex& currentItem, QString curren } } } + +void +Config::setConfigurationMap( const QVariantMap& configurationMap ) +{ + using namespace CalamaresUtils; + + if ( configurationMap.contains( "xOrgConfFileName" ) + && configurationMap.value( "xOrgConfFileName" ).type() == QVariant::String + && !getString( configurationMap, "xOrgConfFileName" ).isEmpty() ) + { + m_xOrgConfFileName = getString( configurationMap, "xOrgConfFileName" ); + } + else + { + m_xOrgConfFileName = "00-keyboard.conf"; + } + + if ( configurationMap.contains( "convertedKeymapPath" ) + && configurationMap.value( "convertedKeymapPath" ).type() == QVariant::String + && !getString( configurationMap, "convertedKeymapPath" ).isEmpty() ) + { + m_convertedKeymapPath = getString( configurationMap, "convertedKeymapPath" ); + } + else + { + m_convertedKeymapPath = QString(); + } + + if ( configurationMap.contains( "writeEtcDefaultKeyboard" ) + && configurationMap.value( "writeEtcDefaultKeyboard" ).type() == QVariant::Bool ) + { + m_writeEtcDefaultKeyboard = getBool( configurationMap, "writeEtcDefaultKeyboard", true ); + } + else + { + m_writeEtcDefaultKeyboard = true; + } +} diff --git a/src/modules/keyboard/Config.h b/src/modules/keyboard/Config.h index f02c08877..9a3a3a013 100644 --- a/src/modules/keyboard/Config.h +++ b/src/modules/keyboard/Config.h @@ -33,13 +33,14 @@ public: void init(); - Calamares::JobList - createJobs( const QString& xOrgConfFileName, const QString& convertedKeymapPath, bool writeEtcDefaultKeyboard ); + Calamares::JobList createJobs(); QString prettyStatus() const; void onActivate(); void finalize(); + void setConfigurationMap( const QVariantMap& configurationMap ); + private: void guessLayout( const QStringList& langParts ); void updateVariants( const QPersistentModelIndex& currentItem, QString currentVariant = QString() ); @@ -53,6 +54,12 @@ private: QString m_selectedVariant; QTimer m_setxkbmapTimer; + // From configuration + QString m_xOrgConfFileName; + QString m_convertedKeymapPath; + bool m_writeEtcDefaultKeyboard = true; + + protected: KeyboardModelsModel* keyboardModels() const; KeyboardLayoutModel* keyboardLayouts() const; diff --git a/src/modules/keyboard/KeyboardViewStep.cpp b/src/modules/keyboard/KeyboardViewStep.cpp index 55402fd14..03159268e 100644 --- a/src/modules/keyboard/KeyboardViewStep.cpp +++ b/src/modules/keyboard/KeyboardViewStep.cpp @@ -9,20 +9,19 @@ #include "KeyboardViewStep.h" +#include "Config.h" #include "KeyboardPage.h" #include "GlobalStorage.h" #include "JobQueue.h" -#include "utils/Variant.h" - CALAMARES_PLUGIN_FACTORY_DEFINITION( KeyboardViewStepFactory, registerPlugin< KeyboardViewStep >(); ) KeyboardViewStep::KeyboardViewStep( QObject* parent ) : Calamares::ViewStep( parent ) + , m_config( new Config(this) ) , m_widget( new KeyboardPage() ) , m_nextEnabled( false ) - , m_writeEtcDefaultKeyboard( true ) { m_widget->init(); m_nextEnabled = true; @@ -91,7 +90,7 @@ KeyboardViewStep::isAtEnd() const QList< Calamares::job_ptr > KeyboardViewStep::jobs() const { - return m_jobs; + return m_config->createJobs(); } @@ -106,7 +105,6 @@ void KeyboardViewStep::onLeave() { m_widget->finalize(); - m_jobs = m_widget->createJobs( m_xOrgConfFileName, m_convertedKeymapPath, m_writeEtcDefaultKeyboard ); m_prettyStatus = m_widget->prettyStatus(); } @@ -114,37 +112,5 @@ KeyboardViewStep::onLeave() void KeyboardViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { - using namespace CalamaresUtils; - - if ( configurationMap.contains( "xOrgConfFileName" ) - && configurationMap.value( "xOrgConfFileName" ).type() == QVariant::String - && !getString( configurationMap, "xOrgConfFileName" ).isEmpty() ) - { - m_xOrgConfFileName = getString( configurationMap, "xOrgConfFileName" ); - } - else - { - m_xOrgConfFileName = "00-keyboard.conf"; - } - - if ( configurationMap.contains( "convertedKeymapPath" ) - && configurationMap.value( "convertedKeymapPath" ).type() == QVariant::String - && !getString( configurationMap, "convertedKeymapPath" ).isEmpty() ) - { - m_convertedKeymapPath = getString( configurationMap, "convertedKeymapPath" ); - } - else - { - m_convertedKeymapPath = QString(); - } - - if ( configurationMap.contains( "writeEtcDefaultKeyboard" ) - && configurationMap.value( "writeEtcDefaultKeyboard" ).type() == QVariant::Bool ) - { - m_writeEtcDefaultKeyboard = getBool( configurationMap, "writeEtcDefaultKeyboard", true ); - } - else - { - m_writeEtcDefaultKeyboard = true; - } + m_config->setConfigurationMap(configurationMap); } diff --git a/src/modules/keyboard/KeyboardViewStep.h b/src/modules/keyboard/KeyboardViewStep.h index aa9a1d335..5cf2c6fd9 100644 --- a/src/modules/keyboard/KeyboardViewStep.h +++ b/src/modules/keyboard/KeyboardViewStep.h @@ -17,6 +17,7 @@ #include +class Config; class KeyboardPage; class PLUGINDLLEXPORT KeyboardViewStep : public Calamares::ViewStep @@ -46,15 +47,10 @@ public: void setConfigurationMap( const QVariantMap& configurationMap ) override; private: + Config* m_config; KeyboardPage* m_widget; bool m_nextEnabled; QString m_prettyStatus; - - QString m_xOrgConfFileName; - QString m_convertedKeymapPath; - bool m_writeEtcDefaultKeyboard; - - Calamares::JobList m_jobs; }; CALAMARES_PLUGIN_FACTORY_DECLARATION( KeyboardViewStepFactory ) diff --git a/src/modules/keyboardq/KeyboardQmlViewStep.cpp b/src/modules/keyboardq/KeyboardQmlViewStep.cpp index d42ab5269..08b72b3f4 100644 --- a/src/modules/keyboardq/KeyboardQmlViewStep.cpp +++ b/src/modules/keyboardq/KeyboardQmlViewStep.cpp @@ -79,7 +79,7 @@ void KeyboardQmlViewStep::onLeave() { m_config->finalize(); - m_jobs = m_config->createJobs( m_xOrgConfFileName, m_convertedKeymapPath, m_writeEtcDefaultKeyboard ); + // m_jobs = m_config->createJobs( m_xOrgConfFileName, m_convertedKeymapPath, m_writeEtcDefaultKeyboard ); m_prettyStatus = m_config->prettyStatus(); } From d91683eec63e629a0588a8fd25a0246fe27b87d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20PORTAY?= Date: Thu, 22 Oct 2020 13:19:28 -0400 Subject: [PATCH 05/78] [partition] Fix message user if no option available The button m_eraseButton is not tested while the button m_somethingElseButton is tested twice. --- src/modules/partition/gui/ChoicePage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index ac8d6fd92..897f89165 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -1464,7 +1464,7 @@ ChoicePage::setupActions() } if ( m_somethingElseButton->isHidden() && m_alongsideButton->isHidden() && m_replaceButton->isHidden() - && m_somethingElseButton->isHidden() ) + && m_eraseButton->isHidden() ) { if ( atLeastOneIsMounted ) { From c412e285c29e9f055eba42b7153deac73526aa03 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 23 Oct 2020 12:01:29 +0200 Subject: [PATCH 06/78] [libcalamares] Link publicly to yaml-cpp Needed on FreeBSD, where you otherwise might not get the include paths for yaml-cpp added -- and utils/Yaml.h expects them to be there. --- src/libcalamares/CMakeLists.txt | 2 +- src/modules/users/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcalamares/CMakeLists.txt b/src/libcalamares/CMakeLists.txt index b1e40c3ae..a8b96065f 100644 --- a/src/libcalamares/CMakeLists.txt +++ b/src/libcalamares/CMakeLists.txt @@ -148,8 +148,8 @@ calamares_automoc( calamares ) target_link_libraries( calamares LINK_PRIVATE ${OPTIONAL_PRIVATE_LIBRARIES} - yamlcpp LINK_PUBLIC + yamlcpp Qt5::Core KF5::CoreAddons ${OPTIONAL_PUBLIC_LIBRARIES} diff --git a/src/modules/users/CMakeLists.txt b/src/modules/users/CMakeLists.txt index 5752ae67a..fdae38440 100644 --- a/src/modules/users/CMakeLists.txt +++ b/src/modules/users/CMakeLists.txt @@ -85,7 +85,7 @@ calamares_add_test( ${JOB_SRC} ${CONFIG_SRC} LIBRARIES - ${USER_EXTRA_LIB} Qt5::DBus # HostName job can use DBus to systemd ${CRYPT_LIBRARIES} # SetPassword job uses crypt() + ${USER_EXTRA_LIB} ) From 9e624c7bd5aa81aaabb219566f276919396a490f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 23 Oct 2020 12:40:03 +0200 Subject: [PATCH 07/78] [unpackfs] Fix schema validation - the *weight* key was introduced without a corresponding schema change, so the examples didn't validate anymore. --- src/modules/unpackfs/unpackfs.schema.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/unpackfs/unpackfs.schema.yaml b/src/modules/unpackfs/unpackfs.schema.yaml index 66c7c0da8..0d96fe9cb 100644 --- a/src/modules/unpackfs/unpackfs.schema.yaml +++ b/src/modules/unpackfs/unpackfs.schema.yaml @@ -17,4 +17,5 @@ properties: destination: { type: string } excludeFile: { type: string } exclude: { type: array, items: { type: string } } + weight: { type: integer, exclusiveMinimum: 0 } required: [ source , sourcefs, destination ] From daeee09fdbc796fd76ff2ae7a1ee683ddd2ad88c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 23 Oct 2020 17:15:55 +0200 Subject: [PATCH 08/78] [machineid] Simplify loading of the list of entropy-files --- src/modules/machineid/MachineIdJob.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/modules/machineid/MachineIdJob.cpp b/src/modules/machineid/MachineIdJob.cpp index 8a33288b9..fef63828a 100644 --- a/src/modules/machineid/MachineIdJob.cpp +++ b/src/modules/machineid/MachineIdJob.cpp @@ -153,18 +153,13 @@ MachineIdJob::setConfigurationMap( const QVariantMap& map ) m_dbus_symlink = m_dbus && m_dbus_symlink; m_entropy_copy = CalamaresUtils::getBool( map, "entropy-copy", false ); - m_entropy_files = CalamaresUtils::getStringList( map, "entropy-files" ); if ( CalamaresUtils::getBool( map, "entropy", false ) ) { - cWarning() << "MachineId:: configuration setting *entropy* is deprecated, use *entropy-files*."; - - QString target_entropy_file = QStringLiteral( "/var/lib/urandom/random-seed" ); - if ( !m_entropy_files.contains( target_entropy_file ) ) - { - m_entropy_files.append( target_entropy_file ); - } + cWarning() << "MachineId:: configuration setting *entropy* is deprecated, use *entropy-files* instead."; + m_entropy_files.append( QStringLiteral( "/var/lib/urandom/random-seed" ) ); } + m_entropy_files.removeDuplicates(); } CALAMARES_PLUGIN_FACTORY_DEFINITION( MachineIdJobFactory, registerPlugin< MachineIdJob >(); ) From aa6109d4700ba3d4c8306762fb84a4f15d1055aa Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 23 Oct 2020 17:16:24 +0200 Subject: [PATCH 09/78] [machineid] Improve config-documentation --- src/modules/machineid/machineid.conf | 30 ++++++++++++++++----- src/modules/machineid/machineid.schema.yaml | 8 +++--- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/modules/machineid/machineid.conf b/src/modules/machineid/machineid.conf index c6189e598..15e190299 100644 --- a/src/modules/machineid/machineid.conf +++ b/src/modules/machineid/machineid.conf @@ -11,21 +11,39 @@ # --- # Whether to create /etc/machine-id for systemd. +# The default is *false*. systemd: true # Whether to create /var/lib/dbus/machine-id for D-Bus. +# The default is *false*. dbus: true # Whether /var/lib/dbus/machine-id should be a symlink to /etc/machine-id # (ignored if dbus is false, or if there is no /etc/machine-id to point to). +# The default is *false*. dbus-symlink: true -# Whether to create an entropy file /var/lib/urandom/random-seed -# -# DEPRECATED: list the file in entropy-files instead -entropy: false -# Whether to copy entropy from the host +# Copy entropy from the host? If this is set to *true*, then +# any entropy file listed below will be copied from the host +# if it exists. Non-existent files will be generated from +# /dev/urandom . The default is *false*. entropy-copy: false -# Which files to write (paths in the target) +# Which files to write (paths in the target). Each of these files is +# either generated from /dev/urandom or copied from the host, depending +# on the setting for *entropy-copy*, above. entropy-files: - /var/lib/urandom/random-seed - /var/lib/systemd/random-seed + +# Whether to create an entropy file /var/lib/urandom/random-seed +# +# DEPRECATED: list the file in entropy-files instead. If this key +# exists and is set to *true*, a warning is printed and Calamares +# behaves as if `/var/lib/urandom/random-seed` is listed in *entropy-files*. +# +# entropy: false + +# Whether to create a symlink for D-Bus +# +# DEPRECATED: set *dbus-symlink* with the same meaning instead. +# +# symlink: false diff --git a/src/modules/machineid/machineid.schema.yaml b/src/modules/machineid/machineid.schema.yaml index 1ae67e132..59bb5f81b 100644 --- a/src/modules/machineid/machineid.schema.yaml +++ b/src/modules/machineid/machineid.schema.yaml @@ -6,11 +6,11 @@ $id: https://calamares.io/schemas/machineid additionalProperties: false type: object properties: - systemd: { type: boolean, default: true } - dbus: { type: boolean, default: true } - "dbus-symlink": { type: boolean, default: true } + systemd: { type: boolean, default: false } + dbus: { type: boolean, default: false } + "dbus-symlink": { type: boolean, default: false } "entropy-copy": { type: boolean, default: false } "entropy-files": { type: array, items: { type: string } } # Deprecated properties - symlink: { type: boolean, default: true } + symlink: { type: boolean, default: false } entropy: { type: boolean, default: false } From 697ee6f65fcb6562fb5afd07f4ed54b7be5106ec Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 23 Oct 2020 17:16:37 +0200 Subject: [PATCH 10/78] CI: accept clang-format90 (FreeBSD naming style) --- ci/calamaresstyle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/calamaresstyle b/ci/calamaresstyle index bd715eee1..42adc33cc 100755 --- a/ci/calamaresstyle +++ b/ci/calamaresstyle @@ -22,7 +22,7 @@ export LANG LC_ALL LC_NUMERIC AS=$( which astyle ) -CF_VERSIONS="clang-format-7 clang-format-8 clang-format70 clang-format80 clang-format-9.0.1 clang-format" +CF_VERSIONS="clang-format-7 clang-format-8 clang-format70 clang-format80 clang-format90 clang-format-9.0.1 clang-format" for _cf in $CF_VERSIONS do # Not an error if this particular clang-format isn't found From 51b47862cded5f358ef592b9f96128fd23779481 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 23 Oct 2020 22:23:10 +0200 Subject: [PATCH 11/78] [partition] Mark destructors `override` This reduces compiler warnings related to virtual-overriding functions: all the destructors are virtual. --- src/modules/partition/core/Config.h | 2 +- src/modules/partition/core/PartitionCoreModule.h | 2 +- src/modules/partition/gui/ChoicePage.h | 2 +- src/modules/partition/gui/CreatePartitionDialog.h | 2 +- src/modules/partition/gui/EditExistingPartitionDialog.h | 2 +- src/modules/partition/gui/PartitionPage.h | 2 +- src/modules/partition/gui/ReplaceWidget.h | 2 +- src/modules/partition/gui/VolumeGroupBaseDialog.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/partition/core/Config.h b/src/modules/partition/core/Config.h index 1629ccc22..57230b6e8 100644 --- a/src/modules/partition/core/Config.h +++ b/src/modules/partition/core/Config.h @@ -28,7 +28,7 @@ class Config : public QObject public: Config( QObject* parent ); - virtual ~Config() = default; + ~Config() override = default; enum InstallChoice { diff --git a/src/modules/partition/core/PartitionCoreModule.h b/src/modules/partition/core/PartitionCoreModule.h index 1dc61db6f..1e4179b97 100644 --- a/src/modules/partition/core/PartitionCoreModule.h +++ b/src/modules/partition/core/PartitionCoreModule.h @@ -85,7 +85,7 @@ public: }; PartitionCoreModule( QObject* parent = nullptr ); - ~PartitionCoreModule(); + ~PartitionCoreModule() override; /** * @brief init performs a devices scan and initializes all KPMcore data diff --git a/src/modules/partition/gui/ChoicePage.h b/src/modules/partition/gui/ChoicePage.h index 118f23a46..1bdee10ea 100644 --- a/src/modules/partition/gui/ChoicePage.h +++ b/src/modules/partition/gui/ChoicePage.h @@ -54,7 +54,7 @@ class ChoicePage : public QWidget, private Ui::ChoicePage Q_OBJECT public: explicit ChoicePage( Config* config, QWidget* parent = nullptr ); - virtual ~ChoicePage(); + ~ChoicePage() override; /** * @brief init runs when the PartitionViewStep and the PartitionCoreModule are diff --git a/src/modules/partition/gui/CreatePartitionDialog.h b/src/modules/partition/gui/CreatePartitionDialog.h index dc756d352..bee70f61b 100644 --- a/src/modules/partition/gui/CreatePartitionDialog.h +++ b/src/modules/partition/gui/CreatePartitionDialog.h @@ -45,7 +45,7 @@ public: Partition* partition, const QStringList& usedMountPoints, QWidget* parentWidget = nullptr ); - ~CreatePartitionDialog(); + ~CreatePartitionDialog() override; /** * Must be called when user wants to create a partition in diff --git a/src/modules/partition/gui/EditExistingPartitionDialog.h b/src/modules/partition/gui/EditExistingPartitionDialog.h index 96cc2c4c4..89b5b55e4 100644 --- a/src/modules/partition/gui/EditExistingPartitionDialog.h +++ b/src/modules/partition/gui/EditExistingPartitionDialog.h @@ -36,7 +36,7 @@ public: Partition* partition, const QStringList& usedMountPoints, QWidget* parentWidget = nullptr ); - ~EditExistingPartitionDialog(); + ~EditExistingPartitionDialog() override; void applyChanges( PartitionCoreModule* module ); diff --git a/src/modules/partition/gui/PartitionPage.h b/src/modules/partition/gui/PartitionPage.h index 26c7dbccf..81c2cd983 100644 --- a/src/modules/partition/gui/PartitionPage.h +++ b/src/modules/partition/gui/PartitionPage.h @@ -34,7 +34,7 @@ class PartitionPage : public QWidget Q_OBJECT public: explicit PartitionPage( PartitionCoreModule* core, QWidget* parent = nullptr ); - ~PartitionPage(); + ~PartitionPage() override; void onRevertClicked(); diff --git a/src/modules/partition/gui/ReplaceWidget.h b/src/modules/partition/gui/ReplaceWidget.h index 5277e5626..fbd19b429 100644 --- a/src/modules/partition/gui/ReplaceWidget.h +++ b/src/modules/partition/gui/ReplaceWidget.h @@ -27,7 +27,7 @@ class ReplaceWidget : public QWidget Q_OBJECT public: explicit ReplaceWidget( PartitionCoreModule* core, QComboBox* devicesComboBox, QWidget* parent = nullptr ); - virtual ~ReplaceWidget(); + virtual ~ReplaceWidget() override; bool isNextEnabled() const; diff --git a/src/modules/partition/gui/VolumeGroupBaseDialog.h b/src/modules/partition/gui/VolumeGroupBaseDialog.h index 253160d97..94ed0b98b 100644 --- a/src/modules/partition/gui/VolumeGroupBaseDialog.h +++ b/src/modules/partition/gui/VolumeGroupBaseDialog.h @@ -30,7 +30,7 @@ class VolumeGroupBaseDialog : public QDialog public: explicit VolumeGroupBaseDialog( QString& vgName, QVector< const Partition* > pvList, QWidget* parent = nullptr ); - ~VolumeGroupBaseDialog(); + ~VolumeGroupBaseDialog() override; protected: virtual void updateOkButton(); From 44a11bd93b12037c491002dae77e8b31024a7a3e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 23 Oct 2020 22:27:30 +0200 Subject: [PATCH 12/78] [partition] Initialize in the initializer list, if possible --- src/modules/partition/core/PartitionLayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/partition/core/PartitionLayout.cpp b/src/modules/partition/core/PartitionLayout.cpp index 182e7606b..67a7c2906 100644 --- a/src/modules/partition/core/PartitionLayout.cpp +++ b/src/modules/partition/core/PartitionLayout.cpp @@ -44,13 +44,13 @@ getDefaultFileSystemType() } PartitionLayout::PartitionLayout() + : m_defaultFsType( getDefaultFileSystemType() ) { - m_defaultFsType = getDefaultFileSystemType(); } PartitionLayout::PartitionLayout( PartitionLayout::PartitionEntry entry ) + : PartitionLayout() { - m_defaultFsType = getDefaultFileSystemType(); m_partLayout.append( entry ); } From 687a795b71f4d035ef6ce3b8f3d193f26d596817 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 23 Oct 2020 22:31:22 +0200 Subject: [PATCH 13/78] [partition] Warnings-- by initialization order --- src/modules/partition/core/PartitionLayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/partition/core/PartitionLayout.cpp b/src/modules/partition/core/PartitionLayout.cpp index 67a7c2906..1b4e49bd6 100644 --- a/src/modules/partition/core/PartitionLayout.cpp +++ b/src/modules/partition/core/PartitionLayout.cpp @@ -82,10 +82,10 @@ PartitionLayout::PartitionEntry::PartitionEntry() } PartitionLayout::PartitionEntry::PartitionEntry( const QString& size, const QString& min, const QString& max ) - : partSize( size ) + : partAttributes( 0 ) + , partSize( size ) , partMinSize( min ) , partMaxSize( max ) - , partAttributes( 0 ) { } From 9910b23152e5f2bc70488de8e24044be668d34c1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 23 Oct 2020 22:34:53 +0200 Subject: [PATCH 14/78] [partition] Avoid uninitialized variable - if the partition size is invalid, then warn about it but do not print the (uninitialized) size of the partition. - shuffle code to continue earlier, allowing the "good path" code to be out-dented. --- .../partition/core/PartitionLayout.cpp | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/src/modules/partition/core/PartitionLayout.cpp b/src/modules/partition/core/PartitionLayout.cpp index 1b4e49bd6..d42e7b568 100644 --- a/src/modules/partition/core/PartitionLayout.cpp +++ b/src/modules/partition/core/PartitionLayout.cpp @@ -172,32 +172,30 @@ PartitionLayout::execute( Device* dev, // Let's check if we have enough space for each partSize for ( const auto& part : qAsConst( m_partLayout ) ) { - qint64 size; - // Calculate partition size - - if ( part.partSize.isValid() ) + if ( !part.partSize.isValid() ) { - // We need to ignore the percent-defined - if ( part.partSize.unit() != CalamaresUtils::Partition::SizeUnit::Percent ) - { - size = part.partSize.toSectors( totalSize, dev->logicalSize() ); - } - else - { - if ( part.partMinSize.isValid() ) - { - size = part.partMinSize.toSectors( totalSize, dev->logicalSize() ); - } - else - { - size = 0; - } - } + cWarning() << "Partition" << part.partMountPoint << "size is invalid, skipping..."; + continue; + } + + // Calculate partition size: Rely on "possibly uninitialized use" + // warnings to ensure that all the cases are covered below. + qint64 size; + // We need to ignore the percent-defined until later + if ( part.partSize.unit() != CalamaresUtils::Partition::SizeUnit::Percent ) + { + size = part.partSize.toSectors( totalSize, dev->logicalSize() ); } else { - cWarning() << "Partition" << part.partMountPoint << "size (" << size << "sectors) is invalid, skipping..."; - continue; + if ( part.partMinSize.isValid() ) + { + size = part.partMinSize.toSectors( totalSize, dev->logicalSize() ); + } + else + { + size = 0; + } } partSizeMap.insert( &part, size ); From eb8e95bb8734541f89a871c6a1231ea3d3e857e5 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 23 Oct 2020 22:39:05 +0200 Subject: [PATCH 15/78] [partition] Warnings--, explain why we're using a void* --- src/modules/partition/core/PartUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/partition/core/PartUtils.cpp b/src/modules/partition/core/PartUtils.cpp index e6c1a520d..39d593f98 100644 --- a/src/modules/partition/core/PartUtils.cpp +++ b/src/modules/partition/core/PartUtils.cpp @@ -59,7 +59,7 @@ convenienceName( const Partition* const candidate ) QString p; QTextStream s( &p ); - s << (void*)candidate; + s << (void*)(candidate); // No good name available, use pointer address return p; } From d7e64de24a65ffda3416926d550821ee9775c18f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 23 Oct 2020 23:14:00 +0200 Subject: [PATCH 16/78] [partition] Adjust docs to function - @params referring to things that don't exist - @brief that is 3 lines long --- src/modules/partition/gui/ChoicePage.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 897f89165..a91c9a8e1 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -845,10 +845,11 @@ ChoicePage::doReplaceSelectedPartition( const QModelIndex& current ) /** - * @brief ChoicePage::updateDeviceStatePreview clears and rebuilds the contents of the - * preview widget for the current on-disk state. This also triggers a rescan in the - * PCM to get a Device* copy that's unaffected by subsequent PCM changes. - * @param currentDevice a pointer to the selected Device. + * @brief clear and then rebuild the contents of the preview widget + * + * The preview widget for the current disk is completely re-constructed + * based on the on-disk state. This also triggers a rescan in the + * PCM to get a Device* copy that's unaffected by subsequent PCM changes. */ void ChoicePage::updateDeviceStatePreview() @@ -916,10 +917,10 @@ ChoicePage::updateDeviceStatePreview() /** - * @brief ChoicePage::updateActionChoicePreview clears and rebuilds the contents of the - * preview widget for the current PCM-proposed state. No rescans here, this should - * be immediate. - * @param currentDevice a pointer to the selected Device. + * @brief rebuild the contents of the preview for the PCM-proposed state. + * + * No rescans here, this should be immediate. + * * @param choice the chosen partitioning action. */ void From 6605e11394a3f7149aaa0eb7236a8f266e7cf79b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 24 Oct 2020 02:05:14 +0200 Subject: [PATCH 17/78] [partition] Warnings-- in test: don't expose internal variable --- src/modules/partition/tests/PartitionJobTests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/partition/tests/PartitionJobTests.cpp b/src/modules/partition/tests/PartitionJobTests.cpp index 60e72e006..2b0b1a1dc 100644 --- a/src/modules/partition/tests/PartitionJobTests.cpp +++ b/src/modules/partition/tests/PartitionJobTests.cpp @@ -156,7 +156,7 @@ QueueRunner::onFailed( const QString& message, const QString& details ) QFAIL( qPrintable( msg ) ); } -CalamaresUtils::Partition::KPMManager* kpmcore = nullptr; +static CalamaresUtils::Partition::KPMManager* kpmcore = nullptr; //- PartitionJobTests ------------------------------------------------------------------ PartitionJobTests::PartitionJobTests() From 01b75ef4b51de7a8904652a4af73bef00f91055e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 24 Oct 2020 02:19:05 +0200 Subject: [PATCH 18/78] [partition] Use C++-style cast --- src/modules/partition/core/PartUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/partition/core/PartUtils.cpp b/src/modules/partition/core/PartUtils.cpp index 39d593f98..a514b9c34 100644 --- a/src/modules/partition/core/PartUtils.cpp +++ b/src/modules/partition/core/PartUtils.cpp @@ -59,7 +59,7 @@ convenienceName( const Partition* const candidate ) QString p; QTextStream s( &p ); - s << (void*)(candidate); // No good name available, use pointer address + s << static_cast(candidate); // No good name available, use pointer address return p; } From 89b1f8d96b7ac01d3e082f614cfaecb3420bb7fd Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 24 Oct 2020 02:21:32 +0200 Subject: [PATCH 19/78] [partition] Warnings-- in tests related to virtual destructors --- src/modules/partition/tests/CreateLayoutsTests.cpp | 4 ++++ src/modules/partition/tests/CreateLayoutsTests.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/modules/partition/tests/CreateLayoutsTests.cpp b/src/modules/partition/tests/CreateLayoutsTests.cpp index 7589b5b65..dcfc01f5a 100644 --- a/src/modules/partition/tests/CreateLayoutsTests.cpp +++ b/src/modules/partition/tests/CreateLayoutsTests.cpp @@ -156,3 +156,7 @@ TestDevice::TestDevice( const QString& name, const qint64 logicalSectorSize, con { } #endif + +TestDevice::~TestDevice() +{ +} diff --git a/src/modules/partition/tests/CreateLayoutsTests.h b/src/modules/partition/tests/CreateLayoutsTests.h index 98d2d8cb9..2ecc7b634 100644 --- a/src/modules/partition/tests/CreateLayoutsTests.h +++ b/src/modules/partition/tests/CreateLayoutsTests.h @@ -18,6 +18,7 @@ class CreateLayoutsTests : public QObject Q_OBJECT public: CreateLayoutsTests(); + ~CreateLayoutsTests() override = default; private Q_SLOTS: void testFixedSizePartition(); @@ -31,6 +32,7 @@ class TestDevice : public Device { public: TestDevice( const QString& name, const qint64 logicalSectorSize, const qint64 totalLogicalSectors ); + ~TestDevice() override; }; #endif From 27f6eaaf7585a0bb46f623a034c54c161d607eab Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 24 Oct 2020 02:24:37 +0200 Subject: [PATCH 20/78] [partition] Remove unused variables --- src/modules/partition/core/PartitionCoreModule.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/partition/core/PartitionCoreModule.cpp b/src/modules/partition/core/PartitionCoreModule.cpp index 3d726aef1..3327eb50b 100644 --- a/src/modules/partition/core/PartitionCoreModule.cpp +++ b/src/modules/partition/core/PartitionCoreModule.cpp @@ -110,7 +110,7 @@ updatePreview( Job* job, const std::true_type& ) template < typename Job > void -updatePreview( Job* job, const std::false_type& ) +updatePreview( Job*, const std::false_type& ) { } @@ -483,7 +483,6 @@ PartitionCoreModule::deletePartition( Device* device, Partition* partition ) } } - const Calamares::JobList& jobs = deviceInfo->jobs(); if ( partition->state() == KPM_PARTITION_STATE( New ) ) { // Take all the SetPartFlagsJob from the list and delete them From 00fa911f72d8897a73ba4d6dd1eca7b64efdd325 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 24 Oct 2020 02:31:38 +0200 Subject: [PATCH 21/78] CMake: switch to C++17 --- CHANGES | 4 +++- CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 911f7156e..ac8bf5855 100644 --- a/CHANGES +++ b/CHANGES @@ -13,7 +13,9 @@ This release contains contributions from (alphabetically by first name): - No external contributors yet ## Core ## - - No core changes yet + - Calamares now sets the C++ standard for compilation to C++17; this + is for better compatibility and fewer warnings when building with + modern KDE Frameworks and KPMcore 4.2.0. ## Modules ## - No module changes yet diff --git a/CMakeLists.txt b/CMakeLists.txt index 99f6cd42a..01cad1eec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -190,7 +190,7 @@ include( CMakeColors ) ### C++ SETUP # -set( CMAKE_CXX_STANDARD 14 ) +set( CMAKE_CXX_STANDARD 17 ) set( CMAKE_CXX_STANDARD_REQUIRED ON ) set( CMAKE_C_STANDARD 99 ) set( CMAKE_C_STANDARD_REQUIRED ON ) From 6c7d29571277f073a03138c0c02ed7e4d7bed89b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 24 Oct 2020 12:32:07 +0200 Subject: [PATCH 22/78] CMake: simplify C and C++ flags - reduce the difference between clang and g++ builds, factor common flags out of the CMake-if - drop special boost-warning-suppression, we do that differently most of the time in the affected source files --- CMakeLists.txt | 34 +++++++++++++++------------------ src/libcalamares/CMakeLists.txt | 3 --- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01cad1eec..c289d523e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -192,21 +192,28 @@ include( CMakeColors ) # set( CMAKE_CXX_STANDARD 17 ) set( CMAKE_CXX_STANDARD_REQUIRED ON ) +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type -Wl,--no-undefined" ) +set( CMAKE_CXX_FLAGS_DEBUG "-g ${CMAKE_CXX_FLAGS_DEBUG}" ) +set( CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG" ) +set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" ) +set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" ) + set( CMAKE_C_STANDARD 99 ) set( CMAKE_C_STANDARD_REQUIRED ON ) - set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall" ) +set( CMAKE_C_FLAGS_DEBUG "-g" ) +set( CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG" ) +set( CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG" ) +set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" ) + +set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) + if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) message( STATUS "Found Clang ${CMAKE_CXX_COMPILER_VERSION}, setting up Clang-specific compiler flags." ) - set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall" ) - set( CMAKE_C_FLAGS_DEBUG "-g" ) - set( CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG" ) - set( CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG" ) - set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" ) # Clang warnings: doing *everything* is counter-productive, since it warns # about things which we can't fix (e.g. C++98 incompatibilities, but - # Calamares is C++14). + # Calamares is C++17). foreach( CLANG_WARNINGS -Weverything -Wno-c++98-compat @@ -218,7 +225,6 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) -Wno-missing-prototypes -Wno-documentation-unknown-command -Wno-unknown-warning-option - -Werror=return-type ) string( APPEND CMAKE_CXX_FLAGS " ${CLANG_WARNINGS}" ) endforeach() @@ -229,27 +235,17 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # mark_thirdparty_code( [...] ) # to switch off warnings for those sources. set( SUPPRESS_3RDPARTY_WARNINGS "-Wno-everything" ) - set( SUPPRESS_BOOST_WARNINGS " -Wno-zero-as-null-pointer-constant -Wno-disabled-macro-expansion" ) - - set( CMAKE_CXX_FLAGS_DEBUG "-g ${CMAKE_CXX_FLAGS_DEBUG}" ) - set( CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG" ) - set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" ) - set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" ) set( CMAKE_TOOLCHAIN_PREFIX "llvm-" ) - set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) - # The path prefix is only relevant for CMake 3.16 and later, fixes #1286 set( CMAKE_AUTOMOC_PATH_PREFIX OFF ) set( CALAMARES_AUTOMOC_OPTIONS "-butils/moc-warnings.h" ) set( CALAMARES_AUTOUIC_OPTIONS --include utils/moc-warnings.h ) else() - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-undefined" ) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--fatal-warnings -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--fatal-warnings -Wnon-virtual-dtor -Woverloaded-virtual" ) set( SUPPRESS_3RDPARTY_WARNINGS "" ) - set( SUPPRESS_BOOST_WARNINGS "" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTREACHED='__builtin_unreachable();' -DFALLTHRU='/* */'" ) endif() diff --git a/src/libcalamares/CMakeLists.txt b/src/libcalamares/CMakeLists.txt index a8b96065f..3964eb3e6 100644 --- a/src/libcalamares/CMakeLists.txt +++ b/src/libcalamares/CMakeLists.txt @@ -86,9 +86,6 @@ if( WITH_PYTHON ) PythonJob.cpp PythonJobApi.cpp ) - set_source_files_properties( PythonJob.cpp - PROPERTIES COMPILE_FLAGS "${SUPPRESS_BOOST_WARNINGS}" - ) include_directories(${PYTHON_INCLUDE_DIRS}) link_directories(${PYTHON_LIBRARIES}) From b28a50de6fa805e608bd0d534fe825ba1a57e5fb Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 24 Oct 2020 12:35:19 +0200 Subject: [PATCH 23/78] [libcalamares] Remove useless variable - describe() is for debugging purposes, doesn't need to calculate whether the requirements are accepted. --- src/libcalamares/modulesystem/RequirementsModel.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/libcalamares/modulesystem/RequirementsModel.cpp b/src/libcalamares/modulesystem/RequirementsModel.cpp index 9dfab0c8f..6a7e0a5b4 100644 --- a/src/libcalamares/modulesystem/RequirementsModel.cpp +++ b/src/libcalamares/modulesystem/RequirementsModel.cpp @@ -85,16 +85,11 @@ void RequirementsModel::describe() const { cDebug() << "Requirements model has" << m_requirements.count() << "items"; - bool acceptable = true; int count = 0; for ( const auto& r : m_requirements ) { cDebug() << Logger::SubEntry << "requirement" << count << r.name << "satisfied?" << r.satisfied << "mandatory?" << r.mandatory; - if ( r.mandatory && !r.satisfied ) - { - acceptable = false; - } ++count; } } From 84936a95fcdfcace8a56f15ad6237dfaffd4544c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 24 Oct 2020 12:49:56 +0200 Subject: [PATCH 24/78] [libcalamaresui] Warnings-- for Qt 5.15 deprecations Introduce a GUI-oriented compatibility header that introduces aliases for some enum values that are deprecated in Qt 5.15 --- src/libcalamaresui/utils/QtCompat.h | 42 +++++++++++++++++++ src/modules/license/LicenseWidget.cpp | 3 +- src/modules/partition/gui/BootInfoWidget.cpp | 3 +- .../partition/gui/DeviceInfoWidget.cpp | 4 +- .../partition/gui/PartitionViewStep.cpp | 3 +- src/modules/summary/SummaryPage.cpp | 3 +- 6 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 src/libcalamaresui/utils/QtCompat.h diff --git a/src/libcalamaresui/utils/QtCompat.h b/src/libcalamaresui/utils/QtCompat.h new file mode 100644 index 000000000..d53c01e0b --- /dev/null +++ b/src/libcalamaresui/utils/QtCompat.h @@ -0,0 +1,42 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later + * Calamares is Free Software: see the License-Identifier above. + * + */ + +/**@file Handle compatibility and deprecations across Qt versions + * + * Since Calamares is supposed to work with Qt 5.9 or later, it covers a + * lot of changes in the Qt API. Especially the later Qt 5.15 (last LTS) + * versions deprecate a number of enum values and parts of the QWidgets + * API. This file adjusts for that by introducing suitable aliases + * and workaround-functions. + * + * For a similar approach for QtCore, see libcalamares/utils/String.h + */ + +#ifndef UTILS_QTCOMPAT_H +#define UTILS_QTCOMPAT_H + +#include + +/* Avoid warnings about QPalette changes */ +constexpr static const auto WindowBackground = +#if QT_VERSION < QT_VERSION_CHECK( 5, 15, 0 ) + QPalette::Background +#else + QPalette::Window +#endif + ; + +constexpr static const auto WindowText = +#if QT_VERSION < QT_VERSION_CHECK( 5, 15, 0 ) + QPalette::Foreground +#else + QPalette::WindowText +#endif + ; + +#endif diff --git a/src/modules/license/LicenseWidget.cpp b/src/modules/license/LicenseWidget.cpp index b2e66515d..a8d581ab5 100644 --- a/src/modules/license/LicenseWidget.cpp +++ b/src/modules/license/LicenseWidget.cpp @@ -13,6 +13,7 @@ #include "LicenseWidget.h" #include "utils/Logger.h" +#include "utils/QtCompat.h" #include #include @@ -48,7 +49,7 @@ LicenseWidget::LicenseWidget( LicenseEntry entry, QWidget* parent ) , m_isExpanded( m_entry.expandByDefault() ) { QPalette pal( palette() ); - pal.setColor( QPalette::Background, palette().window().color().lighter( 108 ) ); + pal.setColor( WindowBackground, palette().window().color().lighter( 108 ) ); setObjectName( "licenseItem" ); diff --git a/src/modules/partition/gui/BootInfoWidget.cpp b/src/modules/partition/gui/BootInfoWidget.cpp index 5d9dcf8b5..0b9d08c47 100644 --- a/src/modules/partition/gui/BootInfoWidget.cpp +++ b/src/modules/partition/gui/BootInfoWidget.cpp @@ -12,6 +12,7 @@ #include "core/PartUtils.h" #include "utils/CalamaresUtilsGui.h" +#include "utils/QtCompat.h" #include "utils/Retranslator.h" #include @@ -45,7 +46,7 @@ BootInfoWidget::BootInfoWidget( QWidget* parent ) m_bootLabel->setAlignment( Qt::AlignCenter ); QPalette palette; - palette.setBrush( QPalette::Foreground, QColor( "#4D4D4D" ) ); //dark grey + palette.setBrush( WindowText, QColor( "#4D4D4D" ) ); //dark grey m_bootIcon->setAutoFillBackground( true ); m_bootLabel->setAutoFillBackground( true ); diff --git a/src/modules/partition/gui/DeviceInfoWidget.cpp b/src/modules/partition/gui/DeviceInfoWidget.cpp index 80eacd05b..708982101 100644 --- a/src/modules/partition/gui/DeviceInfoWidget.cpp +++ b/src/modules/partition/gui/DeviceInfoWidget.cpp @@ -7,13 +7,13 @@ * */ - #include "DeviceInfoWidget.h" #include "GlobalStorage.h" #include "JobQueue.h" #include "utils/CalamaresUtilsGui.h" #include "utils/Logger.h" +#include "utils/QtCompat.h" #include "utils/Retranslator.h" #include @@ -47,7 +47,7 @@ DeviceInfoWidget::DeviceInfoWidget( QWidget* parent ) m_ptLabel->setAlignment( Qt::AlignCenter ); QPalette palette; - palette.setBrush( QPalette::Foreground, QColor( "#4D4D4D" ) ); //dark grey + palette.setBrush( WindowText, QColor( "#4D4D4D" ) ); //dark grey m_ptIcon->setAutoFillBackground( true ); m_ptLabel->setAutoFillBackground( true ); diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 20c7d0f08..63227e3b7 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -34,6 +34,7 @@ #include "utils/CalamaresUtilsGui.h" #include "utils/Logger.h" #include "utils/NamedEnum.h" +#include "utils/QtCompat.h" #include "utils/Retranslator.h" #include "utils/Variant.h" #include "widgets/WaitingWidget.h" @@ -273,7 +274,7 @@ PartitionViewStep::createSummaryWidget() const jobsLabel->setText( jobsLines.join( "
" ) ); jobsLabel->setMargin( CalamaresUtils::defaultFontHeight() / 2 ); QPalette pal; - pal.setColor( QPalette::Background, pal.window().color().lighter( 108 ) ); + pal.setColor( WindowBackground, pal.window().color().lighter( 108 ) ); jobsLabel->setAutoFillBackground( true ); jobsLabel->setPalette( pal ); } diff --git a/src/modules/summary/SummaryPage.cpp b/src/modules/summary/SummaryPage.cpp index d6917d962..96781c25e 100644 --- a/src/modules/summary/SummaryPage.cpp +++ b/src/modules/summary/SummaryPage.cpp @@ -19,6 +19,7 @@ #include "utils/CalamaresUtilsGui.h" #include "utils/Logger.h" +#include "utils/QtCompat.h" #include "utils/Retranslator.h" #include "viewpages/ExecutionViewStep.h" @@ -183,7 +184,7 @@ SummaryPage::createBodyLabel( const QString& text ) const QLabel* label = new QLabel; label->setMargin( CalamaresUtils::defaultFontHeight() / 2 ); QPalette pal( palette() ); - pal.setColor( QPalette::Background, palette().window().color().lighter( 108 ) ); + pal.setColor( WindowBackground, palette().window().color().lighter( 108 ) ); label->setAutoFillBackground( true ); label->setPalette( pal ); label->setText( text ); From 7fa1c1b787143f4a1dcc9bc9e1e77318620403e6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 24 Oct 2020 13:19:42 +0200 Subject: [PATCH 25/78] [libcalamares] Avoid object-slice g++ warns that error_already_set is polymorphic, and we're catching by-value (although we don't use that value). Avoid that. --- src/libcalamares/PythonJob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcalamares/PythonJob.cpp b/src/libcalamares/PythonJob.cpp index cd066b8bd..6944f38e5 100644 --- a/src/libcalamares/PythonJob.cpp +++ b/src/libcalamares/PythonJob.cpp @@ -284,7 +284,7 @@ PythonJob::exec() return JobResult::error( message, description ); } } - catch ( bp::error_already_set ) + catch ( bp::error_already_set& ) { QString msg; if ( PyErr_Occurred() ) From 364d50679fa1618c1bd9868676f13fa5a76485f9 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 24 Oct 2020 16:28:06 +0200 Subject: [PATCH 26/78] CMake: don't put linker flags in compile-flags variables --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c289d523e..67d7637f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -192,7 +192,7 @@ include( CMakeColors ) # set( CMAKE_CXX_STANDARD 17 ) set( CMAKE_CXX_STANDARD_REQUIRED ON ) -set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type -Wl,--no-undefined" ) +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type" ) set( CMAKE_CXX_FLAGS_DEBUG "-g ${CMAKE_CXX_FLAGS_DEBUG}" ) set( CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG" ) set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" ) @@ -206,7 +206,7 @@ set( CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG" ) set( CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG" ) set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" ) -set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) +set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined -Wl,--fatal-warnings" ) if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) message( STATUS "Found Clang ${CMAKE_CXX_COMPILER_VERSION}, setting up Clang-specific compiler flags." ) @@ -243,7 +243,7 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) set( CALAMARES_AUTOMOC_OPTIONS "-butils/moc-warnings.h" ) set( CALAMARES_AUTOUIC_OPTIONS --include utils/moc-warnings.h ) else() - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--fatal-warnings -Wnon-virtual-dtor -Woverloaded-virtual" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Woverloaded-virtual" ) set( SUPPRESS_3RDPARTY_WARNINGS "" ) From 9a2fca7f5b0126cf22ad15f3be288e39ccc243d9 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 24 Oct 2020 17:20:23 +0200 Subject: [PATCH 27/78] CMake: prefer normal C++17 [[fallthrough]] annotation --- CMakeLists.txt | 4 ++-- src/libcalamaresui/viewpages/ExecutionViewStep.cpp | 2 +- src/modules/packagechooser/PackageChooserPage.cpp | 4 ++-- src/modules/tracking/Config.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 67d7637f8..193de8c1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,7 +228,7 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) ) string( APPEND CMAKE_CXX_FLAGS " ${CLANG_WARNINGS}" ) endforeach() - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTREACHED='//' -DFALLTHRU='[[clang::fallthrough]]'") + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTREACHED='//'") # Third-party code where we don't care so much about compiler warnings # (because it's uncomfortable to patch) get different flags; use @@ -247,7 +247,7 @@ else() set( SUPPRESS_3RDPARTY_WARNINGS "" ) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTREACHED='__builtin_unreachable();' -DFALLTHRU='/* */'" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTREACHED='__builtin_unreachable();'" ) endif() # Use mark_thirdparty_code() to reduce warnings from the compiler diff --git a/src/libcalamaresui/viewpages/ExecutionViewStep.cpp b/src/libcalamaresui/viewpages/ExecutionViewStep.cpp index e3498c62d..bb629b217 100644 --- a/src/libcalamaresui/viewpages/ExecutionViewStep.cpp +++ b/src/libcalamaresui/viewpages/ExecutionViewStep.cpp @@ -42,7 +42,7 @@ makeSlideshow( QWidget* parent ) return new Calamares::SlideshowPictures( parent ); #ifdef WITH_QML case 1: - FALLTHRU; + [[fallthrough]]; case 2: return new Calamares::SlideshowQML( parent ); #endif diff --git a/src/modules/packagechooser/PackageChooserPage.cpp b/src/modules/packagechooser/PackageChooserPage.cpp index 0d5df8177..e46809fdd 100644 --- a/src/modules/packagechooser/PackageChooserPage.cpp +++ b/src/modules/packagechooser/PackageChooserPage.cpp @@ -33,12 +33,12 @@ PackageChooserPage::PackageChooserPage( PackageChooserMode mode, QWidget* parent switch ( mode ) { case PackageChooserMode::Optional: - FALLTHRU; + [[fallthrough]]; case PackageChooserMode::Required: ui->products->setSelectionMode( QAbstractItemView::SingleSelection ); break; case PackageChooserMode::OptionalMultiple: - FALLTHRU; + [[fallthrough]]; case PackageChooserMode::RequiredMultiple: ui->products->setSelectionMode( QAbstractItemView::ExtendedSelection ); } diff --git a/src/modules/tracking/Config.cpp b/src/modules/tracking/Config.cpp index f1f61edfd..0d9778c6a 100644 --- a/src/modules/tracking/Config.cpp +++ b/src/modules/tracking/Config.cpp @@ -182,10 +182,10 @@ enableLevelsBelow( Config* config, TrackingType level ) { case TrackingType::UserTracking: config->userTracking()->setTracking( TrackingStyleConfig::TrackingState::EnabledByUser ); - FALLTHRU; + [[fallthrough]]; case TrackingType::MachineTracking: config->machineTracking()->setTracking( TrackingStyleConfig::TrackingState::EnabledByUser ); - FALLTHRU; + [[fallthrough]]; case TrackingType::InstallTracking: config->installTracking()->setTracking( TrackingStyleConfig::TrackingState::EnabledByUser ); break; From 2b9fa0f982b31f0c0a891b9c077346398a1ec751 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sun, 25 Oct 2020 12:48:12 +0100 Subject: [PATCH 28/78] CMake: drop the NOTREACHED macro - both clang and g++ support __builtin_unreachable(); (as Kevin Kofler pointed out) so we don't need the macro to do different things; - the compilers have gotten better at detecting unreachable code, so instead of inserting macros or fiddly bits, just drop them and the unreachable code they comment. --- CMakeLists.txt | 3 --- src/calamares/CalamaresWindow.cpp | 1 - src/libcalamares/geoip/Handler.cpp | 1 - src/libcalamares/partition/PartitionSize.cpp | 9 --------- src/libcalamares/utils/Yaml.cpp | 3 --- src/modules/netinstall/Config.cpp | 1 - src/modules/netinstall/NetInstallViewStep.cpp | 2 +- src/modules/packagechooser/PackageChooserViewStep.cpp | 2 -- 8 files changed, 1 insertion(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 193de8c1d..a83ed6dd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,7 +228,6 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) ) string( APPEND CMAKE_CXX_FLAGS " ${CLANG_WARNINGS}" ) endforeach() - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTREACHED='//'") # Third-party code where we don't care so much about compiler warnings # (because it's uncomfortable to patch) get different flags; use @@ -246,8 +245,6 @@ else() set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Woverloaded-virtual" ) set( SUPPRESS_3RDPARTY_WARNINGS "" ) - - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTREACHED='__builtin_unreachable();'" ) endif() # Use mark_thirdparty_code() to reduce warnings from the compiler diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp index 0960da10a..b062c0b4d 100644 --- a/src/calamares/CalamaresWindow.cpp +++ b/src/calamares/CalamaresWindow.cpp @@ -271,7 +271,6 @@ flavoredWidget( Calamares::Branding::PanelFlavor flavor, case Calamares::Branding::PanelFlavor::None: return nullptr; } - NOTREACHED return nullptr; // All enum values handled above } /** @brief Adds widgets to @p layout if they belong on this @p side diff --git a/src/libcalamares/geoip/Handler.cpp b/src/libcalamares/geoip/Handler.cpp index 648ea69f4..68cf6ed6b 100644 --- a/src/libcalamares/geoip/Handler.cpp +++ b/src/libcalamares/geoip/Handler.cpp @@ -101,7 +101,6 @@ create_interface( Handler::Type t, const QString& selector ) case Handler::Type::Fixed: return std::make_unique< GeoIPFixed >( selector ); } - NOTREACHED return nullptr; } static RegionZonePair diff --git a/src/libcalamares/partition/PartitionSize.cpp b/src/libcalamares/partition/PartitionSize.cpp index d09cc6064..82444da6a 100644 --- a/src/libcalamares/partition/PartitionSize.cpp +++ b/src/libcalamares/partition/PartitionSize.cpp @@ -139,9 +139,6 @@ PartitionSize::toBytes( qint64 totalSectors, qint64 sectorSize ) const case SizeUnit::GiB: return toBytes(); } - - // notreached - return -1; } qint64 @@ -179,8 +176,6 @@ PartitionSize::toBytes( qint64 totalBytes ) const return toBytes(); } - // notreached - return -1; } qint64 @@ -211,7 +206,6 @@ PartitionSize::toBytes() const case SizeUnit::GiB: return CalamaresUtils::GiBtoBytes( static_cast< unsigned long long >( value() ) ); } - NOTREACHED return -1; } bool @@ -237,7 +231,6 @@ PartitionSize::operator<( const PartitionSize& other ) const case SizeUnit::GiB: return ( toBytes() < other.toBytes() ); } - NOTREACHED return false; } bool @@ -263,7 +256,6 @@ PartitionSize::operator>( const PartitionSize& other ) const case SizeUnit::GiB: return ( toBytes() > other.toBytes() ); } - NOTREACHED return false; } bool @@ -289,7 +281,6 @@ PartitionSize::operator==( const PartitionSize& other ) const case SizeUnit::GiB: return ( toBytes() == other.toBytes() ); } - NOTREACHED return false; } } // namespace Partition diff --git a/src/libcalamares/utils/Yaml.cpp b/src/libcalamares/utils/Yaml.cpp index b787589c6..f999b8bb0 100644 --- a/src/libcalamares/utils/Yaml.cpp +++ b/src/libcalamares/utils/Yaml.cpp @@ -52,9 +52,6 @@ yamlToVariant( const YAML::Node& node ) case YAML::NodeType::Undefined: return QVariant(); } - - // NOTREACHED - return QVariant(); } diff --git a/src/modules/netinstall/Config.cpp b/src/modules/netinstall/Config.cpp index ddbb36fcc..92cdcb2bf 100644 --- a/src/modules/netinstall/Config.cpp +++ b/src/modules/netinstall/Config.cpp @@ -43,7 +43,6 @@ Config::status() const case Status::FailedNetworkError: return tr( "Network Installation. (Disabled: Unable to fetch package lists, check your network connection)" ); } - NOTREACHED return QString(); } diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index beb295c32..e96d1724f 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -47,7 +47,7 @@ NetInstallViewStep::prettyName() const return m_sidebarLabel ? m_sidebarLabel->get() : tr( "Package selection" ); #if defined( TABLE_OF_TRANSLATIONS ) - NOTREACHED + __builtin_unreachable(); // This is a table of "standard" labels for this module. If you use them // in the label: sidebar: section of the config file, the existing // translations can be used. diff --git a/src/modules/packagechooser/PackageChooserViewStep.cpp b/src/modules/packagechooser/PackageChooserViewStep.cpp index f162c074b..b649e6431 100644 --- a/src/modules/packagechooser/PackageChooserViewStep.cpp +++ b/src/modules/packagechooser/PackageChooserViewStep.cpp @@ -110,8 +110,6 @@ PackageChooserViewStep::isNextEnabled() const // exactly one OR one or more return m_widget->hasSelection(); } - - NOTREACHED return true; } From f629826d40323e7edb0576f46ad831f5ead2549f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 25 Oct 2020 11:54:27 +0000 Subject: [PATCH 29/78] README: switch to C++17. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3049fbabc..7ad26e2c5 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Clone Calamares from GitHub. The default branch is called *calamares*. git clone https://github.com/calamares/calamares.git ``` -Calamares is a KDE-Frameworks and Qt-based, C++14, CMake-built application. +Calamares is a KDE-Frameworks and Qt-based, C++17, CMake-built application. The dependencies are explainged in [CONTRIBUTING.md](CONTRIBUTING.md). ## Contributing to Calamares From 478c394d99fb395a1cd4c8913501e95b051d2034 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sun, 25 Oct 2020 17:36:24 +0100 Subject: [PATCH 30/78] [partition] Don't needlessly expose a test symbol --- src/modules/partition/tests/CreateLayoutsTests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/partition/tests/CreateLayoutsTests.cpp b/src/modules/partition/tests/CreateLayoutsTests.cpp index dcfc01f5a..12c19db5f 100644 --- a/src/modules/partition/tests/CreateLayoutsTests.cpp +++ b/src/modules/partition/tests/CreateLayoutsTests.cpp @@ -28,7 +28,7 @@ class SmartStatus; QTEST_GUILESS_MAIN( CreateLayoutsTests ) -CalamaresUtils::Partition::KPMManager* kpmcore = nullptr; +static CalamaresUtils::Partition::KPMManager* kpmcore = nullptr; using CalamaresUtils::operator""_MiB; using CalamaresUtils::operator""_GiB; From fea403186f95bc6dbcbea17b11b09100721ce52a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sun, 25 Oct 2020 17:48:54 +0100 Subject: [PATCH 31/78] [libcalamares] Search for balance between warnings and annotations - CI's gcc is too old to analyse a switch() for completeness, so the CI build fails. --- src/libcalamares/geoip/Handler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcalamares/geoip/Handler.cpp b/src/libcalamares/geoip/Handler.cpp index 68cf6ed6b..8ef72d99b 100644 --- a/src/libcalamares/geoip/Handler.cpp +++ b/src/libcalamares/geoip/Handler.cpp @@ -101,6 +101,7 @@ create_interface( Handler::Type t, const QString& selector ) case Handler::Type::Fixed: return std::make_unique< GeoIPFixed >( selector ); } + __builtin_unreachable(); } static RegionZonePair From f6e6774f92b95caa3c25d5fd6f94fedeab468436 Mon Sep 17 00:00:00 2001 From: demmm Date: Sun, 25 Oct 2020 18:35:03 +0100 Subject: [PATCH 32/78] [keyboardq] fix build --- src/modules/keyboardq/KeyboardQmlViewStep.cpp | 41 ++----------------- src/modules/keyboardq/KeyboardQmlViewStep.h | 6 +-- 2 files changed, 5 insertions(+), 42 deletions(-) diff --git a/src/modules/keyboardq/KeyboardQmlViewStep.cpp b/src/modules/keyboardq/KeyboardQmlViewStep.cpp index 08b72b3f4..8e4663ee8 100644 --- a/src/modules/keyboardq/KeyboardQmlViewStep.cpp +++ b/src/modules/keyboardq/KeyboardQmlViewStep.cpp @@ -2,6 +2,7 @@ * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2020 Camilo Higuita + * SPDX-FileCopyrightText: 2020 Anke Boersma * SPDX-License-Identifier: GPL-3.0-or-later * * Calamares is Free Software: see the License-Identifier above. @@ -10,9 +11,10 @@ #include "KeyboardQmlViewStep.h" +#include "Config.h" + #include "GlobalStorage.h" #include "JobQueue.h" -#include "utils/Variant.h" CALAMARES_PLUGIN_FACTORY_DEFINITION( KeyboardQmlViewStepFactory, registerPlugin< KeyboardQmlViewStep >(); ) @@ -20,7 +22,6 @@ KeyboardQmlViewStep::KeyboardQmlViewStep( QObject* parent ) : Calamares::QmlViewStep( parent ) , m_config( new Config( this ) ) , m_nextEnabled( false ) - , m_writeEtcDefaultKeyboard( true ) { m_config->init(); m_nextEnabled = true; @@ -66,7 +67,7 @@ KeyboardQmlViewStep::isAtEnd() const Calamares::JobList KeyboardQmlViewStep::jobs() const { - return m_jobs; + return m_config->createJobs(); } void @@ -79,7 +80,6 @@ void KeyboardQmlViewStep::onLeave() { m_config->finalize(); - // m_jobs = m_config->createJobs( m_xOrgConfFileName, m_convertedKeymapPath, m_writeEtcDefaultKeyboard ); m_prettyStatus = m_config->prettyStatus(); } @@ -92,39 +92,6 @@ KeyboardQmlViewStep::getConfig() void KeyboardQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { - using namespace CalamaresUtils; - - if ( configurationMap.contains( "xOrgConfFileName" ) - && configurationMap.value( "xOrgConfFileName" ).type() == QVariant::String - && !getString( configurationMap, "xOrgConfFileName" ).isEmpty() ) - { - m_xOrgConfFileName = getString( configurationMap, "xOrgConfFileName" ); - } - else - { - m_xOrgConfFileName = "00-keyboard.conf"; - } - - if ( configurationMap.contains( "convertedKeymapPath" ) - && configurationMap.value( "convertedKeymapPath" ).type() == QVariant::String - && !getString( configurationMap, "convertedKeymapPath" ).isEmpty() ) - { - m_convertedKeymapPath = getString( configurationMap, "convertedKeymapPath" ); - } - else - { - m_convertedKeymapPath = QString(); - } - - if ( configurationMap.contains( "writeEtcDefaultKeyboard" ) - && configurationMap.value( "writeEtcDefaultKeyboard" ).type() == QVariant::Bool ) - { - m_writeEtcDefaultKeyboard = getBool( configurationMap, "writeEtcDefaultKeyboard", true ); - } - else - { - m_writeEtcDefaultKeyboard = true; - } Calamares::QmlViewStep::setConfigurationMap( configurationMap ); } diff --git a/src/modules/keyboardq/KeyboardQmlViewStep.h b/src/modules/keyboardq/KeyboardQmlViewStep.h index 4571a9a60..09390d8d9 100644 --- a/src/modules/keyboardq/KeyboardQmlViewStep.h +++ b/src/modules/keyboardq/KeyboardQmlViewStep.h @@ -19,6 +19,7 @@ #include +class Config; class KeyboardPage; class PLUGINDLLEXPORT KeyboardQmlViewStep : public Calamares::QmlViewStep @@ -50,11 +51,6 @@ private: bool m_nextEnabled; QString m_prettyStatus; - QString m_xOrgConfFileName; - QString m_convertedKeymapPath; - bool m_writeEtcDefaultKeyboard; - - Calamares::JobList m_jobs; }; CALAMARES_PLUGIN_FACTORY_DECLARATION( KeyboardQmlViewStepFactory ) From 98c7cec732ba76349c3b06bc076b91fadcd68625 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sun, 25 Oct 2020 18:52:38 +0100 Subject: [PATCH 33/78] CMake: restore NOTREACHED, without the macro-mess - gcc (up to at least version 10) is worse at recognizing that all cases have been handled, so it complains about all the switches that cover enum values. --- src/calamares/CalamaresWindow.cpp | 1 + src/libcalamares/partition/PartitionSize.cpp | 7 ++++++- src/libcalamares/utils/Yaml.cpp | 1 + src/modules/netinstall/Config.cpp | 1 + src/modules/packagechooser/PackageChooserViewStep.cpp | 1 + 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp index b062c0b4d..a141317e0 100644 --- a/src/calamares/CalamaresWindow.cpp +++ b/src/calamares/CalamaresWindow.cpp @@ -271,6 +271,7 @@ flavoredWidget( Calamares::Branding::PanelFlavor flavor, case Calamares::Branding::PanelFlavor::None: return nullptr; } + __builtin_unreachable(); } /** @brief Adds widgets to @p layout if they belong on this @p side diff --git a/src/libcalamares/partition/PartitionSize.cpp b/src/libcalamares/partition/PartitionSize.cpp index 82444da6a..ddd3be2ef 100644 --- a/src/libcalamares/partition/PartitionSize.cpp +++ b/src/libcalamares/partition/PartitionSize.cpp @@ -139,6 +139,7 @@ PartitionSize::toBytes( qint64 totalSectors, qint64 sectorSize ) const case SizeUnit::GiB: return toBytes(); } + __builtin_unreachable(); } qint64 @@ -175,7 +176,7 @@ PartitionSize::toBytes( qint64 totalBytes ) const case SizeUnit::GiB: return toBytes(); } - + __builtin_unreachable(); } qint64 @@ -206,6 +207,7 @@ PartitionSize::toBytes() const case SizeUnit::GiB: return CalamaresUtils::GiBtoBytes( static_cast< unsigned long long >( value() ) ); } + __builtin_unreachable(); } bool @@ -231,6 +233,7 @@ PartitionSize::operator<( const PartitionSize& other ) const case SizeUnit::GiB: return ( toBytes() < other.toBytes() ); } + __builtin_unreachable(); } bool @@ -256,6 +259,7 @@ PartitionSize::operator>( const PartitionSize& other ) const case SizeUnit::GiB: return ( toBytes() > other.toBytes() ); } + __builtin_unreachable(); } bool @@ -281,6 +285,7 @@ PartitionSize::operator==( const PartitionSize& other ) const case SizeUnit::GiB: return ( toBytes() == other.toBytes() ); } + __builtin_unreachable(); } } // namespace Partition diff --git a/src/libcalamares/utils/Yaml.cpp b/src/libcalamares/utils/Yaml.cpp index f999b8bb0..dd7523ae4 100644 --- a/src/libcalamares/utils/Yaml.cpp +++ b/src/libcalamares/utils/Yaml.cpp @@ -52,6 +52,7 @@ yamlToVariant( const YAML::Node& node ) case YAML::NodeType::Undefined: return QVariant(); } + __builtin_unreachable(); } diff --git a/src/modules/netinstall/Config.cpp b/src/modules/netinstall/Config.cpp index 92cdcb2bf..e69b3c2a4 100644 --- a/src/modules/netinstall/Config.cpp +++ b/src/modules/netinstall/Config.cpp @@ -43,6 +43,7 @@ Config::status() const case Status::FailedNetworkError: return tr( "Network Installation. (Disabled: Unable to fetch package lists, check your network connection)" ); } + __builtin_unreachable(); } diff --git a/src/modules/packagechooser/PackageChooserViewStep.cpp b/src/modules/packagechooser/PackageChooserViewStep.cpp index b649e6431..d576f2753 100644 --- a/src/modules/packagechooser/PackageChooserViewStep.cpp +++ b/src/modules/packagechooser/PackageChooserViewStep.cpp @@ -110,6 +110,7 @@ PackageChooserViewStep::isNextEnabled() const // exactly one OR one or more return m_widget->hasSelection(); } + __builtin_unreachable(); } From 83b06fe3cb9e2a3bcb24a5996c30a4fecc547f24 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Oct 2020 15:38:38 +0100 Subject: [PATCH 34/78] Changes: credits for this round --- CHANGES | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index ac8bf5855..1f6f104da 100644 --- a/CHANGES +++ b/CHANGES @@ -10,7 +10,9 @@ website will have to do for older versions. # 3.2.33 (unreleased) # This release contains contributions from (alphabetically by first name): - - No external contributors yet + - Anke Boersma + - Andrius Štikonas + - Gaël PORTAY ## Core ## - Calamares now sets the C++ standard for compilation to C++17; this From 8142d6f86cccc5119b25e0f737d23e5fff5188f6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Oct 2020 15:42:27 +0100 Subject: [PATCH 35/78] [keyboardq] Drop unnecessary variable -- just use the Config status --- src/modules/keyboardq/KeyboardQmlViewStep.cpp | 4 +--- src/modules/keyboardq/KeyboardQmlViewStep.h | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/modules/keyboardq/KeyboardQmlViewStep.cpp b/src/modules/keyboardq/KeyboardQmlViewStep.cpp index 8e4663ee8..3e37b58ec 100644 --- a/src/modules/keyboardq/KeyboardQmlViewStep.cpp +++ b/src/modules/keyboardq/KeyboardQmlViewStep.cpp @@ -37,7 +37,7 @@ KeyboardQmlViewStep::prettyName() const QString KeyboardQmlViewStep::prettyStatus() const { - return m_prettyStatus; + return m_config->prettyStatus(); } bool @@ -80,7 +80,6 @@ void KeyboardQmlViewStep::onLeave() { m_config->finalize(); - m_prettyStatus = m_config->prettyStatus(); } QObject* @@ -92,6 +91,5 @@ KeyboardQmlViewStep::getConfig() void KeyboardQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { - Calamares::QmlViewStep::setConfigurationMap( configurationMap ); } diff --git a/src/modules/keyboardq/KeyboardQmlViewStep.h b/src/modules/keyboardq/KeyboardQmlViewStep.h index 09390d8d9..c90c4a326 100644 --- a/src/modules/keyboardq/KeyboardQmlViewStep.h +++ b/src/modules/keyboardq/KeyboardQmlViewStep.h @@ -49,8 +49,6 @@ public: private: Config* m_config; bool m_nextEnabled; - QString m_prettyStatus; - }; CALAMARES_PLUGIN_FACTORY_DECLARATION( KeyboardQmlViewStepFactory ) From a940be2bb4233d7d2b99de99d8914dd4ffd3f2b3 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Oct 2020 15:46:18 +0100 Subject: [PATCH 36/78] [keyboardq] Load configuration into Config object --- src/modules/keyboardq/KeyboardQmlViewStep.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/keyboardq/KeyboardQmlViewStep.cpp b/src/modules/keyboardq/KeyboardQmlViewStep.cpp index 3e37b58ec..2eb9de0e7 100644 --- a/src/modules/keyboardq/KeyboardQmlViewStep.cpp +++ b/src/modules/keyboardq/KeyboardQmlViewStep.cpp @@ -91,5 +91,6 @@ KeyboardQmlViewStep::getConfig() void KeyboardQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { + m_config->setConfigurationMap( configurationMap ); Calamares::QmlViewStep::setConfigurationMap( configurationMap ); } From 679f61395529f79fc6ee23bd039eb002d9b68afa Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Oct 2020 15:48:51 +0100 Subject: [PATCH 37/78] [keyboard] Rename mysterious Config::init() to descriptive name --- src/modules/keyboard/Config.cpp | 2 +- src/modules/keyboard/Config.h | 2 +- src/modules/keyboardq/KeyboardQmlViewStep.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 7f7eb7b27..efb345edf 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -127,7 +127,7 @@ findLayout( const KeyboardLayoutModel* klm, const QString& currentLayout ) } void -Config::init() +Config::detectCurrentKeyboardLayout() { //### Detect current keyboard layout and variant QString currentLayout; diff --git a/src/modules/keyboard/Config.h b/src/modules/keyboard/Config.h index 9a3a3a013..7c18577f6 100644 --- a/src/modules/keyboard/Config.h +++ b/src/modules/keyboard/Config.h @@ -31,7 +31,7 @@ class Config : public QObject public: Config( QObject* parent = nullptr ); - void init(); + void detectCurrentKeyboardLayout(); Calamares::JobList createJobs(); QString prettyStatus() const; diff --git a/src/modules/keyboardq/KeyboardQmlViewStep.cpp b/src/modules/keyboardq/KeyboardQmlViewStep.cpp index 2eb9de0e7..62063b187 100644 --- a/src/modules/keyboardq/KeyboardQmlViewStep.cpp +++ b/src/modules/keyboardq/KeyboardQmlViewStep.cpp @@ -23,7 +23,7 @@ KeyboardQmlViewStep::KeyboardQmlViewStep( QObject* parent ) , m_config( new Config( this ) ) , m_nextEnabled( false ) { - m_config->init(); + m_config->detectCurrentKeyboardLayout(); m_nextEnabled = true; emit nextStatusChanged( m_nextEnabled ); } From acb51902174a435bbc58ea45abb407e3533f3711 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Oct 2020 15:51:48 +0100 Subject: [PATCH 38/78] [keyboard] Use Config methods rather than own copy - this continues the port of the keyboard module to use the Config object, which was horribly botched earlier. --- src/modules/keyboard/KeyboardPage.cpp | 102 ---------------------- src/modules/keyboard/KeyboardPage.h | 2 - src/modules/keyboard/KeyboardViewStep.cpp | 2 +- 3 files changed, 1 insertion(+), 105 deletions(-) diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 07c5cf763..f97e3ac52 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -93,108 +93,6 @@ KeyboardPage::~KeyboardPage() } -void -KeyboardPage::init() -{ - //### Detect current keyboard layout and variant - QString currentLayout; - QString currentVariant; - QProcess process; - process.start( "setxkbmap", QStringList() << "-print" ); - - if ( process.waitForFinished() ) - { - const QStringList list = QString( process.readAll() ).split( "\n", SplitSkipEmptyParts ); - - for ( QString line : list ) - { - line = line.trimmed(); - if ( !line.startsWith( "xkb_symbols" ) ) - { - continue; - } - - line = line.remove( "}" ).remove( "{" ).remove( ";" ); - line = line.mid( line.indexOf( "\"" ) + 1 ); - - QStringList split = line.split( "+", SplitSkipEmptyParts ); - if ( split.size() >= 2 ) - { - currentLayout = split.at( 1 ); - - if ( currentLayout.contains( "(" ) ) - { - int parenthesisIndex = currentLayout.indexOf( "(" ); - currentVariant = currentLayout.mid( parenthesisIndex + 1 ).trimmed(); - currentVariant.chop( 1 ); - currentLayout = currentLayout.mid( 0, parenthesisIndex ).trimmed(); - } - - break; - } - } - } - - //### Models - m_models = KeyboardGlobal::getKeyboardModels(); - QMapIterator< QString, QString > mi( m_models ); - - ui->comboBoxModel->blockSignals( true ); - - while ( mi.hasNext() ) - { - mi.next(); - - if ( mi.value() == "pc105" ) - { - m_defaultIndex = ui->comboBoxModel->count(); - } - - ui->comboBoxModel->addItem( mi.key() ); - } - - ui->comboBoxModel->blockSignals( false ); - - // Set to default value pc105 - ui->comboBoxModel->setCurrentIndex( m_defaultIndex ); - - - //### Layouts and Variants - - KeyboardLayoutModel* klm = new KeyboardLayoutModel( this ); - ui->listLayout->setModel( klm ); - connect( ui->listLayout->selectionModel(), - &QItemSelectionModel::currentChanged, - this, - &KeyboardPage::onListLayoutCurrentItemChanged ); - - // Block signals - ui->listLayout->blockSignals( true ); - - QPersistentModelIndex currentLayoutItem = findLayout( klm, currentLayout ); - if ( !currentLayoutItem.isValid() && ( ( currentLayout == "latin" ) || ( currentLayout == "pc" ) ) ) - { - currentLayout = "us"; - currentLayoutItem = findLayout( klm, currentLayout ); - } - - // Set current layout and variant - if ( currentLayoutItem.isValid() ) - { - ui->listLayout->setCurrentIndex( currentLayoutItem ); - updateVariants( currentLayoutItem, currentVariant ); - } - - // Unblock signals - ui->listLayout->blockSignals( false ); - - // Default to the first available layout if none was set - // Do this after unblocking signals so we get the default variant handling. - if ( !currentLayoutItem.isValid() && klm->rowCount() > 0 ) - { - ui->listLayout->setCurrentIndex( klm->index( 0 ) ); - } -} QString diff --git a/src/modules/keyboard/KeyboardPage.h b/src/modules/keyboard/KeyboardPage.h index 4faeebd57..4e85ae8b7 100644 --- a/src/modules/keyboard/KeyboardPage.h +++ b/src/modules/keyboard/KeyboardPage.h @@ -36,8 +36,6 @@ public: explicit KeyboardPage( QWidget* parent = nullptr ); ~KeyboardPage() override; - void init(); - QString prettyStatus() const; Calamares::JobList diff --git a/src/modules/keyboard/KeyboardViewStep.cpp b/src/modules/keyboard/KeyboardViewStep.cpp index 03159268e..0ba20dd87 100644 --- a/src/modules/keyboard/KeyboardViewStep.cpp +++ b/src/modules/keyboard/KeyboardViewStep.cpp @@ -23,7 +23,7 @@ KeyboardViewStep::KeyboardViewStep( QObject* parent ) , m_widget( new KeyboardPage() ) , m_nextEnabled( false ) { - m_widget->init(); + m_config->detectCurrentKeyboardLayout(); m_nextEnabled = true; emit nextStatusChanged( m_nextEnabled ); } From 14c079d1d6d8eab45a6476c43f740bf5aac72d59 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Oct 2020 15:53:59 +0100 Subject: [PATCH 39/78] [keyboard] Replace own copy of status by the one from Config --- src/modules/keyboard/KeyboardPage.cpp | 17 ----------------- src/modules/keyboard/KeyboardPage.h | 2 -- src/modules/keyboard/KeyboardViewStep.cpp | 3 +-- src/modules/keyboard/KeyboardViewStep.h | 1 - 4 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index f97e3ac52..25cd7a366 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -92,23 +92,6 @@ KeyboardPage::~KeyboardPage() delete ui; } - - - -QString -KeyboardPage::prettyStatus() const -{ - QString status; - status += tr( "Set keyboard model to %1.
" ).arg( ui->comboBoxModel->currentText() ); - - QString layout = ui->listLayout->currentIndex().data().toString(); - QString variant = ui->listVariant->currentItem() ? ui->listVariant->currentItem()->text() : QString( "" ); - status += tr( "Set keyboard layout to %1/%2." ).arg( layout, variant ); - - return status; -} - - QList< Calamares::job_ptr > KeyboardPage::createJobs( const QString& xOrgConfFileName, const QString& convertedKeymapPath, diff --git a/src/modules/keyboard/KeyboardPage.h b/src/modules/keyboard/KeyboardPage.h index 4e85ae8b7..6c2f99b68 100644 --- a/src/modules/keyboard/KeyboardPage.h +++ b/src/modules/keyboard/KeyboardPage.h @@ -36,8 +36,6 @@ public: explicit KeyboardPage( QWidget* parent = nullptr ); ~KeyboardPage() override; - QString prettyStatus() const; - Calamares::JobList createJobs( const QString& xOrgConfFileName, const QString& convertedKeymapPath, bool writeEtcDefaultKeyboard ); diff --git a/src/modules/keyboard/KeyboardViewStep.cpp b/src/modules/keyboard/KeyboardViewStep.cpp index 0ba20dd87..5cb168dc5 100644 --- a/src/modules/keyboard/KeyboardViewStep.cpp +++ b/src/modules/keyboard/KeyboardViewStep.cpp @@ -48,7 +48,7 @@ KeyboardViewStep::prettyName() const QString KeyboardViewStep::prettyStatus() const { - return m_prettyStatus; + return m_config->prettyStatus(); } @@ -105,7 +105,6 @@ void KeyboardViewStep::onLeave() { m_widget->finalize(); - m_prettyStatus = m_widget->prettyStatus(); } diff --git a/src/modules/keyboard/KeyboardViewStep.h b/src/modules/keyboard/KeyboardViewStep.h index 5cf2c6fd9..31769d192 100644 --- a/src/modules/keyboard/KeyboardViewStep.h +++ b/src/modules/keyboard/KeyboardViewStep.h @@ -50,7 +50,6 @@ private: Config* m_config; KeyboardPage* m_widget; bool m_nextEnabled; - QString m_prettyStatus; }; CALAMARES_PLUGIN_FACTORY_DECLARATION( KeyboardViewStepFactory ) From 35a2bd3f0fd1ba1a46f0c08ec21a1f23cd577d79 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Oct 2020 15:55:29 +0100 Subject: [PATCH 40/78] [keyboard] Use Config's own finalize() --- src/modules/keyboard/KeyboardPage.cpp | 14 -------------- src/modules/keyboard/KeyboardPage.h | 1 - src/modules/keyboard/KeyboardViewStep.cpp | 2 +- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 25cd7a366..7ca60be10 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -250,20 +250,6 @@ KeyboardPage::onActivate() } -void -KeyboardPage::finalize() -{ - Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); - if ( !m_selectedLayout.isEmpty() ) - { - gs->insert( "keyboardLayout", m_selectedLayout ); - gs->insert( "keyboardVariant", m_selectedVariant ); //empty means default variant - } - - //FIXME: also store keyboard model for something? -} - - void KeyboardPage::updateVariants( const QPersistentModelIndex& currentItem, QString currentVariant ) { diff --git a/src/modules/keyboard/KeyboardPage.h b/src/modules/keyboard/KeyboardPage.h index 6c2f99b68..41b4b7903 100644 --- a/src/modules/keyboard/KeyboardPage.h +++ b/src/modules/keyboard/KeyboardPage.h @@ -40,7 +40,6 @@ public: createJobs( const QString& xOrgConfFileName, const QString& convertedKeymapPath, bool writeEtcDefaultKeyboard ); void onActivate(); - void finalize(); protected slots: void onListLayoutCurrentItemChanged( const QModelIndex& current, const QModelIndex& previous ); diff --git a/src/modules/keyboard/KeyboardViewStep.cpp b/src/modules/keyboard/KeyboardViewStep.cpp index 5cb168dc5..a068b5a5d 100644 --- a/src/modules/keyboard/KeyboardViewStep.cpp +++ b/src/modules/keyboard/KeyboardViewStep.cpp @@ -104,7 +104,7 @@ KeyboardViewStep::onActivate() void KeyboardViewStep::onLeave() { - m_widget->finalize(); + m_config->finalize(); } From 0ffa500432a2dd5330e05d33c583336595c92ef6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Oct 2020 15:56:50 +0100 Subject: [PATCH 41/78] [keyboard] Remove unused code - this has already migrated to Config but had not been removed locally --- src/modules/keyboard/KeyboardPage.cpp | 37 --------------------------- src/modules/keyboard/KeyboardPage.h | 3 --- 2 files changed, 40 deletions(-) diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 7ca60be10..decf7714a 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -40,23 +40,6 @@ public: LayoutItem::~LayoutItem() {} -static QPersistentModelIndex -findLayout( const KeyboardLayoutModel* klm, const QString& currentLayout ) -{ - QPersistentModelIndex currentLayoutItem; - - for ( int i = 0; i < klm->rowCount(); ++i ) - { - QModelIndex idx = klm->index( i ); - if ( idx.isValid() && idx.data( KeyboardLayoutModel::KeyboardLayoutKeyRole ).toString() == currentLayout ) - { - currentLayoutItem = idx; - } - } - - return currentLayoutItem; -} - KeyboardPage::KeyboardPage( QWidget* parent ) : QWidget( parent ) , ui( new Ui::Page_Keyboard ) @@ -92,26 +75,6 @@ KeyboardPage::~KeyboardPage() delete ui; } -QList< Calamares::job_ptr > -KeyboardPage::createJobs( const QString& xOrgConfFileName, - const QString& convertedKeymapPath, - bool writeEtcDefaultKeyboard ) -{ - QList< Calamares::job_ptr > list; - QString selectedModel = m_models.value( ui->comboBoxModel->currentText(), "pc105" ); - - Calamares::Job* j = new SetKeyboardLayoutJob( selectedModel, - m_selectedLayout, - m_selectedVariant, - xOrgConfFileName, - convertedKeymapPath, - writeEtcDefaultKeyboard ); - list.append( Calamares::job_ptr( j ) ); - - return list; -} - - void KeyboardPage::guessLayout( const QStringList& langParts ) { diff --git a/src/modules/keyboard/KeyboardPage.h b/src/modules/keyboard/KeyboardPage.h index 41b4b7903..554832b5f 100644 --- a/src/modules/keyboard/KeyboardPage.h +++ b/src/modules/keyboard/KeyboardPage.h @@ -36,9 +36,6 @@ public: explicit KeyboardPage( QWidget* parent = nullptr ); ~KeyboardPage() override; - Calamares::JobList - createJobs( const QString& xOrgConfFileName, const QString& convertedKeymapPath, bool writeEtcDefaultKeyboard ); - void onActivate(); protected slots: From 0947cd835486d238fbe8bb990c83b675f7621d50 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Oct 2020 16:12:36 +0100 Subject: [PATCH 42/78] [keyboard] Migrate to Config::onActivate() which is badly-named --- src/modules/keyboard/KeyboardPage.cpp | 138 ---------------------- src/modules/keyboard/KeyboardPage.h | 4 - src/modules/keyboard/KeyboardViewStep.cpp | 2 +- 3 files changed, 1 insertion(+), 143 deletions(-) diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index decf7714a..bfa0b4b42 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -75,144 +75,6 @@ KeyboardPage::~KeyboardPage() delete ui; } -void -KeyboardPage::guessLayout( const QStringList& langParts ) -{ - const KeyboardLayoutModel* klm = dynamic_cast< KeyboardLayoutModel* >( ui->listLayout->model() ); - bool foundCountryPart = false; - for ( auto countryPart = langParts.rbegin(); !foundCountryPart && countryPart != langParts.rend(); ++countryPart ) - { - cDebug() << Logger::SubEntry << "looking for locale part" << *countryPart; - for ( int i = 0; i < klm->rowCount(); ++i ) - { - QModelIndex idx = klm->index( i ); - QString name - = idx.isValid() ? idx.data( KeyboardLayoutModel::KeyboardLayoutKeyRole ).toString() : QString(); - if ( idx.isValid() && ( name.compare( *countryPart, Qt::CaseInsensitive ) == 0 ) ) - { - cDebug() << Logger::SubEntry << "matched" << name; - ui->listLayout->setCurrentIndex( idx ); - foundCountryPart = true; - break; - } - } - if ( foundCountryPart ) - { - ++countryPart; - if ( countryPart != langParts.rend() ) - { - cDebug() << "Next level:" << *countryPart; - for ( int variantnumber = 0; variantnumber < ui->listVariant->count(); ++variantnumber ) - { - LayoutItem* variantdata = dynamic_cast< LayoutItem* >( ui->listVariant->item( variantnumber ) ); - if ( variantdata && ( variantdata->data.compare( *countryPart, Qt::CaseInsensitive ) == 0 ) ) - { - ui->listVariant->setCurrentItem( variantdata ); - cDebug() << Logger::SubEntry << "matched variant" << variantdata->data << ' ' - << variantdata->text(); - } - } - } - } - } -} - - -void -KeyboardPage::onActivate() -{ - /* Guessing a keyboard layout based on the locale means - * mapping between language identifiers in _ - * format to keyboard mappings, which are _ - * format; in addition, some countries have multiple languages, - * so fr_BE and nl_BE want different layouts (both Belgian) - * and sometimes the language-country name doesn't match the - * keyboard-country name at all (e.g. Ellas vs. Greek). - * - * This is a table of language-to-keyboard mappings. The - * language identifier is the key, while the value is - * a string that is used instead of the real language - * identifier in guessing -- so it should be something - * like _. - */ - static constexpr char arabic[] = "ara"; - static const auto specialCaseMap = QMap< std::string, std::string >( { - /* Most Arab countries map to Arabic keyboard (Default) */ - { "ar_AE", arabic }, - { "ar_BH", arabic }, - { "ar_DZ", arabic }, - { "ar_EG", arabic }, - { "ar_IN", arabic }, - { "ar_IQ", arabic }, - { "ar_JO", arabic }, - { "ar_KW", arabic }, - { "ar_LB", arabic }, - { "ar_LY", arabic }, - /* Not Morocco: use layout ma */ - { "ar_OM", arabic }, - { "ar_QA", arabic }, - { "ar_SA", arabic }, - { "ar_SD", arabic }, - { "ar_SS", arabic }, - /* Not Syria: use layout sy */ - { "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 */ - { "ig_NG", "igbo_NG" }, /* Igbo in Nigeria */ - { "ha_NG", "hausa_NG" } /* Hausa */ - } ); - - ui->listLayout->setFocus(); - - // Try to preselect a layout, depending on language and locale - Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); - QString lang = gs->value( "localeConf" ).toMap().value( "LANG" ).toString(); - - cDebug() << "Got locale language" << lang; - if ( !lang.isEmpty() ) - { - // Chop off .codeset and @modifier - int index = lang.indexOf( '.' ); - if ( index >= 0 ) - { - lang.truncate( index ); - } - index = lang.indexOf( '@' ); - if ( index >= 0 ) - { - lang.truncate( index ); - } - - lang.replace( '-', '_' ); // Normalize separators - } - if ( !lang.isEmpty() ) - { - std::string lang_s = lang.toStdString(); - if ( specialCaseMap.contains( lang_s ) ) - { - QString newLang = QString::fromStdString( specialCaseMap.value( lang_s ) ); - cDebug() << Logger::SubEntry << "special case language" << lang << "becomes" << newLang; - lang = newLang; - } - } - 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 ); - } -} - - void KeyboardPage::updateVariants( const QPersistentModelIndex& currentItem, QString currentVariant ) { diff --git a/src/modules/keyboard/KeyboardPage.h b/src/modules/keyboard/KeyboardPage.h index 554832b5f..bb2ec17a9 100644 --- a/src/modules/keyboard/KeyboardPage.h +++ b/src/modules/keyboard/KeyboardPage.h @@ -36,15 +36,11 @@ public: explicit KeyboardPage( QWidget* parent = nullptr ); ~KeyboardPage() override; - void onActivate(); - protected slots: void onListLayoutCurrentItemChanged( const QModelIndex& current, const QModelIndex& previous ); void onListVariantCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous ); private: - /// Guess a layout based on the split-apart locale - void guessLayout( const QStringList& langParts ); void updateVariants( const QPersistentModelIndex& currentItem, QString currentVariant = QString() ); Ui::Page_Keyboard* ui; diff --git a/src/modules/keyboard/KeyboardViewStep.cpp b/src/modules/keyboard/KeyboardViewStep.cpp index a068b5a5d..844c3c719 100644 --- a/src/modules/keyboard/KeyboardViewStep.cpp +++ b/src/modules/keyboard/KeyboardViewStep.cpp @@ -97,7 +97,7 @@ KeyboardViewStep::jobs() const void KeyboardViewStep::onActivate() { - m_widget->onActivate(); + m_config->onActivate(); } From 734dbece8afe98645f5d916a686406f236860308 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Oct 2020 16:47:47 +0100 Subject: [PATCH 43/78] [keyboardq] Fix include style, remove unnecessary declarations --- src/modules/keyboardq/KeyboardQmlViewStep.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/modules/keyboardq/KeyboardQmlViewStep.h b/src/modules/keyboardq/KeyboardQmlViewStep.h index c90c4a326..2b9f98e27 100644 --- a/src/modules/keyboardq/KeyboardQmlViewStep.h +++ b/src/modules/keyboardq/KeyboardQmlViewStep.h @@ -13,15 +13,12 @@ #include "Config.h" -#include -#include -#include +#include "DllMacro.h" +#include "utils/PluginFactory.h" +#include "viewpages/QmlViewStep.h" #include -class Config; -class KeyboardPage; - class PLUGINDLLEXPORT KeyboardQmlViewStep : public Calamares::QmlViewStep { Q_OBJECT From 8cf3bd23b9f5ff84c1b664ecf7e41e3df507d7da Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Oct 2020 16:55:02 +0100 Subject: [PATCH 44/78] [keyboardq] Remove superfluous variable (set to true, never changed) --- src/modules/keyboardq/KeyboardQmlViewStep.cpp | 6 ++---- src/modules/keyboardq/KeyboardQmlViewStep.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/modules/keyboardq/KeyboardQmlViewStep.cpp b/src/modules/keyboardq/KeyboardQmlViewStep.cpp index 62063b187..e8ae630e7 100644 --- a/src/modules/keyboardq/KeyboardQmlViewStep.cpp +++ b/src/modules/keyboardq/KeyboardQmlViewStep.cpp @@ -21,11 +21,9 @@ CALAMARES_PLUGIN_FACTORY_DEFINITION( KeyboardQmlViewStepFactory, registerPlugin< KeyboardQmlViewStep::KeyboardQmlViewStep( QObject* parent ) : Calamares::QmlViewStep( parent ) , m_config( new Config( this ) ) - , m_nextEnabled( false ) { m_config->detectCurrentKeyboardLayout(); - m_nextEnabled = true; - emit nextStatusChanged( m_nextEnabled ); + emit nextStatusChanged( true ); } QString @@ -43,7 +41,7 @@ KeyboardQmlViewStep::prettyStatus() const bool KeyboardQmlViewStep::isNextEnabled() const { - return m_nextEnabled; + return true; } bool diff --git a/src/modules/keyboardq/KeyboardQmlViewStep.h b/src/modules/keyboardq/KeyboardQmlViewStep.h index 2b9f98e27..eb31c3d59 100644 --- a/src/modules/keyboardq/KeyboardQmlViewStep.h +++ b/src/modules/keyboardq/KeyboardQmlViewStep.h @@ -45,7 +45,6 @@ public: private: Config* m_config; - bool m_nextEnabled; }; CALAMARES_PLUGIN_FACTORY_DECLARATION( KeyboardQmlViewStepFactory ) From 17b964701606bdbf620e7229840768568c6c6096 Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Sun, 25 Oct 2020 05:14:42 +0300 Subject: [PATCH 45/78] [keyboard] Support for additional layout if current layout is not ASCII- capable in live system --- src/modules/keyboard/Config.cpp | 132 ++++++++++++++++++++++++- src/modules/keyboard/Config.h | 12 +++ src/modules/keyboard/keyboard.qrc | 1 + src/modules/keyboard/non-ascii-layouts | 4 + 4 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 src/modules/keyboard/non-ascii-layouts diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 7f7eb7b27..4e59b5fda 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -49,6 +49,104 @@ xkbmap_layout_args( const QString& layout, const QString& variant ) return r; } +static inline QStringList +xkbmap_layout_args( const QList> layoutsAndVariantsList, const QString& switchOption = "grp:alt_shift_toggle") +{ + QStringList layouts; + QStringList variants; + + for( auto& [layout,variant] : layoutsAndVariantsList ) + { + layouts.append(layout); + variants.append(variant); + } + + QStringList r{ "-layout", layouts.join( "," ) }; + + if ( !variants.isEmpty() ) + { + r << "-variant" << variants.join( "," ); + } + + if ( !switchOption.isEmpty()) + { + r << "-option" << switchOption; + } + + return r; +} + +static inline QString +xkbmap_query_grp_option() +{ + QProcess setxkbmapQuery; + setxkbmapQuery.start( "setxkbmap", { "-query" } ); + setxkbmapQuery.waitForFinished(); + + QString outputLine; + + do + { + outputLine = setxkbmapQuery.readLine(); + } + while( !setxkbmapQuery.atEnd() || !outputLine.startsWith("options:") ); + + if( !outputLine.startsWith("options:") ) + { + return QString(); + } + + int index = outputLine.indexOf("grp:"); + + if( index == -1 ) + { + return QString(); + } + + //it's either in the end of line or before the other option so \s or , + int lastIndex = outputLine.indexOf( QRegExp("[\\s,]"), index ); + + return outputLine.mid( index, lastIndex-1 ); +} + +AdditionalLayoutInfo Config::getAdditionalLayoutInfo( const QString &layout, bool* found ) +{ + QFile layoutTable(":/non-ascii-layouts"); + + if(!layoutTable.open(QIODevice::ReadOnly | QIODevice::Text)) { + cError() << "Non-ASCII layout table could not be opened"; + *found = false; + return {}; + } + + QString tableLine; + + do + { + tableLine = layoutTable.readLine(); + } + while( !layoutTable.atEnd() || !tableLine.startsWith(layout) ); + + if( !tableLine.startsWith(layout) ){ + *found = false; + return {}; + } + + *found = true; + + QStringList tableEntries = tableLine.split(" ", SplitSkipEmptyParts); + + AdditionalLayoutInfo r; + + r.name = tableEntries[0]; + r.additionalLayout = tableEntries[1]; + r.additionalVariant = tableEntries[2]; + + r.vconsoleKeymap = tableEntries[3]; + + return r; +} + Config::Config( QObject* parent ) : QObject( parent ) , m_keyboardModelsModel( new KeyboardModelsModel( this ) ) @@ -82,8 +180,31 @@ Config::Config( QObject* parent ) } connect( &m_setxkbmapTimer, &QTimer::timeout, this, [=] { - QProcess::execute( "setxkbmap", xkbmap_layout_args( m_selectedLayout, m_selectedVariant ) ); - cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant; + bool isNotAsciiCapable = false; + AdditionalLayoutInfo info = getAdditionalLayoutInfo( m_selectedLayout, &isNotAsciiCapable ); + + if(isNotAsciiCapable) + { + m_selectedLayoutsAdditionalLayoutInfo = info; + QString switchOption = xkbmap_query_grp_option(); + + QProcess::execute( "setxkbmap", xkbmap_layout_args( { + {m_selectedLayout, m_selectedVariant}, + {info.additionalLayout, info.additionalVariant} + }, + switchOption.isEmpty()?"grp:alt_shift_toggle":QString() ) + ); + cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant + << "(added " << info.additionalLayout << "-" << info.additionalVariant << " since target layout is not ASCII-capable)"; + + + } + else + { + m_selectedLayoutsAdditionalLayoutInfo = AdditionalLayoutInfo(); + QProcess::execute( "setxkbmap", xkbmap_layout_args( m_selectedLayout, m_selectedVariant ) ); + cDebug() << "xkbеmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant; + } m_setxkbmapTimer.disconnect( this ); } ); m_setxkbmapTimer.start( QApplication::keyboardInputInterval() ); @@ -372,6 +493,13 @@ Config::finalize() { gs->insert( "keyboardLayout", m_selectedLayout ); gs->insert( "keyboardVariant", m_selectedVariant ); //empty means default variant + + if ( !m_selectedLayoutsAdditionalLayoutInfo.name.isEmpty() ) + { + gs->insert( "keyboardAdditionalLayout", m_selectedLayoutsAdditionalLayoutInfo.additionalLayout); + gs->insert( "keyboardAdditionalLayout", m_selectedLayoutsAdditionalLayoutInfo.additionalVariant); + gs->insert( "keyboardVConsoleKeymap", m_selectedLayoutsAdditionalLayoutInfo.vconsoleKeymap ); + } } //FIXME: also store keyboard model for something? diff --git a/src/modules/keyboard/Config.h b/src/modules/keyboard/Config.h index 9a3a3a013..34d719d1b 100644 --- a/src/modules/keyboard/Config.h +++ b/src/modules/keyboard/Config.h @@ -20,6 +20,15 @@ #include #include +struct AdditionalLayoutInfo { + QString name; + + QString additionalLayout; + QString additionalVariant; + + QString vconsoleKeymap; +}; + class Config : public QObject { Q_OBJECT @@ -41,6 +50,8 @@ public: void setConfigurationMap( const QVariantMap& configurationMap ); + static AdditionalLayoutInfo getAdditionalLayoutInfo( const QString& layout, bool* found ); + private: void guessLayout( const QStringList& langParts ); void updateVariants( const QPersistentModelIndex& currentItem, QString currentVariant = QString() ); @@ -52,6 +63,7 @@ private: QString m_selectedLayout; QString m_selectedModel; QString m_selectedVariant; + AdditionalLayoutInfo m_selectedLayoutsAdditionalLayoutInfo; QTimer m_setxkbmapTimer; // From configuration diff --git a/src/modules/keyboard/keyboard.qrc b/src/modules/keyboard/keyboard.qrc index dd211e630..4283d8190 100644 --- a/src/modules/keyboard/keyboard.qrc +++ b/src/modules/keyboard/keyboard.qrc @@ -2,5 +2,6 @@ kbd-model-map images/restore.png + non-ascii-layouts diff --git a/src/modules/keyboard/non-ascii-layouts b/src/modules/keyboard/non-ascii-layouts new file mode 100644 index 000000000..83935c190 --- /dev/null +++ b/src/modules/keyboard/non-ascii-layouts @@ -0,0 +1,4 @@ +# Layouts stored here need additional layout (usually us) to provide ASCII support for user + +#layout additional-layout additional-variant vconsole-keymap +ru us - ruwin_alt_sh-UTF-8 From 09b5e42734c040312ca1021067048a392d7421bd Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Sun, 25 Oct 2020 14:29:33 +0300 Subject: [PATCH 46/78] [keyboard] Minor additional layout info rework --- src/modules/keyboard/Config.cpp | 34 ++++++++++++++------------------- src/modules/keyboard/Config.h | 4 +--- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 4e59b5fda..47aaf6dbe 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -109,14 +109,13 @@ xkbmap_query_grp_option() return outputLine.mid( index, lastIndex-1 ); } -AdditionalLayoutInfo Config::getAdditionalLayoutInfo( const QString &layout, bool* found ) +AdditionalLayoutInfo Config::getAdditionalLayoutInfo( const QString &layout ) { - QFile layoutTable(":/non-ascii-layouts"); + QFile layoutTable( ":/non-ascii-layouts" ); - if(!layoutTable.open(QIODevice::ReadOnly | QIODevice::Text)) { + if( !layoutTable.open( QIODevice::ReadOnly | QIODevice::Text ) ) { cError() << "Non-ASCII layout table could not be opened"; - *found = false; - return {}; + return AdditionalLayoutInfo(); } QString tableLine; @@ -125,22 +124,19 @@ AdditionalLayoutInfo Config::getAdditionalLayoutInfo( const QString &layout, boo { tableLine = layoutTable.readLine(); } - while( !layoutTable.atEnd() || !tableLine.startsWith(layout) ); + while( !layoutTable.atEnd() || !tableLine.startsWith( layout ) ); - if( !tableLine.startsWith(layout) ){ - *found = false; - return {}; + if( !tableLine.startsWith( layout ) ) + { + return AdditionalLayoutInfo(); } - *found = true; - - QStringList tableEntries = tableLine.split(" ", SplitSkipEmptyParts); + QStringList tableEntries = tableLine.split( " ", SplitSkipEmptyParts ); AdditionalLayoutInfo r; - r.name = tableEntries[0]; r.additionalLayout = tableEntries[1]; - r.additionalVariant = tableEntries[2]; + r.additionalVariant = tableEntries[2] == "-" ? "" : tableEntries[2]; r.vconsoleKeymap = tableEntries[3]; @@ -180,10 +176,9 @@ Config::Config( QObject* parent ) } connect( &m_setxkbmapTimer, &QTimer::timeout, this, [=] { - bool isNotAsciiCapable = false; - AdditionalLayoutInfo info = getAdditionalLayoutInfo( m_selectedLayout, &isNotAsciiCapable ); + AdditionalLayoutInfo info = getAdditionalLayoutInfo( m_selectedLayout); - if(isNotAsciiCapable) + if(!info.additionalLayout.isEmpty()) { m_selectedLayoutsAdditionalLayoutInfo = info; QString switchOption = xkbmap_query_grp_option(); @@ -195,8 +190,7 @@ Config::Config( QObject* parent ) switchOption.isEmpty()?"grp:alt_shift_toggle":QString() ) ); cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant - << "(added " << info.additionalLayout << "-" << info.additionalVariant << " since target layout is not ASCII-capable)"; - + << "(added " << info.additionalLayout << "-" << info.additionalVariant << " since current layout is not ASCII-capable)"; } else @@ -494,7 +488,7 @@ Config::finalize() gs->insert( "keyboardLayout", m_selectedLayout ); gs->insert( "keyboardVariant", m_selectedVariant ); //empty means default variant - if ( !m_selectedLayoutsAdditionalLayoutInfo.name.isEmpty() ) + if ( !m_selectedLayoutsAdditionalLayoutInfo.additionalLayout.isEmpty() ) { gs->insert( "keyboardAdditionalLayout", m_selectedLayoutsAdditionalLayoutInfo.additionalLayout); gs->insert( "keyboardAdditionalLayout", m_selectedLayoutsAdditionalLayoutInfo.additionalVariant); diff --git a/src/modules/keyboard/Config.h b/src/modules/keyboard/Config.h index 34d719d1b..96b3d7dd4 100644 --- a/src/modules/keyboard/Config.h +++ b/src/modules/keyboard/Config.h @@ -21,8 +21,6 @@ #include struct AdditionalLayoutInfo { - QString name; - QString additionalLayout; QString additionalVariant; @@ -50,7 +48,7 @@ public: void setConfigurationMap( const QVariantMap& configurationMap ); - static AdditionalLayoutInfo getAdditionalLayoutInfo( const QString& layout, bool* found ); + static AdditionalLayoutInfo getAdditionalLayoutInfo( const QString& layout ); private: void guessLayout( const QStringList& langParts ); From 354dc1613a7eae1ec36ecc6ac157f9fc9d028a9e Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Mon, 26 Oct 2020 18:22:43 +0300 Subject: [PATCH 47/78] [keyboard] Removed unnecessary repacking in xkbmap_layout_args --- src/modules/keyboard/Config.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 47aaf6dbe..4d61b0938 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -50,15 +50,12 @@ xkbmap_layout_args( const QString& layout, const QString& variant ) } static inline QStringList -xkbmap_layout_args( const QList> layoutsAndVariantsList, const QString& switchOption = "grp:alt_shift_toggle") +xkbmap_layout_args( const QStringList& layouts, const QStringList& variants, const QString& switchOption = "grp:alt_shift_toggle") { - QStringList layouts; - QStringList variants; - - for( auto& [layout,variant] : layoutsAndVariantsList ) + if ( layouts.size() != variants.size() ) { - layouts.append(layout); - variants.append(variant); + cError() << "Number of layouts and variants must be equal (empty string should be used if there is no corresponding variant)"; + return QStringList(); } QStringList r{ "-layout", layouts.join( "," ) }; @@ -183,11 +180,10 @@ Config::Config( QObject* parent ) m_selectedLayoutsAdditionalLayoutInfo = info; QString switchOption = xkbmap_query_grp_option(); - QProcess::execute( "setxkbmap", xkbmap_layout_args( { - {m_selectedLayout, m_selectedVariant}, - {info.additionalLayout, info.additionalVariant} - }, - switchOption.isEmpty()?"grp:alt_shift_toggle":QString() ) + QProcess::execute( "setxkbmap", xkbmap_layout_args( + { m_selectedLayout, info.additionalLayout }, + { m_selectedVariant, info.additionalVariant }, + switchOption.isEmpty()?"grp:alt_shift_toggle":QString() ) ); cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant << "(added " << info.additionalLayout << "-" << info.additionalVariant << " since current layout is not ASCII-capable)"; From 384b1ba8c69c9f032f459815761f70d8ecd9fada Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Mon, 26 Oct 2020 18:26:14 +0300 Subject: [PATCH 48/78] [keyboard] Swapped primary and additional layouts in selection --- src/modules/keyboard/Config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 4d61b0938..173f34051 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -181,8 +181,8 @@ Config::Config( QObject* parent ) QString switchOption = xkbmap_query_grp_option(); QProcess::execute( "setxkbmap", xkbmap_layout_args( - { m_selectedLayout, info.additionalLayout }, - { m_selectedVariant, info.additionalVariant }, + { info.additionalLayout, m_selectedLayout }, + { info.additionalVariant, m_selectedVariant }, switchOption.isEmpty()?"grp:alt_shift_toggle":QString() ) ); cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant From 19b1fb3358f6ca4e8f969757b140c7dc266f32f5 Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Mon, 26 Oct 2020 18:30:24 +0300 Subject: [PATCH 49/78] [keyboard] Added explanatory comment for xkbmap_query_grp_option --- src/modules/keyboard/Config.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 173f34051..e766c8a53 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -73,6 +73,9 @@ xkbmap_layout_args( const QStringList& layouts, const QStringList& variants, con return r; } +/* Returns group-switch setxkbd option if set + * or an empty string otherwise + */ static inline QString xkbmap_query_grp_option() { From 0dd027af90caf23bbafcac5207247047079e4c32 Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Tue, 27 Oct 2020 04:53:05 +0300 Subject: [PATCH 50/78] [keyboard] Fixed condition bug --- src/modules/keyboard/Config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index e766c8a53..aab7db014 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -89,7 +89,7 @@ xkbmap_query_grp_option() { outputLine = setxkbmapQuery.readLine(); } - while( !setxkbmapQuery.atEnd() || !outputLine.startsWith("options:") ); + while( setxkbmapQuery.canReadLine() && !outputLine.startsWith("options:") ); if( !outputLine.startsWith("options:") ) { @@ -124,7 +124,7 @@ AdditionalLayoutInfo Config::getAdditionalLayoutInfo( const QString &layout ) { tableLine = layoutTable.readLine(); } - while( !layoutTable.atEnd() || !tableLine.startsWith( layout ) ); + while( layoutTable.canReadLine() && !tableLine.startsWith( layout ) ); if( !tableLine.startsWith( layout ) ) { From bfc60ad2cfc2f16ca87fd3c024a2d96defa0c023 Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Tue, 27 Oct 2020 04:56:19 +0300 Subject: [PATCH 51/78] [keyboard] Implemented X11 config writing for additional layout --- src/modules/keyboard/AdditionalLayoutInfo.h | 24 +++++++++++++ src/modules/keyboard/Config.cpp | 25 ++++++++----- src/modules/keyboard/Config.h | 8 +---- src/modules/keyboard/KeyboardPage.cpp | 1 + src/modules/keyboard/SetKeyboardLayoutJob.cpp | 36 +++++++++++++------ src/modules/keyboard/SetKeyboardLayoutJob.h | 4 +++ src/modules/keyboardq/keyboardq.qrc | 1 + 7 files changed, 72 insertions(+), 27 deletions(-) create mode 100644 src/modules/keyboard/AdditionalLayoutInfo.h diff --git a/src/modules/keyboard/AdditionalLayoutInfo.h b/src/modules/keyboard/AdditionalLayoutInfo.h new file mode 100644 index 000000000..660449952 --- /dev/null +++ b/src/modules/keyboard/AdditionalLayoutInfo.h @@ -0,0 +1,24 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2020 Artem Grinev + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +#ifndef KEYBOARD_ADDITIONAL_LAYOUT_INFO_H +#define KEYBOARD_ADDITIONAL_LAYOUT_INFO_H + +#include + +struct AdditionalLayoutInfo { + QString additionalLayout; + QString additionalVariant; + + QString groupSwitcher; + + QString vconsoleKeymap; +}; + +#endif diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index aab7db014..03a774ef6 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -176,27 +176,33 @@ Config::Config( QObject* parent ) } connect( &m_setxkbmapTimer, &QTimer::timeout, this, [=] { - AdditionalLayoutInfo info = getAdditionalLayoutInfo( m_selectedLayout); + m_selectedLayoutsAdditionalLayoutInfo = getAdditionalLayoutInfo( m_selectedLayout ); - if(!info.additionalLayout.isEmpty()) + if(!m_selectedLayoutsAdditionalLayoutInfo.additionalLayout.isEmpty()) { - m_selectedLayoutsAdditionalLayoutInfo = info; - QString switchOption = xkbmap_query_grp_option(); + m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher = xkbmap_query_grp_option(); QProcess::execute( "setxkbmap", xkbmap_layout_args( - { info.additionalLayout, m_selectedLayout }, - { info.additionalVariant, m_selectedVariant }, - switchOption.isEmpty()?"grp:alt_shift_toggle":QString() ) + { m_selectedLayoutsAdditionalLayoutInfo.additionalLayout, m_selectedLayout }, + { m_selectedLayoutsAdditionalLayoutInfo.additionalVariant, m_selectedVariant }, + m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher.isEmpty()?"grp:alt_shift_toggle":QString() ) ); + + if( m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher.isEmpty() ) + { + m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher = "grp:alt_shift_toggle"; + } + cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant - << "(added " << info.additionalLayout << "-" << info.additionalVariant << " since current layout is not ASCII-capable)"; + << "(added " << m_selectedLayoutsAdditionalLayoutInfo.additionalLayout << "-" + << m_selectedLayoutsAdditionalLayoutInfo.additionalVariant << " since current layout is not ASCII-capable)"; } else { m_selectedLayoutsAdditionalLayoutInfo = AdditionalLayoutInfo(); QProcess::execute( "setxkbmap", xkbmap_layout_args( m_selectedLayout, m_selectedVariant ) ); - cDebug() << "xkbеmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant; + cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant; } m_setxkbmapTimer.disconnect( this ); } ); @@ -336,6 +342,7 @@ Config::createJobs() Calamares::Job* j = new SetKeyboardLayoutJob( m_selectedModel, m_selectedLayout, m_selectedVariant, + m_selectedLayoutsAdditionalLayoutInfo, m_xOrgConfFileName, m_convertedKeymapPath, m_writeEtcDefaultKeyboard ); diff --git a/src/modules/keyboard/Config.h b/src/modules/keyboard/Config.h index 96b3d7dd4..dda4403b3 100644 --- a/src/modules/keyboard/Config.h +++ b/src/modules/keyboard/Config.h @@ -13,6 +13,7 @@ #include "Job.h" #include "KeyboardLayoutModel.h" +#include "AdditionalLayoutInfo.h" #include #include @@ -20,13 +21,6 @@ #include #include -struct AdditionalLayoutInfo { - QString additionalLayout; - QString additionalVariant; - - QString vconsoleKeymap; -}; - class Config : public QObject { Q_OBJECT diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 07c5cf763..84958761b 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -222,6 +222,7 @@ KeyboardPage::createJobs( const QString& xOrgConfFileName, Calamares::Job* j = new SetKeyboardLayoutJob( selectedModel, m_selectedLayout, m_selectedVariant, + AdditionalLayoutInfo(), xOrgConfFileName, convertedKeymapPath, writeEtcDefaultKeyboard ); diff --git a/src/modules/keyboard/SetKeyboardLayoutJob.cpp b/src/modules/keyboard/SetKeyboardLayoutJob.cpp index cabe0b5c0..ddadc8430 100644 --- a/src/modules/keyboard/SetKeyboardLayoutJob.cpp +++ b/src/modules/keyboard/SetKeyboardLayoutJob.cpp @@ -30,9 +30,9 @@ #include -SetKeyboardLayoutJob::SetKeyboardLayoutJob( const QString& model, +SetKeyboardLayoutJob::SetKeyboardLayoutJob(const QString& model, const QString& layout, - const QString& variant, + const QString& variant, const AdditionalLayoutInfo &additionaLayoutInfo, const QString& xOrgConfFileName, const QString& convertedKeymapPath, bool writeEtcDefaultKeyboard ) @@ -40,6 +40,7 @@ SetKeyboardLayoutJob::SetKeyboardLayoutJob( const QString& model, , m_model( model ) , m_layout( layout ) , m_variant( variant ) + , m_additionalLayoutInfo( additionaLayoutInfo ) , m_xOrgConfFileName( xOrgConfFileName ) , m_convertedKeymapPath( convertedKeymapPath ) , m_writeEtcDefaultKeyboard( writeEtcDefaultKeyboard ) @@ -250,19 +251,32 @@ SetKeyboardLayoutJob::writeX11Data( const QString& keyboardConfPath ) const " Identifier \"system-keyboard\"\n" " MatchIsKeyboard \"on\"\n"; - if ( !m_layout.isEmpty() ) - { - stream << " Option \"XkbLayout\" \"" << m_layout << "\"\n"; - } - if ( !m_model.isEmpty() ) + if ( m_additionalLayoutInfo.additionalLayout.isEmpty() ) { - stream << " Option \"XkbModel\" \"" << m_model << "\"\n"; - } + if ( !m_layout.isEmpty() ) + { + stream << " Option \"XkbLayout\" \"" << m_layout << "\"\n"; + } - if ( !m_variant.isEmpty() ) + if ( !m_variant.isEmpty() ) + { + stream << " Option \"XkbVariant\" \"" << m_variant << "\"\n"; + } + } + else { - stream << " Option \"XkbVariant\" \"" << m_variant << "\"\n"; + if ( !m_layout.isEmpty() ) + { + stream << " Option \"XkbLayout\" \"" << m_additionalLayoutInfo.additionalLayout << "," << m_layout << "\"\n"; + } + + if ( !m_variant.isEmpty() ) + { + stream << " Option \"XkbVariant\" \"" << m_additionalLayoutInfo.additionalVariant << "," << m_variant << "\"\n"; + } + + stream << " Option \"XkbOptions\" \"" << m_additionalLayoutInfo.groupSwitcher << "\"\n"; } stream << "EndSection\n"; diff --git a/src/modules/keyboard/SetKeyboardLayoutJob.h b/src/modules/keyboard/SetKeyboardLayoutJob.h index f1eabe195..b1ce0bb15 100644 --- a/src/modules/keyboard/SetKeyboardLayoutJob.h +++ b/src/modules/keyboard/SetKeyboardLayoutJob.h @@ -12,6 +12,8 @@ #define SETKEYBOARDLAYOUTJOB_H #include "Job.h" +#include "AdditionalLayoutInfo.h" + class SetKeyboardLayoutJob : public Calamares::Job @@ -21,6 +23,7 @@ public: SetKeyboardLayoutJob( const QString& model, const QString& layout, const QString& variant, + const AdditionalLayoutInfo& additionaLayoutInfo, const QString& xOrgConfFileName, const QString& convertedKeymapPath, bool writeEtcDefaultKeyboard ); @@ -38,6 +41,7 @@ private: QString m_model; QString m_layout; QString m_variant; + AdditionalLayoutInfo m_additionalLayoutInfo; QString m_xOrgConfFileName; QString m_convertedKeymapPath; const bool m_writeEtcDefaultKeyboard; diff --git a/src/modules/keyboardq/keyboardq.qrc b/src/modules/keyboardq/keyboardq.qrc index 492f6e213..d2473a8ec 100644 --- a/src/modules/keyboardq/keyboardq.qrc +++ b/src/modules/keyboardq/keyboardq.qrc @@ -3,5 +3,6 @@ ../keyboard/kbd-model-map ../keyboard/images/restore.png keyboardq.qml + ../keyboard/non-ascii-layouts From 4a3273d6341e8f1fcc81eea937d0b45d9df5cc67 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Oct 2020 16:59:22 +0100 Subject: [PATCH 52/78] [keyboard] Remove superfluous variable (set to true, never changed) --- src/modules/keyboard/KeyboardViewStep.cpp | 6 ++---- src/modules/keyboard/KeyboardViewStep.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/modules/keyboard/KeyboardViewStep.cpp b/src/modules/keyboard/KeyboardViewStep.cpp index 844c3c719..80945f848 100644 --- a/src/modules/keyboard/KeyboardViewStep.cpp +++ b/src/modules/keyboard/KeyboardViewStep.cpp @@ -21,11 +21,9 @@ KeyboardViewStep::KeyboardViewStep( QObject* parent ) : Calamares::ViewStep( parent ) , m_config( new Config(this) ) , m_widget( new KeyboardPage() ) - , m_nextEnabled( false ) { m_config->detectCurrentKeyboardLayout(); - m_nextEnabled = true; - emit nextStatusChanged( m_nextEnabled ); + emit nextStatusChanged( true ); } @@ -62,7 +60,7 @@ KeyboardViewStep::widget() bool KeyboardViewStep::isNextEnabled() const { - return m_nextEnabled; + return true; } diff --git a/src/modules/keyboard/KeyboardViewStep.h b/src/modules/keyboard/KeyboardViewStep.h index 31769d192..902b888fd 100644 --- a/src/modules/keyboard/KeyboardViewStep.h +++ b/src/modules/keyboard/KeyboardViewStep.h @@ -49,7 +49,6 @@ public: private: Config* m_config; KeyboardPage* m_widget; - bool m_nextEnabled; }; CALAMARES_PLUGIN_FACTORY_DECLARATION( KeyboardViewStepFactory ) From 996c82160eb276697de24e54c018e3a7803f632b Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Tue, 27 Oct 2020 20:38:04 +0300 Subject: [PATCH 53/78] [keyboard] fixed typo --- src/modules/keyboard/SetKeyboardLayoutJob.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/keyboard/SetKeyboardLayoutJob.cpp b/src/modules/keyboard/SetKeyboardLayoutJob.cpp index ddadc8430..e733c18ed 100644 --- a/src/modules/keyboard/SetKeyboardLayoutJob.cpp +++ b/src/modules/keyboard/SetKeyboardLayoutJob.cpp @@ -32,7 +32,8 @@ SetKeyboardLayoutJob::SetKeyboardLayoutJob(const QString& model, const QString& layout, - const QString& variant, const AdditionalLayoutInfo &additionaLayoutInfo, + const QString& variant, + const AdditionalLayoutInfo &additionalLayoutInfo, const QString& xOrgConfFileName, const QString& convertedKeymapPath, bool writeEtcDefaultKeyboard ) @@ -40,7 +41,7 @@ SetKeyboardLayoutJob::SetKeyboardLayoutJob(const QString& model, , m_model( model ) , m_layout( layout ) , m_variant( variant ) - , m_additionalLayoutInfo( additionaLayoutInfo ) + , m_additionalLayoutInfo( additionalLayoutInfo ) , m_xOrgConfFileName( xOrgConfFileName ) , m_convertedKeymapPath( convertedKeymapPath ) , m_writeEtcDefaultKeyboard( writeEtcDefaultKeyboard ) From 6667ea834feba460b2adceabc435dc09e55644d3 Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Tue, 27 Oct 2020 20:42:49 +0300 Subject: [PATCH 54/78] [keyboard] Adjusted indents --- src/modules/keyboard/Config.cpp | 10 +++++----- src/modules/keyboard/SetKeyboardLayoutJob.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 03a774ef6..1e46e7f6d 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -91,12 +91,12 @@ xkbmap_query_grp_option() } while( setxkbmapQuery.canReadLine() && !outputLine.startsWith("options:") ); - if( !outputLine.startsWith("options:") ) + if( !outputLine.startsWith( "options:" ) ) { return QString(); } - int index = outputLine.indexOf("grp:"); + int index = outputLine.indexOf( "grp:" ); if( index == -1 ) { @@ -104,7 +104,7 @@ xkbmap_query_grp_option() } //it's either in the end of line or before the other option so \s or , - int lastIndex = outputLine.indexOf( QRegExp("[\\s,]"), index ); + int lastIndex = outputLine.indexOf( QRegExp( "[\\s,]" ), index ); return outputLine.mid( index, lastIndex-1 ); } @@ -178,14 +178,14 @@ Config::Config( QObject* parent ) connect( &m_setxkbmapTimer, &QTimer::timeout, this, [=] { m_selectedLayoutsAdditionalLayoutInfo = getAdditionalLayoutInfo( m_selectedLayout ); - if(!m_selectedLayoutsAdditionalLayoutInfo.additionalLayout.isEmpty()) + if( !m_selectedLayoutsAdditionalLayoutInfo.additionalLayout.isEmpty() ) { m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher = xkbmap_query_grp_option(); QProcess::execute( "setxkbmap", xkbmap_layout_args( { m_selectedLayoutsAdditionalLayoutInfo.additionalLayout, m_selectedLayout }, { m_selectedLayoutsAdditionalLayoutInfo.additionalVariant, m_selectedVariant }, - m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher.isEmpty()?"grp:alt_shift_toggle":QString() ) + m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher.isEmpty() ? "grp:alt_shift_toggle" : QString() ) ); if( m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher.isEmpty() ) diff --git a/src/modules/keyboard/SetKeyboardLayoutJob.cpp b/src/modules/keyboard/SetKeyboardLayoutJob.cpp index e733c18ed..766044179 100644 --- a/src/modules/keyboard/SetKeyboardLayoutJob.cpp +++ b/src/modules/keyboard/SetKeyboardLayoutJob.cpp @@ -33,7 +33,7 @@ SetKeyboardLayoutJob::SetKeyboardLayoutJob(const QString& model, const QString& layout, const QString& variant, - const AdditionalLayoutInfo &additionalLayoutInfo, + const AdditionalLayoutInfo& additionalLayoutInfo, const QString& xOrgConfFileName, const QString& convertedKeymapPath, bool writeEtcDefaultKeyboard ) From 3552233bf12a63225ee5793520bdfb03090845ff Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Tue, 27 Oct 2020 20:48:18 +0300 Subject: [PATCH 55/78] [keyboard] Minor logic rework --- src/modules/keyboard/Config.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 1e46e7f6d..4725dc91d 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -178,21 +178,23 @@ Config::Config( QObject* parent ) connect( &m_setxkbmapTimer, &QTimer::timeout, this, [=] { m_selectedLayoutsAdditionalLayoutInfo = getAdditionalLayoutInfo( m_selectedLayout ); - if( !m_selectedLayoutsAdditionalLayoutInfo.additionalLayout.isEmpty() ) + if ( !m_selectedLayoutsAdditionalLayoutInfo.additionalLayout.isEmpty() ) { m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher = xkbmap_query_grp_option(); - QProcess::execute( "setxkbmap", xkbmap_layout_args( - { m_selectedLayoutsAdditionalLayoutInfo.additionalLayout, m_selectedLayout }, - { m_selectedLayoutsAdditionalLayoutInfo.additionalVariant, m_selectedVariant }, - m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher.isEmpty() ? "grp:alt_shift_toggle" : QString() ) - ); - if( m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher.isEmpty() ) { m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher = "grp:alt_shift_toggle"; } + QProcess::execute( "setxkbmap", xkbmap_layout_args( + { m_selectedLayoutsAdditionalLayoutInfo.additionalLayout, m_selectedLayout }, + { m_selectedLayoutsAdditionalLayoutInfo.additionalVariant, m_selectedVariant }, + m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher ) + ); + + + cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant << "(added " << m_selectedLayoutsAdditionalLayoutInfo.additionalLayout << "-" << m_selectedLayoutsAdditionalLayoutInfo.additionalVariant << " since current layout is not ASCII-capable)"; @@ -200,7 +202,6 @@ Config::Config( QObject* parent ) } else { - m_selectedLayoutsAdditionalLayoutInfo = AdditionalLayoutInfo(); QProcess::execute( "setxkbmap", xkbmap_layout_args( m_selectedLayout, m_selectedVariant ) ); cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant; } From 4434e85d4d8871d7e1d0cea703e894b7539a94cb Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Tue, 27 Oct 2020 20:53:20 +0300 Subject: [PATCH 56/78] [keyboard] Simplified variable name --- src/modules/keyboard/Config.cpp | 30 +++++++++++++++--------------- src/modules/keyboard/Config.h | 5 ++++- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 4725dc91d..b3365cff6 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -176,28 +176,28 @@ Config::Config( QObject* parent ) } connect( &m_setxkbmapTimer, &QTimer::timeout, this, [=] { - m_selectedLayoutsAdditionalLayoutInfo = getAdditionalLayoutInfo( m_selectedLayout ); + m_additionalLayoutInfo = getAdditionalLayoutInfo( m_selectedLayout ); - if ( !m_selectedLayoutsAdditionalLayoutInfo.additionalLayout.isEmpty() ) + if ( !m_additionalLayoutInfo.additionalLayout.isEmpty() ) { - m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher = xkbmap_query_grp_option(); + m_additionalLayoutInfo.groupSwitcher = xkbmap_query_grp_option(); - if( m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher.isEmpty() ) + if( m_additionalLayoutInfo.groupSwitcher.isEmpty() ) { - m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher = "grp:alt_shift_toggle"; + m_additionalLayoutInfo.groupSwitcher = "grp:alt_shift_toggle"; } QProcess::execute( "setxkbmap", xkbmap_layout_args( - { m_selectedLayoutsAdditionalLayoutInfo.additionalLayout, m_selectedLayout }, - { m_selectedLayoutsAdditionalLayoutInfo.additionalVariant, m_selectedVariant }, - m_selectedLayoutsAdditionalLayoutInfo.groupSwitcher ) + { m_additionalLayoutInfo.additionalLayout, m_selectedLayout }, + { m_additionalLayoutInfo.additionalVariant, m_selectedVariant }, + m_additionalLayoutInfo.groupSwitcher ) ); cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant - << "(added " << m_selectedLayoutsAdditionalLayoutInfo.additionalLayout << "-" - << m_selectedLayoutsAdditionalLayoutInfo.additionalVariant << " since current layout is not ASCII-capable)"; + << "(added " << m_additionalLayoutInfo.additionalLayout << "-" + << m_additionalLayoutInfo.additionalVariant << " since current layout is not ASCII-capable)"; } else @@ -343,7 +343,7 @@ Config::createJobs() Calamares::Job* j = new SetKeyboardLayoutJob( m_selectedModel, m_selectedLayout, m_selectedVariant, - m_selectedLayoutsAdditionalLayoutInfo, + m_additionalLayoutInfo, m_xOrgConfFileName, m_convertedKeymapPath, m_writeEtcDefaultKeyboard ); @@ -495,11 +495,11 @@ Config::finalize() gs->insert( "keyboardLayout", m_selectedLayout ); gs->insert( "keyboardVariant", m_selectedVariant ); //empty means default variant - if ( !m_selectedLayoutsAdditionalLayoutInfo.additionalLayout.isEmpty() ) + if ( !m_additionalLayoutInfo.additionalLayout.isEmpty() ) { - gs->insert( "keyboardAdditionalLayout", m_selectedLayoutsAdditionalLayoutInfo.additionalLayout); - gs->insert( "keyboardAdditionalLayout", m_selectedLayoutsAdditionalLayoutInfo.additionalVariant); - gs->insert( "keyboardVConsoleKeymap", m_selectedLayoutsAdditionalLayoutInfo.vconsoleKeymap ); + gs->insert( "keyboardAdditionalLayout", m_additionalLayoutInfo.additionalLayout); + gs->insert( "keyboardAdditionalLayout", m_additionalLayoutInfo.additionalVariant); + gs->insert( "keyboardVConsoleKeymap", m_additionalLayoutInfo.vconsoleKeymap ); } } diff --git a/src/modules/keyboard/Config.h b/src/modules/keyboard/Config.h index dda4403b3..031cf8922 100644 --- a/src/modules/keyboard/Config.h +++ b/src/modules/keyboard/Config.h @@ -55,7 +55,10 @@ private: QString m_selectedLayout; QString m_selectedModel; QString m_selectedVariant; - AdditionalLayoutInfo m_selectedLayoutsAdditionalLayoutInfo; + + // Layout (and corresponding info) added if current one doesn't support ASCII (e.g. Russian or Japanese) + AdditionalLayoutInfo m_additionalLayoutInfo; + QTimer m_setxkbmapTimer; // From configuration From fe5757c7d1cdbfb0d38ffc7c954b745c1cf43614 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 01:07:49 +0100 Subject: [PATCH 57/78] [keyboard] Matching of layouts is very suspect --- src/modules/keyboard/Config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 2df2e8935..9f93d9197 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -381,11 +381,11 @@ Config::guessLayout( const QStringList& langParts ) for ( int variantnumber = 0; variantnumber < m_keyboardVariantsModel->rowCount(); ++variantnumber ) { if ( m_keyboardVariantsModel->item( variantnumber )[ "key" ].compare( *countryPart, - Qt::CaseInsensitive ) ) + Qt::CaseInsensitive ) == 0 ) { m_keyboardVariantsModel->setCurrentIndex( variantnumber ); cDebug() << Logger::SubEntry << "matched variant" - << m_keyboardVariantsModel->item( variantnumber )[ "key" ] << ' ' + << *countryPart << ' ' << m_keyboardVariantsModel->item( variantnumber )[ "key" ]; } } From d464e98e892c2a396621590ecfbb04844441b4b6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 01:10:05 +0100 Subject: [PATCH 58/78] [keyboard] Move remaining variables to Config - Config already *has* everythind, but drop the useless copies and duplicated code from the Page - Plug the models model into the Page - While here, document the model / layout / variant distinctions The code doesn't fill the UI properly, and the drop-down for the models combobox is not right, but at least the data is shared. --- src/modules/keyboard/Config.h | 27 +++++++----- src/modules/keyboard/KeyboardPage.cpp | 54 ++++++----------------- src/modules/keyboard/KeyboardPage.h | 9 +--- src/modules/keyboard/KeyboardViewStep.cpp | 2 +- 4 files changed, 34 insertions(+), 58 deletions(-) diff --git a/src/modules/keyboard/Config.h b/src/modules/keyboard/Config.h index 0446da525..fa8728975 100644 --- a/src/modules/keyboard/Config.h +++ b/src/modules/keyboard/Config.h @@ -44,6 +44,23 @@ public: static AdditionalLayoutInfo getAdditionalLayoutInfo( const QString& layout ); + /* A model is a physical configuration of a keyboard, e.g. 105-key PC + * or TKL 88-key physical size. + */ + KeyboardModelsModel* keyboardModels() const; + /* A layout describes the basic keycaps / language assigned to the + * keys of the physical keyboard, e.g. English (US) or Russian. + */ + KeyboardLayoutModel* keyboardLayouts() const; + /* A variant describes a variant of the basic keycaps; this can + * concern options (dead keys), or different placements of the keycaps + * (dvorak). + */ + KeyboardVariantsModel* keyboardVariants() const; + +signals: + void prettyStatusChanged(); + private: void guessLayout( const QStringList& langParts ); void updateVariants( const QPersistentModelIndex& currentItem, QString currentVariant = QString() ); @@ -65,16 +82,6 @@ private: QString m_xOrgConfFileName; QString m_convertedKeymapPath; bool m_writeEtcDefaultKeyboard = true; - - -protected: - KeyboardModelsModel* keyboardModels() const; - KeyboardLayoutModel* keyboardLayouts() const; - KeyboardVariantsModel* keyboardVariants() const; - - -signals: - void prettyStatusChanged(); }; diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index bfa0b4b42..f26c3d122 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -15,6 +15,7 @@ #include "KeyboardPage.h" +#include "Config.h" #include "KeyboardLayoutModel.h" #include "SetKeyboardLayoutJob.h" #include "keyboardwidget/keyboardpreview.h" @@ -40,30 +41,32 @@ public: LayoutItem::~LayoutItem() {} -KeyboardPage::KeyboardPage( QWidget* parent ) +KeyboardPage::KeyboardPage( Config* config, QWidget* parent ) : QWidget( parent ) , ui( new Ui::Page_Keyboard ) , m_keyboardPreview( new KeyBoardPreview( this ) ) - , m_defaultIndex( 0 ) { ui->setupUi( this ); // Keyboard Preview ui->KBPreviewLayout->addWidget( m_keyboardPreview ); - m_setxkbmapTimer.setSingleShot( true ); - + ui->comboBoxModel->setModel( config->keyboardModels() ); // Connect signals and slots connect( ui->listVariant, &QListWidget::currentItemChanged, this, &KeyboardPage::onListVariantCurrentItemChanged ); connect( - ui->buttonRestore, &QPushButton::clicked, [this] { ui->comboBoxModel->setCurrentIndex( m_defaultIndex ); } ); + ui->buttonRestore, &QPushButton::clicked, [this] { + cDebug() << "Restore clicked"; + // ui->comboBoxModel->setCurrentIndex( m_defaultIndex ); + } ); connect( ui->comboBoxModel, &QComboBox::currentTextChanged, [this]( const QString& text ) { - QString model = m_models.value( text, "pc105" ); + cDebug() << "ComboBox changed to" << text; + // QString model = m_models.value( text, "pc105" ); // Set Xorg keyboard model - QProcess::execute( "setxkbmap", QStringList { "-model", model } ); + // QProcess::execute( "setxkbmap", QStringList { "-model", model } ); } ); CALAMARES_RETRANSLATE( ui->retranslateUi( this ); ) @@ -128,25 +131,13 @@ KeyboardPage::onListLayoutCurrentItemChanged( const QModelIndex& current, const updateVariants( QPersistentModelIndex( current ) ); } -/* Returns stringlist with suitable setxkbmap command-line arguments - * to set the given @p layout and @p variant. - */ -static inline QStringList -xkbmap_args( const QString& layout, const QString& variant ) -{ - QStringList r { "-layout", layout }; - if ( !variant.isEmpty() ) - { - r << "-variant" << variant; - } - return r; -} - void KeyboardPage::onListVariantCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous ) { Q_UNUSED( previous ) + cDebug() << "item" << Logger::Pointer( current ); + QPersistentModelIndex layoutIndex = ui->listLayout->currentIndex(); LayoutItem* variantItem = dynamic_cast< LayoutItem* >( current ); @@ -158,25 +149,8 @@ KeyboardPage::onListVariantCurrentItemChanged( QListWidgetItem* current, QListWi QString layout = layoutIndex.data( KeyboardLayoutModel::KeyboardLayoutKeyRole ).toString(); QString variant = variantItem->data; + cDebug() << Logger::SubEntry << layout << variant; + m_keyboardPreview->setLayout( layout ); m_keyboardPreview->setVariant( variant ); - - //emit checkReady(); - - // Set Xorg keyboard layout - if ( m_setxkbmapTimer.isActive() ) - { - m_setxkbmapTimer.stop(); - m_setxkbmapTimer.disconnect( this ); - } - - connect( &m_setxkbmapTimer, &QTimer::timeout, this, [=] { - QProcess::execute( "setxkbmap", xkbmap_args( layout, variant ) ); - cDebug() << "xkbmap selection changed to: " << layout << '-' << variant; - m_setxkbmapTimer.disconnect( this ); - } ); - m_setxkbmapTimer.start( QApplication::keyboardInputInterval() ); - - m_selectedLayout = layout; - m_selectedVariant = variant; } diff --git a/src/modules/keyboard/KeyboardPage.h b/src/modules/keyboard/KeyboardPage.h index bb2ec17a9..231099d0b 100644 --- a/src/modules/keyboard/KeyboardPage.h +++ b/src/modules/keyboard/KeyboardPage.h @@ -27,13 +27,14 @@ namespace Ui class Page_Keyboard; } +class Config; class KeyBoardPreview; class KeyboardPage : public QWidget { Q_OBJECT public: - explicit KeyboardPage( QWidget* parent = nullptr ); + explicit KeyboardPage( Config* config, QWidget* parent = nullptr ); ~KeyboardPage() override; protected slots: @@ -45,12 +46,6 @@ private: Ui::Page_Keyboard* ui; KeyBoardPreview* m_keyboardPreview; - int m_defaultIndex; - QMap< QString, QString > m_models; - - QString m_selectedLayout; - QString m_selectedVariant; - QTimer m_setxkbmapTimer; }; #endif // KEYBOARDPAGE_H diff --git a/src/modules/keyboard/KeyboardViewStep.cpp b/src/modules/keyboard/KeyboardViewStep.cpp index 80945f848..773ed1401 100644 --- a/src/modules/keyboard/KeyboardViewStep.cpp +++ b/src/modules/keyboard/KeyboardViewStep.cpp @@ -20,7 +20,7 @@ CALAMARES_PLUGIN_FACTORY_DEFINITION( KeyboardViewStepFactory, registerPlugin< Ke KeyboardViewStep::KeyboardViewStep( QObject* parent ) : Calamares::ViewStep( parent ) , m_config( new Config(this) ) - , m_widget( new KeyboardPage() ) + , m_widget( new KeyboardPage( m_config ) ) { m_config->detectCurrentKeyboardLayout(); emit nextStatusChanged( true ); From 5f1d7b2e8dc6449298dbec13c26edcf0fcd7a0a0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 10:38:51 +0100 Subject: [PATCH 59/78] [keyboard] Rename UI widgets to make code clearer --- src/modules/keyboard/KeyboardPage.cpp | 20 ++++++++++---------- src/modules/keyboard/KeyboardPage.ui | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index f26c3d122..9ce947ef6 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -51,17 +51,17 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent ) // Keyboard Preview ui->KBPreviewLayout->addWidget( m_keyboardPreview ); - ui->comboBoxModel->setModel( config->keyboardModels() ); + ui->physicalModelSelector->setModel( config->keyboardModels() ); // Connect signals and slots - connect( ui->listVariant, &QListWidget::currentItemChanged, this, &KeyboardPage::onListVariantCurrentItemChanged ); + connect( ui->variantSelector, &QListWidget::currentItemChanged, this, &KeyboardPage::onListVariantCurrentItemChanged ); connect( ui->buttonRestore, &QPushButton::clicked, [this] { cDebug() << "Restore clicked"; - // ui->comboBoxModel->setCurrentIndex( m_defaultIndex ); + // ui->physicalModelSelector->setCurrentIndex( m_defaultIndex ); } ); - connect( ui->comboBoxModel, &QComboBox::currentTextChanged, [this]( const QString& text ) { + connect( ui->physicalModelSelector, &QComboBox::currentTextChanged, [this]( const QString& text ) { cDebug() << "ComboBox changed to" << text; // QString model = m_models.value( text, "pc105" ); @@ -82,14 +82,14 @@ void KeyboardPage::updateVariants( const QPersistentModelIndex& currentItem, QString currentVariant ) { // Block signals - ui->listVariant->blockSignals( true ); + ui->variantSelector->blockSignals( true ); QMap< QString, QString > variants = currentItem.data( KeyboardLayoutModel::KeyboardVariantsRole ).value< QMap< QString, QString > >(); QMapIterator< QString, QString > li( variants ); LayoutItem* defaultItem = nullptr; - ui->listVariant->clear(); + ui->variantSelector->clear(); while ( li.hasNext() ) { @@ -98,7 +98,7 @@ KeyboardPage::updateVariants( const QPersistentModelIndex& currentItem, QString LayoutItem* item = new LayoutItem(); item->setText( li.key() ); item->data = li.value(); - ui->listVariant->addItem( item ); + ui->variantSelector->addItem( item ); // currentVariant defaults to QString(). It is only non-empty during the // initial setup. @@ -109,12 +109,12 @@ KeyboardPage::updateVariants( const QPersistentModelIndex& currentItem, QString } // Unblock signals - ui->listVariant->blockSignals( false ); + ui->variantSelector->blockSignals( false ); // Set to default value if ( defaultItem ) { - ui->listVariant->setCurrentItem( defaultItem ); + ui->variantSelector->setCurrentItem( defaultItem ); } } @@ -138,7 +138,7 @@ KeyboardPage::onListVariantCurrentItemChanged( QListWidgetItem* current, QListWi cDebug() << "item" << Logger::Pointer( current ); - QPersistentModelIndex layoutIndex = ui->listLayout->currentIndex(); + QPersistentModelIndex layoutIndex = ui->layoutSelector->currentIndex(); LayoutItem* variantItem = dynamic_cast< LayoutItem* >( current ); if ( !layoutIndex.isValid() || !variantItem ) diff --git a/src/modules/keyboard/KeyboardPage.ui b/src/modules/keyboard/KeyboardPage.ui index f7e430a04..e8de90dec 100644 --- a/src/modules/keyboard/KeyboardPage.ui +++ b/src/modules/keyboard/KeyboardPage.ui @@ -76,7 +76,7 @@ SPDX-License-Identifier: GPL-3.0-or-later - + 0 @@ -110,10 +110,10 @@ SPDX-License-Identifier: GPL-3.0-or-later 9 - + - + @@ -139,9 +139,9 @@ SPDX-License-Identifier: GPL-3.0-or-later - comboBoxModel - listLayout - listVariant + physicalModelSelector + layoutSelector + variantSelector LE_TestKeyboard buttonRestore From a1c70b46a1e490682326085ba811dfdbed356ae5 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 13:06:43 +0100 Subject: [PATCH 60/78] [keyboard] Typo in comment --- src/modules/keyboard/keyboardwidget/keyboardglobal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp b/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp index 329913d79..8099cb231 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp +++ b/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp @@ -75,7 +75,7 @@ parseKeyboardModels( const char* filepath ) break; } - // here we are in the model section, otherwhise we would continue or break + // here we are in the model section, otherwise we would continue or break QRegExp rx; rx.setPattern( "^\\s+(\\S+)\\s+(\\w.*)\n$" ); From 365a2ad6fd5fea34d705974418216575cff5d26f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 13:41:21 +0100 Subject: [PATCH 61/78] [keyboard] Re-do the keyboard physical models model from scratch --- src/modules/keyboard/Config.cpp | 78 ++++----- src/modules/keyboard/KeyboardLayoutModel.cpp | 172 ++++++++++--------- src/modules/keyboard/KeyboardLayoutModel.h | 83 +++++---- 3 files changed, 181 insertions(+), 152 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 9f93d9197..d821146b3 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -50,22 +50,25 @@ xkbmap_layout_args( const QString& layout, const QString& variant ) } static inline QStringList -xkbmap_layout_args( const QStringList& layouts, const QStringList& variants, const QString& switchOption = "grp:alt_shift_toggle") +xkbmap_layout_args( const QStringList& layouts, + const QStringList& variants, + const QString& switchOption = "grp:alt_shift_toggle" ) { if ( layouts.size() != variants.size() ) { - cError() << "Number of layouts and variants must be equal (empty string should be used if there is no corresponding variant)"; + cError() << "Number of layouts and variants must be equal (empty string should be used if there is no " + "corresponding variant)"; return QStringList(); } - QStringList r{ "-layout", layouts.join( "," ) }; + QStringList r { "-layout", layouts.join( "," ) }; if ( !variants.isEmpty() ) { r << "-variant" << variants.join( "," ); } - if ( !switchOption.isEmpty()) + if ( !switchOption.isEmpty() ) { r << "-option" << switchOption; } @@ -88,17 +91,16 @@ xkbmap_query_grp_option() do { outputLine = setxkbmapQuery.readLine(); - } - while( setxkbmapQuery.canReadLine() && !outputLine.startsWith("options:") ); + } while ( setxkbmapQuery.canReadLine() && !outputLine.startsWith( "options:" ) ); - if( !outputLine.startsWith( "options:" ) ) + if ( !outputLine.startsWith( "options:" ) ) { return QString(); } int index = outputLine.indexOf( "grp:" ); - if( index == -1 ) + if ( index == -1 ) { return QString(); } @@ -106,14 +108,16 @@ xkbmap_query_grp_option() //it's either in the end of line or before the other option so \s or , int lastIndex = outputLine.indexOf( QRegExp( "[\\s,]" ), index ); - return outputLine.mid( index, lastIndex-1 ); + return outputLine.mid( index, lastIndex - 1 ); } -AdditionalLayoutInfo Config::getAdditionalLayoutInfo( const QString &layout ) +AdditionalLayoutInfo +Config::getAdditionalLayoutInfo( const QString& layout ) { QFile layoutTable( ":/non-ascii-layouts" ); - if( !layoutTable.open( QIODevice::ReadOnly | QIODevice::Text ) ) { + if ( !layoutTable.open( QIODevice::ReadOnly | QIODevice::Text ) ) + { cError() << "Non-ASCII layout table could not be opened"; return AdditionalLayoutInfo(); } @@ -123,10 +127,9 @@ AdditionalLayoutInfo Config::getAdditionalLayoutInfo( const QString &layout ) do { tableLine = layoutTable.readLine(); - } - while( layoutTable.canReadLine() && !tableLine.startsWith( layout ) ); + } while ( layoutTable.canReadLine() && !tableLine.startsWith( layout ) ); - if( !tableLine.startsWith( layout ) ) + if ( !tableLine.startsWith( layout ) ) { return AdditionalLayoutInfo(); } @@ -135,10 +138,10 @@ AdditionalLayoutInfo Config::getAdditionalLayoutInfo( const QString &layout ) AdditionalLayoutInfo r; - r.additionalLayout = tableEntries[1]; - r.additionalVariant = tableEntries[2] == "-" ? "" : tableEntries[2]; + r.additionalLayout = tableEntries[ 1 ]; + r.additionalVariant = tableEntries[ 2 ] == "-" ? "" : tableEntries[ 2 ]; - r.vconsoleKeymap = tableEntries[3]; + r.vconsoleKeymap = tableEntries[ 3 ]; return r; } @@ -153,7 +156,7 @@ Config::Config( QObject* parent ) // Connect signals and slots connect( m_keyboardModelsModel, &KeyboardModelsModel::currentIndexChanged, [&]( int index ) { - m_selectedModel = m_keyboardModelsModel->item( index ).value( "key", "pc105" ); + m_selectedModel = m_keyboardModelsModel->modelKey( index ); // Set Xorg keyboard model QProcess::execute( "setxkbmap", xkbmap_model_args( m_selectedModel ) ); emit prettyStatusChanged(); @@ -182,23 +185,20 @@ Config::Config( QObject* parent ) { m_additionalLayoutInfo.groupSwitcher = xkbmap_query_grp_option(); - if( m_additionalLayoutInfo.groupSwitcher.isEmpty() ) + if ( m_additionalLayoutInfo.groupSwitcher.isEmpty() ) { m_additionalLayoutInfo.groupSwitcher = "grp:alt_shift_toggle"; } - QProcess::execute( "setxkbmap", xkbmap_layout_args( - { m_additionalLayoutInfo.additionalLayout, m_selectedLayout }, - { m_additionalLayoutInfo.additionalVariant, m_selectedVariant }, - m_additionalLayoutInfo.groupSwitcher ) - ); + QProcess::execute( "setxkbmap", + xkbmap_layout_args( { m_additionalLayoutInfo.additionalLayout, m_selectedLayout }, + { m_additionalLayoutInfo.additionalVariant, m_selectedVariant }, + m_additionalLayoutInfo.groupSwitcher ) ); - - cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant - << "(added " << m_additionalLayoutInfo.additionalLayout << "-" - << m_additionalLayoutInfo.additionalVariant << " since current layout is not ASCII-capable)"; - + cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant << "(added " + << m_additionalLayoutInfo.additionalLayout << "-" << m_additionalLayoutInfo.additionalVariant + << " since current layout is not ASCII-capable)"; } else { @@ -269,15 +269,15 @@ Config::detectCurrentKeyboardLayout() continue; } - int firstQuote = line.indexOf('"'); - int lastQuote = line.lastIndexOf('"'); + int firstQuote = line.indexOf( '"' ); + int lastQuote = line.lastIndexOf( '"' ); - if (firstQuote < 0 || lastQuote < 0 || lastQuote <= firstQuote) + if ( firstQuote < 0 || lastQuote < 0 || lastQuote <= firstQuote ) { continue; } - QStringList split = line.mid(firstQuote+1, lastQuote-firstQuote).split( "+", SplitSkipEmptyParts ); + QStringList split = line.mid( firstQuote + 1, lastQuote - firstQuote ).split( "+", SplitSkipEmptyParts ); cDebug() << split; if ( split.size() >= 2 ) { @@ -324,7 +324,7 @@ Config::prettyStatus() const { QString status; status += tr( "Set keyboard model to %1.
" ) - .arg( m_keyboardModelsModel->item( m_keyboardModelsModel->currentIndex() )[ "label" ] ); + .arg( m_keyboardModelsModel->modelLabel( m_keyboardModelsModel->currentIndex() ) ); QString layout = m_keyboardLayoutsModel->item( m_keyboardLayoutsModel->currentIndex() ).second.description; QString variant = m_keyboardVariantsModel->currentIndex() >= 0 @@ -381,11 +381,11 @@ Config::guessLayout( const QStringList& langParts ) for ( int variantnumber = 0; variantnumber < m_keyboardVariantsModel->rowCount(); ++variantnumber ) { if ( m_keyboardVariantsModel->item( variantnumber )[ "key" ].compare( *countryPart, - Qt::CaseInsensitive ) == 0 ) + Qt::CaseInsensitive ) + == 0 ) { m_keyboardVariantsModel->setCurrentIndex( variantnumber ); - cDebug() << Logger::SubEntry << "matched variant" - << *countryPart << ' ' + cDebug() << Logger::SubEntry << "matched variant" << *countryPart << ' ' << m_keyboardVariantsModel->item( variantnumber )[ "key" ]; } } @@ -497,8 +497,8 @@ Config::finalize() if ( !m_additionalLayoutInfo.additionalLayout.isEmpty() ) { - gs->insert( "keyboardAdditionalLayout", m_additionalLayoutInfo.additionalLayout); - gs->insert( "keyboardAdditionalLayout", m_additionalLayoutInfo.additionalVariant); + gs->insert( "keyboardAdditionalLayout", m_additionalLayoutInfo.additionalLayout ); + gs->insert( "keyboardAdditionalLayout", m_additionalLayoutInfo.additionalVariant ); gs->insert( "keyboardVConsoleKeymap", m_additionalLayoutInfo.vconsoleKeymap ); } } diff --git a/src/modules/keyboard/KeyboardLayoutModel.cpp b/src/modules/keyboard/KeyboardLayoutModel.cpp index 2a4ffa4d6..f0393ba6c 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.cpp +++ b/src/modules/keyboard/KeyboardLayoutModel.cpp @@ -10,8 +10,96 @@ #include "KeyboardLayoutModel.h" +#include "utils/Logger.h" + #include +KeyboardModelsModel::KeyboardModelsModel( QObject* parent ) + : QAbstractListModel( parent ) +{ + // The models map is from human-readable names (!) to xkb identifier + const auto models = KeyboardGlobal::getKeyboardModels(); + for ( const auto& key : models.keys() ) + { + // So here *key* is the key in the map, which is the human-readable thing, + // while the struct fields are xkb-id, and human-readable + m_list << ModelInfo { models[ key ], key }; + } + + cDebug() << "Loaded" << m_list.count() << "keyboard models"; +} + +int +KeyboardModelsModel::rowCount( const QModelIndex& ) const +{ + return m_list.count(); +} + +QVariant +KeyboardModelsModel::data( const QModelIndex& index, int role ) const +{ + if ( !index.isValid() ) + { + return QVariant(); + } + if ( index.row() < 0 || index.row() >= m_list.count() ) + { + return QVariant(); + } + + const auto item = m_list.at( index.row() ); + switch ( role ) + { + case LabelRole: + return item.label; + case KeyRole: + return item.key; + default: + return QVariant(); + } + __builtin_unreachable(); +} + +QString +KeyboardModelsModel::modelKey( int index ) const +{ + if ( index < 0 || index >= m_list.count() ) + { + return QString(); + } + return m_list[ index ].key; +} + +QString +KeyboardModelsModel::modelLabel( int index ) const +{ + if ( index < 0 || index >= m_list.count() ) + { + return QString(); + } + return m_list[ index ].label; +} + +QHash< int, QByteArray > +KeyboardModelsModel::roleNames() const +{ + return { { Qt::DisplayRole, "label" }, { Qt::UserRole, "key" } }; +} + +void +KeyboardModelsModel::setCurrentIndex( int index ) +{ + if ( index >= m_list.count() || index < 0 ) + { + return; + } + if ( m_currentIndex != index ) + { + m_currentIndex = index; + emit currentIndexChanged( m_currentIndex ); + } +} + KeyboardLayoutModel::KeyboardLayoutModel( QObject* parent ) : QAbstractListModel( parent ) @@ -100,77 +188,6 @@ KeyboardLayoutModel::currentIndex() const return m_currentIndex; } -KeyboardModelsModel::KeyboardModelsModel( QObject* parent ) - : QAbstractListModel( parent ) -{ - detectModels(); -} - -void -KeyboardModelsModel::detectModels() -{ - beginResetModel(); - const auto models = KeyboardGlobal::getKeyboardModels(); - auto index = -1; - for ( const auto& key : models.keys() ) - { - index++; - m_list << QMap< QString, QString > { { "label", key }, { "key", models[ key ] } }; - if ( models[ key ] == "pc105" ) - { - this->setCurrentIndex( index ); - } - } - endResetModel(); -} - -void -KeyboardModelsModel::refresh() -{ - m_list.clear(); - setCurrentIndex( -1 ); - detectModels(); -} - -QVariant -KeyboardModelsModel::data( const QModelIndex& index, int role ) const -{ - if ( !index.isValid() ) - { - return QVariant(); - } - const auto item = m_list.at( index.row() ); - return role == Qt::DisplayRole ? item[ "label" ] : item[ "key" ]; -} - -int -KeyboardModelsModel::rowCount( const QModelIndex& ) const -{ - return m_list.count(); -} - -QHash< int, QByteArray > -KeyboardModelsModel::roleNames() const -{ - return { { Qt::DisplayRole, "label" }, { Qt::UserRole, "key" } }; -} - -int -KeyboardModelsModel::currentIndex() const -{ - return m_currentIndex; -} - -const QMap< QString, QString > -KeyboardModelsModel::item( const int& index ) const -{ - if ( index >= m_list.count() || index < 0 ) - { - return QMap< QString, QString >(); - } - - return m_list.at( index ); -} const QMap< QString, QString > KeyboardVariantsModel::item( const int& index ) const @@ -183,18 +200,6 @@ KeyboardVariantsModel::item( const int& index ) const return m_list.at( index ); } -void -KeyboardModelsModel::setCurrentIndex( const int& index ) -{ - if ( index >= m_list.count() || index < 0 ) - { - return; - } - - m_currentIndex = index; - emit currentIndexChanged( m_currentIndex ); -} - KeyboardVariantsModel::KeyboardVariantsModel( QObject* parent ) : QAbstractListModel( parent ) { @@ -253,4 +258,3 @@ KeyboardVariantsModel::setVariants( QMap< QString, QString > variants ) } endResetModel(); } - diff --git a/src/modules/keyboard/KeyboardLayoutModel.h b/src/modules/keyboard/KeyboardLayoutModel.h index 0fd662263..a7075b798 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.h +++ b/src/modules/keyboard/KeyboardLayoutModel.h @@ -17,6 +17,60 @@ #include #include +/** @brief A list model of the physical keyboard formats ("models" in xkb) + * + * This model acts like it has a single selection, as well. + */ +class KeyboardModelsModel : public QAbstractListModel +{ + Q_OBJECT + Q_PROPERTY( int currentIndex WRITE setCurrentIndex READ currentIndex NOTIFY currentIndexChanged ) + +public: + enum + { + LabelRole = Qt::DisplayRole, ///< Human-readable + KeyRole = Qt::UserRole ///< xkb identifier + }; + + explicit KeyboardModelsModel( QObject* parent = nullptr ); + + int rowCount( const QModelIndex& ) const override; + QVariant data( const QModelIndex& index, int role ) const override; + /** @brief xkb key for a given index (row) + * + * This is like calling data( QModelIndex( index ), KeyRole ).toString(), + * but shorter and faster. Can return an empty string if index is invalid. + */ + QString modelKey( int index ) const; + + /** @brief human-readable label for a given index (row) + * + * This is like calling data( QModelIndex( index ), LabelRole ).toString(), + * but shorter and faster. Can return an empty string if index is invalid. + */ + QString modelLabel( int index ) const; + + QHash< int, QByteArray > roleNames() const override; + + void setCurrentIndex( int index ); + int currentIndex() const { return m_currentIndex; } + +signals: + void currentIndexChanged( int index ); + +private: + struct ModelInfo + { + /// XKB identifier + QString key; + /// Human-readable + QString label; + }; + QVector< ModelInfo > m_list; + int m_currentIndex; +}; + class KeyboardLayoutModel : public QAbstractListModel { Q_OBJECT @@ -51,35 +105,6 @@ signals: void currentIndexChanged( int index ); }; -class KeyboardModelsModel : public QAbstractListModel -{ - Q_OBJECT - Q_PROPERTY( int currentIndex WRITE setCurrentIndex READ currentIndex NOTIFY currentIndexChanged ) - -public: - explicit KeyboardModelsModel( QObject* parent = nullptr ); - int rowCount( const QModelIndex& = QModelIndex() ) const override; - QVariant data( const QModelIndex& index, int role ) const override; - - void setCurrentIndex( const int& index ); - int currentIndex() const; - const QMap< QString, QString > item( const int& index ) const; - -public slots: - void refresh(); - -protected: - QHash< int, QByteArray > roleNames() const override; - -private: - int m_currentIndex = -1; - QVector< QMap< QString, QString > > m_list; - void detectModels(); - -signals: - void currentIndexChanged( int index ); -}; - class KeyboardVariantsModel : public QAbstractListModel { Q_OBJECT From 6aedf4401f8a549d2b51be2b3341a16ebd46942f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 13:41:34 +0100 Subject: [PATCH 62/78] [keyboard] Apply coding style --- src/modules/keyboard/AdditionalLayoutInfo.h | 3 ++- src/modules/keyboard/Config.h | 2 +- src/modules/keyboard/KeyboardPage.cpp | 12 ++++++------ src/modules/keyboard/KeyboardViewStep.cpp | 4 ++-- src/modules/keyboard/SetKeyboardLayoutJob.cpp | 8 +++++--- src/modules/keyboard/SetKeyboardLayoutJob.h | 3 +-- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/modules/keyboard/AdditionalLayoutInfo.h b/src/modules/keyboard/AdditionalLayoutInfo.h index 660449952..61e854d3b 100644 --- a/src/modules/keyboard/AdditionalLayoutInfo.h +++ b/src/modules/keyboard/AdditionalLayoutInfo.h @@ -12,7 +12,8 @@ #include -struct AdditionalLayoutInfo { +struct AdditionalLayoutInfo +{ QString additionalLayout; QString additionalVariant; diff --git a/src/modules/keyboard/Config.h b/src/modules/keyboard/Config.h index fa8728975..e35193484 100644 --- a/src/modules/keyboard/Config.h +++ b/src/modules/keyboard/Config.h @@ -11,9 +11,9 @@ #ifndef KEYBOARD_CONFIG_H #define KEYBOARD_CONFIG_H +#include "AdditionalLayoutInfo.h" #include "Job.h" #include "KeyboardLayoutModel.h" -#include "AdditionalLayoutInfo.h" #include #include diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 9ce947ef6..a6b1d3a16 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -53,13 +53,13 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent ) ui->physicalModelSelector->setModel( config->keyboardModels() ); // Connect signals and slots - connect( ui->variantSelector, &QListWidget::currentItemChanged, this, &KeyboardPage::onListVariantCurrentItemChanged ); - connect( - ui->buttonRestore, &QPushButton::clicked, [this] { - cDebug() << "Restore clicked"; - // ui->physicalModelSelector->setCurrentIndex( m_defaultIndex ); - } ); + ui->variantSelector, &QListWidget::currentItemChanged, this, &KeyboardPage::onListVariantCurrentItemChanged ); + + connect( ui->buttonRestore, &QPushButton::clicked, [this] { + cDebug() << "Restore clicked"; + // ui->physicalModelSelector->setCurrentIndex( m_defaultIndex ); + } ); connect( ui->physicalModelSelector, &QComboBox::currentTextChanged, [this]( const QString& text ) { cDebug() << "ComboBox changed to" << text; diff --git a/src/modules/keyboard/KeyboardViewStep.cpp b/src/modules/keyboard/KeyboardViewStep.cpp index 773ed1401..d1eb3eb68 100644 --- a/src/modules/keyboard/KeyboardViewStep.cpp +++ b/src/modules/keyboard/KeyboardViewStep.cpp @@ -19,7 +19,7 @@ CALAMARES_PLUGIN_FACTORY_DEFINITION( KeyboardViewStepFactory, registerPlugin< Ke KeyboardViewStep::KeyboardViewStep( QObject* parent ) : Calamares::ViewStep( parent ) - , m_config( new Config(this) ) + , m_config( new Config( this ) ) , m_widget( new KeyboardPage( m_config ) ) { m_config->detectCurrentKeyboardLayout(); @@ -109,5 +109,5 @@ KeyboardViewStep::onLeave() void KeyboardViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { - m_config->setConfigurationMap(configurationMap); + m_config->setConfigurationMap( configurationMap ); } diff --git a/src/modules/keyboard/SetKeyboardLayoutJob.cpp b/src/modules/keyboard/SetKeyboardLayoutJob.cpp index 766044179..419d6f3fc 100644 --- a/src/modules/keyboard/SetKeyboardLayoutJob.cpp +++ b/src/modules/keyboard/SetKeyboardLayoutJob.cpp @@ -30,7 +30,7 @@ #include -SetKeyboardLayoutJob::SetKeyboardLayoutJob(const QString& model, +SetKeyboardLayoutJob::SetKeyboardLayoutJob( const QString& model, const QString& layout, const QString& variant, const AdditionalLayoutInfo& additionalLayoutInfo, @@ -269,12 +269,14 @@ SetKeyboardLayoutJob::writeX11Data( const QString& keyboardConfPath ) const { if ( !m_layout.isEmpty() ) { - stream << " Option \"XkbLayout\" \"" << m_additionalLayoutInfo.additionalLayout << "," << m_layout << "\"\n"; + stream << " Option \"XkbLayout\" \"" << m_additionalLayoutInfo.additionalLayout << "," << m_layout + << "\"\n"; } if ( !m_variant.isEmpty() ) { - stream << " Option \"XkbVariant\" \"" << m_additionalLayoutInfo.additionalVariant << "," << m_variant << "\"\n"; + stream << " Option \"XkbVariant\" \"" << m_additionalLayoutInfo.additionalVariant << "," << m_variant + << "\"\n"; } stream << " Option \"XkbOptions\" \"" << m_additionalLayoutInfo.groupSwitcher << "\"\n"; diff --git a/src/modules/keyboard/SetKeyboardLayoutJob.h b/src/modules/keyboard/SetKeyboardLayoutJob.h index b1ce0bb15..15fadfb52 100644 --- a/src/modules/keyboard/SetKeyboardLayoutJob.h +++ b/src/modules/keyboard/SetKeyboardLayoutJob.h @@ -11,9 +11,8 @@ #ifndef SETKEYBOARDLAYOUTJOB_H #define SETKEYBOARDLAYOUTJOB_H -#include "Job.h" #include "AdditionalLayoutInfo.h" - +#include "Job.h" class SetKeyboardLayoutJob : public Calamares::Job From 193efe171007cad73c3baa2c9e360a7a530a77c6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 13:52:30 +0100 Subject: [PATCH 63/78] [keyboard] Restore the notion of PC105 default index --- src/modules/keyboard/KeyboardLayoutModel.cpp | 6 ++++++ src/modules/keyboard/KeyboardLayoutModel.h | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/modules/keyboard/KeyboardLayoutModel.cpp b/src/modules/keyboard/KeyboardLayoutModel.cpp index f0393ba6c..ab7dbd37f 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.cpp +++ b/src/modules/keyboard/KeyboardLayoutModel.cpp @@ -19,11 +19,17 @@ KeyboardModelsModel::KeyboardModelsModel( QObject* parent ) { // The models map is from human-readable names (!) to xkb identifier const auto models = KeyboardGlobal::getKeyboardModels(); + int index = 0; for ( const auto& key : models.keys() ) { // So here *key* is the key in the map, which is the human-readable thing, // while the struct fields are xkb-id, and human-readable m_list << ModelInfo { models[ key ], key }; + if ( models[ key ] == "pc105" ) + { + m_defaultPC105 = index; + } + index++; } cDebug() << "Loaded" << m_list.count() << "keyboard models"; diff --git a/src/modules/keyboard/KeyboardLayoutModel.h b/src/modules/keyboard/KeyboardLayoutModel.h index a7075b798..d0edac2d1 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.h +++ b/src/modules/keyboard/KeyboardLayoutModel.h @@ -54,6 +54,8 @@ public: QHash< int, QByteArray > roleNames() const override; void setCurrentIndex( int index ); + /// @brief Set the index back to PC105 (the default physical model) + void setCurrentIndex() { setCurrentIndex( m_defaultPC105 ); } int currentIndex() const { return m_currentIndex; } signals: @@ -68,7 +70,8 @@ private: QString label; }; QVector< ModelInfo > m_list; - int m_currentIndex; + int m_currentIndex = -1; + int m_defaultPC105 = -1; ///< The index of pc105, if there is one }; class KeyboardLayoutModel : public QAbstractListModel From 87aafb2442c3208a256c7c01b92d1b9aa405b1df Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 13:55:21 +0100 Subject: [PATCH 64/78] [keyboard] Tear up connections between widgets and model --- src/modules/keyboard/Config.cpp | 7 +++++-- src/modules/keyboard/KeyboardPage.cpp | 16 +++------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index d821146b3..13954eb20 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -156,22 +156,25 @@ Config::Config( QObject* parent ) // Connect signals and slots connect( m_keyboardModelsModel, &KeyboardModelsModel::currentIndexChanged, [&]( int index ) { + // Set Xorg keyboard model m_selectedModel = m_keyboardModelsModel->modelKey( index ); - // Set Xorg keyboard model + cDebug() << "Setting model" << index << m_selectedModel; QProcess::execute( "setxkbmap", xkbmap_model_args( m_selectedModel ) ); emit prettyStatusChanged(); } ); connect( m_keyboardLayoutsModel, &KeyboardLayoutModel::currentIndexChanged, [&]( int index ) { m_selectedLayout = m_keyboardLayoutsModel->item( index ).first; + cDebug() << "Setting layout" << index << m_selectedLayout; updateVariants( QPersistentModelIndex( m_keyboardLayoutsModel->index( index ) ) ); emit prettyStatusChanged(); } ); connect( m_keyboardVariantsModel, &KeyboardVariantsModel::currentIndexChanged, [&]( int index ) { + // Set Xorg keyboard layout + variant m_selectedVariant = m_keyboardVariantsModel->item( index )[ "key" ]; + cDebug() << "Setting variant" << index << m_selectedVariant; - // Set Xorg keyboard layout if ( m_setxkbmapTimer.isActive() ) { m_setxkbmapTimer.stop(); diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index a6b1d3a16..9974f7bf7 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -52,22 +52,12 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent ) ui->KBPreviewLayout->addWidget( m_keyboardPreview ); ui->physicalModelSelector->setModel( config->keyboardModels() ); - // Connect signals and slots - connect( - ui->variantSelector, &QListWidget::currentItemChanged, this, &KeyboardPage::onListVariantCurrentItemChanged ); + ui->layoutSelector->setModel( config->keyboardLayouts() ); - connect( ui->buttonRestore, &QPushButton::clicked, [this] { - cDebug() << "Restore clicked"; - // ui->physicalModelSelector->setCurrentIndex( m_defaultIndex ); + connect( ui->buttonRestore, &QPushButton::clicked, [config=config] { + config->keyboardModels()->setCurrentIndex(); } ); - connect( ui->physicalModelSelector, &QComboBox::currentTextChanged, [this]( const QString& text ) { - cDebug() << "ComboBox changed to" << text; - // QString model = m_models.value( text, "pc105" ); - - // Set Xorg keyboard model - // QProcess::execute( "setxkbmap", QStringList { "-model", model } ); - } ); CALAMARES_RETRANSLATE( ui->retranslateUi( this ); ) } From 168be02c964c8971925b60250c39cc019c03a4a3 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 14:03:46 +0100 Subject: [PATCH 65/78] [keyboard] Hook up the model-selection again --- src/modules/keyboard/KeyboardPage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 9974f7bf7..135aa1bc5 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -57,7 +57,10 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent ) connect( ui->buttonRestore, &QPushButton::clicked, [config=config] { config->keyboardModels()->setCurrentIndex(); } ); - + connect( ui->physicalModelSelector, + QOverload::of( &QComboBox::currentIndexChanged ), + config->keyboardModels(), + QOverload::of( &KeyboardModelsModel::setCurrentIndex ) ); CALAMARES_RETRANSLATE( ui->retranslateUi( this ); ) } From 5afe54132bf6bcaaef73f960d25813770f06bf18 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 15:34:47 +0100 Subject: [PATCH 66/78] [keyboard] Use the models from Config - Remove code that is duplicated in Config. - Hook up UI for physical keyboard model, and back. - For now, introduce some named slots with debugging output. This makes debugging a lot easier since we have function names to work with rather than anonymous lambdas --- src/modules/keyboard/KeyboardPage.cpp | 156 ++++++++++++-------------- src/modules/keyboard/KeyboardPage.h | 10 +- src/modules/keyboard/KeyboardPage.ui | 2 +- 3 files changed, 79 insertions(+), 89 deletions(-) diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 135aa1bc5..90dacef95 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -45,105 +45,93 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent ) : QWidget( parent ) , ui( new Ui::Page_Keyboard ) , m_keyboardPreview( new KeyBoardPreview( this ) ) + , m_config( config ) { ui->setupUi( this ); // Keyboard Preview ui->KBPreviewLayout->addWidget( m_keyboardPreview ); - ui->physicalModelSelector->setModel( config->keyboardModels() ); - ui->layoutSelector->setModel( config->keyboardLayouts() ); + { + auto* model = config->keyboardModels(); + model->setCurrentIndex(); // To default PC105 + ui->physicalModelSelector->setModel( model ); + ui->physicalModelSelector->setCurrentIndex( model->currentIndex() ); + } + { + auto* model = config->keyboardLayouts(); + ui->layoutSelector->setModel( model ); + ui->layoutSelector->setCurrentIndex( model->index( model->currentIndex() ) ); + } + { + auto* model = config->keyboardVariants(); + ui->variantSelector->setModel( model ); + ui->variantSelector->setCurrentIndex( model->index( model->currentIndex() ) ); + cDebug() << "Variants now" << model->rowCount() << model->currentIndex(); + } + + connect( + ui->buttonRestore, &QPushButton::clicked, [config = config] { config->keyboardModels()->setCurrentIndex(); } ); - connect( ui->buttonRestore, &QPushButton::clicked, [config=config] { - config->keyboardModels()->setCurrentIndex(); - } ); connect( ui->physicalModelSelector, - QOverload::of( &QComboBox::currentIndexChanged ), + QOverload< int >::of( &QComboBox::currentIndexChanged ), config->keyboardModels(), - QOverload::of( &KeyboardModelsModel::setCurrentIndex ) ); + QOverload< int >::of( &KeyboardModelsModel::setCurrentIndex ) ); + connect( config->keyboardModels(), + &KeyboardModelsModel::currentIndexChanged, + ui->physicalModelSelector, + &QComboBox::setCurrentIndex ); + + connect( ui->layoutSelector->selectionModel(), + &QItemSelectionModel::currentChanged, + this, + &KeyboardPage::layoutChangedByUser ); + connect( config->keyboardLayouts(), + &KeyboardLayoutModel::currentIndexChanged, + this, + &KeyboardPage::layoutChangedByConfig ); + + connect( ui->variantSelector->selectionModel(), + &QItemSelectionModel::currentChanged, + this, + &KeyboardPage::variantChangedByUser ); + connect( config->keyboardVariants(), + &KeyboardVariantsModel::currentIndexChanged, + this, + &KeyboardPage::variantChangedByConfig ); CALAMARES_RETRANSLATE( ui->retranslateUi( this ); ) } +void +KeyboardPage::layoutChangedByUser( const QModelIndex& current, const QModelIndex& previous ) +{ + cDebug() << "index ->" << current.row(); + m_config->keyboardLayouts()->setCurrentIndex( current.row() ); + cDebug() << Logger::SubEntry << "variants now" << m_config->keyboardVariants()->rowCount(); +} + +void +KeyboardPage::layoutChangedByConfig( int index ) +{ + cDebug() << "index ->" << index; + ui->layoutSelector->setCurrentIndex( m_config->keyboardLayouts()->index( index ) ); + cDebug() << Logger::SubEntry << "variants now" << m_config->keyboardVariants()->rowCount(); +} + +void +KeyboardPage::variantChangedByUser( const QModelIndex& current, const QModelIndex& previous ) +{ + cDebug() << "index ->" << current.row(); +} + +void +KeyboardPage::variantChangedByConfig( int index ) +{ + cDebug() << "index ->" << index; +} KeyboardPage::~KeyboardPage() { delete ui; } - -void -KeyboardPage::updateVariants( const QPersistentModelIndex& currentItem, QString currentVariant ) -{ - // Block signals - ui->variantSelector->blockSignals( true ); - - QMap< QString, QString > variants - = currentItem.data( KeyboardLayoutModel::KeyboardVariantsRole ).value< QMap< QString, QString > >(); - QMapIterator< QString, QString > li( variants ); - LayoutItem* defaultItem = nullptr; - - ui->variantSelector->clear(); - - while ( li.hasNext() ) - { - li.next(); - - LayoutItem* item = new LayoutItem(); - item->setText( li.key() ); - item->data = li.value(); - ui->variantSelector->addItem( item ); - - // currentVariant defaults to QString(). It is only non-empty during the - // initial setup. - if ( li.value() == currentVariant ) - { - defaultItem = item; - } - } - - // Unblock signals - ui->variantSelector->blockSignals( false ); - - // Set to default value - if ( defaultItem ) - { - ui->variantSelector->setCurrentItem( defaultItem ); - } -} - - -void -KeyboardPage::onListLayoutCurrentItemChanged( const QModelIndex& current, const QModelIndex& previous ) -{ - Q_UNUSED( previous ) - if ( !current.isValid() ) - { - return; - } - - updateVariants( QPersistentModelIndex( current ) ); -} - -void -KeyboardPage::onListVariantCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous ) -{ - Q_UNUSED( previous ) - - cDebug() << "item" << Logger::Pointer( current ); - - QPersistentModelIndex layoutIndex = ui->layoutSelector->currentIndex(); - LayoutItem* variantItem = dynamic_cast< LayoutItem* >( current ); - - if ( !layoutIndex.isValid() || !variantItem ) - { - return; - } - - QString layout = layoutIndex.data( KeyboardLayoutModel::KeyboardLayoutKeyRole ).toString(); - QString variant = variantItem->data; - - cDebug() << Logger::SubEntry << layout << variant; - - m_keyboardPreview->setLayout( layout ); - m_keyboardPreview->setVariant( variant ); -} diff --git a/src/modules/keyboard/KeyboardPage.h b/src/modules/keyboard/KeyboardPage.h index 231099d0b..582b614e3 100644 --- a/src/modules/keyboard/KeyboardPage.h +++ b/src/modules/keyboard/KeyboardPage.h @@ -38,14 +38,16 @@ public: ~KeyboardPage() override; protected slots: - void onListLayoutCurrentItemChanged( const QModelIndex& current, const QModelIndex& previous ); - void onListVariantCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous ); + void layoutChangedByUser( const QModelIndex& current, const QModelIndex& previous ); + void layoutChangedByConfig( int index ); + + void variantChangedByUser( const QModelIndex& current, const QModelIndex& previous ); + void variantChangedByConfig( int index ); private: - void updateVariants( const QPersistentModelIndex& currentItem, QString currentVariant = QString() ); - Ui::Page_Keyboard* ui; KeyBoardPreview* m_keyboardPreview; + Config* m_config; }; #endif // KEYBOARDPAGE_H diff --git a/src/modules/keyboard/KeyboardPage.ui b/src/modules/keyboard/KeyboardPage.ui index e8de90dec..f7592fc6a 100644 --- a/src/modules/keyboard/KeyboardPage.ui +++ b/src/modules/keyboard/KeyboardPage.ui @@ -113,7 +113,7 @@ SPDX-License-Identifier: GPL-3.0-or-later - + From d536173d66a03deade6c578156cc32a81bbe8d72 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 16:20:02 +0100 Subject: [PATCH 67/78] [keyboard] Factor out a 2-column k-v list --- src/modules/keyboard/KeyboardLayoutModel.cpp | 52 +++++++++++--------- src/modules/keyboard/KeyboardLayoutModel.h | 29 ++++++++--- src/modules/keyboard/KeyboardPage.cpp | 2 +- 3 files changed, 53 insertions(+), 30 deletions(-) diff --git a/src/modules/keyboard/KeyboardLayoutModel.cpp b/src/modules/keyboard/KeyboardLayoutModel.cpp index ab7dbd37f..4026bfc64 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.cpp +++ b/src/modules/keyboard/KeyboardLayoutModel.cpp @@ -14,35 +14,19 @@ #include -KeyboardModelsModel::KeyboardModelsModel( QObject* parent ) +XKBListModel::XKBListModel( QObject* parent ) : QAbstractListModel( parent ) { - // The models map is from human-readable names (!) to xkb identifier - const auto models = KeyboardGlobal::getKeyboardModels(); - int index = 0; - for ( const auto& key : models.keys() ) - { - // So here *key* is the key in the map, which is the human-readable thing, - // while the struct fields are xkb-id, and human-readable - m_list << ModelInfo { models[ key ], key }; - if ( models[ key ] == "pc105" ) - { - m_defaultPC105 = index; - } - index++; - } - - cDebug() << "Loaded" << m_list.count() << "keyboard models"; } int -KeyboardModelsModel::rowCount( const QModelIndex& ) const +XKBListModel::rowCount( const QModelIndex& ) const { return m_list.count(); } QVariant -KeyboardModelsModel::data( const QModelIndex& index, int role ) const +XKBListModel::data( const QModelIndex& index, int role ) const { if ( !index.isValid() ) { @@ -67,7 +51,7 @@ KeyboardModelsModel::data( const QModelIndex& index, int role ) const } QString -KeyboardModelsModel::modelKey( int index ) const +XKBListModel::modelKey( int index ) const { if ( index < 0 || index >= m_list.count() ) { @@ -77,7 +61,7 @@ KeyboardModelsModel::modelKey( int index ) const } QString -KeyboardModelsModel::modelLabel( int index ) const +XKBListModel::modelLabel( int index ) const { if ( index < 0 || index >= m_list.count() ) { @@ -87,13 +71,13 @@ KeyboardModelsModel::modelLabel( int index ) const } QHash< int, QByteArray > -KeyboardModelsModel::roleNames() const +XKBListModel::roleNames() const { return { { Qt::DisplayRole, "label" }, { Qt::UserRole, "key" } }; } void -KeyboardModelsModel::setCurrentIndex( int index ) +XKBListModel::setCurrentIndex( int index ) { if ( index >= m_list.count() || index < 0 ) { @@ -106,6 +90,28 @@ KeyboardModelsModel::setCurrentIndex( int index ) } } +KeyboardModelsModel::KeyboardModelsModel( QObject* parent ) + : XKBListModel( parent ) +{ + // The models map is from human-readable names (!) to xkb identifier + const auto models = KeyboardGlobal::getKeyboardModels(); + m_list.reserve( models.count() ); + int index = 0; + for ( const auto& key : models.keys() ) + { + // So here *key* is the key in the map, which is the human-readable thing, + // while the struct fields are xkb-id, and human-readable + m_list << ModelInfo { models[ key ], key }; + if ( models[ key ] == "pc105" ) + { + m_defaultPC105 = index; + } + index++; + } + + cDebug() << "Loaded" << m_list.count() << "keyboard models"; +} + KeyboardLayoutModel::KeyboardLayoutModel( QObject* parent ) : QAbstractListModel( parent ) diff --git a/src/modules/keyboard/KeyboardLayoutModel.h b/src/modules/keyboard/KeyboardLayoutModel.h index d0edac2d1..76b921fd4 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.h +++ b/src/modules/keyboard/KeyboardLayoutModel.h @@ -17,11 +17,12 @@ #include #include -/** @brief A list model of the physical keyboard formats ("models" in xkb) +/** @brief A list model with an xkb key and a human-readable string * * This model acts like it has a single selection, as well. */ -class KeyboardModelsModel : public QAbstractListModel + +class XKBListModel : public QAbstractListModel { Q_OBJECT Q_PROPERTY( int currentIndex WRITE setCurrentIndex READ currentIndex NOTIFY currentIndexChanged ) @@ -33,7 +34,7 @@ public: KeyRole = Qt::UserRole ///< xkb identifier }; - explicit KeyboardModelsModel( QObject* parent = nullptr ); + explicit XKBListModel( QObject* parent = nullptr ); int rowCount( const QModelIndex& ) const override; QVariant data( const QModelIndex& index, int role ) const override; @@ -54,14 +55,12 @@ public: QHash< int, QByteArray > roleNames() const override; void setCurrentIndex( int index ); - /// @brief Set the index back to PC105 (the default physical model) - void setCurrentIndex() { setCurrentIndex( m_defaultPC105 ); } int currentIndex() const { return m_currentIndex; } signals: void currentIndexChanged( int index ); -private: +protected: struct ModelInfo { /// XKB identifier @@ -71,6 +70,24 @@ private: }; QVector< ModelInfo > m_list; int m_currentIndex = -1; +}; + + +/** @brief A list model of the physical keyboard formats ("models" in xkb) + * + * This model acts like it has a single selection, as well. + */ +class KeyboardModelsModel : public XKBListModel +{ + Q_OBJECT + +public: + explicit KeyboardModelsModel( QObject* parent = nullptr ); + + /// @brief Set the index back to PC105 (the default physical model) + void setCurrentIndex() { XKBListModel::setCurrentIndex( m_defaultPC105 ); } + +private: int m_defaultPC105 = -1; ///< The index of pc105, if there is one }; diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 90dacef95..28ed3d25a 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -76,7 +76,7 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent ) connect( ui->physicalModelSelector, QOverload< int >::of( &QComboBox::currentIndexChanged ), config->keyboardModels(), - QOverload< int >::of( &KeyboardModelsModel::setCurrentIndex ) ); + QOverload< int >::of( &XKBListModel::setCurrentIndex ) ); connect( config->keyboardModels(), &KeyboardModelsModel::currentIndexChanged, ui->physicalModelSelector, From 14a76a386a1a32030712bfa54a1cdc86ff3e4927 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 16:28:00 +0100 Subject: [PATCH 68/78] [keyboard] Replace broken-ish variants model with k-v list - Use the just-refactored XKBListModel to store the xkb key-value pairs for variants, drop most of the complicated implementation, store just a single list of values. --- src/modules/keyboard/Config.cpp | 13 ++-- src/modules/keyboard/KeyboardLayoutModel.cpp | 64 ++------------------ src/modules/keyboard/KeyboardLayoutModel.h | 28 ++------- 3 files changed, 17 insertions(+), 88 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 13954eb20..8cd97f08b 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -157,7 +157,7 @@ Config::Config( QObject* parent ) // Connect signals and slots connect( m_keyboardModelsModel, &KeyboardModelsModel::currentIndexChanged, [&]( int index ) { // Set Xorg keyboard model - m_selectedModel = m_keyboardModelsModel->modelKey( index ); + m_selectedModel = m_keyboardModelsModel->key( index ); cDebug() << "Setting model" << index << m_selectedModel; QProcess::execute( "setxkbmap", xkbmap_model_args( m_selectedModel ) ); emit prettyStatusChanged(); @@ -172,7 +172,7 @@ Config::Config( QObject* parent ) connect( m_keyboardVariantsModel, &KeyboardVariantsModel::currentIndexChanged, [&]( int index ) { // Set Xorg keyboard layout + variant - m_selectedVariant = m_keyboardVariantsModel->item( index )[ "key" ]; + m_selectedVariant = m_keyboardVariantsModel->key( index ); cDebug() << "Setting variant" << index << m_selectedVariant; if ( m_setxkbmapTimer.isActive() ) @@ -327,11 +327,11 @@ Config::prettyStatus() const { QString status; status += tr( "Set keyboard model to %1.
" ) - .arg( m_keyboardModelsModel->modelLabel( m_keyboardModelsModel->currentIndex() ) ); + .arg( m_keyboardModelsModel->label( m_keyboardModelsModel->currentIndex() ) ); QString layout = m_keyboardLayoutsModel->item( m_keyboardLayoutsModel->currentIndex() ).second.description; QString variant = m_keyboardVariantsModel->currentIndex() >= 0 - ? m_keyboardVariantsModel->item( m_keyboardVariantsModel->currentIndex() )[ "label" ] + ? m_keyboardVariantsModel->label( m_keyboardVariantsModel->currentIndex() ) : QString( "" ); status += tr( "Set keyboard layout to %1/%2." ).arg( layout, variant ); @@ -383,13 +383,12 @@ Config::guessLayout( const QStringList& langParts ) cDebug() << "Next level:" << *countryPart; for ( int variantnumber = 0; variantnumber < m_keyboardVariantsModel->rowCount(); ++variantnumber ) { - if ( m_keyboardVariantsModel->item( variantnumber )[ "key" ].compare( *countryPart, - Qt::CaseInsensitive ) + if ( m_keyboardVariantsModel->key( variantnumber ).compare( *countryPart, Qt::CaseInsensitive ) == 0 ) { m_keyboardVariantsModel->setCurrentIndex( variantnumber ); cDebug() << Logger::SubEntry << "matched variant" << *countryPart << ' ' - << m_keyboardVariantsModel->item( variantnumber )[ "key" ]; + << m_keyboardVariantsModel->key( variantnumber ); } } } diff --git a/src/modules/keyboard/KeyboardLayoutModel.cpp b/src/modules/keyboard/KeyboardLayoutModel.cpp index 4026bfc64..5ecc4ccb1 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.cpp +++ b/src/modules/keyboard/KeyboardLayoutModel.cpp @@ -51,7 +51,7 @@ XKBListModel::data( const QModelIndex& index, int role ) const } QString -XKBListModel::modelKey( int index ) const +XKBListModel::key( int index ) const { if ( index < 0 || index >= m_list.count() ) { @@ -61,7 +61,7 @@ XKBListModel::modelKey( int index ) const } QString -XKBListModel::modelLabel( int index ) const +XKBListModel::label( int index ) const { if ( index < 0 || index >= m_list.count() ) { @@ -201,72 +201,20 @@ KeyboardLayoutModel::currentIndex() const } -const QMap< QString, QString > -KeyboardVariantsModel::item( const int& index ) const -{ - if ( index >= m_list.count() || index < 0 ) - { - return QMap< QString, QString >(); - } - - return m_list.at( index ); -} - KeyboardVariantsModel::KeyboardVariantsModel( QObject* parent ) - : QAbstractListModel( parent ) + : XKBListModel( parent ) { } -int -KeyboardVariantsModel::currentIndex() const -{ - return m_currentIndex; -} - -void -KeyboardVariantsModel::setCurrentIndex( const int& index ) -{ - if ( index >= m_list.count() || index < 0 ) - { - return; - } - - m_currentIndex = index; - emit currentIndexChanged( m_currentIndex ); -} - -QVariant -KeyboardVariantsModel::data( const QModelIndex& index, int role ) const -{ - if ( !index.isValid() ) - { - return QVariant(); - } - const auto item = m_list.at( index.row() ); - return role == Qt::DisplayRole ? item[ "label" ] : item[ "key" ]; -} - -int -KeyboardVariantsModel::rowCount( const QModelIndex& ) const -{ - return m_list.count(); -} - -QHash< int, QByteArray > -KeyboardVariantsModel::roleNames() const -{ - return { { Qt::DisplayRole, "label" }, { Qt::UserRole, "key" } }; -} - void KeyboardVariantsModel::setVariants( QMap< QString, QString > variants ) { - m_list.clear(); beginResetModel(); + m_list.clear(); + m_list.reserve( variants.count() ); for ( const auto& key : variants.keys() ) { - const auto item = QMap< QString, QString > { { "label", key }, { "key", variants[ key ] } }; - m_list << item; + m_list << ModelInfo { variants[ key ], key }; } endResetModel(); } diff --git a/src/modules/keyboard/KeyboardLayoutModel.h b/src/modules/keyboard/KeyboardLayoutModel.h index 76b921fd4..9cb2da851 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.h +++ b/src/modules/keyboard/KeyboardLayoutModel.h @@ -36,21 +36,21 @@ public: explicit XKBListModel( QObject* parent = nullptr ); - int rowCount( const QModelIndex& ) const override; + int rowCount( const QModelIndex& = QModelIndex() ) const override; QVariant data( const QModelIndex& index, int role ) const override; /** @brief xkb key for a given index (row) * * This is like calling data( QModelIndex( index ), KeyRole ).toString(), * but shorter and faster. Can return an empty string if index is invalid. */ - QString modelKey( int index ) const; + QString key( int index ) const; /** @brief human-readable label for a given index (row) * * This is like calling data( QModelIndex( index ), LabelRole ).toString(), * but shorter and faster. Can return an empty string if index is invalid. */ - QString modelLabel( int index ) const; + QString label( int index ) const; QHash< int, QByteArray > roleNames() const override; @@ -125,32 +125,14 @@ signals: void currentIndexChanged( int index ); }; -class KeyboardVariantsModel : public QAbstractListModel +class KeyboardVariantsModel : public XKBListModel { Q_OBJECT - Q_PROPERTY( int currentIndex WRITE setCurrentIndex READ currentIndex NOTIFY currentIndexChanged ) public: explicit KeyboardVariantsModel( QObject* parent = nullptr ); + void setVariants( QMap< QString, QString > variants ); - - int rowCount( const QModelIndex& = QModelIndex() ) const override; - QVariant data( const QModelIndex& index, int role ) const override; - - void setCurrentIndex( const int& index ); - int currentIndex() const; - - const QMap< QString, QString > item( const int& index ) const; - -protected: - QHash< int, QByteArray > roleNames() const override; - -private: - int m_currentIndex = -1; - QVector< QMap< QString, QString > > m_list; - -signals: - void currentIndexChanged( int index ); }; #endif // KEYBOARDLAYOUTMODEL_H From 9e141636c54002758ee57071ada2af387097df7c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 16:40:43 +0100 Subject: [PATCH 69/78] [keyboard] Tidy up the debugging output, add docs --- src/modules/keyboard/KeyboardLayoutModel.h | 11 +++++++++++ src/modules/keyboard/KeyboardPage.cpp | 8 ++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/modules/keyboard/KeyboardLayoutModel.h b/src/modules/keyboard/KeyboardLayoutModel.h index 9cb2da851..3eef595c3 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.h +++ b/src/modules/keyboard/KeyboardLayoutModel.h @@ -91,6 +91,11 @@ private: int m_defaultPC105 = -1; ///< The index of pc105, if there is one }; +/** @brief A list of keyboard layouts (arrangements of keycaps) + * + * Layouts can have a list of associated Variants, so this + * is slightly more complicated than the "regular" XKBListModel. + */ class KeyboardLayoutModel : public QAbstractListModel { Q_OBJECT @@ -125,6 +130,12 @@ signals: void currentIndexChanged( int index ); }; +/** @brief A list of variants (xkb id and human-readable) + * + * The variants that are available depend on the Layout that is used, + * so the `setVariants()` function can be used to update the variants + * when the two models are related. + */ class KeyboardVariantsModel : public XKBListModel { Q_OBJECT diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 28ed3d25a..cb8aada5b 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -106,29 +106,25 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent ) void KeyboardPage::layoutChangedByUser( const QModelIndex& current, const QModelIndex& previous ) { - cDebug() << "index ->" << current.row(); m_config->keyboardLayouts()->setCurrentIndex( current.row() ); - cDebug() << Logger::SubEntry << "variants now" << m_config->keyboardVariants()->rowCount(); } void KeyboardPage::layoutChangedByConfig( int index ) { - cDebug() << "index ->" << index; ui->layoutSelector->setCurrentIndex( m_config->keyboardLayouts()->index( index ) ); - cDebug() << Logger::SubEntry << "variants now" << m_config->keyboardVariants()->rowCount(); } void KeyboardPage::variantChangedByUser( const QModelIndex& current, const QModelIndex& previous ) { - cDebug() << "index ->" << current.row(); + m_config->keyboardVariants()->setCurrentIndex( current.row() ); } void KeyboardPage::variantChangedByConfig( int index ) { - cDebug() << "index ->" << index; + ui->variantSelector->setCurrentIndex( m_config->keyboardVariants()->index( index ) ); } KeyboardPage::~KeyboardPage() From 0bf28b0b94aa030e5ccf421cdbc709b30abf4216 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 16:47:52 +0100 Subject: [PATCH 70/78] [keyboard] Sanity in setCurrentIndex() parameters --- src/modules/keyboard/KeyboardLayoutModel.cpp | 9 ++++++--- src/modules/keyboard/KeyboardLayoutModel.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/modules/keyboard/KeyboardLayoutModel.cpp b/src/modules/keyboard/KeyboardLayoutModel.cpp index 5ecc4ccb1..b8cb892f4 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.cpp +++ b/src/modules/keyboard/KeyboardLayoutModel.cpp @@ -183,15 +183,18 @@ KeyboardLayoutModel::roleNames() const } void -KeyboardLayoutModel::setCurrentIndex( const int& index ) +KeyboardLayoutModel::setCurrentIndex( int index ) { if ( index >= m_layouts.count() || index < 0 ) { return; } - m_currentIndex = index; - emit currentIndexChanged( m_currentIndex ); + if ( m_currentIndex != index ) + { + m_currentIndex = index; + emit currentIndexChanged( m_currentIndex ); + } } int diff --git a/src/modules/keyboard/KeyboardLayoutModel.h b/src/modules/keyboard/KeyboardLayoutModel.h index 3eef595c3..60747da55 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.h +++ b/src/modules/keyboard/KeyboardLayoutModel.h @@ -114,7 +114,7 @@ public: QVariant data( const QModelIndex& index, int role ) const override; - void setCurrentIndex( const int& index ); + void setCurrentIndex( int index ); int currentIndex() const; const QPair< QString, KeyboardGlobal::KeyboardInfo > item( const int& index ) const; From 2e5301c5c91e211c73069d72d516dd6218ca63d8 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 16:51:34 +0100 Subject: [PATCH 71/78] [keyboard] Simplify back down to lambdas - With debugging and untangling done, the lambdas are simple and short, so return to using them. One point of improvement might be to give the models suitable slots themselves, to avoid even this indirection. --- src/modules/keyboard/KeyboardPage.cpp | 45 +++++---------------------- src/modules/keyboard/KeyboardPage.h | 7 ----- 2 files changed, 8 insertions(+), 44 deletions(-) diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index cb8aada5b..2be897e58 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -84,49 +84,20 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent ) connect( ui->layoutSelector->selectionModel(), &QItemSelectionModel::currentChanged, - this, - &KeyboardPage::layoutChangedByUser ); - connect( config->keyboardLayouts(), - &KeyboardLayoutModel::currentIndexChanged, - this, - &KeyboardPage::layoutChangedByConfig ); + [this]( const QModelIndex& current ) { m_config->keyboardLayouts()->setCurrentIndex( current.row() ); } ); + connect( config->keyboardLayouts(), &KeyboardLayoutModel::currentIndexChanged, [this]( int index ) { + ui->layoutSelector->setCurrentIndex( m_config->keyboardLayouts()->index( index ) ); + } ); connect( ui->variantSelector->selectionModel(), &QItemSelectionModel::currentChanged, - this, - &KeyboardPage::variantChangedByUser ); - connect( config->keyboardVariants(), - &KeyboardVariantsModel::currentIndexChanged, - this, - &KeyboardPage::variantChangedByConfig ); - + [this]( const QModelIndex& current ) { m_config->keyboardVariants()->setCurrentIndex( current.row() ); } ); + connect( config->keyboardVariants(), &KeyboardVariantsModel::currentIndexChanged, [this]( int index ) { + ui->variantSelector->setCurrentIndex( m_config->keyboardVariants()->index( index ) ); + } ); CALAMARES_RETRANSLATE( ui->retranslateUi( this ); ) } -void -KeyboardPage::layoutChangedByUser( const QModelIndex& current, const QModelIndex& previous ) -{ - m_config->keyboardLayouts()->setCurrentIndex( current.row() ); -} - -void -KeyboardPage::layoutChangedByConfig( int index ) -{ - ui->layoutSelector->setCurrentIndex( m_config->keyboardLayouts()->index( index ) ); -} - -void -KeyboardPage::variantChangedByUser( const QModelIndex& current, const QModelIndex& previous ) -{ - m_config->keyboardVariants()->setCurrentIndex( current.row() ); -} - -void -KeyboardPage::variantChangedByConfig( int index ) -{ - ui->variantSelector->setCurrentIndex( m_config->keyboardVariants()->index( index ) ); -} - KeyboardPage::~KeyboardPage() { delete ui; diff --git a/src/modules/keyboard/KeyboardPage.h b/src/modules/keyboard/KeyboardPage.h index 582b614e3..98925fcad 100644 --- a/src/modules/keyboard/KeyboardPage.h +++ b/src/modules/keyboard/KeyboardPage.h @@ -37,13 +37,6 @@ public: explicit KeyboardPage( Config* config, QWidget* parent = nullptr ); ~KeyboardPage() override; -protected slots: - void layoutChangedByUser( const QModelIndex& current, const QModelIndex& previous ); - void layoutChangedByConfig( int index ); - - void variantChangedByUser( const QModelIndex& current, const QModelIndex& previous ); - void variantChangedByConfig( int index ); - private: Ui::Page_Keyboard* ui; KeyBoardPreview* m_keyboardPreview; From cd9c0ea78172e7940f9264bd056123ce59f62492 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 17:00:12 +0100 Subject: [PATCH 72/78] [keyboard] Reduce debugging output --- src/modules/keyboard/Config.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 8cd97f08b..6475d9bc8 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -158,14 +158,12 @@ Config::Config( QObject* parent ) connect( m_keyboardModelsModel, &KeyboardModelsModel::currentIndexChanged, [&]( int index ) { // Set Xorg keyboard model m_selectedModel = m_keyboardModelsModel->key( index ); - cDebug() << "Setting model" << index << m_selectedModel; QProcess::execute( "setxkbmap", xkbmap_model_args( m_selectedModel ) ); emit prettyStatusChanged(); } ); connect( m_keyboardLayoutsModel, &KeyboardLayoutModel::currentIndexChanged, [&]( int index ) { m_selectedLayout = m_keyboardLayoutsModel->item( index ).first; - cDebug() << "Setting layout" << index << m_selectedLayout; updateVariants( QPersistentModelIndex( m_keyboardLayoutsModel->index( index ) ) ); emit prettyStatusChanged(); } ); @@ -173,7 +171,6 @@ Config::Config( QObject* parent ) connect( m_keyboardVariantsModel, &KeyboardVariantsModel::currentIndexChanged, [&]( int index ) { // Set Xorg keyboard layout + variant m_selectedVariant = m_keyboardVariantsModel->key( index ); - cDebug() << "Setting variant" << index << m_selectedVariant; if ( m_setxkbmapTimer.isActive() ) { From 018788ddc0de422d583aeda68c4dd96fde8c6488 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Oct 2020 17:07:19 +0100 Subject: [PATCH 73/78] Changes: document Artem's work --- CHANGES | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 1f6f104da..8c15405b1 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,7 @@ website will have to do for older versions. This release contains contributions from (alphabetically by first name): - Anke Boersma - Andrius Štikonas + - Artem Grinev - Gaël PORTAY ## Core ## @@ -20,7 +21,9 @@ This release contains contributions from (alphabetically by first name): modern KDE Frameworks and KPMcore 4.2.0. ## Modules ## - - No module changes yet + - The *keyboard* and *keyboardq* modules now share backend code + and handle non-ASCII layouts better (for setting passwords + and usernames). # 3.2.32.1 (2020-10-17) # From aeeb4332b053ecccde8666b072e520e3d11b5a9e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 29 Oct 2020 14:26:17 +0100 Subject: [PATCH 74/78] Changes: add Vietnamese translation --- CHANGES | 2 ++ CMakeLists.txt | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 8c15405b1..73c99cf9b 100644 --- a/CHANGES +++ b/CHANGES @@ -14,11 +14,13 @@ This release contains contributions from (alphabetically by first name): - Andrius Štikonas - Artem Grinev - Gaël PORTAY + - TTran Me ## Core ## - Calamares now sets the C++ standard for compilation to C++17; this is for better compatibility and fewer warnings when building with modern KDE Frameworks and KPMcore 4.2.0. + - Vietnamese translations have been added. Welcome! ## Modules ## - The *keyboard* and *keyboardq* modules now share backend code diff --git a/CMakeLists.txt b/CMakeLists.txt index a83ed6dd8..b20ce50d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,12 +140,13 @@ set( CALAMARES_DESCRIPTION_SUMMARY # NOTE: update these lines by running `txstats.py`, or for full automation # `txstats.py -e`. See also # -# Total 70 languages -set( _tx_complete ca cs_CZ he hr sq tr_TR uk ) -set( _tx_good as ast az az_AZ be da de es fa fi_FI fr hi hu it_IT - ja ko lt ml nl pt_BR pt_PT ru sk sv tg zh_CN zh_TW ) -set( _tx_ok ar bg bn el en_GB es_MX es_PR et eu fur gl id is mr nb - pl ro sl sr sr@latin th ) +# Total 71 languages +set( _tx_complete be ca cs_CZ da fi_FI fur he hi hr ja pt_BR sq sv + tg uk vi zh_TW ) +set( _tx_good as ast az az_AZ de es fa fr hu it_IT ko lt ml nl + pt_PT ru sk tr_TR zh_CN ) +set( _tx_ok ar bg bn el en_GB es_MX es_PR et eu gl id is mr nb pl + ro sl sr sr@latin th ) set( _tx_incomplete ca@valencia eo fr_CH gu ie kk kn lo lv mk ne_NP te ur uz ) From e4a8b8358f749494a1b1052f20b5bff12a220aee Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Thu, 29 Oct 2020 14:28:48 +0100 Subject: [PATCH 75/78] i18n: [calamares] Automatic merge of Transifex translations --- lang/calamares_be.ts | 155 +- lang/calamares_bg.ts | 12 +- lang/calamares_ca.ts | 2 +- lang/calamares_cs_CZ.ts | 2 +- lang/calamares_da.ts | 6 +- lang/calamares_fi_FI.ts | 6 +- lang/calamares_fur.ts | 346 ++-- lang/calamares_he.ts | 40 +- lang/calamares_hi.ts | 6 +- lang/calamares_hr.ts | 2 +- lang/calamares_ja.ts | 2 +- lang/calamares_pt_BR.ts | 6 +- lang/calamares_sv.ts | 6 +- lang/calamares_tg.ts | 6 +- lang/calamares_vi.ts | 4124 +++++++++++++++++++++++++++++++++++++++ lang/calamares_zh_TW.ts | 6 +- 16 files changed, 4463 insertions(+), 264 deletions(-) create mode 100644 lang/calamares_vi.ts diff --git a/lang/calamares_be.ts b/lang/calamares_be.ts index 27c5422ae..41502ddfc 100644 --- a/lang/calamares_be.ts +++ b/lang/calamares_be.ts @@ -532,7 +532,7 @@ The installer will quit and all changes will be lost. <strong>Manual partitioning</strong><br/>You can create or resize partitions yourself. - + <strong>Уласнаручная разметка</strong><br/>Вы можаце самастойна ствараць раздзелы або змяняць іх памеры. @@ -621,17 +621,17 @@ The installer will quit and all changes will be lost. This storage device already has an operating system on it, but the partition table <strong>%1</strong> is different from the needed <strong>%2</strong>.<br/> - + На гэтай прыладзе ўжо ўсталяваная аперацыйная сістэма, але табліца раздзелаў <strong>%1</strong> не такая, як патрэбна <strong>%2</strong>.<br/> This storage device has one of its partitions <strong>mounted</strong>. - + Адзін з раздзелаў гэтай назапашвальнай прылады<strong>прымантаваны</strong>. This storage device is a part of an <strong>inactive RAID</strong> device. - + Гэтая назапашвальная прылада ёсць часткай<strong>неактыўнага RAID</strong>. @@ -734,7 +734,7 @@ The installer will quit and all changes will be lost. Set timezone to %1/%2. - + Вызначыць часавы пояс %1/%2. @@ -794,22 +794,22 @@ The installer will quit and all changes will be lost. <h1>Welcome to the Calamares setup program for %1</h1> - + <h1>Вітаем у праграме ўсталёўкі Calamares для %1</h1> <h1>Welcome to %1 setup</h1> - + <h1>Вітаем у праграме ўсталёўкі %1</h1> <h1>Welcome to the Calamares installer for %1</h1> - + <h1>Вітаем у праграме ўсталёўкі Calamares для %1</h1> <h1>Welcome to the %1 installer</h1> - + <h1>Вітаем у праграме ўсталёўкі %1</h1> @@ -819,7 +819,7 @@ The installer will quit and all changes will be lost. '%1' is not allowed as username. - + '%1' немагчыма выкарыстаць як імя карыстальніка. @@ -844,7 +844,7 @@ The installer will quit and all changes will be lost. '%1' is not allowed as hostname. - + '%1' немагчыма выкарыстаць як назву хоста. @@ -1817,14 +1817,16 @@ The installer will quit and all changes will be lost. Timezone: %1 - + Часавы пояс: %1 Please select your preferred location on the map so the installer can suggest the locale and timezone settings for you. You can fine-tune the suggested settings below. Search the map by dragging to move and using the +/- buttons to zoom in/out or use mouse scrolling for zooming. - + Калі ласка, абярыце неабходнае месца на мапе, каб праграма прапанавала мову + і налады часавога пояса. Вы можаце дакладна наладзіць прапанаваныя параметры ніжэй. Месца на мапе можна абраць перацягваючы + яе пры дапамозе мышы. Для павелічэння і памяншэння выкарыстоўвайце кнопкі +/- і кола мышы. @@ -1944,7 +1946,7 @@ The installer will quit and all changes will be lost. <html><head/><body><p>Enter a batch-identifier here. This will be stored in the target system.</p></body></html> - <html><head/><body><p>Увядзіце сюды масавы ідэнтыфікатар. Ён захавецца ў мэтавай сістэме.</p></body></html> + <html><head/><body><p>Увядзіце сюды масавы ідэнтыфікатар. Ён захаваецца ў мэтавай сістэме.</p></body></html> @@ -1970,29 +1972,29 @@ The installer will quit and all changes will be lost. Select your preferred Region, or use the default one based on your current location. - + Абярыце пераважны рэгіён альбо выкарыстоўвайце прадвызначаны ў залежнасці ад вашага бягучага месцазнаходжання. Timezone: %1 - + Часавы пояс: %1 Select your preferred Zone within your Region. - + Абярыце часавы пояс для вашага рэгіёна. Zones - + Часавыя паясы You can fine-tune Language and Locale settings below. - + Ніжэй вы можаце наладзіць мову і мясцовасць. @@ -2644,12 +2646,12 @@ The installer will quit and all changes will be lost. An EFI system partition is necessary to start %1.<br/><br/>To configure an EFI system partition, go back and select or create a FAT32 filesystem with the <strong>%3</strong> flag enabled and mount point <strong>%2</strong>.<br/><br/>You can continue without setting up an EFI system partition but your system may fail to start. - + Для таго, каб пачаць %1, патрабуецца сістэмны раздзел EFI.<br/><br/> Каб наладзіць сістэмны раздзел EFI, вярніцеся назад, абярыце альбо стварыце файлавую сістэму FAT32 са сцягам <strong>%3</strong> і пунктам мантавання <strong>%2</strong>.<br/><br/>Вы можаце працягнуць і без наладкі сістэмнага раздзела EFI, але ваша сістэма можа не загрузіцца. An EFI system partition is necessary to start %1.<br/><br/>A partition was configured with mount point <strong>%2</strong> but its <strong>%3</strong> flag is not set.<br/>To set the flag, go back and edit the partition.<br/><br/>You can continue without setting the flag but your system may fail to start. - + Для таго, каб пачаць %1, патрабуецца сістэмны раздзел EFI.<br/><br/>Быў наладжаны раздзел з пунктам мантавання<strong>%2</strong> але яго сцяг <strong>%3</strong> не вызначаны.<br/>Каб вызначыць сцяг, вярніцеся назад і адрэдагуйце раздзел.<br/><br/> Вы можаце працягнуць без наладкі раздзела, але ваша сістэма можа не загрузіцца. @@ -2868,7 +2870,7 @@ Output: Directory not found - + Каталог не знойдзены @@ -2903,7 +2905,8 @@ Output: <p>This computer does not satisfy some of the recommended requirements for setting up %1.<br/> Setup can continue, but some features might be disabled.</p> - + <p>Гэты камп’ютар адпавядае не ўсім патрэбам для ўсталёўкі %1.<br/> + Можна працягнуць усталёўку, але некаторыя магчымасці могуць быць недаступнымі.</p> @@ -3014,13 +3017,15 @@ Output: <p>This computer does not satisfy the minimum requirements for installing %1.<br/> Installation cannot continue.</p> - + <p>Гэты камп’ютар не адпавядае мінімальным патрэбам для ўсталёўкі %1.<p> + Немагчыма працягнуць. <br/> <p>This computer does not satisfy some of the recommended requirements for setting up %1.<br/> Setup can continue, but some features might be disabled.</p> - + <p>Гэты камп’ютар адпавядае не ўсім патрэбам для ўсталёўкі %1.<br/> + Можна працягнуць усталёўку, але некаторыя магчымасці могуць быць недаступнымі.</p> @@ -3038,7 +3043,7 @@ Output: The file-system resize job has an invalid configuration and will not run. - У задачы па змене памеру файлавай сістэмы хібная канфігурафыя, таму яна не будзе выконвацца. + У задачы па змене памеру файлавай сістэмы хібная канфігурацыя, таму яна не будзе выконвацца. @@ -3486,28 +3491,28 @@ Output: KDE user feedback - + Зваротная сувязь KDE Configuring KDE user feedback. - + Наладка зваротнай сувязі KDE. Error in KDE user feedback configuration. - + Падчас наладкі зваротнай сувязі KDE адбылася памылка. Could not configure KDE user feedback correctly, script error %1. - + Не атрымалася наладзіць зваротную сувязь KDE, памылка скрыпта %1. Could not configure KDE user feedback correctly, Calamares error %1. - + Не атрымалася наладзіць зваротную сувязь KDE, памылка Calamares %1. @@ -3554,7 +3559,7 @@ Output: <html><head/><body><p>Click here to send <span style=" font-weight:600;">no information at all</span> about your installation.</p></body></html> - + <html><head/><body><p>Пстрыкніце сюды, каб не адпраўляць <span style=" font-weight:600;">ніякіх звестак</span> пра вашу ўсталёўку.</p></body></html> @@ -3564,22 +3569,22 @@ Output: Tracking helps %1 to see how often it is installed, what hardware it is installed on and which applications are used. To see what will be sent, please click the help icon next to each area. - + Адсочванне дапамагае праекту %1 бачыць, як часта ён усталёўваецца, на якім абсталяванні ён усталёўваецца, якія праграмы выкарыстоўваюцца. Каб убачыць, што будзе адпраўлена, пстрыкніце па значку ля кожнай вобласці. By selecting this you will send information about your installation and hardware. This information will only be sent <b>once</b> after the installation finishes. - + Абраўшы гэты пункт вы адправіце звесткі пра сваю канфігурацыю ўсталёўкі і ваша абсталяванне. Звесткі адправяцца <b>адзін раз</b> пасля завяршэння ўсталёўкі. By selecting this you will periodically send information about your <b>machine</b> installation, hardware and applications, to %1. - + Абраўшы гэты пункт вы будзеце перыядычна адпраўляць звесткі пра усталёўку, абсталяванне і праграмы вашага <b>камп'ютара</b> на %1. By selecting this you will regularly send information about your <b>user</b> installation, hardware, applications and application usage patterns, to %1. - + Абраўшы гэты пункт вы будзеце перыядычна адпраўляць звесткі пра усталёўку, абсталяванне, праграмы <b>карыстальніка</b> і вобласці іх выкарыстання на %1. @@ -3625,7 +3630,7 @@ Output: Key Column header for key/value - Клавіша + Ключ @@ -3783,7 +3788,7 @@ Output: <h1>%1</h1><br/><strong>%2<br/>for %3</strong><br/><br/>Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Copyright 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Thanks to <a href="https://calamares.io/team/">the Calamares team</a> and the <a href="https://www.transifex.com/calamares/calamares/">Calamares translators team</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> development is sponsored by <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software. - + <h1>%1</h1><br/><strong>%2<br/>for %3</strong><br/><br/>Аўтарскія правы 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Аўтарскія правы 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Шчырыя падзякі <a href="https://calamares.io/team/">камандзе распрацоўкі Calamares</a> і <a href="https://www.transifex.com/calamares/calamares/">камандзе перакладчыкаў Calamares</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> распрацоўваецца пры падтрымцы<br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software. @@ -3818,7 +3823,17 @@ Output: development is sponsored by <br/> <a href='http://www.blue-systems.com/'>Blue Systems</a> - Liberating Software. - + <h1>%1</h1><br/> + <strong>%2<br/> + for %3</strong><br/><br/> + Аўтарскія правы 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/> + Аўтарскія правы 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/> + Шчырыя падзякі <a href='https://calamares.io/team/'>камандзе распрацоўкі Calamares </a> + і <a href='https://www.transifex.com/calamares/calamares/'> перакладчыкам Calamares</a>.<br/><br/> + <a href='https://calamares.io/'>Calamares</a> + распрацоўваецца пры падтрымцы <br/> + <a href='http://www.blue-systems.com/'>Blue Systems</a> - + Liberating Software. @@ -3832,13 +3847,15 @@ Output: <h1>Languages</h1> </br> The system locale setting affects the language and character set for some command line user interface elements. The current setting is <strong>%1</strong>. - + <h1>Мовы</h1></br> + Сістэмныя рэгіянальныя налады вызначаюць мову і кадаванне для пэўных элементаў інтэрфейсу загаднага радка. Бягучыя налады <strong>%1</strong>. <h1>Locales</h1> </br> The system locale setting affects the numbers and dates format. The current setting is <strong>%1</strong>. - + <h1>Рэгіянальныя налады</h1></br> + Сістэмныя рэгіянальныя налады вызначаюць фармат нумароў і датаў. Бягучыя налады <strong>%1</strong>. @@ -3866,7 +3883,7 @@ Output: Click your preferred keyboard model to select layout and variant, or use the default one based on the detected hardware. - + Пстрыкніце на пераважную мадэль клавіятуры, каб абраць раскладку і варыянт, альбо выкарыстоўвайце прадвызначаную ў залежнасці ад выяўленага абсталявання. @@ -3881,7 +3898,7 @@ Output: Keyboard Variant - + Варыянт клавіятуры @@ -3894,7 +3911,7 @@ Output: Change - + Змяніць @@ -3932,7 +3949,28 @@ Output: </ul> <p>The vertical scrollbar is adjustable, current width set to 10.</p> - + <h3>%1</h3> + <p>Гэта прыклад файла QML, у якім паказваюцца параметры RichText са зменным змесцівам.</p> + + <p>QML з RichText можа выкарыстоўваць пазнакі HTML. Зменнае змесціва карысна для сэнсарных экранаў.</p> + + <p><b>Гэта паўтлусты тэкст</b></p> + <p><i>Гэта тэкст курсівам</i></p> + <p><u>Гэта падкрэслены</u></p> + <p><center>Гэта выраўнаваны па цэнтры тэкст.</center><s> + <p><s>Гэта закрэслены тэкст</s></p> + + <p>Прыклад кода: + <code>ls -l / +/home</code></p> + + <p><b>Спісы:</b></p> + <ul> + <li>Сістэмы з Intel CPU</li> + <li>Сістэмы з AMD CPU</li> + </ul> + + <p>Вертыкальная паласа пракруткі наладжваецца. Бягучая шырыня - 10.</p> @@ -3945,7 +3983,7 @@ Output: Pick your user name and credentials to login and perform admin tasks - + Абярыце свае імя карыстальніка і ўліковыя даныя для ўваходу і выканання задач адміністратара @@ -3965,12 +4003,12 @@ Output: Login Name - + Лагін If more than one person will use this computer, you can create multiple accounts after installation. - + Калі камп’ютарам карыстаецца некалькі чалавек, то вы можаце стварыць для іх акаўнты пасля завяршэння ўсталёўкі. @@ -3985,7 +4023,7 @@ Output: This name will be used if you make the computer visible to others on a network. - + Назва будзе выкарыстоўвацца для пазначэння камп’ютара ў сетцы. @@ -4005,12 +4043,12 @@ Output: Enter the same password twice, so that it can be checked for typing errors. A good password will contain a mixture of letters, numbers and punctuation, should be at least eight characters long, and should be changed at regular intervals. - + Увядзіце двойчы аднолькавы пароль. Гэта неабходна для таго, каб пазбегнуць памылак. Надзейны пароль павінен складацца з літар, лічбаў, знакаў пунктуацыі. Ён павінен змяшчаць прынамсі 8 знакаў, яго перыядычна трэба змяняць. Validate passwords quality - + Праверка якасці пароляў @@ -4020,12 +4058,12 @@ Output: Log in automatically without asking for the password - + Аўтаматычна ўваходзіць без уводу пароля Reuse user password as root password - + Выкарыстоўваць пароль карыстальніка як пароль адміністратара @@ -4035,22 +4073,22 @@ Output: Choose a root password to keep your account safe. - + Абярыце пароль адміністратара для абароны вашага акаўнта. Root Password - + Пароль адміністратара Repeat Root Password - + Паўтарыце пароль адміністратара Enter the same password twice, so that it can be checked for typing errors. - + Увядзіце пароль двойчы, каб пазбегнуць памылак уводу. @@ -4059,7 +4097,8 @@ Output: <h3>Welcome to the %1 <quote>%2</quote> installer</h3> <p>This program will ask you some questions and set up %1 on your computer.</p> - + <h3>Вітаем у %1, праграме ўсталёўкі<quote>%2</quote> </h3> + <p>Гэтая праграма дапаможа вам усталяваць %1 на ваш камп'ютар.</p> diff --git a/lang/calamares_bg.ts b/lang/calamares_bg.ts index b2a6b2b02..cacab19d0 100644 --- a/lang/calamares_bg.ts +++ b/lang/calamares_bg.ts @@ -6,7 +6,7 @@ The <strong>boot environment</strong> of this system.<br><br>Older x86 systems only support <strong>BIOS</strong>.<br>Modern systems usually use <strong>EFI</strong>, but may also show up as BIOS if started in compatibility mode. - <strong>Среда за начално зареждане</strong> на тази система.<br><br>Старите x86 системи поддържат само <strong>BIOS</strong>.<br>Модерните системи обикновено използват <strong>EFI</strong>, но може също така да използват BIOS, ако са стартирани в режим на съвместимост. + <strong>Средата за начално зареждане</strong> на тази система.<br><br>Старите x86 системи поддържат само <strong>BIOS</strong>.<br>Модерните системи обикновено използват <strong>EFI</strong>, но може също така да използват BIOS, ако са стартирани в режим на съвместимост. @@ -132,7 +132,7 @@ Job failed (%1) - + Задачата се провали (%1) @@ -153,7 +153,7 @@ Example job (%1) - + Примерна задача (%1) @@ -199,7 +199,7 @@ Main script file %1 for python job %2 is not readable. - Файлът на главен скрипт %1 за python задача %2 не се чете. + Файла на главен скрипт %1 за python задача %2 не се чете. @@ -3755,12 +3755,12 @@ Output: <h1>Welcome to the Calamares installer for %1.</h1> - <h1>Добре дошли при инсталатора Calamares на %1.</h1> + <h1>Добре дошли в инсталатора Calamares за %1.</h1> <h1>Welcome to the %1 installer.</h1> - <h1>Добре дошли при инсталатора на %1.</h1> + <h1>Добре дошли в инсталатора на %1.</h1> diff --git a/lang/calamares_ca.ts b/lang/calamares_ca.ts index 07df2503f..49d14be33 100644 --- a/lang/calamares_ca.ts +++ b/lang/calamares_ca.ts @@ -619,7 +619,7 @@ L'instal·lador es tancarà i tots els canvis es perdran. This storage device already has an operating system on it, but the partition table <strong>%1</strong> is different from the needed <strong>%2</strong>.<br/> - + Aquest dispositiu d'emmagatzematge ja té un sistema operatiu, però la taula de particions <strong>%1</strong> és diferent de la necessària: <strong>%2</strong>.<br/> diff --git a/lang/calamares_cs_CZ.ts b/lang/calamares_cs_CZ.ts index 2ceef9619..7f63af78e 100644 --- a/lang/calamares_cs_CZ.ts +++ b/lang/calamares_cs_CZ.ts @@ -623,7 +623,7 @@ Instalační program bude ukončen a všechny změny ztraceny. This storage device already has an operating system on it, but the partition table <strong>%1</strong> is different from the needed <strong>%2</strong>.<br/> - + Na tomto úložném zařízení se už nachází operační systém, ale tabulka rozdělení <strong>%1</strong> je jiná než potřebná <strong>%2</strong>.<br/> diff --git a/lang/calamares_da.ts b/lang/calamares_da.ts index e2fc21085..e5593c7d0 100644 --- a/lang/calamares_da.ts +++ b/lang/calamares_da.ts @@ -619,17 +619,17 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt. This storage device already has an operating system on it, but the partition table <strong>%1</strong> is different from the needed <strong>%2</strong>.<br/> - + Lagerenheden har allerede et styresystem på den men partitionstabellen <strong>%1</strong> er ikke magen til den nødvendige <strong>%2</strong>.<br/> This storage device has one of its partitions <strong>mounted</strong>. - + Lagerenhden har en af sine partitioner <strong>monteret</strong>. This storage device is a part of an <strong>inactive RAID</strong> device. - + Lagringsenheden er en del af en <strong>inaktiv RAID</strong>-enhed. diff --git a/lang/calamares_fi_FI.ts b/lang/calamares_fi_FI.ts index e3ff2229e..1bf0d09cc 100644 --- a/lang/calamares_fi_FI.ts +++ b/lang/calamares_fi_FI.ts @@ -619,17 +619,17 @@ Asennusohjelma sulkeutuu ja kaikki muutoksesi katoavat. This storage device already has an operating system on it, but the partition table <strong>%1</strong> is different from the needed <strong>%2</strong>.<br/> - + Tässä kiintolevyssä on jo käyttöjärjestelmä, mutta osiotaulukko <strong>%1</strong> on erilainen kuin tarvittava <strong>%2</strong>.<br/> This storage device has one of its partitions <strong>mounted</strong>. - + Tähän kiintolevyyn on <strong>asennettu</strong> yksi osioista. This storage device is a part of an <strong>inactive RAID</strong> device. - + Tämä kiintolevy on osa <strong>passiivista RAID</strong> -laitetta. diff --git a/lang/calamares_fur.ts b/lang/calamares_fur.ts index 7575c0e2a..d2f3a8127 100644 --- a/lang/calamares_fur.ts +++ b/lang/calamares_fur.ts @@ -153,7 +153,7 @@ Example job (%1) - Operazion di esempli (%1) + Lavôr di esempli (%1) @@ -189,7 +189,7 @@ Working directory %1 for python job %2 is not readable. - No si rive a lei la cartele di lavôr %1 pe ativitât di python %2. + No si rive a lei la cartele di lavôr %1 pe operazion di python %2. @@ -199,7 +199,7 @@ Main script file %1 for python job %2 is not readable. - No si rive a lei il file di script principâl %1 pe ativitât di python %2. + No si rive a lei il file di script principâl %1 pe operazion di python %2. @@ -2258,7 +2258,7 @@ Il program di instalazion al jessarà e dutis lis modifichis a laran pierdudis.< TextLabel - + EticheteTest @@ -2366,7 +2366,7 @@ Il program di instalazion al jessarà e dutis lis modifichis a laran pierdudis.< <small>Enter the same password twice, so that it can be checked for typing errors. A good password will contain a mixture of letters, numbers and punctuation, should be at least eight characters long, and should be changed at regular intervals.</small> - <small>Inserìs la stesse password dôs voltis, in mût di evitâ erôrs di scriture. Une buine password e contignarà un miscliç di letaris, numars e puntuazions, e sarà lungje almancul vot caratars, e si scugnarà cambiâle a intervai regolârs.</small> + <small>Inserìs la stesse password dôs voltis, in mût di evitâ erôrs di batidure. Une buine password e contignarà un miscliç di letaris, numars e puntuazions, e sarà lungje almancul vot caratars, e si scugnarà cambiâle a intervai regolârs.</small> @@ -2791,7 +2791,7 @@ Output: Bad parameters for process job call. - Parametris sbaliâts par processâ la clamade dal lavôr. + Parametris sbaliâts par processâ la clamade de operazion. @@ -2979,24 +2979,24 @@ Output: %1 system partition (%2) - + %1 partizion di sisteme (%2) <strong>%4</strong><br/><br/>The partition %1 is too small for %2. Please select a partition with capacity at least %3 GiB. - + <strong>%4</strong><br/><br/>La partizion %1 e je masse piçule par %2. Selezione une partizion cun almancul %3 GiB di capacitât. <strong>%2</strong><br/><br/>An EFI system partition cannot be found anywhere on this system. Please go back and use manual partitioning to set up %1. - + <strong>%2</strong><br/><br/>No si rive a cjatâ di nissune bande su cheste machine une partizion di sisteme EFI. Par plasê torne indaûr e dopre il partizionament manuâl par configurâ %1. <strong>%3</strong><br/><br/>%1 will be installed on %2.<br/><font color="red">Warning: </font>all data on partition %2 will be lost. - + <strong>%3</strong><br/><br/>Si instalarà %1 su %2.<br/><font color="red">Atenzion: </font>ducj i dâts de partizion %2 a laran pierdûts. @@ -3015,7 +3015,8 @@ Output: <p>This computer does not satisfy the minimum requirements for installing %1.<br/> Installation cannot continue.</p> - + <p>Chest computer nol sodisfe i recuisîts minims pe instalazion di %1.<br/> + La instalazion no pues continuâ.</p> @@ -3030,27 +3031,27 @@ Output: Resize Filesystem Job - + Operazion di ridimensionament dal filesystem Invalid configuration - + Configurazion no valide The file-system resize job has an invalid configuration and will not run. - + La operazion di ridimensionament dal filesystem e à une configurazion no valide e no vignarà eseguide. KPMCore not Available - + KPMCore no disponibil Calamares cannot start KPMCore for the file-system resize job. - + Calamares nol rive a inviâ KPMCore pe operazion di ridimensionament dal filesystem. @@ -3059,39 +3060,39 @@ Output: Resize Failed - + Ridimensionament falît The filesystem %1 could not be found in this system, and cannot be resized. - + Nol è stât pussibil cjatâ in chest sisteme il filesystem %1 e duncje nol pues jessi ridimensionât. The device %1 could not be found in this system, and cannot be resized. - + Nol è stât pussibil cjatâ in chest sisteme il dispositîf %1 e duncje nol pues jessi ridimensionât. The filesystem %1 cannot be resized. - + Impussibil ridimensionâ il filesystem %1. The device %1 cannot be resized. - + Impussibil ridimensionâ il dispositîf %1. The filesystem %1 must be resized, but cannot. - + Si scugne ridimensionâ il filesystem %1, ma no si rive. The device %1 must be resized, but cannot - + Si scugne ridimensionâ il filesystem %1, ma no si rive. @@ -3099,22 +3100,22 @@ Output: Resize partition %1. - + Ridimensionâ partizion %1 Resize <strong>%2MiB</strong> partition <strong>%1</strong> to <strong>%3MiB</strong>. - + Ridimensionâ la partizion <strong>%1</strong> di <strong>%2MiB</strong> a <strong>%3MiB</strong>. Resizing %2MiB partition %1 to %3MiB. - + Ridimensionâ la partizion %1 di %2MiB a %3MiB. The installer failed to resize partition %1 on disk '%2'. - + Il program di instalazion nol è rivât a ridimensionâ la partizion %1 sul disc '%2'. @@ -3131,17 +3132,17 @@ Output: Resize volume group named %1 from %2 to %3. - + Ridimensionâ il grup di volums clamât %1 di %2 a %3. Resize volume group named <strong>%1</strong> from <strong>%2</strong> to <strong>%3</strong>. - + Ridimensionâ il grup di volums clamât <strong>%1</strong> di <strong>%2</strong> a <strong>%3</strong>. The installer failed to resize a volume group named '%1'. - + Il program di instalazion nol è rivât a ridimensionâ un grup di volums clamât '%1'. @@ -3149,12 +3150,12 @@ Output: For best results, please ensure that this computer: - + Par otignî i miôrs risultâts, siguriti che chest computer: System requirements - + Recuisîts di sisteme @@ -3190,12 +3191,12 @@ Output: Scanning storage devices... - + Scandai dai dispositîfs di memorie... Partitioning - + Partizionament @@ -3203,29 +3204,29 @@ Output: Set hostname %1 - + Stabilî il non-host a %1 Set hostname <strong>%1</strong>. - + Stabilî il non-host a <strong>%1</strong>. Setting hostname %1. - + Daûr a stabilî il non-host a %1. Internal Error - + Erôr interni Cannot write hostname to target system - + Impussibil scrivi il non-host sul sisteme di destinazion @@ -3233,29 +3234,29 @@ Output: Set keyboard model to %1, layout to %2-%3 - + Stabilî il model di tastiere a %1, disposizion a %2-%3 Failed to write keyboard configuration for the virtual console. - + No si è rivâts a scrivi la configurazion de tastiere pe console virtuâl. Failed to write to %1 - + No si è rivâts a scrivi su %1 Failed to write keyboard configuration for X11. - + No si è rivâts a scrivi la configurazion de tastiere par X11. Failed to write keyboard configuration to existing /etc/default directory. - + No si è rivâts a scrivi la configurazion de tastiere te cartele esistente /etc/default . @@ -3346,42 +3347,42 @@ Output: Set password for user %1 - + Stabilî la password pal utent %1 Setting password for user %1. - + Daûr a stabilî la password pal utent %1. Bad destination system path. - + Percors di sisteme de destinazion sbaliât. rootMountPoint is %1 - + Il rootMountPoint (pont di montaç de lidrîs) al è %1 Cannot disable root account. - + Impussibil disabilitâ l'account di root. passwd terminated with error code %1. - + passwd terminât cun codiç di erôr %1. Cannot set password for user %1. - + Impussibil stabilî la password pal utent %1. usermod terminated with error code %1. - + usermod terminât cun codiç di erôr %1. @@ -3389,37 +3390,37 @@ Output: Set timezone to %1/%2 - + Meti il fûs orari su %1/%2 Cannot access selected timezone path. - + Impussibil acedi al percors dal fûs orari selezionât. Bad path: %1 - + Percors no valit: %1 Cannot set timezone. - + Impussibil stabilî il fûs orari. Link creation failed, target: %1; link name: %2 - + Creazion dal colegament falide, destinazion: %1; non colegament: %2 Cannot set timezone, - + Impussibil stabilî il fûs orari, Cannot open /etc/timezone for writing - + Impussibil vierzi /etc/timezone pe scriture @@ -3427,7 +3428,7 @@ Output: Shell Processes Job - + Operazion dai procès de shell @@ -3436,7 +3437,7 @@ Output: %L1 / %L2 slide counter, %1 of %2 (numeric) - + %L1 / %L2 @@ -3444,12 +3445,12 @@ Output: This is an overview of what will happen once you start the setup procedure. - + Cheste e je une panoramiche di ce che al sucedarà une volte inviade la procedure di configurazion. This is an overview of what will happen once you start the install procedure. - + Cheste e je une panoramiche di ce che al sucedarà une volte inviade la procedure di instalazion. @@ -3457,7 +3458,7 @@ Output: Summary - + Sintesi @@ -3465,22 +3466,22 @@ Output: Installation feedback - + Opinion su la instalazion Sending installation feedback. - + Daûr a inviâ la opinion su la instalazion. Internal error in install-tracking. - + Erôr interni in install-tracking. HTTP request timed out. - + Richieste HTTP scjadude. @@ -3488,28 +3489,28 @@ Output: KDE user feedback - + Opinion dal utent di KDE Configuring KDE user feedback. - + Daûr a configurâ la opinione dal utent di KDE. Error in KDE user feedback configuration. - + Erôr te configurazion de opinion dal utent di KDE. Could not configure KDE user feedback correctly, script error %1. - + Nol è stât pussibil configurâ in maniere juste la opinion dal utent di KDE, erôr di script %1. Could not configure KDE user feedback correctly, Calamares error %1. - + Nol è stât pussibil configurâ in maniere juste la opinion dal utent di KDE, erôr di Calamares %1. @@ -3517,28 +3518,28 @@ Output: Machine feedback - + Opinion su la machine Configuring machine feedback. - + Daûr a configurâ la opinion su la machine. Error in machine feedback configuration. - + Erôr inte configurazion de opinion su la machine. Could not configure machine feedback correctly, script error %1. - + Nol è stât pussibil configurâ in maniere juste la opinion su la machine, erôr di script %1. Could not configure machine feedback correctly, Calamares error %1. - + Nol è stât pussibil configurâ in maniere juste la opinion su la machine, erôr di Calamares %1. @@ -3551,37 +3552,37 @@ Output: Placeholder - + Segnepuest <html><head/><body><p>Click here to send <span style=" font-weight:600;">no information at all</span> about your installation.</p></body></html> - + <html><head/><body><p>Fâs clic achì par <span style=" font-weight:600;">no inviâ nissune informazion</span> su la tô instalazion.</p></body></html> <html><head/><body><p><a href="placeholder"><span style=" text-decoration: underline; color:#2980b9;">Click here for more information about user feedback</span></a></p></body></html> - + <html><head/><body><p><a href="placeholder"><span style=" text-decoration: underline; color:#2980b9;">Fâs clic achì par vê plui informazions su lis opinions dai utents</span></a></p></body></html> Tracking helps %1 to see how often it is installed, what hardware it is installed on and which applications are used. To see what will be sent, please click the help icon next to each area. - + Tignî i indizis al jude %1 a viodi trop dispès che al ven instalât, in cuâl hardware e ce aplicazions che a vegnin dopradis. Par viodi ce che al ven inviât, fâs clic su pe icone di jutori dongje a ogni aree. By selecting this you will send information about your installation and hardware. This information will only be sent <b>once</b> after the installation finishes. - + Selezionant chest tu inviarâs informazions sul to hardware e su la tô instalazion. Cheste informazion e vignarà mandade dome <b>une volte</b>, dopo finide la instalazion. By selecting this you will periodically send information about your <b>machine</b> installation, hardware and applications, to %1. - + Selezionant chest tu mandarâs informazions in mût periodic a %1 su la instalazion, l'hardware e lis aplicazions de tô <b>machine</b>. By selecting this you will regularly send information about your <b>user</b> installation, hardware, applications and application usage patterns, to %1. - + Selezionant chest tu mandarâs cun regolaritât informazions a %1 su la instalazion, l'hardware, lis aplicazions e modei di ûs de aplicazion dal tô <b>utent</b>. @@ -3589,7 +3590,7 @@ Output: Feedback - + Opinion @@ -3597,12 +3598,12 @@ Output: <small>If more than one person will use this computer, you can create multiple accounts after setup.</small> - + <small>Se chest computer al vignarà doprât di plui di une persone, si pues creâ plui accounts dopo vê completade la configurazion.</small> <small>If more than one person will use this computer, you can create multiple accounts after installation.</small> - + <small>Se chest computer al vignarà doprât di plui di une persone, si pues creâ plui accounts dopo vê completade la instalazion.</small> @@ -3610,7 +3611,7 @@ Output: Users - + Utents @@ -3618,7 +3619,7 @@ Output: Users - + Utents @@ -3627,13 +3628,13 @@ Output: Key Column header for key/value - + Clâf Value Column header for key/value - + Valôr @@ -3646,22 +3647,22 @@ Output: List of Physical Volumes - + Liste di volums fisics Volume Group Name: - + Non dal grup di volums: Volume Group Type: - + Gjenar dal grup di volums: Physical Extent Size: - + Dimension de estension fisiche: @@ -3671,22 +3672,22 @@ Output: Total Size: - + Dimension totâl: Used Size: - + Dimension doprade: Total Sectors: - + Setôrs totâi: Quantity of LVs: - + Cuantitât di VLs: @@ -3700,92 +3701,92 @@ Output: Select application and system language - + Selezionâ lenghe di sisteme e di aplicazions &About - + &Informazions Open donations website - + Vierç il sît web pes donazions &Donate - + &Done Open help and support website - + Vierç il sît web pal jutori e pal supuart &Support - + &Supuart Open issues and bug-tracking website - + Vierç il sît web sui problemis e lis segnalazions/indizis sui erôrs &Known issues - + &Problemis cognossûts Open release notes website - + Vierç il sît web des notis di publicazion &Release notes - + &Notis di publicazion <h1>Welcome to the Calamares setup program for %1.</h1> - + <h1>Benvignûts sul program di configurazion Calamares par %1.</h1> <h1>Welcome to %1 setup.</h1> - + <h1>Benvignûts te configurazion di %1.</h1> <h1>Welcome to the Calamares installer for %1.</h1> - + <h1>Benvignûts sul program di instalazion Calamares par %1.</h1> <h1>Welcome to the %1 installer.</h1> - + <h1>Benvignûts sul program di instalazion di %1.</h1> %1 support - + Supuart di %1 About %1 setup - + Informazions su la configurazion di %1 About %1 installer - + Informazion su la instalazion di %1 <h1>%1</h1><br/><strong>%2<br/>for %3</strong><br/><br/>Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Copyright 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Thanks to <a href="https://calamares.io/team/">the Calamares team</a> and the <a href="https://www.transifex.com/calamares/calamares/">Calamares translators team</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> development is sponsored by <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software. - + <h1>%1</h1><br/><strong>%2<br/>par %3</strong><br/><br/>Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Copyright 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Gracie a <a href="https://calamares.io/team/">il grup di Calamares</a> e al <a href="https://www.transifex.com/calamares/calamares/">grup di tradutôrs di Calamares</a>.<br/><br/>Il disvilup di <a href="https://calamares.io/">Calamares</a> al è patrocinât di <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software. @@ -3793,7 +3794,7 @@ Output: Welcome - + Benvignûts @@ -3801,7 +3802,7 @@ Output: Welcome - + Benvignûts @@ -3820,12 +3821,23 @@ Output: development is sponsored by <br/> <a href='http://www.blue-systems.com/'>Blue Systems</a> - Liberating Software. - + <h1>%1</h1><br/> + <strong>%2<br/> + par %3</strong><br/><br/> + Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/> + Copyright 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/> + Gracie a <a href='https://calamares.io/team/'>il grup di Calamares</a> + e al <a href='https://www.transifex.com/calamares/calamares/'>grup di tradutôrs + di Calamares</a>.<br/><br/> + Il disvilup di + <a href='https://calamares.io/'>Calamares</a> al è patrocinât di <br/> + <a href='http://www.blue-systems.com/'>Blue Systems</a> - + Liberating Software. Back - + Indaûr @@ -3834,18 +3846,20 @@ Output: <h1>Languages</h1> </br> The system locale setting affects the language and character set for some command line user interface elements. The current setting is <strong>%1</strong>. - + <h1>Lenghis</h1> </br> + La impostazion di localizazion dal sisteme e influence la lenghe e la cumbinazion di caratars par cualchi element de interface utent a rie di comant. La impostazion atuâl e je <strong>%1</strong>. <h1>Locales</h1> </br> The system locale setting affects the numbers and dates format. The current setting is <strong>%1</strong>. - + <h1>Localitâts</h1> </br> + La impostazions di localizazion dal sisteme e influence il formât des datis e dai numars. La impostazion atuâl e je <strong>%1</strong>. Back - + Indaûr @@ -3853,42 +3867,42 @@ Output: Keyboard Model - + Model di tastiere Layouts - + Disposizions Keyboard Layout - + Disposizion di tastiere Click your preferred keyboard model to select layout and variant, or use the default one based on the detected hardware. - + Fâs clic sul model di tastiere preferît par selezionâ la disposizion e la variante, o dopre chel predefinît basât sul hardware rilevât. Models - + Modei Variants - + Variantis Keyboard Variant - + Variante di tastiere Test your keyboard - + Prove la tastiere @@ -3896,7 +3910,7 @@ Output: Change - + Cambie @@ -3905,7 +3919,8 @@ Output: <h3>%1</h3> <p>These are example release notes.</p> - + <h3>%1</h3> + <p>Chescj a son esemplis di notis di publicazion.</p> @@ -3933,12 +3948,32 @@ Output: </ul> <p>The vertical scrollbar is adjustable, current width set to 10.</p> - + <h3>%1</h3> + <p>Chest esempli di file QML, al mostre lis opzions in test formatât cun contignût che si pues dai une passade.</p> + + <p>Il QML cun test formatât al pues doprâ etichetis HTML, il contignût che si pues scori al è util pai touchscreens.</p> + + <p><b>Chest al è test in neret</b></p> + <p><i>Chest al è test corsîf</i></p> + <p><u>Chest al è test sotlineât</u></p> + <p><center>Chest test al vignarà centrât.</center></p> + <p><s>Chest al è stricât</s></p> + + <p>Esempli di codiç: + <code>ls -l /home</code></p> + + <p><b>Listis:</b></p> + <ul> + <li>Sistemis a CPU Intel</li> + <li>Sistemis a CPU AMD</li> + </ul> + + <p>La sbare di scoriment verticâl si pues justâ, cumò la largjece e je metude a 10.</p> Back - + Indaûr @@ -3946,7 +3981,7 @@ Output: Pick your user name and credentials to login and perform admin tasks - + Sielç e dopre il to non utent e lis credenziâls par jentrâ e eseguî ativitâts di aministradôr @@ -3966,12 +4001,12 @@ Output: Login Name - + Non di acès If more than one person will use this computer, you can create multiple accounts after installation. - + Se chest computer al vignarà doprât di plui personis, tu puedis creâ plui account dopo vê completade la instalazion. @@ -3986,7 +4021,7 @@ Output: This name will be used if you make the computer visible to others on a network. - + Si doprarà chest non se tu rindis visibil a altris chest computer suntune rêt. @@ -4006,12 +4041,12 @@ Output: Enter the same password twice, so that it can be checked for typing errors. A good password will contain a mixture of letters, numbers and punctuation, should be at least eight characters long, and should be changed at regular intervals. - + Inserìs la stesse password dôs voltis, in mût di evitâ erôrs di batidure. Une buine password e contignarà un miscliç di letaris, numars e puntuazions, e sarà lungje almancul vot caratars e si scugnarà cambiâle a intervai regolârs. Validate passwords quality - + Convalidâ la cualitât des passwords @@ -4021,12 +4056,12 @@ Output: Log in automatically without asking for the password - + Jentre in automatic cence domandâ la password Reuse user password as root password - + Torne dopre la password dal utent pe password di root @@ -4036,22 +4071,22 @@ Output: Choose a root password to keep your account safe. - + Sielç une password di root par tignî il to account al sigûr. Root Password - + Password di root Repeat Root Password - + Ripeti password di root Enter the same password twice, so that it can be checked for typing errors. - + Inserìs la stesse password dôs voltis, in mût di evitâ erôrs di batidure. @@ -4060,32 +4095,33 @@ Output: <h3>Welcome to the %1 <quote>%2</quote> installer</h3> <p>This program will ask you some questions and set up %1 on your computer.</p> - + <h3>Benvignûts sul program di instalazion <quote>%2</quote> par %1</h3> + <p>Chest program al fasarà cualchi domande e al configurarà %1 sul to computer.</p> About - + Informazions Support - + Supuart Known issues - + Problemis cognossûts Release notes - + Notis di publicazion Donate - + Done diff --git a/lang/calamares_he.ts b/lang/calamares_he.ts index 6c7ea88d8..e87f6bb19 100644 --- a/lang/calamares_he.ts +++ b/lang/calamares_he.ts @@ -11,12 +11,12 @@ This system was started with an <strong>EFI</strong> boot environment.<br><br>To configure startup from an EFI environment, this installer must deploy a boot loader application, like <strong>GRUB</strong> or <strong>systemd-boot</strong> on an <strong>EFI System Partition</strong>. This is automatic, unless you choose manual partitioning, in which case you must choose it or create it on your own. - מערכת זו הופעלה בתצורת אתחול <strong>EFI</strong>.<br><br> כדי להגדיר הפעלה מתצורת אתחול EFI, על אשף ההתקנה להתקין מנהל אתחול מערכת, לדוגמה <strong>GRUB</strong> או <strong>systemd-boot</strong> על <strong>מחיצת מערכת EFI</strong>. פעולה זו היא אוטומטית, אלא אם כן העדפתך היא להגדיר מחיצות באופן ידני, במקרה זה עליך לבחור זאת או להגדיר בעצמך. + מערכת זו הופעלה בתצורת אתחול <strong>EFI</strong>.<br><br> כדי להגדיר הפעלה מתצורת אתחול EFI, על תכנית ההתקנה להתקין מנהל אתחול מערכת, לדוגמה <strong>GRUB</strong> או <strong>systemd-boot</strong> על <strong>מחיצת מערכת EFI</strong>. פעולה זו היא אוטומטית, אלא אם כן העדפתך היא להגדיר מחיצות באופן ידני, במקרה זה יש לבחור זאת או להגדיר בעצמך. This system was started with a <strong>BIOS</strong> boot environment.<br><br>To configure startup from a BIOS environment, this installer must install a boot loader, like <strong>GRUB</strong>, either at the beginning of a partition or on the <strong>Master Boot Record</strong> near the beginning of the partition table (preferred). This is automatic, unless you choose manual partitioning, in which case you must set it up on your own. - מערכת זו הופעלה בתצורת אתחול <strong>BIOS</strong>.<br><br> כדי להגדיר הפעלה מתצורת אתחול BIOS, על אשף ההתקנה להתקין מנהל אתחול מערכת, לדוגמה <strong>GRUB</strong>, בתחילת המחיצה או על ה־<strong>Master Boot Record</strong> בצמוד להתחלה של טבלת המחיצות (מועדף). פעולה זו היא אוטומטית, אלא אם כן תבחר להגדיר מחיצות באופן ידני, במקרה זה עליך להגדיר זאת בעצמך. + מערכת זו הופעלה בתצורת אתחול <strong>BIOS</strong>.<br><br> כדי להגדיר הפעלה מתצורת אתחול BIOS, על תכנית ההתקנה להתקין מנהל אתחול מערכת, לדוגמה <strong>GRUB</strong>, בתחילת המחיצה או על ה־<strong>Master Boot Record</strong> בצמוד להתחלה של טבלת המחיצות (מועדף). פעולה זו היא אוטומטית, אלא אם כן תבחר להגדיר מחיצות באופן ידני, במקרה זה יש להגדיר זאת בעצמך. @@ -340,7 +340,7 @@ The %1 installer is about to make changes to your disk in order to install %2.<br/><strong>You will not be able to undo these changes.</strong> - אשף ההתקנה של %1 הולך לבצע שינויים בכונן שלך לטובת התקנת %2.<br/><strong>לא תוכל לבטל את השינויים הללו.</strong> + תכנית ההתקנה של %1 עומדת לבצע שינויים בכונן שלך לטובת התקנת %2.<br/><strong>לא תהיה אפשרות לבטל את השינויים הללו.</strong> @@ -375,7 +375,7 @@ The installation is complete. Close the installer. - תהליך ההתקנה הושלם. נא לסגור את אשף ההתקנה. + תהליך ההתקנה הושלם. נא לסגור את תכנית ההתקנה. @@ -428,8 +428,8 @@ The setup program will quit and all changes will be lost. Do you really want to cancel the current install process? The installer will quit and all changes will be lost. - האם ברצונך לבטל את תהליך ההתקנה? -אשף ההתקנה ייסגר וכל השינויים יאבדו. + האם אכן ברצונך לבטל את תהליך ההתקנה? +תכנית ההתקנה תיסגר וכל השינויים יאבדו. @@ -495,7 +495,7 @@ The installer will quit and all changes will be lost. %1 Installer - אשף התקנה של %1 + תכנית התקנת %1 @@ -638,7 +638,7 @@ The installer will quit and all changes will be lost. No Swap - בלי החלפה + ללא החלפה @@ -1117,7 +1117,7 @@ The installer will quit and all changes will be lost. The installer failed to delete partition %1. - אשף ההתקנה נכשל בעת מחיקת מחיצה %1. + תכנית ההתקנה כשלה במחיקת המחיצה %1. @@ -1644,7 +1644,7 @@ The installer will quit and all changes will be lost. If you do not agree with the terms, the setup procedure cannot continue. - אם התנאים האלה אינם מקובלים עליך, אי אפשר להמשיך בתהליך ההתקנה. + אם התנאים האלה אינם מקובלים עליכם, אי אפשר להמשיך בתהליך ההתקנה. @@ -1654,7 +1654,7 @@ The installer will quit and all changes will be lost. If you do not agree with the terms, proprietary software will not be installed, and open source alternatives will be used instead. - אם תנאים אלו אינם מקובלים עליך, לא תותקן תכנה קניינית וייעשה שימוש בחלופות בקוד פתוח במקום. + אם התנאים הללו אינם מקובלים עליכם, תוכנה קניינית לא תותקן, ובמקומן יעשה שימוש בחלופות בקוד פתוח. @@ -1826,8 +1826,8 @@ The installer will quit and all changes will be lost. Please select your preferred location on the map so the installer can suggest the locale and timezone settings for you. You can fine-tune the suggested settings below. Search the map by dragging to move and using the +/- buttons to zoom in/out or use mouse scrolling for zooming. - נא לבחור את המיקום המועדף עליך על המפה כדי שתכנית ההתקנה תוכל להציע הגדרות מקומיות - ואזור זמן עבורך. ניתן לכוונן את ההגדרות המוצעות להלן. לחפש במפה על ידי משיכה להזזתה ובכפתורים +/- כדי להתקרב/להתרחק + נא לבחור את המיקום המועדף עליכם על המפה כדי שתכנית ההתקנה תוכל להציע הגדרות מקומיות + ואזור זמן עבורכם. ניתן לכוונן את ההגדרות המוצעות להלן. לחפש במפה על ידי משיכה להזזתה ובכפתורים +/- כדי להתקרב/להתרחק או להשתמש בגלילת העכבר לטובת שליטה בתקריב. @@ -1974,7 +1974,7 @@ The installer will quit and all changes will be lost. Select your preferred Region, or use the default one based on your current location. - נא לבחור את המחוז המועדף עליך או להשתמש בבררת המחדל לפי המיקום הנוכחי שלך. + נא לבחור את המחוז המועדף עליכם או להשתמש בברירת המחדל לפי המיקום הנוכחי שלכם. @@ -2029,7 +2029,7 @@ The installer will quit and all changes will be lost. The password is the same as the old one - הססמה זהה לישנה + הססמה הזו זהה לישנה @@ -2413,7 +2413,7 @@ The installer will quit and all changes will be lost. <small>Enter the same password twice, so that it can be checked for typing errors.</small> - <small>עליך להקליד את אותה הססמה פעמיים כדי לאפשר זיהוי של שגיאות הקלדה.</small> + <small>יש להקליד את אותה הססמה פעמיים כדי לאפשר זיהוי של שגיאות הקלדה.</small> @@ -2648,12 +2648,12 @@ The installer will quit and all changes will be lost. An EFI system partition is necessary to start %1.<br/><br/>To configure an EFI system partition, go back and select or create a FAT32 filesystem with the <strong>%3</strong> flag enabled and mount point <strong>%2</strong>.<br/><br/>You can continue without setting up an EFI system partition but your system may fail to start. - מחיצת מערכת EFI נדרשת כדי להפעיל את %1.<br/><br/> כדי להגדיר מחיצת מערכת EFI, עליך לחזור ולבחור או ליצור מערכת קבצים מסוג FAT32 עם סימון <strong>%3</strong> פעיל ועם נקודת עיגון <strong>%2</strong>.<br/><br/> ניתן להמשיך ללא הגדרת מחיצת מערכת EFI אך טעינת המערכת עשויה להיכשל. + מחיצת מערכת EFI נדרשת כדי להפעיל את %1.<br/><br/> כדי להגדיר מחיצת מערכת EFI, יש לחזור ולבחור או ליצור מערכת קבצים מסוג FAT32 עם סימון <strong>%3</strong> פעיל ועם נקודת עיגון <strong>%2</strong>.<br/><br/> ניתן להמשיך ללא הגדרת מחיצת מערכת EFI אך טעינת המערכת עשויה להיכשל. An EFI system partition is necessary to start %1.<br/><br/>A partition was configured with mount point <strong>%2</strong> but its <strong>%3</strong> flag is not set.<br/>To set the flag, go back and edit the partition.<br/><br/>You can continue without setting the flag but your system may fail to start. - לצורך הפעלת %1 נדרשת מחיצת מערכת EFI.<br/><br/> הוגדרה מחיצה עם נקודת עיגון <strong>%2</strong> אך לא הוגדר סימון <strong>%3</strong>.<br/> כדי לסמן את המחיצה, עליך לחזור ולערוך את המחיצה.<br/><br/> ניתן להמשיך ללא הוספת הסימון אך טעינת המערכת עשויה להיכשל. + לצורך הפעלת %1 נדרשת מחיצת מערכת EFI.<br/><br/> הוגדרה מחיצה עם נקודת עיגון <strong>%2</strong> אך לא הוגדר סימון <strong>%3</strong>.<br/> כדי לסמן את המחיצה, יש לחזור ולערוך את המחיצה.<br/><br/> ניתן להמשיך ללא הוספת הסימון אך טעינת המערכת עשויה להיכשל. @@ -2843,7 +2843,7 @@ Output: swap - דפדוף, swap + דפדוף swap @@ -3886,7 +3886,7 @@ Output: Click your preferred keyboard model to select layout and variant, or use the default one based on the detected hardware. - נא ללחוץ על דרם המקלדת המועדף עליך כדי לבחור בפריסה ובהגוון או להשתמש בבררת המחדל בהתאם לחומרה שזוהתה. + נא ללחוץ על דגם המקלדת המועדף עליכם כדי לבחור בפריסה ובהגוון או להשתמש בברירת המחדל בהתאם לחומרה שזוהתה. diff --git a/lang/calamares_hi.ts b/lang/calamares_hi.ts index 1f220d9e5..f6d73519d 100644 --- a/lang/calamares_hi.ts +++ b/lang/calamares_hi.ts @@ -619,17 +619,17 @@ The installer will quit and all changes will be lost. This storage device already has an operating system on it, but the partition table <strong>%1</strong> is different from the needed <strong>%2</strong>.<br/> - + इस संचय उपकरण पर पहले से ऑपरेटिंग सिस्टम है, परंतु <strong>%1</strong> विभाजन तालिका अपेक्षित <strong>%2</strong> से भिन्न है।<br/> This storage device has one of its partitions <strong>mounted</strong>. - + इस संचय उपकरण के विभाजनों में से कोई एक विभाजन <strong>माउंट</strong> है। This storage device is a part of an <strong>inactive RAID</strong> device. - + यह संचय उपकरण एक <strong>निष्क्रिय RAID</strong> उपकरण का हिस्सा है। diff --git a/lang/calamares_hr.ts b/lang/calamares_hr.ts index e9e5c252a..256de9da6 100644 --- a/lang/calamares_hr.ts +++ b/lang/calamares_hr.ts @@ -621,7 +621,7 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. This storage device already has an operating system on it, but the partition table <strong>%1</strong> is different from the needed <strong>%2</strong>.<br/> - + Ovaj uređaj za pohranu već ima operativni sustav, ali njegova particijska tablica <strong>%1</strong> razlikuje se od potrebne <strong>%2</strong>.<br/> diff --git a/lang/calamares_ja.ts b/lang/calamares_ja.ts index 0a798b844..3a820770f 100644 --- a/lang/calamares_ja.ts +++ b/lang/calamares_ja.ts @@ -617,7 +617,7 @@ The installer will quit and all changes will be lost. This storage device already has an operating system on it, but the partition table <strong>%1</strong> is different from the needed <strong>%2</strong>.<br/> - + このストレージデバイスにはすでにオペレーティングシステムがインストールされていますが、パーティションテーブル <strong>%1</strong> は必要な <strong>%2</strong> とは異なります。<br/> diff --git a/lang/calamares_pt_BR.ts b/lang/calamares_pt_BR.ts index 242303308..9897c6c1a 100644 --- a/lang/calamares_pt_BR.ts +++ b/lang/calamares_pt_BR.ts @@ -619,17 +619,17 @@ O instalador será fechado e todas as alterações serão perdidas. This storage device already has an operating system on it, but the partition table <strong>%1</strong> is different from the needed <strong>%2</strong>.<br/> - + O dispositivo de armazenamento já possui um sistema operacional, mas a tabela de partições <strong>%1</strong> é diferente da necessária <strong>%2</strong>.<br/> This storage device has one of its partitions <strong>mounted</strong>. - + O dispositivo de armazenamento tem uma de suas partições <strong>montada</strong>. This storage device is a part of an <strong>inactive RAID</strong> device. - + O dispositivo de armazenamento é parte de um dispositivo <strong>RAID inativo</strong>. diff --git a/lang/calamares_sv.ts b/lang/calamares_sv.ts index 3f03caf4e..ec72fefa9 100644 --- a/lang/calamares_sv.ts +++ b/lang/calamares_sv.ts @@ -618,17 +618,17 @@ Alla ändringar kommer att gå förlorade. This storage device already has an operating system on it, but the partition table <strong>%1</strong> is different from the needed <strong>%2</strong>.<br/> - + Denna lagringsenhet har redan ett operativsystem installerat på sig, men partitionstabellen <strong>%1</strong> skiljer sig från den som behövs <strong>%2</strong>.<br/> This storage device has one of its partitions <strong>mounted</strong>. - + Denna lagringsenhet har en av dess partitioner <strong>monterad</strong>. This storage device is a part of an <strong>inactive RAID</strong> device. - + Denna lagringsenhet är en del av en <strong>inaktiv RAID</strong>enhet. diff --git a/lang/calamares_tg.ts b/lang/calamares_tg.ts index eac2d747e..9c2910547 100644 --- a/lang/calamares_tg.ts +++ b/lang/calamares_tg.ts @@ -620,17 +620,17 @@ The installer will quit and all changes will be lost. This storage device already has an operating system on it, but the partition table <strong>%1</strong> is different from the needed <strong>%2</strong>.<br/> - + Ин дастгоҳи захирагоҳ аллакай дорои низоми амалкунанда мебошад, аммо ҷадвали қисми диски <strong>%1</strong> аз диски лозимии <strong>%2</strong> фарқ мекунад.<br/> This storage device has one of its partitions <strong>mounted</strong>. - + Яке аз қисмҳои диски ин дастгоҳи захирагоҳ <strong>васлшуда</strong> мебошад. This storage device is a part of an <strong>inactive RAID</strong> device. - + Ин дастгоҳи захирагоҳ қисми дасгоҳи <strong>RAID-и ғайрифаъол</strong> мебошад. diff --git a/lang/calamares_vi.ts b/lang/calamares_vi.ts new file mode 100644 index 000000000..140da8aad --- /dev/null +++ b/lang/calamares_vi.ts @@ -0,0 +1,4124 @@ + + + + + BootInfoWidget + + + The <strong>boot environment</strong> of this system.<br><br>Older x86 systems only support <strong>BIOS</strong>.<br>Modern systems usually use <strong>EFI</strong>, but may also show up as BIOS if started in compatibility mode. + <strong> Môi trường khởi động </strong> của hệ thống này. <br> <br> Các hệ thống x86 cũ hơn chỉ hỗ trợ <strong> BIOS </strong>. <br> Các hệ thống hiện đại thường sử dụng <strong> EFI </strong>, nhưng cũng có thể hiển thị dưới dạng BIOS nếu được khởi động ở chế độ tương thích. + + + + This system was started with an <strong>EFI</strong> boot environment.<br><br>To configure startup from an EFI environment, this installer must deploy a boot loader application, like <strong>GRUB</strong> or <strong>systemd-boot</strong> on an <strong>EFI System Partition</strong>. This is automatic, unless you choose manual partitioning, in which case you must choose it or create it on your own. + Hệ thống này được khởi động bằng môi trường khởi động <strong> EFI </strong>. <br> <br> Để định cấu hình khởi động từ môi trường EFI, trình cài đặt này phải triển khai ứng dụng trình tải khởi động, như <strong> GRUB </strong> hoặc <strong> systemd-boot </strong> trên <strong> Phân vùng hệ thống EFI </strong>. Điều này là tự động, trừ khi bạn chọn phân vùng thủ công, trong trường hợp này, bạn phải chọn nó hoặc tự tạo nó. + + + + This system was started with a <strong>BIOS</strong> boot environment.<br><br>To configure startup from a BIOS environment, this installer must install a boot loader, like <strong>GRUB</strong>, either at the beginning of a partition or on the <strong>Master Boot Record</strong> near the beginning of the partition table (preferred). This is automatic, unless you choose manual partitioning, in which case you must set it up on your own. + Hệ thống này được khởi động với môi trường khởi động <strong> BIOS </strong>. <br> <br> Để định cấu hình khởi động từ môi trường BIOS, trình cài đặt này phải cài đặt một trình tải khởi động, chẳng hạn như <strong> GRUB </strong> ở đầu phân vùng hoặc trên <strong> Bản ghi khởi động chính </strong> gần đầu bảng phân vùng (ưu tiên). Điều này là tự động, trừ khi bạn chọn phân vùng thủ công, trong trường hợp đó, bạn phải tự thiết lập nó. + + + + BootLoaderModel + + + Master Boot Record of %1 + Bản ghi khởi động chính của %1 + + + + Boot Partition + Phân vùng khởi động + + + + System Partition + Phân vùng hệ thống + + + + Do not install a boot loader + Không cài đặt bộ tải khởi động + + + + %1 (%2) + %1 (%2) + + + + Calamares::BlankViewStep + + + Blank Page + Trang trắng + + + + Calamares::DebugWindow + + + Form + Mẫu + + + + GlobalStorage + Lưu trữ tổng quát + + + + JobQueue + Hàng đợi công việc + + + + Modules + Mô-đun + + + + Type: + Kiểu: + + + + + none + không + + + + Interface: + Giao diện: + + + + Tools + Công cụ + + + + Reload Stylesheet + Tải lại bảng định kiểu + + + + Widget Tree + Cây công cụ + + + + Debug information + Thông tin gỡ lỗi + + + + Calamares::ExecutionViewStep + + + Set up + Thiết lập + + + + Install + Cài đặt + + + + Calamares::FailJob + + + Job failed (%1) + Công việc thất bại (%1) + + + + Programmed job failure was explicitly requested. + Lỗi công việc được lập trình đã được yêu cầu rõ ràng. + + + + Calamares::JobThread + + + Done + Xong + + + + Calamares::NamedJob + + + Example job (%1) + Ví dụ về công việc (%1) + + + + Calamares::ProcessJob + + + Run command '%1' in target system. + Chạy lệnh '%1' trong hệ thống đích. + + + + Run command '%1'. + Chạy lệnh '%1'. + + + + Running command %1 %2 + Đang chạy lệnh %1 %2 + + + + Calamares::PythonJob + + + Running %1 operation. + Đang chạy %1 thao tác. + + + + Bad working directory path + Sai đường dẫn thư mục làm việc + + + + Working directory %1 for python job %2 is not readable. + Không thể đọc thư mục làm việc %1 của công việc python %2. + + + + Bad main script file + Sai tệp kịch bản chính + + + + Main script file %1 for python job %2 is not readable. + Không thể đọc tập tin kịch bản chính %1 của công việc python %2. + + + + Boost.Python error in job "%1". + Lỗi Boost.Python trong công việc "%1". + + + + Calamares::QmlViewStep + + + Loading ... + Đang tải ... + + + + QML Step <i>%1</i>. + QML bước <i>%1</i>. + + + + Loading failed. + Không tải được. + + + + Calamares::RequirementsChecker + + + Requirements checking for module <i>%1</i> is complete. + Kiểm tra các yêu cầu cho mô-đun <i> %1 </i> đã hoàn tất. + + + + Waiting for %n module(s). + + Đang đợi %n mô-đun. + + + + + (%n second(s)) + + (%n giây) + + + + + System-requirements checking is complete. + Kiểm tra yêu cầu hệ thống đã hoàn tất. + + + + Calamares::ViewManager + + + Setup Failed + Thiết lập không thành công + + + + Installation Failed + Cài đặt thất bại + + + + Would you like to paste the install log to the web? + Bạn có muốn gửi nhật ký cài đặt lên web không? + + + + Error + Lỗi + + + + + &Yes + &Có + + + + + &No + &Không + + + + &Close + Đón&g + + + + Install Log Paste URL + URL để gửi nhật ký cài đặt + + + + The upload was unsuccessful. No web-paste was done. + Tải lên không thành công. Không có quá trình gửi lên web nào được thực hiện. + + + + Calamares Initialization Failed + Khởi tạo không thành công + + + + %1 can not be installed. Calamares was unable to load all of the configured modules. This is a problem with the way Calamares is being used by the distribution. + %1 không thể được cài đặt.Không thể tải tất cả các mô-đun đã định cấu hình. Đây là vấn đề với cách phân phối sử dụng. + + + + <br/>The following modules could not be loaded: + <br/> Không thể tải các mô-đun sau: + + + + Continue with setup? + Tiếp tục thiết lập? + + + + Continue with installation? + Tiếp tục cài đặt? + + + + The %1 setup program is about to make changes to your disk in order to set up %2.<br/><strong>You will not be able to undo these changes.</strong> + Chương trình thiết lập %1 sắp thực hiện các thay đổi đối với đĩa của bạn để thiết lập %2. <br/> <strong> Bạn sẽ không thể hoàn tác các thay đổi này. </strong> + + + + The %1 installer is about to make changes to your disk in order to install %2.<br/><strong>You will not be able to undo these changes.</strong> + Trình cài đặt %1 sắp thực hiện các thay đổi đối với đĩa của bạn để cài đặt %2. <br/> <strong> Bạn sẽ không thể hoàn tác các thay đổi này. </strong> + + + + &Set up now + &Thiết lập ngay + + + + &Install now + &Cài đặt ngay + + + + Go &back + &Quay lại + + + + &Set up + &Thiết lập + + + + &Install + &Cài đặt + + + + Setup is complete. Close the setup program. + Thiết lập hoàn tất. Đóng chương trình cài đặt. + + + + The installation is complete. Close the installer. + Quá trình cài đặt hoàn tất. Đóng trình cài đặt. + + + + Cancel setup without changing the system. + Hủy thiết lập mà không thay đổi hệ thống. + + + + Cancel installation without changing the system. + Hủy cài đặt mà không thay đổi hệ thống. + + + + &Next + &Tiếp + + + + &Back + &Quay lại + + + + &Done + &Xong + + + + &Cancel + &Hủy + + + + Cancel setup? + Hủy thiết lập? + + + + Cancel installation? + Hủy cài đặt? + + + + Do you really want to cancel the current setup process? +The setup program will quit and all changes will be lost. + Bạn có thực sự muốn hủy quá trình thiết lập hiện tại không? +Chương trình thiết lập sẽ thoát và tất cả các thay đổi sẽ bị mất. + + + + Do you really want to cancel the current install process? +The installer will quit and all changes will be lost. + Bạn có thực sự muốn hủy quá trình cài đặt hiện tại không? +Trình cài đặt sẽ thoát và tất cả các thay đổi sẽ bị mất. + + + + CalamaresPython::Helper + + + Unknown exception type + Không nhận ra kiểu của ngoại lệ + + + + unparseable Python error + lỗi không thể phân tích cú pháp Python + + + + unparseable Python traceback + truy vết không thể phân tích cú pháp Python + + + + Unfetchable Python error. + Lỗi Python không thể try cập. + + + + CalamaresUtils + + + Install log posted to: +%1 + Cài đặt nhật ký được đăng lên: +%1 + + + + CalamaresWindow + + + Show debug information + Hiện thông tin gỡ lỗi + + + + &Back + Trở &về + + + + &Next + &Tiếp theo + + + + &Cancel + &Hủy bỏ + + + + %1 Setup Program + %1 Thiết lập chương trình + + + + %1 Installer + %1 cài đặt hệ điều hành + + + + CheckerContainer + + + Gathering system information... + Thu thập thông tin hệ thống ... + + + + ChoicePage + + + Form + Biểu mẫu + + + + Select storage de&vice: + &Chọn thiết bị lưu trữ: + + + + + + + Current: + Hiện tại: + + + + After: + Sau khi cài đặt: + + + + <strong>Manual partitioning</strong><br/>You can create or resize partitions yourself. + <strong> Phân vùng thủ công </strong> <br/> Bạn có thể tự tạo hoặc thay đổi kích thước phân vùng. + + + + Reuse %1 as home partition for %2. + Sử dụng lại %1 làm phân vùng chính cho %2. + + + + <strong>Select a partition to shrink, then drag the bottom bar to resize</strong> + <strong> Chọn một phân vùng để thu nhỏ, sau đó kéo thanh dưới cùng để thay đổi kích thước </strong> + + + + %1 will be shrunk to %2MiB and a new %3MiB partition will be created for %4. + %1 sẽ được thu nhỏ thành %2MiB và phân vùng %3MiB mới sẽ được tạo cho %4. + + + + Boot loader location: + Vị trí bộ tải khởi động: + + + + <strong>Select a partition to install on</strong> + <strong> Chọn phân vùng để cài đặt </strong> + + + + An EFI system partition cannot be found anywhere on this system. Please go back and use manual partitioning to set up %1. + Không thể tìm thấy phân vùng hệ thống EFI ở bất kỳ đâu trên hệ thống này. Vui lòng quay lại và sử dụng phân vùng thủ công để thiết lập %1. + + + + The EFI system partition at %1 will be used for starting %2. + Phân vùng hệ thống EFI tại %1 sẽ được sử dụng để bắt đầu %2. + + + + EFI system partition: + Phân vùng hệ thống EFI: + + + + This storage device does not seem to have an operating system on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device. + Thiết bị lưu trữ này dường như không có hệ điều hành trên đó. Bạn muốn làm gì? <br/> Bạn sẽ có thể xem xét và xác nhận lựa chọn của mình trước khi thực hiện bất kỳ thay đổi nào đối với thiết bị lưu trữ. + + + + + + + <strong>Erase disk</strong><br/>This will <font color="red">delete</font> all data currently present on the selected storage device. + <strong> Xóa đĩa </strong> <br/> Thao tác này sẽ <font color = "red"> xóa </font> tất cả dữ liệu hiện có trên thiết bị lưu trữ đã chọn. + + + + + + + <strong>Install alongside</strong><br/>The installer will shrink a partition to make room for %1. + <strong> Cài đặt cùng với </strong> <br/> Trình cài đặt sẽ thu nhỏ phân vùng để nhường chỗ cho %1. + + + + + + + <strong>Replace a partition</strong><br/>Replaces a partition with %1. + <strong> Thay thế phân vùng </strong> <br/> Thay thế phân vùng bằng %1. + + + + This storage device has %1 on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device. + Thiết bị lưu trữ này có %1 trên đó. Bạn muốn làm gì? <br/> Bạn sẽ có thể xem lại và xác nhận lựa chọn của mình trước khi thực hiện bất kỳ thay đổi nào đối với thiết bị lưu trữ. + + + + This storage device already has an operating system on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device. + Thiết bị lưu trữ này đã có hệ điều hành trên đó. Bạn muốn làm gì? <br/> Bạn sẽ có thể xem lại và xác nhận lựa chọn của mình trước khi thực hiện bất kỳ thay đổi nào đối với thiết bị lưu trữ. + + + + This storage device has multiple operating systems on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device. + Thiết bị lưu trữ này có nhiều hệ điều hành trên đó. Bạn muốn làm gì? <br/> Bạn sẽ có thể xem lại và xác nhận lựa chọn của mình trước khi thực hiện bất kỳ thay đổi nào đối với thiết bị lưu trữ. + + + + This storage device already has an operating system on it, but the partition table <strong>%1</strong> is different from the needed <strong>%2</strong>.<br/> + Thiết bị lưu trữ này đã có sẵn hệ điều hành, nhưng bảng phân vùng <strong> %1 </strong> khác với bảng <strong> %2 </strong> cần thiết. <br/> + + + + This storage device has one of its partitions <strong>mounted</strong>. + Thiết bị lưu trữ này có một trong các phân vùng được <strong> gắn kết </strong>. + + + + This storage device is a part of an <strong>inactive RAID</strong> device. + Thiết bị lưu trữ này là một phần của thiết bị <strong> RAID không hoạt động </strong>. + + + + No Swap + Không hoán đổi + + + + Reuse Swap + Sử dụng lại Hoán đổi + + + + Swap (no Hibernate) + Hoán đổi (không ngủ đông) + + + + Swap (with Hibernate) + Hoán đổi (ngủ đông) + + + + Swap to file + Hoán đổi sang tệp + + + + ClearMountsJob + + + Clear mounts for partitioning operations on %1 + Xóa gắn kết cho các hoạt động phân vùng trên %1 + + + + Clearing mounts for partitioning operations on %1. + Xóa các gắn kết cho các hoạt động phân vùng trên %1. + + + + Cleared all mounts for %1 + Đã xóa tất cả các gắn kết cho %1 + + + + ClearTempMountsJob + + + Clear all temporary mounts. + Xóa tất cả các gắn kết tạm thời. + + + + Clearing all temporary mounts. + Đang xóa tất cả các gắn kết tạm thời. + + + + Cannot get list of temporary mounts. + Không thể lấy danh sách các gắn kết tạm thời. + + + + Cleared all temporary mounts. + Xóa tất cả các gắn kết tạm thời. + + + + CommandList + + + + Could not run command. + Không thể chạy lệnh. + + + + The command runs in the host environment and needs to know the root path, but no rootMountPoint is defined. + Lệnh chạy trong môi trường máy chủ và cần biết đường dẫn gốc, nhưng không có biến rootMountPoint nào được xác định. + + + + The command needs to know the user's name, but no username is defined. + Lệnh cần biết tên của người dùng, nhưng không có tên người dùng nào được xác định. + + + + Config + + + Set keyboard model to %1.<br/> + Thiệt lập bàn phím kiểu %1.<br/> + + + + Set keyboard layout to %1/%2. + Thiết lập bố cục bàn phím thành %1/%2. + + + + Set timezone to %1/%2. + Thiết lập múi giờ sang %1/%2. + + + + The system language will be set to %1. + Ngôn ngữ hệ thống sẽ được đặt thành %1. + + + + The numbers and dates locale will be set to %1. + Định dạng ngôn ngữ của số và ngày tháng sẽ được chuyển thành %1. + + + + Network Installation. (Disabled: Incorrect configuration) + Cài đặt mạng. (Tắt: Sai cấu hình) + + + + Network Installation. (Disabled: Received invalid groups data) + Cài đặt mạng. (Tắt: Nhận được dữ liệu nhóm bị sai) + + + + Network Installation. (Disabled: internal error) + Cài đặt mạng. (Tắt: Lỗi nội bộ) + + + + Network Installation. (Disabled: Unable to fetch package lists, check your network connection) + Cài đặt mạng. (Tắt: Không thể lấy được danh sách gói ứng dụng, kiểm tra kết nối mạng) + + + + This computer does not satisfy the minimum requirements for setting up %1.<br/>Setup cannot continue. <a href="#details">Details...</a> + Máy tính này không đạt đủ yêu cấu tối thiểu để thiết lập %1.<br/>Không thể tiếp tục thiết lập. <a href="#details">Chi tiết...</a> + + + + This computer does not satisfy the minimum requirements for installing %1.<br/>Installation cannot continue. <a href="#details">Details...</a> + Máy tính này không đạt đủ yêu cấu tối thiểu để cài đặt %1.<br/>Không thể tiếp tục cài đặt. <a href="#details">Chi tiết...</a> + + + + This computer does not satisfy some of the recommended requirements for setting up %1.<br/>Setup can continue, but some features might be disabled. + Máy tính này không đạt đủ yêu cấu khuyến nghị để thiết lập %1.<br/>Thiết lập có thể tiếp tục, nhưng một số tính năng có thể sẽ bị tắt. + + + + This computer does not satisfy some of the recommended requirements for installing %1.<br/>Installation can continue, but some features might be disabled. + Máy tính này không đạt đủ yêu cấu khuyến nghị để cài đặt %1.<br/>Cài đặt có thể tiếp tục, nhưng một số tính năng có thể sẽ bị tắt. + + + + This program will ask you some questions and set up %2 on your computer. + Chương trình này sẽ hỏi bạn vài câu hỏi và thiết lập %2 trên máy tính của bạn. + + + + <h1>Welcome to the Calamares setup program for %1</h1> + <h1>Chào mừng đến với chương trình Calamares để thiết lập %1</h1> + + + + <h1>Welcome to %1 setup</h1> + <h1>Chào mừng đến với thiết lập %1 </h1> + + + + <h1>Welcome to the Calamares installer for %1</h1> + <h1>Chào mừng đến với chương trình Calamares để cài đặt %1</h1> + + + + <h1>Welcome to the %1 installer</h1> + <h1>Chào mừng đến với bộ cài đặt %1 </h1> + + + + Your username is too long. + Tên bạn hơi dài. + + + + '%1' is not allowed as username. + '%1' không được phép dùng làm tên. + + + + Your username must start with a lowercase letter or underscore. + Tên người dùng của bạn phải bắt đầu bằng chữ cái viết thường hoặc dấu gạch dưới. + + + + Only lowercase letters, numbers, underscore and hyphen are allowed. + Chỉ cho phép các chữ cái viết thường, số, gạch dưới và gạch nối. + + + + Your hostname is too short. + Tên máy chủ quá ngắn. + + + + Your hostname is too long. + Tên máy chủ quá dài. + + + + '%1' is not allowed as hostname. + '%1' không được phép dùng làm tên máy chủ. + + + + Only letters, numbers, underscore and hyphen are allowed. + Chỉ cho phép các chữ cái, số, gạch dưới và gạch nối. + + + + Your passwords do not match! + Mật khẩu nhập lại không khớp! + + + + ContextualProcessJob + + + Contextual Processes Job + Công việc xử lý theo ngữ cảnh + + + + CreatePartitionDialog + + + Create a Partition + Tạo phân vùng + + + + Si&ze: + &Kích thước: + + + + MiB + MiB + + + + Partition &Type: + &Loại phân vùng: + + + + &Primary + &Sơ cấp + + + + E&xtended + &Mở rộng + + + + Fi&le System: + &Tập tin hệ thống: + + + + LVM LV name + Tên LVM LV + + + + &Mount Point: + &Điểm gắn kết: + + + + Flags: + Cờ: + + + + En&crypt + &Mã hóa + + + + Logical + Lô-gic + + + + Primary + Sơ cấp + + + + GPT + GPT + + + + Mountpoint already in use. Please select another one. + Điểm gắn kết đã được sử dụng. Vui lòng chọn một cái khác. + + + + CreatePartitionJob + + + Create new %2MiB partition on %4 (%3) with file system %1. + Tạo phân vùng %2MiB mới trên %4 (%3) với hệ thống tệp %1. + + + + Create new <strong>%2MiB</strong> partition on <strong>%4</strong> (%3) with file system <strong>%1</strong>. + Tạo phân vùng <strong>%2MiB </strong> mới trên <strong>%4 </strong> (%3) với hệ thống tệp <strong>%1 </strong>. + + + + Creating new %1 partition on %2. + Tạo phân vùng %1 mới trên %2. + + + + The installer failed to create partition on disk '%1'. + Trình cài đặt không tạo được phân vùng trên đĩa '%1'. + + + + CreatePartitionTableDialog + + + Create Partition Table + Tạo bảng phân vùng + + + + Creating a new partition table will delete all existing data on the disk. + Tạo bảng phân vùng mới sẽ xóa tất cả dữ liệu hiện có trên đĩa. + + + + What kind of partition table do you want to create? + Bạn muốn tạo loại bảng phân vùng nào? + + + + Master Boot Record (MBR) + Bản ghi khởi động chính (MBR) + + + + GUID Partition Table (GPT) + Bảng phân vùng GUID (GPT) + + + + CreatePartitionTableJob + + + Create new %1 partition table on %2. + Tạo bảng phân vùng %1 mới trên %2. + + + + Create new <strong>%1</strong> partition table on <strong>%2</strong> (%3). + Tạo bảng phân vùng <strong>%1 </strong> mới trên <strong>%2 </strong> (%3). + + + + Creating new %1 partition table on %2. + Tạo bảng phân vùng %1 mới trên %2. + + + + The installer failed to create a partition table on %1. + Trình cài đặt không tạo được bảng phân vùng trên %1. + + + + CreateUserJob + + + Create user %1 + Khởi tạo người dùng %1 + + + + Create user <strong>%1</strong>. + Tạo người dùng <strong>%1</strong>. + + + + Creating user %1. + Đang tạo người dùng %1. + + + + Cannot create sudoers file for writing. + Không thể tạo tệp sudoers để viết. + + + + Cannot chmod sudoers file. + Không thể sửa đổi mod của tệp sudoers. + + + + CreateVolumeGroupDialog + + + Create Volume Group + Tạo nhóm ổ đĩa + + + + CreateVolumeGroupJob + + + Create new volume group named %1. + Tạo nhóm ổ đĩa mới có tên %1. + + + + Create new volume group named <strong>%1</strong>. + Tạo nhóm ổ đĩa mới có tên <strong>%1</strong>. + + + + Creating new volume group named %1. + Đang tạo nhóm ổ đĩa mới có tên %1. + + + + The installer failed to create a volume group named '%1'. + Trình cài đặt không tạo được nhóm ổ đĩa có tên '%1'. + + + + DeactivateVolumeGroupJob + + + + Deactivate volume group named %1. + Hủy kích hoạt nhóm ổ đĩa có tên %1. + + + + Deactivate volume group named <strong>%1</strong>. + Hủy kích hoạt nhóm ổ đĩa có tên <strong>%1</strong>. + + + + The installer failed to deactivate a volume group named %1. + Trình cài đặt không thể hủy kích hoạt nhóm ổ đĩa có tên %1. + + + + DeletePartitionJob + + + Delete partition %1. + Xóa phân vùng %1. + + + + Delete partition <strong>%1</strong>. + Xóa phân vùng <strong>%1</strong>. + + + + Deleting partition %1. + Đang xóa phân vùng %1. + + + + The installer failed to delete partition %1. + Trình cài đặt không thể xóa phân vùng %1. + + + + DeviceInfoWidget + + + This device has a <strong>%1</strong> partition table. + Thiết bị này có bảng phân vùng <strong> %1 </strong>. + + + + This is a <strong>loop</strong> device.<br><br>It is a pseudo-device with no partition table that makes a file accessible as a block device. This kind of setup usually only contains a single filesystem. + Đây là thiết bị <strong> vòng lặp </strong>. <br> <br> Đây là thiết bị giả không có bảng phân vùng giúp tệp có thể truy cập được dưới dạng thiết bị khối. Loại thiết lập này thường chỉ chứa một hệ thống tệp duy nhất. + + + + This installer <strong>cannot detect a partition table</strong> on the selected storage device.<br><br>The device either has no partition table, or the partition table is corrupted or of an unknown type.<br>This installer can create a new partition table for you, either automatically, or through the manual partitioning page. + Trình cài đặt này <strong> không thể phát hiện bảng phân vùng </strong> trên thiết bị lưu trữ đã chọn. <br> <br> Thiết bị không có bảng phân vùng hoặc bảng phân vùng bị hỏng hoặc thuộc loại không xác định. <br> Điều này trình cài đặt có thể tạo bảng phân vùng mới cho bạn, tự động hoặc thông qua trang phân vùng thủ công. + + + + <br><br>This is the recommended partition table type for modern systems which start from an <strong>EFI</strong> boot environment. + <br> <br> Đây là loại bảng phân vùng được khuyến nghị cho các hệ thống hiện đại bắt đầu từ môi trường khởi động <strong> EFI </strong>. + + + + <br><br>This partition table type is only advisable on older systems which start from a <strong>BIOS</strong> boot environment. GPT is recommended in most other cases.<br><br><strong>Warning:</strong> the MBR partition table is an obsolete MS-DOS era standard.<br>Only 4 <em>primary</em> partitions may be created, and of those 4, one can be an <em>extended</em> partition, which may in turn contain many <em>logical</em> partitions. + <br> <br> Loại bảng phân vùng này chỉ được khuyến khích trên các hệ thống cũ hơn bắt đầu từ môi trường khởi động <strong> BIOS </strong>. GPT được khuyến nghị trong hầu hết các trường hợp khác. <br> <br> <strong> Cảnh báo: </strong> bảng phân vùng MBR là tiêu chuẩn thời đại MS-DOS lỗi thời. <br> Chỉ có 4 phân vùng <em> chính </em> có thể được tạo và trong số 4 phân vùng đó, một phân vùng có thể là phân vùng <em> mở rộng </em>, đến lượt nó có thể chứa nhiều phân vùng <em> logic </em>. + + + + The type of <strong>partition table</strong> on the selected storage device.<br><br>The only way to change the partition table type is to erase and recreate the partition table from scratch, which destroys all data on the storage device.<br>This installer will keep the current partition table unless you explicitly choose otherwise.<br>If unsure, on modern systems GPT is preferred. + Loại <strong> bảng phân vùng </strong> trên thiết bị lưu trữ đã chọn. <br> <br> Cách duy nhất để thay đổi loại bảng phân vùng là xóa và tạo lại bảng phân vùng từ đầu, việc này sẽ hủy tất cả dữ liệu trên thiết bị lưu trữ. <br> Trình cài đặt này sẽ giữ bảng phân vùng hiện tại trừ khi bạn chọn rõ ràng khác. <br> Nếu không chắc chắn, trên các hệ thống hiện đại, GPT được ưu tiên hơn. + + + + DeviceModel + + + %1 - %2 (%3) + device[name] - size[number] (device-node[name]) + %1 - %2 (%3) + + + + %1 - (%2) + device[name] - (device-node[name]) + %1 - (%2) + + + + DracutLuksCfgJob + + + Write LUKS configuration for Dracut to %1 + Lưu cấu hình LUKS cho Dracut vào %1 + + + + Skip writing LUKS configuration for Dracut: "/" partition is not encrypted + Không lưu cấu hình LUKS cho Dracut: phân vùng "/" không được mã hoá + + + + Failed to open %1 + Mở %1 thất bại + + + + DummyCppJob + + + Dummy C++ Job + Công việc C++ ví dụ + + + + EditExistingPartitionDialog + + + Edit Existing Partition + Chỉnh sửa phân vùng hiện có + + + + Content: + Nội dung: + + + + &Keep + &Giữ + + + + Format + Định dạng + + + + Warning: Formatting the partition will erase all existing data. + Cảnh báo: Định dạng phân vùng sẽ xóa tất cả dữ liệu hiện có. + + + + &Mount Point: + &Điểm gắn kết: + + + + Si&ze: + &Kích thước: + + + + MiB + MiB + + + + Fi&le System: + &Tập tin hệ thống: + + + + Flags: + Cờ: + + + + Mountpoint already in use. Please select another one. + Điểm gắn kết đã được sử dụng. Vui lòng chọn một cái khác. + + + + EncryptWidget + + + Form + Biểu mẫu + + + + En&crypt system + &Mã hóa hệ thống + + + + Passphrase + Cụm mật khẩu + + + + Confirm passphrase + Xác nhận cụm mật khẩu + + + + + Please enter the same passphrase in both boxes. + Vui lòng nhập cùng một cụm mật khẩu vào cả hai hộp. + + + + FillGlobalStorageJob + + + Set partition information + Đặt thông tin phân vùng + + + + Install %1 on <strong>new</strong> %2 system partition. + Cài đặt %1 trên phân vùng hệ thống <strong> mới </strong> %2. + + + + Set up <strong>new</strong> %2 partition with mount point <strong>%1</strong>. + Thiết lập phân vùng <strong> mới </strong> %2 với điểm gắn kết <strong> %1 </strong>. + + + + Install %2 on %3 system partition <strong>%1</strong>. + Cài đặt %2 trên phân vùng hệ thống %3 <strong> %1 </strong>. + + + + Set up %3 partition <strong>%1</strong> with mount point <strong>%2</strong>. + Thiết lập phân vùng %3 <strong> %1 </strong> với điểm gắn kết <strong> %2 </strong>. + + + + Install boot loader on <strong>%1</strong>. + Cài đặt trình tải khởi động trên <strong> %1 </strong>. + + + + Setting up mount points. + Thiết lập điểm gắn kết. + + + + FinishedPage + + + Form + Biểu mẫu + + + + &Restart now + &Khởi động lại ngay + + + + <h1>All done.</h1><br/>%1 has been set up on your computer.<br/>You may now start using your new system. + <h1>Hoàn thành.</h1><br/>%1 đã được cài đặt thành công.<br/>Hãy khởi động lại máy tính. + + + + <html><head/><body><p>When this box is checked, your system will restart immediately when you click on <span style="font-style:italic;">Done</span> or close the setup program.</p></body></html> + <html><head/><body><p>Tích chọn để khởi động lại sau khi ấn <span style="font-style:italic;">Hoàn thành</span> hoặc đóng phần mềm thiết lập.</p></body></html> + + + + <h1>All done.</h1><br/>%1 has been installed on your computer.<br/>You may now restart into your new system, or continue using the %2 Live environment. + <h1>Hoàn thành.</h1><br/>%1 đã được cài đặt trên máy.<br/>hãy khởi động lại, hoặc cũng có thể tiếp tục sử dụng %2 môi trường USB. + + + + <html><head/><body><p>When this box is checked, your system will restart immediately when you click on <span style="font-style:italic;">Done</span> or close the installer.</p></body></html> + <html><head/><body><p>Tích chọn để khởi động lại sau khi ấn <span style="font-style:italic;">Hoàn thành</span> hoặc đóng phần mềm cài đặt.</p></body></html> + + + + <h1>Setup Failed</h1><br/>%1 has not been set up on your computer.<br/>The error message was: %2. + <h1>Thiết lập lỗi</h1><br/>%1 đã không được thiết lập trên máy tính.<br/>tin báo lỗi: %2. + + + + <h1>Installation Failed</h1><br/>%1 has not been installed on your computer.<br/>The error message was: %2. + <h1>Cài đặt lỗi</h1><br/>%1 chưa được cài đặt trên máy tính<br/>Tin báo lỗi: %2. + + + + FinishedViewStep + + + Finish + Hoàn thành + + + + Setup Complete + Thiết lập xong + + + + Installation Complete + Cài đặt xong + + + + The setup of %1 is complete. + Thiết lập %1 đã xong. + + + + The installation of %1 is complete. + Cài đặt của %1 đã xong. + + + + FormatPartitionJob + + + Format partition %1 (file system: %2, size: %3 MiB) on %4. + Định dạng phân vùng %1 (tập tin hệ thống:%2, kích thước: %3 MiB) trên %4. + + + + Format <strong>%3MiB</strong> partition <strong>%1</strong> with file system <strong>%2</strong>. + Định dạng <strong>%3MiB</strong> phân vùng <strong>%1</strong>với tập tin hệ thống <strong>%2</strong>. + + + + Formatting partition %1 with file system %2. + Đang định dạng phân vùng %1 với tập tin hệ thống %2. + + + + The installer failed to format partition %1 on disk '%2'. + Không thể định dạng %1 ở đĩa '%2'. + + + + GeneralRequirements + + + has at least %1 GiB available drive space + có ít nhất %1 GiB dung lượng ổ đĩa khả dụng + + + + There is not enough drive space. At least %1 GiB is required. + Không có đủ dung lượng ổ đĩa. Ít nhất %1 GiB là bắt buộc. + + + + has at least %1 GiB working memory + có ít nhất %1 GiB bộ nhớ làm việc + + + + The system does not have enough working memory. At least %1 GiB is required. + Hệ thống không có đủ bộ nhớ hoạt động. Ít nhất %1 GiB là bắt buộc. + + + + is plugged in to a power source + được cắm vào nguồn điện + + + + The system is not plugged in to a power source. + Hệ thống chưa được cắm vào nguồn điện. + + + + is connected to the Internet + được kết nối với Internet + + + + The system is not connected to the Internet. + Hệ thống không được kết nối với Internet. + + + + is running the installer as an administrator (root) + đang chạy trình cài đặt với tư cách quản trị viên (root) + + + + The setup program is not running with administrator rights. + Chương trình thiết lập không chạy với quyền quản trị viên. + + + + The installer is not running with administrator rights. + Trình cài đặt không chạy với quyền quản trị viên. + + + + has a screen large enough to show the whole installer + có màn hình đủ lớn để hiển thị toàn bộ trình cài đặt + + + + The screen is too small to display the setup program. + Màn hình quá nhỏ để hiển thị chương trình cài đặt. + + + + The screen is too small to display the installer. + Màn hình quá nhỏ để hiển thị trình cài đặt. + + + + HostInfoJob + + + Collecting information about your machine. + Thu thập thông tin về máy của bạn. + + + + IDJob + + + + + + OEM Batch Identifier + Định danh lô OEM + + + + Could not create directories <code>%1</code>. + Không thể tạo thư mục <code> %1 </code>. + + + + Could not open file <code>%1</code>. + Không thể mở được tệp <code> %1 </code>. + + + + Could not write to file <code>%1</code>. + Không thể ghi vào tệp <code> %1 </code>. + + + + InitcpioJob + + + Creating initramfs with mkinitcpio. + Đang tạo initramfs bằng mkinitcpio. + + + + InitramfsJob + + + Creating initramfs. + Đang tạo initramfs. + + + + InteractiveTerminalPage + + + Konsole not installed + Konsole chưa được cài đặt + + + + Please install KDE Konsole and try again! + Vui lòng cài đặt KDE Konsole rồi thử lại! + + + + Executing script: &nbsp;<code>%1</code> + Đang thực thi kịch bản: &nbsp;<code>%1</code> + + + + InteractiveTerminalViewStep + + + Script + Kịch bản + + + + KeyboardPage + + + Set keyboard model to %1.<br/> + Thiết lập bàn phím kiểu %1.<br/> + + + + Set keyboard layout to %1/%2. + Thiết lập bố cục bàn phím thành %1/%2. + + + + KeyboardQmlViewStep + + + Keyboard + Bàn phím + + + + KeyboardViewStep + + + Keyboard + Bàn phím + + + + LCLocaleDialog + + + System locale setting + Cài đặt ngôn ngữ hệ thống + + + + The system locale setting affects the language and character set for some command line user interface elements.<br/>The current setting is <strong>%1</strong>. + Thiết lập ngôn ngữ hệ thống ảnh hưởng tới ngôn ngữ và bộ kí tự của một vài thành phần trong giao diện dòng lệnh cho người dùng.<br/>Thiết lập hiện tại là <strong>%1</strong>. + + + + &Cancel + &Huỷ bỏ + + + + &OK + &OK + + + + LicensePage + + + Form + Biểu mẫu + + + + <h1>License Agreement</h1> + <h1>Điều khoản giấy phép</h1> + + + + I accept the terms and conditions above. + Tôi đồng ý với điều khoản và điều kiện trên. + + + + Please review the End User License Agreements (EULAs). + Vui lòng đọc thoả thuận giấy phép người dùng cuối (EULAs). + + + + This setup procedure will install proprietary software that is subject to licensing terms. + Quy trình thiết lập này sẽ cài đặt phần mềm độc quyền tuân theo các điều khoản cấp phép. + + + + If you do not agree with the terms, the setup procedure cannot continue. + Nếu bạn không đồng ý với các điều khoản, quy trình thiết lập không thể tiếp tục. + + + + This setup procedure can install proprietary software that is subject to licensing terms in order to provide additional features and enhance the user experience. + Quy trình thiết lập này có thể cài đặt phần mềm độc quyền tuân theo các điều khoản cấp phép để cung cấp các tính năng bổ sung và nâng cao trải nghiệm người dùng. + + + + If you do not agree with the terms, proprietary software will not be installed, and open source alternatives will be used instead. + Nếu bạn không đồng ý với các điều khoản, phần mềm độc quyền sẽ không được cài đặt và các giải pháp thay thế nguồn mở sẽ được sử dụng thay thế. + + + + LicenseViewStep + + + License + Giấy phép + + + + LicenseWidget + + + URL: %1 + URL: %1 + + + + <strong>%1 driver</strong><br/>by %2 + %1 is an untranslatable product name, example: Creative Audigy driver + <strong>trình điều khiển %1</strong><br/>bởi %2 + + + + <strong>%1 graphics driver</strong><br/><font color="Grey">by %2</font> + %1 is usually a vendor name, example: Nvidia graphics driver + <strong>trình điều khiển đồ hoạc %1</strong><br/><font color="Grey">bởi %2</font> + + + + <strong>%1 browser plugin</strong><br/><font color="Grey">by %2</font> + <strong>plugin trình duyệt %1</strong><br/><font color="Grey">bởi %2</font> + + + + <strong>%1 codec</strong><br/><font color="Grey">by %2</font> + <strong>%1 codec</strong><br/><font color="Grey">bởi %2</font> + + + + <strong>%1 package</strong><br/><font color="Grey">by %2</font> + <strong>gói %1</strong><br/><font color="Grey">bởi %2</font> + + + + <strong>%1</strong><br/><font color="Grey">by %2</font> + <strong>%1</strong><br/><font color="Grey">bởi %2</font> + + + + File: %1 + Tệp: %1 + + + + Hide license text + Ẩn thông tin giấy phép + + + + Show the license text + Hiện thông tin giấy phép + + + + Open license agreement in browser. + Mở điều khoản giấy phép trên trình duyệt. + + + + LocalePage + + + Region: + Khu vực: + + + + Zone: + Vùng: + + + + + &Change... + &Thay đổi... + + + + LocaleQmlViewStep + + + Location + Vị trí + + + + LocaleViewStep + + + Location + Vị trí + + + + LuksBootKeyFileJob + + + Configuring LUKS key file. + Định cấu hình tệp khóa LUKS. + + + + + No partitions are defined. + Không có phân vùng nào được xác định. + + + + + + Encrypted rootfs setup error + Lỗi thiết lập rootfs mã hóa + + + + Root partition %1 is LUKS but no passphrase has been set. + Phân vùng gốc %1 là LUKS nhưng không có cụm mật khẩu nào được đặt. + + + + Could not create LUKS key file for root partition %1. + Không thể tạo tệp khóa LUKS cho phân vùng gốc %1. + + + + Could not configure LUKS key file on partition %1. + Không thể định cấu hình tệp khóa LUKS trên phân vùng %1. + + + + MachineIdJob + + + Generate machine-id. + Tạo ID máy. + + + + Configuration Error + Lỗi cấu hình + + + + No root mount point is set for MachineId. + Không có điểm gắn kết gốc nào được đặt cho ID máy + + + + Map + + + Timezone: %1 + Múi giờ: %1 + + + + Please select your preferred location on the map so the installer can suggest the locale + and timezone settings for you. You can fine-tune the suggested settings below. Search the map by dragging + to move and using the +/- buttons to zoom in/out or use mouse scrolling for zooming. + Vui lòng chọn vị trí ưa thích của bạn trên bản đồ để trình cài đặt có thể đề xuất ngôn ngữ + và cài đặt múi giờ cho bạn. Bạn có thể tinh chỉnh các cài đặt được đề xuất bên dưới. Tìm kiếm bản đồ bằng cách kéo + để di chuyển và sử dụng các nút +/- để phóng to / thu nhỏ hoặc sử dụng cuộn chuột để phóng to. + + + + NetInstallViewStep + + + + Package selection + Chọn phân vùng + + + + Office software + Phần mềm văn phòng + + + + Office package + Gói văn phòng + + + + Browser software + Phần mềm trình duyệt + + + + Browser package + Gói trình duyệt + + + + Web browser + Trình duyệt web + + + + Kernel + Lõi + + + + Services + Dịch vụ + + + + Login + Đăng nhập + + + + Desktop + Màn hình chính + + + + Applications + Ứng dụng + + + + Communication + Cộng đồng + + + + Development + Phát triển + + + + Office + Văn phòng + + + + Multimedia + Đa phương tiện + + + + Internet + Mạng Internet + + + + Theming + Chủ đề + + + + Gaming + Trò chơi + + + + Utilities + Tiện ích + + + + NotesQmlViewStep + + + Notes + Ghi chú + + + + OEMPage + + + Ba&tch: + &Lô: + + + + <html><head/><body><p>Enter a batch-identifier here. This will be stored in the target system.</p></body></html> + <html><head/><body> <p> Nhập số nhận dạng lô tại đây. Điều này sẽ được lưu trữ trong hệ thống đích. </p> </body> </html> + + + + <html><head/><body><h1>OEM Configuration</h1><p>Calamares will use OEM settings while configuring the target system.</p></body></html> + <html><head/><body> <h1> Cấu hình OEM </h1> <p> Calamares sẽ sử dụng cài đặt OEM trong khi định cấu hình hệ thống đích. </p> </body> </html> + + + + OEMViewStep + + + OEM Configuration + Cấu hình OEM + + + + Set the OEM Batch Identifier to <code>%1</code>. + Đặt số nhận dạng lô OEM thành <code> %1 </code>. + + + + Offline + + + Select your preferred Region, or use the default one based on your current location. + Chọn khu vực ưa thích của bạn hoặc sử dụng khu vực mặc định dựa trên vị trí hiện tại của bạn. + + + + + + Timezone: %1 + Múi giờ: %1 + + + + Select your preferred Zone within your Region. + Chọn vùng ưa thích của bạn trong khu vực của bạn. + + + + Zones + Vùng + + + + You can fine-tune Language and Locale settings below. + Bạn có thể tinh chỉnh cài đặt Ngôn ngữ và Bản địa bên dưới. + + + + PWQ + + + Password is too short + Mật khẩu quá ngắn + + + + Password is too long + Mật khẩu quá dài + + + + Password is too weak + Mật khẩu quá yếu + + + + Memory allocation error when setting '%1' + Lỗi phân bổ bộ nhớ khi cài đặt '%1' + + + + Memory allocation error + Lỗi phân bổ bộ nhớ + + + + The password is the same as the old one + Mật khẩu giống với mật khẩu cũ + + + + The password is a palindrome + Mật khẩu là chuỗi đối xứng + + + + The password differs with case changes only + Mật khẩu chỉ khác khi thay đổi chữ hoa chữ thường + + + + The password is too similar to the old one + Mật khẩu giống mật khẩu cũ + + + + The password contains the user name in some form + Mật khẩu chứa tên người dùng ở một số dạng + + + + The password contains words from the real name of the user in some form + Mật khẩu chứa các từ từ tên thật của người dùng dưới một số hình thức + + + + The password contains forbidden words in some form + Mật khẩu chứa các từ bị cấm dưới một số hình thức + + + + The password contains less than %1 digits + Mật khẩu chứa ít hơn %1 ký tự + + + + The password contains too few digits + Mật khẩu chứa quá ít ký tự + + + + The password contains less than %1 uppercase letters + Mật khẩu có ít nhất %1 chữ viết hoa + + + + The password contains too few uppercase letters + Mật khẩu chứa quá ít chữ hoa + + + + The password contains less than %1 lowercase letters + Mật khẩu chứa ít hơn %1 chữ thường + + + + The password contains too few lowercase letters + Mật khẩu chứa quá ít chữ thường + + + + The password contains less than %1 non-alphanumeric characters + Mật khẩu chứa ít hơn %1 ký tự không phải chữ và số + + + + The password contains too few non-alphanumeric characters + Mật khẩu chứa quá ít ký tự không phải chữ và số + + + + The password is shorter than %1 characters + Mật khẩu ngắn hơn %1 ký tự + + + + The password is too short + Mật khẩu quá ngắn + + + + The password is just rotated old one + Mật khẩu vừa được xoay vòng cũ + + + + The password contains less than %1 character classes + Mật khẩu chứa ít hơn %1 lớp ký tự + + + + The password does not contain enough character classes + Mật khẩu không chứa đủ các lớp ký tự + + + + The password contains more than %1 same characters consecutively + Mật khẩu chứa nhiều hơn %1 ký tự giống nhau liên tiếp + + + + The password contains too many same characters consecutively + Mật khẩu chứa quá nhiều ký tự giống nhau liên tiếp + + + + The password contains more than %1 characters of the same class consecutively + Mật khẩu chứa nhiều hơn %1 ký tự của cùng một lớp liên tiếp + + + + The password contains too many characters of the same class consecutively + Mật khẩu chứa quá nhiều ký tự của cùng một lớp liên tiếp + + + + The password contains monotonic sequence longer than %1 characters + Mật khẩu chứa chuỗi đơn điệu dài hơn %1 ký tự + + + + The password contains too long of a monotonic character sequence + Mật khẩu chứa một chuỗi ký tự đơn điệu quá dài + + + + No password supplied + Chưa cung cấp mật khẩu + + + + Cannot obtain random numbers from the RNG device + Không thể lấy số ngẫu nhiên từ thiết bị RNG + + + + Password generation failed - required entropy too low for settings + Tạo mật khẩu không thành công - yêu cầu entropy quá thấp để cài đặt + + + + The password fails the dictionary check - %1 + Mật khẩu không kiểm tra được từ điển - %1 + + + + The password fails the dictionary check + Mật khẩu không kiểm tra được từ điển + + + + Unknown setting - %1 + Cài đặt không xác định - %1 + + + + Unknown setting + Cài đặt không xác định + + + + Bad integer value of setting - %1 + Giá trị số nguyên không hợp lệ của cài đặt - %1 + + + + Bad integer value + Giá trị số nguyên không hợp lệ + + + + Setting %1 is not of integer type + Cài đặt %1 không thuộc kiểu số nguyên + + + + Setting is not of integer type + Cài đặt không thuộc kiểu số nguyên + + + + Setting %1 is not of string type + Cài đặt %1 không thuộc loại chuỗi + + + + Setting is not of string type + Cài đặt không thuộc loại chuỗi + + + + Opening the configuration file failed + Không mở được tệp cấu hình + + + + The configuration file is malformed + Tệp cấu hình không đúng định dạng + + + + Fatal failure + Thất bại nghiêm trọng + + + + Unknown error + Lỗi không xác định + + + + Password is empty + Mật khẩu trống + + + + PackageChooserPage + + + Form + Biểu mẫu + + + + Product Name + Tên sản phẩm + + + + TextLabel + Nhãn văn bản + + + + Long Product Description + Mô tả đầy đủ sản phẩm + + + + Package Selection + Lựa chọn gói + + + + Please pick a product from the list. The selected product will be installed. + Vui lòng chọn một sản phẩm từ danh sách. Sản phẩm đã chọn sẽ được cài đặt. + + + + PackageChooserViewStep + + + Packages + Gói + + + + PackageModel + + + Name + Tên + + + + Description + Mô tả + + + + Page_Keyboard + + + Form + Biểu mẫu + + + + Keyboard Model: + Mẫu bàn phím: + + + + Type here to test your keyboard + Gõ vào đây để thử bàn phím + + + + Page_UserSetup + + + Form + Mẫu + + + + What is your name? + Hãy cho Vigo biết tên đầy đủ của bạn? + + + + Your Full Name + Tên đầy đủ + + + + What name do you want to use to log in? + Bạn sẽ dùng tên nào để đăng nhập vào máy tính? + + + + login + Tên đăng nhập + + + + What is the name of this computer? + Tên máy tính này là? + + + + <small>This name will be used if you make the computer visible to others on a network.</small> + <small>Tên này được dùng nếu máy tính được nhìn thấy trong mạng.</small> + + + + Computer Name + Tên máy + + + + Choose a password to keep your account safe. + Chọn một mật khẩu để giữ an toàn cho tài khoản của bạn. + + + + + <small>Enter the same password twice, so that it can be checked for typing errors. A good password will contain a mixture of letters, numbers and punctuation, should be at least eight characters long, and should be changed at regular intervals.</small> + <small>Nhập mật khẩu hai lần giống nhau để kiểm tra nếu gõ sai.Một mật khẩu tốt được kết hợp giữ ký tự, số và ký tự đặc biệt; ít nhất 8 ký tự và nên được thay đổi định kỳ.</small> + + + + + Password + Mật khẩu + + + + + Repeat Password + Nhập lại mật khẩu + + + + When this box is checked, password-strength checking is done and you will not be able to use a weak password. + Khi chọn mục này, bạn có thể chọn mật khẩu yếu. + + + + Require strong passwords. + Yêu cầu mật khẩu mạnh. + + + + Log in automatically without asking for the password. + Tự đăng nhật không cần mật khẩu. + + + + Use the same password for the administrator account. + Dùng cùng một mật khẩu cho tài khoản quản trị. + + + + Choose a password for the administrator account. + Chọn một mật khẩu cho tài khoản quản trị. + + + + + <small>Enter the same password twice, so that it can be checked for typing errors.</small> + <small>Nhập mật khẩu hai lần giống nhau để kiểm tra nếu gõ sai.</small> + + + + PartitionLabelsView + + + Root + Gốc + + + + Home + Nhà + + + + Boot + Khởi động + + + + EFI system + Hệ thống EFI + + + + Swap + Hoán đổi + + + + New partition for %1 + Phân vùng mới cho %1 + + + + New partition + Phân vùng mới + + + + %1 %2 + size[number] filesystem[name] + %1 %2 + + + + PartitionModel + + + + Free Space + Không gian trống + + + + + New partition + Phân vùng mới + + + + Name + Tên + + + + File System + Tập tin hệ thống + + + + Mount Point + Điểm gắn kết + + + + Size + Kích cỡ + + + + PartitionPage + + + Form + Biểu mẫu + + + + Storage de&vice: + Thiết &bị lưu trữ: + + + + &Revert All Changes + &Hoàn tác tất cả thay đổi + + + + New Partition &Table + Phân vùng &Bảng mới + + + + Cre&ate + &Tạo + + + + &Edit + &Sửa + + + + &Delete + &Xóa + + + + New Volume Group + Nhóm ổ đĩa mới + + + + Resize Volume Group + Thay đổi kích thước nhóm ổ đĩa + + + + Deactivate Volume Group + Hủy kích hoạt nhóm ổ đĩa + + + + Remove Volume Group + Xóa nhóm ổ đĩa + + + + I&nstall boot loader on: + &Cài đặt bộ tải khởi động trên: + + + + Are you sure you want to create a new partition table on %1? + Bạn có chắc chắn muốn tạo một bảng phân vùng mới trên %1 không? + + + + Can not create new partition + Không thể tạo phân vùng mới + + + + The partition table on %1 already has %2 primary partitions, and no more can be added. Please remove one primary partition and add an extended partition, instead. + Bảng phân vùng trên %1 đã có %2 phân vùng chính và không thể thêm được nữa. Vui lòng xóa một phân vùng chính và thêm một phân vùng mở rộng, thay vào đó. + + + + PartitionViewStep + + + Gathering system information... + Thu thập thông tin hệ thống ... + + + + Partitions + Phân vùng + + + + Install %1 <strong>alongside</strong> another operating system. + Cài đặt %1 <strong> cùng với </strong> hệ điều hành khác. + + + + <strong>Erase</strong> disk and install %1. + <strong> Xóa </strong> đĩa và cài đặt %1. + + + + <strong>Replace</strong> a partition with %1. + <strong>thay thế</strong> một phân vùng với %1. + + + + <strong>Manual</strong> partitioning. + Phân vùng <strong> thủ công </strong>. + + + + Install %1 <strong>alongside</strong> another operating system on disk <strong>%2</strong> (%3). + Cài đặt %1 <strong> cùng với </strong> hệ điều hành khác trên đĩa <strong>%2</strong> (%3). + + + + <strong>Erase</strong> disk <strong>%2</strong> (%3) and install %1. + <strong> Xóa </strong> đĩa <strong>%2 </strong> (%3) và cài đặt %1. + + + + <strong>Replace</strong> a partition on disk <strong>%2</strong> (%3) with %1. + <strong> Thay thế </strong> phân vùng trên đĩa <strong>%2 </strong> (%3) bằng %1. + + + + <strong>Manual</strong> partitioning on disk <strong>%1</strong> (%2). + Phân vùng <strong> thủ công </strong> trên đĩa <strong>%1 </strong> (%2). + + + + Disk <strong>%1</strong> (%2) + Đĩa <strong>%1</strong> (%2) + + + + Current: + Hiện tại: + + + + After: + Sau: + + + + No EFI system partition configured + Không có hệ thống phân vùng EFI được cài đặt + + + + An EFI system partition is necessary to start %1.<br/><br/>To configure an EFI system partition, go back and select or create a FAT32 filesystem with the <strong>%3</strong> flag enabled and mount point <strong>%2</strong>.<br/><br/>You can continue without setting up an EFI system partition but your system may fail to start. + Cần có phân vùng hệ thống EFI để khởi động %1. <br/> <br/> Để định cấu hình phân vùng hệ thống EFI, hãy quay lại và chọn hoặc tạo hệ thống tệp FAT32 với cờ <strong> %3 </strong> được bật và gắn kết point <strong> %2 </strong>. <br/> <br/> Bạn có thể tiếp tục mà không cần thiết lập phân vùng hệ thống EFI nhưng hệ thống của bạn có thể không khởi động được. + + + + An EFI system partition is necessary to start %1.<br/><br/>A partition was configured with mount point <strong>%2</strong> but its <strong>%3</strong> flag is not set.<br/>To set the flag, go back and edit the partition.<br/><br/>You can continue without setting the flag but your system may fail to start. + Một phân vùng hệ thống EFI là cần thiết để bắt đầu %1. <br/> <br/> Một phân vùng đã được định cấu hình với điểm gắn kết <strong> %2 </strong> nhưng cờ <strong> %3 </strong> của nó không được đặt . <br/> Để đặt cờ, hãy quay lại và chỉnh sửa phân vùng. <br/> <br/> Bạn có thể tiếp tục mà không cần đặt cờ nhưng hệ thống của bạn có thể không khởi động được. + + + + EFI system partition flag not set + Cờ phân vùng hệ thống EFI chưa được đặt + + + + Option to use GPT on BIOS + Lựa chọn dùng GPT trên BIOS + + + + A GPT partition table is the best option for all systems. This installer supports such a setup for BIOS systems too.<br/><br/>To configure a GPT partition table on BIOS, (if not done so already) go back and set the partition table to GPT, next create a 8 MB unformatted partition with the <strong>bios_grub</strong> flag enabled.<br/><br/>An unformatted 8 MB partition is necessary to start %1 on a BIOS system with GPT. + Bảng phân vùng GPT là lựa chọn tốt nhất cho tất cả các hệ thống. Trình cài đặt này cũng hỗ trợ thiết lập như vậy cho các hệ thống BIOS. <br/> <br/> Để định cấu hình bảng phân vùng GPT trên BIOS, (nếu chưa thực hiện xong) hãy quay lại và đặt bảng phân vùng thành GPT, tiếp theo tạo 8 MB phân vùng chưa định dạng với cờ <strong> bios_grub </strong> được bật. <br/> <br/> Cần có phân vùng 8 MB chưa được định dạng để khởi động %1 trên hệ thống BIOS có GPT. + + + + Boot partition not encrypted + Phân vùng khởi động không được mã hóa + + + + A separate boot partition was set up together with an encrypted root partition, but the boot partition is not encrypted.<br/><br/>There are security concerns with this kind of setup, because important system files are kept on an unencrypted partition.<br/>You may continue if you wish, but filesystem unlocking will happen later during system startup.<br/>To encrypt the boot partition, go back and recreate it, selecting <strong>Encrypt</strong> in the partition creation window. + Một phân vùng khởi động riêng biệt đã được thiết lập cùng với một phân vùng gốc được mã hóa, nhưng phân vùng khởi động không được mã hóa. <br/> <br/> Có những lo ngại về bảo mật với loại thiết lập này, vì các tệp hệ thống quan trọng được lưu giữ trên một phân vùng không được mã hóa . <br/> Bạn có thể tiếp tục nếu muốn, nhưng việc mở khóa hệ thống tệp sẽ diễn ra sau trong quá trình khởi động hệ thống. <br/> Để mã hóa phân vùng khởi động, hãy quay lại và tạo lại nó, chọn <strong> Mã hóa </strong> trong phân vùng cửa sổ tạo. + + + + has at least one disk device available. + có sẵn ít nhất một thiết bị đĩa. + + + + There are no partitions to install on. + Không có phân vùng để cài đặt. + + + + PlasmaLnfJob + + + Plasma Look-and-Feel Job + Công việc Plasma Look-and-Feel + + + + + Could not select KDE Plasma Look-and-Feel package + Không thể chọn gói KDE Plasma Look-and-Feel + + + + PlasmaLnfPage + + + Form + Biểu mẫu + + + + Please choose a look-and-feel for the KDE Plasma Desktop. You can also skip this step and configure the look-and-feel once the system is set up. Clicking on a look-and-feel selection will give you a live preview of that look-and-feel. + Vui lòng chọn giao diện cho Máy tính để bàn KDE Plasma. Bạn cũng có thể bỏ qua bước này và định cấu hình giao diện sau khi hệ thống được thiết lập. Nhấp vào lựa chọn giao diện sẽ cung cấp cho bạn bản xem trước trực tiếp của giao diện đó. + + + + Please choose a look-and-feel for the KDE Plasma Desktop. You can also skip this step and configure the look-and-feel once the system is installed. Clicking on a look-and-feel selection will give you a live preview of that look-and-feel. + Vui lòng chọn giao diện cho Máy tính để bàn KDE Plasma. Bạn cũng có thể bỏ qua bước này và định cấu hình giao diện sau khi hệ thống được thiết lập. Nhấp vào lựa chọn giao diện sẽ cung cấp cho bạn bản xem trước trực tiếp của giao diện đó. + + + + PlasmaLnfViewStep + + + Look-and-Feel + Look-and-Feel + + + + PreserveFiles + + + Saving files for later ... + Đang lưu tập tin để dùng sau ... + + + + No files configured to save for later. + Không có tệp nào được định cấu hình để lưu sau này. + + + + Not all of the configured files could be preserved. + Không phải tất cả các tệp đã định cấu hình đều có thể được giữ nguyên. + + + + ProcessResult + + + +There was no output from the command. + +Không có đầu ra từ lệnh. + + + + +Output: + + +Đầu ra: + + + + + External command crashed. + Lệnh bên ngoài bị lỗi. + + + + Command <i>%1</i> crashed. + Lệnh <i>%1</i> bị lỗi. + + + + External command failed to start. + Lệnh ngoài không thể bắt đầu. + + + + Command <i>%1</i> failed to start. + Lệnh <i>%1</i> không thể bắt đầu. + + + + Internal error when starting command. + Lỗi nội bộ khi bắt đầu lệnh. + + + + Bad parameters for process job call. + Tham số không hợp lệ cho lệnh gọi công việc của quy trình. + + + + External command failed to finish. + Không thể hoàn tất lệnh bên ngoài. + + + + Command <i>%1</i> failed to finish in %2 seconds. + Lệnh <i>%1</i> không thể hoàn thành trong %2 giây. + + + + External command finished with errors. + Lệnh bên ngoài kết thúc với lỗi. + + + + Command <i>%1</i> finished with exit code %2. + Lệnh <i>%1</i> hoàn thành với lỗi %2. + + + + QObject + + + %1 (%2) + %1 (%2) + + + + unknown + không xác định + + + + extended + gia tăng + + + + unformatted + không định dạng + + + + swap + hoán đổi + + + + Default Keyboard Model + Mẫu bàn phím mặc định + + + + + Default + Mặc định + + + + + + + File not found + Không tìm thấy tập tin + + + + Path <pre>%1</pre> must be an absolute path. + Đường dẫn <pre>%1</pre> phải là đường dẫn tuyệt đối. + + + + Directory not found + Thư mục không tìm thấy + + + + + Could not create new random file <pre>%1</pre>. + Không thể tạo tập tin ngẫu nhiên <pre>%1</pre>. + + + + No product + Không có sản phẩm + + + + No description provided. + Không có mô tả được cung cấp. + + + + (no mount point) + (không có điểm gắn kết) + + + + Unpartitioned space or unknown partition table + Không gian chưa được phân vùng hoặc bảng phân vùng không xác định + + + + Recommended + + + <p>This computer does not satisfy some of the recommended requirements for setting up %1.<br/> + Setup can continue, but some features might be disabled.</p> + <p> Máy tính này không đáp ứng một số yêu cầu được đề xuất để thiết lập %1. <br/> + Có thể tiếp tục thiết lập nhưng một số tính năng có thể bị tắt. </p> + + + + RemoveUserJob + + + Remove live user from target system + Xóa người dùng trực tiếp khỏi hệ thống đích + + + + RemoveVolumeGroupJob + + + + Remove Volume Group named %1. + Xóa nhóm ổ đĩa có tên %1. + + + + Remove Volume Group named <strong>%1</strong>. + Xóa nhóm ổ đĩa có tên <strong>%1</strong>. + + + + The installer failed to remove a volume group named '%1'. + Trình cài đặt không xóa được nhóm ổ đĩa có tên '%1'. + + + + ReplaceWidget + + + Form + Biểu mẫu + + + + Select where to install %1.<br/><font color="red">Warning: </font>this will delete all files on the selected partition. + Chọn nơi cài đặt %1. <br/> <font color = "red"> Cảnh báo: </font> điều này sẽ xóa tất cả các tệp trên phân vùng đã chọn. + + + + The selected item does not appear to be a valid partition. + Mục đã chọn dường như không phải là một phân vùng hợp lệ. + + + + %1 cannot be installed on empty space. Please select an existing partition. + %1 không thể được cài đặt trên không gian trống. Vui lòng chọn một phân vùng hiện có. + + + + %1 cannot be installed on an extended partition. Please select an existing primary or logical partition. + %1 không thể được cài đặt trên một phân vùng mở rộng. Vui lòng chọn phân vùng chính hoặc phân vùng logic hiện có. + + + + %1 cannot be installed on this partition. + %1 không thể cài đặt trên phân vùng này. + + + + Data partition (%1) + Phân vùng dữ liệu (%1) + + + + Unknown system partition (%1) + Phân vùng hệ thống không xác định (%1) + + + + %1 system partition (%2) + %1 phân vùng hệ thống (%2) + + + + <strong>%4</strong><br/><br/>The partition %1 is too small for %2. Please select a partition with capacity at least %3 GiB. + <strong> %4 </strong> <br/> <br/> Phân vùng %1 quá nhỏ đối với %2. Vui lòng chọn một phân vùng có dung lượng ít nhất là %3 GiB. + + + + <strong>%2</strong><br/><br/>An EFI system partition cannot be found anywhere on this system. Please go back and use manual partitioning to set up %1. + <strong> %2 </strong> <br/> <br/> Không thể tìm thấy phân vùng hệ thống EFI ở bất kỳ đâu trên hệ thống này. Vui lòng quay lại và sử dụng phân vùng thủ công để thiết lập %1. + + + + + + <strong>%3</strong><br/><br/>%1 will be installed on %2.<br/><font color="red">Warning: </font>all data on partition %2 will be lost. + <strong> %3 </strong> <br/> <br/> %1 sẽ được cài đặt trên %2. <br/> <font color = "red"> Cảnh báo: </font> tất cả dữ liệu trên phân vùng %2 sẽ bị mất. + + + + The EFI system partition at %1 will be used for starting %2. + Phân vùng hệ thống EFI tại %1 sẽ được sử dụng để bắt đầu %2. + + + + EFI system partition: + Phân vùng hệ thống EFI: + + + + Requirements + + + <p>This computer does not satisfy the minimum requirements for installing %1.<br/> + Installation cannot continue.</p> + <p> Máy tính này không đáp ứng các yêu cầu tối thiểu để cài đặt %1. <br/> + Không thể tiếp tục cài đặt. </p> + + + + <p>This computer does not satisfy some of the recommended requirements for setting up %1.<br/> + Setup can continue, but some features might be disabled.</p> + <p> Máy tính này không đáp ứng một số yêu cầu được đề xuất để thiết lập %1. <br/> + Có thể tiếp tục thiết lập nhưng một số tính năng có thể bị tắt. </p> + + + + ResizeFSJob + + + Resize Filesystem Job + Thay đổi kích thước tệp công việc hệ thống + + + + Invalid configuration + Cấu hình không hợp lệ + + + + The file-system resize job has an invalid configuration and will not run. + Công việc thay đổi kích thước hệ thống tệp có cấu hình không hợp lệ và sẽ không chạy. + + + + KPMCore not Available + KPMCore không khả dụng + + + + Calamares cannot start KPMCore for the file-system resize job. + Calamares không thể khởi động KPMCore cho công việc thay đổi kích thước hệ thống tệp. + + + + + + + + Resize Failed + Thay đổi kích thước không thành công + + + + The filesystem %1 could not be found in this system, and cannot be resized. + Không thể tìm thấy tệp hệ thống %1 trong hệ thống này và không thể thay đổi kích thước. + + + + The device %1 could not be found in this system, and cannot be resized. + Không thể tìm thấy thiết bị %1 trong hệ thống này và không thể thay đổi kích thước. + + + + + The filesystem %1 cannot be resized. + Không thể thay đổi kích thước tệp hệ thống %1. + + + + + The device %1 cannot be resized. + Không thể thay đổi kích thước thiết bị %1. + + + + The filesystem %1 must be resized, but cannot. + Hệ thống tệp %1 phải được thay đổi kích thước, nhưng không thể. + + + + The device %1 must be resized, but cannot + Thiết bị %1 phải được thay đổi kích thước, nhưng không thể + + + + ResizePartitionJob + + + Resize partition %1. + Đổi kích thước phân vùng %1. + + + + Resize <strong>%2MiB</strong> partition <strong>%1</strong> to <strong>%3MiB</strong>. + Thay đổi kích thước <strong>%2MiB</strong> phân vùng <strong>%1</strong> toùng <strong>%3đếnMiB</strong>. + + + + Resizing %2MiB partition %1 to %3MiB. + Thay đổi %2MiB phân vùng %1 thành %3MiB. + + + + The installer failed to resize partition %1 on disk '%2'. + Thất bại trong việc thay đổi kích thước phân vùng %1 trên đĩa '%2'. + + + + ResizeVolumeGroupDialog + + + Resize Volume Group + Thay đổi kích thước nhóm ổ đĩa + + + + ResizeVolumeGroupJob + + + + Resize volume group named %1 from %2 to %3. + Thay đổi kích thước nhóm ổ đĩa có tên %1 từ %2 thành %3. + + + + Resize volume group named <strong>%1</strong> from <strong>%2</strong> to <strong>%3</strong>. + Thay đổi kích thước nhóm ổ đĩa có tên <strong> %1 </strong> từ <strong> %2 </strong> thành <strong> %3 </strong>. + + + + The installer failed to resize a volume group named '%1'. + Trình cài đặt không thể thay đổi kích thước một nhóm ổ đĩa có tên ' %1'. + + + + ResultsListDialog + + + For best results, please ensure that this computer: + Để có kết quả tốt nhất, hãy đảm bảo rằng máy tính này: + + + + System requirements + Yêu cầu hệ thống + + + + ResultsListWidget + + + This computer does not satisfy the minimum requirements for setting up %1.<br/>Setup cannot continue. <a href="#details">Details...</a> + Máy tính này không đáp ứng các yêu cầu tối thiểu để thiết lập %1. <br/> Không thể tiếp tục thiết lập. <a href="#details"> Chi tiết ... </a> + + + + This computer does not satisfy the minimum requirements for installing %1.<br/>Installation cannot continue. <a href="#details">Details...</a> + Máy tính này không đáp ứng các yêu cầu tối thiểu để cài đặt %1. <br/> Không thể tiếp tục cài đặt. <a href="#details"> Chi tiết ... </a> + + + + This computer does not satisfy some of the recommended requirements for setting up %1.<br/>Setup can continue, but some features might be disabled. + Máy tính này không đáp ứng một số yêu cầu được khuyến nghị để thiết lập %1. <br/> Quá trình thiết lập có thể tiếp tục nhưng một số tính năng có thể bị tắt. + + + + This computer does not satisfy some of the recommended requirements for installing %1.<br/>Installation can continue, but some features might be disabled. + Máy tính này không đáp ứng một số yêu cầu được khuyến nghị để cài đặt %1. <br/> Quá trình cài đặt có thể tiếp tục, nhưng một số tính năng có thể bị tắt. + + + + This program will ask you some questions and set up %2 on your computer. + Chương trình này sẽ hỏi bạn một số câu hỏi và thiết lập %2 trên máy tính của bạn. + + + + ScanningDialog + + + Scanning storage devices... + Quét thiết bị lưu trữ... + + + + Partitioning + Đang phân vùng + + + + SetHostNameJob + + + Set hostname %1 + Đặt tên máy %1 + + + + Set hostname <strong>%1</strong>. + Đặt tên máy <strong>%1</strong>. + + + + Setting hostname %1. + Đặt tên máy %1. + + + + + Internal Error + Lỗi bên trong + + + + + Cannot write hostname to target system + Không thể ghi tên máy chủ vào hệ thống đích + + + + SetKeyboardLayoutJob + + + Set keyboard model to %1, layout to %2-%3 + Cài đặt bàn phím kiểu %1, bố cục %2-%3 + + + + Failed to write keyboard configuration for the virtual console. + Lỗi khi ghi cấu hình bàn phím cho virtual console. + + + + + + Failed to write to %1 + Lỗi khi ghi vào %1 + + + + Failed to write keyboard configuration for X11. + Lỗi khi ghi cấu hình bàn phím cho X11. + + + + Failed to write keyboard configuration to existing /etc/default directory. + Lỗi khi ghi cấu hình bàn phím vào thư mục /etc/default. + + + + SetPartFlagsJob + + + Set flags on partition %1. + Chọn cờ trong phân vùng %1. + + + + Set flags on %1MiB %2 partition. + Chọn cờ %1MiB %2 phân vùng. + + + + Set flags on new partition. + Chọn cờ trong phân vùng mới. + + + + Clear flags on partition <strong>%1</strong>. + Xóa cờ trong phân vùng<strong>%1</strong>. + + + + Clear flags on %1MiB <strong>%2</strong> partition. + Xóa cờ trong %1MiB <strong>%2</strong> phân vùng. + + + + Clear flags on new partition. + Xóa cờ trong phân vùng mới. + + + + Flag partition <strong>%1</strong> as <strong>%2</strong>. + Cờ phân vùng <strong>%1</strong> như <strong>%2</strong>. + + + + Flag %1MiB <strong>%2</strong> partition as <strong>%3</strong>. + Cờ %1MiB <strong>%2</strong> phân vùng như <strong>%3</strong>. + + + + Flag new partition as <strong>%1</strong>. + Cờ phân vùng mới như <strong>%1</strong>. + + + + Clearing flags on partition <strong>%1</strong>. + Đang xóa cờ trên phân vùng <strong>%1</strong>. + + + + Clearing flags on %1MiB <strong>%2</strong> partition. + Đang xóa cờ trên %1MiB <strong>%2</strong> phân vùng. + + + + Clearing flags on new partition. + Đang xóa cờ trên phân vùng mới. + + + + Setting flags <strong>%2</strong> on partition <strong>%1</strong>. + Chọn cờ <strong>%2</strong> trong phân vùng <strong>%1</strong>. + + + + Setting flags <strong>%3</strong> on %1MiB <strong>%2</strong> partition. + Chọn cờ <strong>%3</strong> trong %1MiB <strong>%2</strong> phân vùng. + + + + Setting flags <strong>%1</strong> on new partition. + Chọn cờ <strong>%1</strong> trong phân vùng mới. + + + + The installer failed to set flags on partition %1. + Không thể tạo cờ cho phân vùng %1. + + + + SetPasswordJob + + + Set password for user %1 + Tạo mật khẩu người dùng %1 + + + + Setting password for user %1. + Đang tạo mật khẩu người dùng %1. + + + + Bad destination system path. + Đường dẫn hệ thống đích không hợp lệ. + + + + rootMountPoint is %1 + Điểm gắn kết gốc là %1 + + + + Cannot disable root account. + Không thể vô hiệu hoá tài khoản quản trị. + + + + passwd terminated with error code %1. + passwd bị kết thúc với mã lỗi %1. + + + + Cannot set password for user %1. + Không thể đặt mật khẩu cho người dùng %1. + + + + usermod terminated with error code %1. + usermod bị chấm dứt với mã lỗi %1. + + + + SetTimezoneJob + + + Set timezone to %1/%2 + Đặt múi giờ thành %1/%2 + + + + Cannot access selected timezone path. + Không thể truy cập đường dẫn múi giờ đã chọn. + + + + Bad path: %1 + Đường dẫn sai: %1 + + + + Cannot set timezone. + Không thể cài đặt múi giờ. + + + + Link creation failed, target: %1; link name: %2 + Không tạo được liên kết, target: %1; tên liên kết: %2 + + + + Cannot set timezone, + Không thể cài đặt múi giờ + + + + Cannot open /etc/timezone for writing + Không thể mở để viết vào /etc/timezone + + + + ShellProcessJob + + + Shell Processes Job + Shell Xử lý Công việc + + + + SlideCounter + + + %L1 / %L2 + slide counter, %1 of %2 (numeric) + %L1 / %L2 + + + + SummaryPage + + + This is an overview of what will happen once you start the setup procedure. + Đây là tổng quan về những gì sẽ xảy ra khi bạn bắt đầu quy trình thiết lập. + + + + This is an overview of what will happen once you start the install procedure. + Đây là tổng quan về những gì sẽ xảy ra khi bạn bắt đầu quy trình cài đặt. + + + + SummaryViewStep + + + Summary + Tổng quan + + + + TrackingInstallJob + + + Installation feedback + Phản hồi cài đặt + + + + Sending installation feedback. + Gửi phản hồi cài đặt. + + + + Internal error in install-tracking. + Lỗi nội bộ trong theo dõi cài đặt. + + + + HTTP request timed out. + Yêu cầu HTTP đã hết thời gian chờ. + + + + TrackingKUserFeedbackJob + + + KDE user feedback + Người dùng KDE phản hồi + + + + Configuring KDE user feedback. + Định cấu hình phản hồi của người dùng KDE. + + + + + Error in KDE user feedback configuration. + Lỗi trong cấu hình phản hồi của người dùng KDE. + + + + Could not configure KDE user feedback correctly, script error %1. + Không thể định cấu hình phản hồi của người dùng KDE một cách chính xác, lỗi tập lệnh %1. + + + + Could not configure KDE user feedback correctly, Calamares error %1. + Không thể định cấu hình phản hồi của người dùng KDE một cách chính xác, lỗi Calamares %1. + + + + TrackingMachineUpdateManagerJob + + + Machine feedback + Phản hồi máy + + + + Configuring machine feedback. + Cấu hình phản hồi máy. + + + + + Error in machine feedback configuration. + Lỗi cấu hình phản hồi máy. + + + + Could not configure machine feedback correctly, script error %1. + Không thể cấu hình phản hồi máy chính xác, kịch bản lỗi %1. + + + + Could not configure machine feedback correctly, Calamares error %1. + Không thể cấu hình phản hồi máy chính xác, lỗi %1. + + + + TrackingPage + + + Form + Biểu mẫu + + + + Placeholder + Trình giữ chỗ + + + + <html><head/><body><p>Click here to send <span style=" font-weight:600;">no information at all</span> about your installation.</p></body></html> + <html><head/><body><p>Nhấp vào đây để gửi <span style=" font-weight:600;">không có thông tin nào</span> về cài đặt của bạn.</p></body></html> + + + + <html><head/><body><p><a href="placeholder"><span style=" text-decoration: underline; color:#2980b9;">Click here for more information about user feedback</span></a></p></body></html> + <html><head/><body><p><a href="placeholder"><span style=" text-decoration: underline; color:#2980b9;">Bấm vào đây để biết thêm thông tin về phản hồi của người dùng</span></a></p></body></html> + + + + Tracking helps %1 to see how often it is installed, what hardware it is installed on and which applications are used. To see what will be sent, please click the help icon next to each area. + Theo dõi giúp %1 biết tần suất cài đặt, phần cứng được cài đặt trên phần cứng nào và ứng dụng nào được sử dụng. Để xem những gì sẽ được gửi, vui lòng nhấp vào biểu tượng trợ giúp bên cạnh mỗi khu vực. + + + + By selecting this you will send information about your installation and hardware. This information will only be sent <b>once</b> after the installation finishes. + Bằng cách chọn này, bạn sẽ gửi thông tin về cài đặt và phần cứng của mình. Thông tin này sẽ chỉ được gửi <b> một lần </b> sau khi quá trình cài đặt kết thúc. + + + + By selecting this you will periodically send information about your <b>machine</b> installation, hardware and applications, to %1. + Bằng cách chọn này, bạn sẽ định kỳ gửi thông tin về cài đặt <b> máy </b>, phần cứng và ứng dụng của mình cho %1. + + + + By selecting this you will regularly send information about your <b>user</b> installation, hardware, applications and application usage patterns, to %1. + Bằng cách chọn này, bạn sẽ thường xuyên gửi thông tin về cài đặt <b> người dùng </b>, phần cứng, ứng dụng và các kiểu sử dụng ứng dụng cho %1. + + + + TrackingViewStep + + + Feedback + Phản hồi + + + + UsersPage + + + <small>If more than one person will use this computer, you can create multiple accounts after setup.</small> + <small> Nếu nhiều người cùng sử dụng máy tính này, bạn có thể tạo nhiều tài khoản sau khi thiết lập. </small> + + + + <small>If more than one person will use this computer, you can create multiple accounts after installation.</small> + <small> Nếu nhiều người cùng sử dụng máy tính này, bạn có thể tạo nhiều tài khoản sau khi cài đặt. </small> + + + + UsersQmlViewStep + + + Users + Người dùng + + + + UsersViewStep + + + Users + Người dùng + + + + VariantModel + + + Key + Column header for key/value + Khóa + + + + Value + Column header for key/value + Giá trị + + + + VolumeGroupBaseDialog + + + Create Volume Group + Tạo nhóm ổ đĩa + + + + List of Physical Volumes + Danh sách các đĩa vật lý + + + + Volume Group Name: + Tên nhóm ổ đĩa: + + + + Volume Group Type: + Loại nhóm ổ đĩa: + + + + Physical Extent Size: + Kích thước phạm vi vật lý: + + + + MiB + MiB + + + + Total Size: + Tổng kích thước: + + + + Used Size: + Đã dùng: + + + + Total Sectors: + Tổng số Sec-tơ: + + + + Quantity of LVs: + Số lượng của LVs: + + + + WelcomePage + + + Form + Biểu mẫu + + + + + Select application and system language + Chọn ngôn ngữ ứng dụng và hệ thống + + + + &About + &Giới thiệu + + + + Open donations website + Mở trang web ủng hộ + + + + &Donate + Ủng &hộ + + + + Open help and support website + Mở trang web trợ giúp + + + + &Support + &Hỗ trợ + + + + Open issues and bug-tracking website + Mở trang web theo dõi lỗi và vấn đề + + + + &Known issues + &Vấn đề đã biết + + + + Open release notes website + Mở trang web ghi chú phát hành + + + + &Release notes + &Ghi chú phát hành + + + + <h1>Welcome to the Calamares setup program for %1.</h1> + <h1>Chào mừng đến với chương trình Calamares để thiết lập cho %1.</h1> + + + + <h1>Welcome to %1 setup.</h1> + <h1>Chào mừng đến với thiết lập %1.</h1> + + + + <h1>Welcome to the Calamares installer for %1.</h1> + <h1>Chào mừng đến với chương trình Calamares để cài đặt cho %1.</h1> + + + + <h1>Welcome to the %1 installer.</h1> + <h1>Chào mừng đến với bộ cài đặt %1.</h1> + + + + %1 support + Hỗ trợ %1 + + + + About %1 setup + Về thiết lập %1 + + + + About %1 installer + Về bộ cài đặt %1 + + + + <h1>%1</h1><br/><strong>%2<br/>for %3</strong><br/><br/>Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Copyright 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Thanks to <a href="https://calamares.io/team/">the Calamares team</a> and the <a href="https://www.transifex.com/calamares/calamares/">Calamares translators team</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> development is sponsored by <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software. + <h1>%1</h1><br/><strong>%2<br/>cho %3</strong><br/><br/>Bản quyền 2014-2017 bởi Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Bản quyền 2017-2020 bởi Adriaan de Groot &lt;groot@kde.org&gt;<br/>Cám ơn <a href="https://calamares.io/team/">đội ngũ Calamares</a> và <a href="https://www.transifex.com/calamares/calamares/">các dịch giả của Calamares</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> được tài trợ bởi <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software. + + + + WelcomeQmlViewStep + + + Welcome + Chào mừng + + + + WelcomeViewStep + + + Welcome + Chào mừng + + + + about + + + <h1>%1</h1><br/> + <strong>%2<br/> + for %3</strong><br/><br/> + Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/> + Copyright 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/> + Thanks to <a href='https://calamares.io/team/'>the Calamares team</a> + and the <a href='https://www.transifex.com/calamares/calamares/'>Calamares + translators team</a>.<br/><br/> + <a href='https://calamares.io/'>Calamares</a> + development is sponsored by <br/> + <a href='http://www.blue-systems.com/'>Blue Systems</a> - + Liberating Software. + <h1>%1</h1><br/> + <strong>%2<br/> + cho %3</strong><br/><br/> + Bản quyền 2014-2017 bởi Teo Mrnjavac &lt;teo@kde.org&gt;<br/> + Bản quyền 2017-2020 bởi Adriaan de Groot &lt;groot@kde.org&gt;<br/> + Cám ơn <a href='https://calamares.io/team/'>đội ngũ Calamares</a> + và <a href='https://www.transifex.com/calamares/calamares/'>các dịch giả Calamares</a>.<br/><br/> + <a href='https://calamares.io/'>Calamares</a> + được tài trợ bởi <br/> + <a href='http://www.blue-systems.com/'>Blue Systems</a> - + Liberating Software. + + + + Back + Quay lại + + + + i18n + + + <h1>Languages</h1> </br> + The system locale setting affects the language and character set for some command line user interface elements. The current setting is <strong>%1</strong>. + <h1>Ngôn ngữ</h1> </br> + Cài đặt ngôn ngữ hệ thống ảnh hưởng đến ngôn ngữ và bộ ký tự cho một số thành phần giao diện người dùng dòng lệnh. Cài đặt hiện tại là <strong>%1</strong>. + + + + <h1>Locales</h1> </br> + The system locale setting affects the numbers and dates format. The current setting is <strong>%1</strong>. + <h1>Địa phương</h1> </br> + Cài đặt ngôn ngữ hệ thống ảnh hưởng đến số và định dạng ngày tháng. Cài đặt hiện tại là <strong>%1</strong>. + + + + Back + Trở lại + + + + keyboardq + + + Keyboard Model + Mẫu bàn phím + + + + Layouts + Bố cục + + + + Keyboard Layout + Bố cục bàn phím + + + + Click your preferred keyboard model to select layout and variant, or use the default one based on the detected hardware. + Nhấp vào kiểu bàn phím ưa thích của bạn để chọn bố cục và biến thể hoặc sử dụng kiểu mặc định dựa trên phần cứng được phát hiện. + + + + Models + Mẫu + + + + Variants + Các biến thể + + + + Keyboard Variant + Các biến thể bàn phím + + + + Test your keyboard + Thử bàn phím + + + + localeq + + + Change + Đổi + + + + notesqml + + + <h3>%1</h3> + <p>These are example release notes.</p> + <h3>%1</h3> + <p>Đây là ghi chú phát hành mẫu.</p> + + + + release_notes + + + <h3>%1</h3> + <p>This an example QML file, showing options in RichText with Flickable content.</p> + + <p>QML with RichText can use HTML tags, Flickable content is useful for touchscreens.</p> + + <p><b>This is bold text</b></p> + <p><i>This is italic text</i></p> + <p><u>This is underlined text</u></p> + <p><center>This text will be center-aligned.</center></p> + <p><s>This is strikethrough</s></p> + + <p>Code example: + <code>ls -l /home</code></p> + + <p><b>Lists:</b></p> + <ul> + <li>Intel CPU systems</li> + <li>AMD CPU systems</li> + </ul> + + <p>The vertical scrollbar is adjustable, current width set to 10.</p> + <h3>%1</h3> + <p>Đây là một tệp QML mẫu, hiển thị các tùy chọn trong RichText với nội dung Flickable..</p> + + <p>QML với RichText có thể sử dụng thẻ HTML, nội dung Flickable hữu ích cho màn hình cảm ứng.</p> + + <p><b>Đây là văn bản in đậm</b></p> + <p><i>Đây là văn bản in nghiêng</i></p> + <p><u>Đây là văn bản được gạch chân</u></p> + <p><center>Văn bản này sẽ được căn giữa.</center></p> + <p><s>Đây là đường gạch ngang</s></p> + + <p>Ví dụ về mã: + <code>ls -l /home</code></p> + + <p><b>Danh sách:</b></p> + <ul> + <li>Hệ thống Intel CPU</li> + <li>Hệ thống AMD CPU</li> + </ul> + + <p>Thanh cuộn dọc có thể điều chỉnh được, chiều rộng hiện tại được đặt thành 10.</p> + + + + Back + Quay lại + + + + usersq + + + Pick your user name and credentials to login and perform admin tasks + Chọn tên bạn và chứng chỉ để đăng nhập và thực hiện các tác vụ quản trị + + + + What is your name? + Hãy cho Vigo biết tên đầy đủ của bạn? + + + + Your Full Name + Tên đầy đủ + + + + What name do you want to use to log in? + Bạn muốn dùng tên nào để đăng nhập máy tính? + + + + Login Name + Tên đăng nhập + + + + If more than one person will use this computer, you can create multiple accounts after installation. + Tạo nhiều tài khoản sau khi cài đặt nếu có nhiều người dùng chung. + + + + What is the name of this computer? + Tên của máy tính này là? + + + + Computer Name + Tên máy tính + + + + This name will be used if you make the computer visible to others on a network. + Tên này sẽ hiển thị khi bạn kết nối vào một mạng. + + + + Choose a password to keep your account safe. + Chọn mật khẩu để giữ máy tính an toàn. + + + + Password + Mật khẩu + + + + Repeat Password + Lặp lại mật khẩu + + + + Enter the same password twice, so that it can be checked for typing errors. A good password will contain a mixture of letters, numbers and punctuation, should be at least eight characters long, and should be changed at regular intervals. + Nhập lại mật khẩu hai lần để kiểm tra. Một mật khẩu tốt phải có ít nhất 8 ký tự và bao gồm chữ, số, ký hiệu đặc biệt. Nên được thay đổi thường xuyên. + + + + Validate passwords quality + Xác thực chất lượng mật khẩu + + + + When this box is checked, password-strength checking is done and you will not be able to use a weak password. + Khi tích chọn, bạn có thể chọn mật khẩu yếu. + + + + Log in automatically without asking for the password + Tự động đăng nhập không hỏi mật khẩu + + + + Reuse user password as root password + Dùng lại mật khẩu người dùng như mật khẩu quản trị + + + + Use the same password for the administrator account. + Dùng cùng một mật khẩu cho tài khoản quản trị. + + + + Choose a root password to keep your account safe. + Chọn mật khẩu quản trị để giữ máy tính an toàn. + + + + Root Password + Mật khẩu quản trị + + + + Repeat Root Password + Lặp lại mật khẩu quản trị + + + + Enter the same password twice, so that it can be checked for typing errors. + Nhập lại mật khẩu hai lần để kiểm tra. + + + + welcomeq + + + <h3>Welcome to the %1 <quote>%2</quote> installer</h3> + <p>This program will ask you some questions and set up %1 on your computer.</p> + <h3>Chào mừng đến với bộ cài đặt %1 <quote>%2</quote></h3> + <p>Chương trình sẽ hỏi bản vài câu hỏi và thiết lập %1 trên máy tính của bạn.</p> + + + + About + Giới thiệu + + + + Support + Hỗ trợ + + + + Known issues + Các vấn đề đã biết + + + + Release notes + Ghi chú phát hành + + + + Donate + Ủng hộ + + + diff --git a/lang/calamares_zh_TW.ts b/lang/calamares_zh_TW.ts index fe5918943..85a49ee98 100644 --- a/lang/calamares_zh_TW.ts +++ b/lang/calamares_zh_TW.ts @@ -617,17 +617,17 @@ The installer will quit and all changes will be lost. This storage device already has an operating system on it, but the partition table <strong>%1</strong> is different from the needed <strong>%2</strong>.<br/> - + 此儲存裝置上已有作業系統,但分割表 <strong>%1</strong> 與需要的 <strong>%2</strong> 不同。<br/> This storage device has one of its partitions <strong>mounted</strong>. - + 此裝置<strong>已掛載</strong>其中一個分割區。 This storage device is a part of an <strong>inactive RAID</strong> device. - + 此儲存裝置是<strong>非作用中 RAID</strong> 裝置的一部份。 From 3e57979e735a295a2464ee9ab6fde8b5c2441ed0 Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Thu, 29 Oct 2020 14:28:48 +0100 Subject: [PATCH 76/78] i18n: [desktop] Automatic merge of Transifex translations --- calamares.desktop | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/calamares.desktop b/calamares.desktop index b6cafe612..834c4a518 100644 --- a/calamares.desktop +++ b/calamares.desktop @@ -201,6 +201,10 @@ Name[uk]=Встановити Систему Icon[uk]=calamares GenericName[uk]=Встановлювач системи Comment[uk]=Calamares - Встановлювач системи +Name[vi]=Cài đặt hệ thống +Icon[vi]=calamares +GenericName[vi]=Bộ cài đặt hệ thống +Comment[vi]=Calamares — Bộ cài đặt hệ thống Name[zh_CN]=安装系统 Icon[zh_CN]=calamares GenericName[zh_CN]=系统安装程序 From f82285644165f342cbf6557d15907cc82dc097d1 Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Thu, 29 Oct 2020 14:28:48 +0100 Subject: [PATCH 77/78] i18n: [python] Automatic merge of Transifex translations --- lang/python/be/LC_MESSAGES/python.po | 6 +- lang/python/bg/LC_MESSAGES/python.po | 4 +- lang/python/ca/LC_MESSAGES/python.po | 2 + lang/python/da/LC_MESSAGES/python.po | 2 + lang/python/fi_FI/LC_MESSAGES/python.po | 2 + lang/python/fur/LC_MESSAGES/python.po | 4 +- lang/python/hi/LC_MESSAGES/python.po | 2 + lang/python/sv/LC_MESSAGES/python.po | 2 + lang/python/tg/LC_MESSAGES/python.po | 2 + lang/python/vi/LC_MESSAGES/python.po | 363 ++++++++++++++++++++++++ lang/python/zh_TW/LC_MESSAGES/python.po | 2 +- 11 files changed, 384 insertions(+), 7 deletions(-) create mode 100644 lang/python/vi/LC_MESSAGES/python.po diff --git a/lang/python/be/LC_MESSAGES/python.po b/lang/python/be/LC_MESSAGES/python.po index c31beab74..b9154868b 100644 --- a/lang/python/be/LC_MESSAGES/python.po +++ b/lang/python/be/LC_MESSAGES/python.po @@ -201,6 +201,8 @@ msgid "" "The displaymanagers list is empty or undefined in both globalstorage and " "displaymanager.conf." msgstr "" +"Спіс дысплейных кіраўнікоў пусты альбо не вызначаны ў both globalstorage і " +"displaymanager.conf." #: src/modules/displaymanager/main.py:977 msgid "Display manager configuration was incomplete" @@ -314,11 +316,11 @@ msgstr "Наладка апаратнага гадзінніка." #: src/modules/mkinitfs/main.py:27 msgid "Creating initramfs with mkinitfs." -msgstr "" +msgstr "Стварэнне initramfs праз mkinitfs." #: src/modules/mkinitfs/main.py:49 msgid "Failed to run mkinitfs on the target" -msgstr "" +msgstr "Не атрымалася запусціць mkinitfs у пункце прызначэння" #: src/modules/mkinitfs/main.py:50 src/modules/dracut/main.py:50 msgid "The exit code was {}" diff --git a/lang/python/bg/LC_MESSAGES/python.po b/lang/python/bg/LC_MESSAGES/python.po index 372847af8..ca58592ad 100644 --- a/lang/python/bg/LC_MESSAGES/python.po +++ b/lang/python/bg/LC_MESSAGES/python.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# Georgi Georgiev, 2020 +# Жоро, 2020 # #, fuzzy msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-16 22:35+0200\n" "PO-Revision-Date: 2017-08-09 10:34+0000\n" -"Last-Translator: Georgi Georgiev, 2020\n" +"Last-Translator: Жоро, 2020\n" "Language-Team: Bulgarian (https://www.transifex.com/calamares/teams/20061/bg/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/lang/python/ca/LC_MESSAGES/python.po b/lang/python/ca/LC_MESSAGES/python.po index 3d057cae1..1dc1d6d14 100644 --- a/lang/python/ca/LC_MESSAGES/python.po +++ b/lang/python/ca/LC_MESSAGES/python.po @@ -204,6 +204,8 @@ msgid "" "The displaymanagers list is empty or undefined in both globalstorage and " "displaymanager.conf." msgstr "" +"La llista de gestors de pantalla és buida o no definida ni a globalstorage " +"ni a displaymanager.conf." #: src/modules/displaymanager/main.py:977 msgid "Display manager configuration was incomplete" diff --git a/lang/python/da/LC_MESSAGES/python.po b/lang/python/da/LC_MESSAGES/python.po index e2603ca82..6a103acbe 100644 --- a/lang/python/da/LC_MESSAGES/python.po +++ b/lang/python/da/LC_MESSAGES/python.po @@ -204,6 +204,8 @@ msgid "" "The displaymanagers list is empty or undefined in both globalstorage and " "displaymanager.conf." msgstr "" +"Displayhåndteringerlisten er tom eller udefineret i både globalstorage og " +"displaymanager.conf." #: src/modules/displaymanager/main.py:977 msgid "Display manager configuration was incomplete" diff --git a/lang/python/fi_FI/LC_MESSAGES/python.po b/lang/python/fi_FI/LC_MESSAGES/python.po index cb15f9ae9..e4e63e57d 100644 --- a/lang/python/fi_FI/LC_MESSAGES/python.po +++ b/lang/python/fi_FI/LC_MESSAGES/python.po @@ -201,6 +201,8 @@ msgid "" "The displaymanagers list is empty or undefined in both globalstorage and " "displaymanager.conf." msgstr "" +"Luettelo on tyhjä tai määrittelemätön, sekä globalstorage, että " +"displaymanager.conf tiedostossa." #: src/modules/displaymanager/main.py:977 msgid "Display manager configuration was incomplete" diff --git a/lang/python/fur/LC_MESSAGES/python.po b/lang/python/fur/LC_MESSAGES/python.po index 3168c2f35..90800f4a2 100644 --- a/lang/python/fur/LC_MESSAGES/python.po +++ b/lang/python/fur/LC_MESSAGES/python.po @@ -23,11 +23,11 @@ msgstr "" #: src/modules/grubcfg/main.py:28 msgid "Configure GRUB." -msgstr "" +msgstr "Configure GRUB." #: src/modules/mount/main.py:29 msgid "Mounting partitions." -msgstr "" +msgstr "Montaç des partizions." #: src/modules/mount/main.py:141 src/modules/initcpiocfg/main.py:196 #: src/modules/initcpiocfg/main.py:200 diff --git a/lang/python/hi/LC_MESSAGES/python.po b/lang/python/hi/LC_MESSAGES/python.po index 2b0ab266a..d577d9fd8 100644 --- a/lang/python/hi/LC_MESSAGES/python.po +++ b/lang/python/hi/LC_MESSAGES/python.po @@ -200,6 +200,8 @@ msgid "" "The displaymanagers list is empty or undefined in both globalstorage and " "displaymanager.conf." msgstr "" +"globalstorage व displaymanager.conf में डिस्प्ले प्रबंधक सूची रिक्त या " +"अपरिभाषित है।" #: src/modules/displaymanager/main.py:977 msgid "Display manager configuration was incomplete" diff --git a/lang/python/sv/LC_MESSAGES/python.po b/lang/python/sv/LC_MESSAGES/python.po index 0b8665e7a..d1c87de4c 100644 --- a/lang/python/sv/LC_MESSAGES/python.po +++ b/lang/python/sv/LC_MESSAGES/python.po @@ -205,6 +205,8 @@ msgid "" "The displaymanagers list is empty or undefined in both globalstorage and " "displaymanager.conf." msgstr "" +"Skärmhanterar listan är tom eller odefinierad i både globalstorage och " +"displaymanager.conf." #: src/modules/displaymanager/main.py:977 msgid "Display manager configuration was incomplete" diff --git a/lang/python/tg/LC_MESSAGES/python.po b/lang/python/tg/LC_MESSAGES/python.po index d99c9e711..d9886a107 100644 --- a/lang/python/tg/LC_MESSAGES/python.po +++ b/lang/python/tg/LC_MESSAGES/python.po @@ -205,6 +205,8 @@ msgid "" "The displaymanagers list is empty or undefined in both globalstorage and " "displaymanager.conf." msgstr "" +"Рӯйхати displaymanagers ҳам дар globalstorage ва ҳам дар displaymanager.conf" +" холӣ ё номаълум аст." #: src/modules/displaymanager/main.py:977 msgid "Display manager configuration was incomplete" diff --git a/lang/python/vi/LC_MESSAGES/python.po b/lang/python/vi/LC_MESSAGES/python.po new file mode 100644 index 000000000..bb9b67a96 --- /dev/null +++ b/lang/python/vi/LC_MESSAGES/python.po @@ -0,0 +1,363 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# T. Tran , 2020 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-10-16 22:35+0200\n" +"PO-Revision-Date: 2017-08-09 10:34+0000\n" +"Last-Translator: T. Tran , 2020\n" +"Language-Team: Vietnamese (https://www.transifex.com/calamares/teams/20061/vi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: vi\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: src/modules/grubcfg/main.py:28 +msgid "Configure GRUB." +msgstr "Cấu hình GRUB" + +#: src/modules/mount/main.py:29 +msgid "Mounting partitions." +msgstr "Đang gắn kết các phân vùng." + +#: src/modules/mount/main.py:141 src/modules/initcpiocfg/main.py:196 +#: src/modules/initcpiocfg/main.py:200 +#: src/modules/luksopenswaphookcfg/main.py:86 +#: src/modules/luksopenswaphookcfg/main.py:90 src/modules/rawfs/main.py:164 +#: src/modules/initramfscfg/main.py:85 src/modules/initramfscfg/main.py:89 +#: src/modules/openrcdmcryptcfg/main.py:69 +#: src/modules/openrcdmcryptcfg/main.py:73 src/modules/fstab/main.py:361 +#: src/modules/fstab/main.py:367 src/modules/localecfg/main.py:135 +#: src/modules/networkcfg/main.py:39 +msgid "Configuration Error" +msgstr "Lỗi cấu hình" + +#: src/modules/mount/main.py:142 src/modules/initcpiocfg/main.py:197 +#: src/modules/luksopenswaphookcfg/main.py:87 src/modules/rawfs/main.py:165 +#: src/modules/initramfscfg/main.py:86 src/modules/openrcdmcryptcfg/main.py:70 +#: src/modules/fstab/main.py:362 +msgid "No partitions are defined for
{!s}
to use." +msgstr "Không có phân vùng nào được định nghĩa cho
{!s}
để dùng." + +#: src/modules/services-systemd/main.py:26 +msgid "Configure systemd services" +msgstr "Cấu hình các dịch vụ systemd" + +#: src/modules/services-systemd/main.py:59 +#: src/modules/services-openrc/main.py:93 +msgid "Cannot modify service" +msgstr "Không thể sửa đổi dịch vụ" + +#: src/modules/services-systemd/main.py:60 +msgid "" +"systemctl {arg!s} call in chroot returned error code {num!s}." +msgstr "" +"systemctl {arg!s} trong môi trường chroot trả về lỗi {num!s}." + +#: src/modules/services-systemd/main.py:63 +#: src/modules/services-systemd/main.py:67 +msgid "Cannot enable systemd service {name!s}." +msgstr "Không thể bật dịch vụ systemd {name!s}." + +#: src/modules/services-systemd/main.py:65 +msgid "Cannot enable systemd target {name!s}." +msgstr "Không thể bật nhóm dịch vụ systemd {name!s}." + +#: src/modules/services-systemd/main.py:69 +msgid "Cannot disable systemd target {name!s}." +msgstr "Không thể tắt nhóm dịch vụ systemd {name!s}." + +#: src/modules/services-systemd/main.py:71 +msgid "Cannot mask systemd unit {name!s}." +msgstr "Không thể đánh dấu đơn vị systemd {name!s}." + +#: src/modules/services-systemd/main.py:73 +msgid "" +"Unknown systemd commands {command!s} and " +"{suffix!s} for unit {name!s}." +msgstr "" +"Không nhận ra lệnh systemd {command!s} và " +"{suffix!s} cho đơn vị {name!s}." + +#: src/modules/umount/main.py:31 +msgid "Unmount file systems." +msgstr "Gỡ kết nối các hệ thống tập tin." + +#: src/modules/unpackfs/main.py:35 +msgid "Filling up filesystems." +msgstr "Đang làm đầy các hệ thống tập tin." + +#: src/modules/unpackfs/main.py:254 +msgid "rsync failed with error code {}." +msgstr "rsync thất bại với lỗi {}." + +#: src/modules/unpackfs/main.py:299 +msgid "Unpacking image {}/{}, file {}/{}" +msgstr "Đang bung hình ảnh {}/{}, tập tin {}/{}" + +#: src/modules/unpackfs/main.py:314 +msgid "Starting to unpack {}" +msgstr "Bắt đầu bung nội dung {}" + +#: src/modules/unpackfs/main.py:323 src/modules/unpackfs/main.py:463 +msgid "Failed to unpack image \"{}\"" +msgstr "Bung hình ảnh thất bại \"{}\"" + +#: src/modules/unpackfs/main.py:430 +msgid "No mount point for root partition" +msgstr "Không có điểm kết nối cho phân vùng gốc" + +#: src/modules/unpackfs/main.py:431 +msgid "globalstorage does not contain a \"rootMountPoint\" key, doing nothing" +msgstr "globalstorage không có khoá \"rootMountPoint\", sẽ không làm gì cả" + +#: src/modules/unpackfs/main.py:436 +msgid "Bad mount point for root partition" +msgstr "Sai điểm kết nối cho phân vùng gốc" + +#: src/modules/unpackfs/main.py:437 +msgid "rootMountPoint is \"{}\", which does not exist, doing nothing" +msgstr "rootMountPoint không tồn tại, có giá trị là \"{}\", sẽ không làm gì cả" + +#: src/modules/unpackfs/main.py:453 src/modules/unpackfs/main.py:457 +#: src/modules/unpackfs/main.py:477 +msgid "Bad unsquash configuration" +msgstr "Sai cấu hình bung nén" + +#: src/modules/unpackfs/main.py:454 +msgid "The filesystem for \"{}\" ({}) is not supported by your current kernel" +msgstr "Hệ thống tập tin cho \"{}\" ({}) không được hỗ trợ bởi nhân hiện tại" + +#: src/modules/unpackfs/main.py:458 +msgid "The source filesystem \"{}\" does not exist" +msgstr "Hệ thống tập tin nguồn \"{}\" không tồn tại" + +#: src/modules/unpackfs/main.py:464 +msgid "" +"Failed to find unsquashfs, make sure you have the squashfs-tools package " +"installed" +msgstr "Không tìm thấy lệnh unsquashfs, vui lòng cài đặt gói squashfs-tools" + +#: src/modules/unpackfs/main.py:478 +msgid "The destination \"{}\" in the target system is not a directory" +msgstr "Hệ thống đích \"{}\" không phải là một thư mục" + +#: src/modules/displaymanager/main.py:514 +msgid "Cannot write KDM configuration file" +msgstr "Không thể ghi vào tập tin cấu hình KDM" + +#: src/modules/displaymanager/main.py:515 +msgid "KDM config file {!s} does not exist" +msgstr "Tập tin cấu hình KDM {!s} không tồn tại" + +#: src/modules/displaymanager/main.py:576 +msgid "Cannot write LXDM configuration file" +msgstr "Không thể ghi vào tập tin cấu hình LXDM" + +#: src/modules/displaymanager/main.py:577 +msgid "LXDM config file {!s} does not exist" +msgstr "Tập tin cấu hình LXDM {!s} không tồn tại" + +#: src/modules/displaymanager/main.py:660 +msgid "Cannot write LightDM configuration file" +msgstr "Không thể ghi vào tập tin cấu hình LightDM" + +#: src/modules/displaymanager/main.py:661 +msgid "LightDM config file {!s} does not exist" +msgstr "Tập tin cấu hình LightDM {!s} không tồn tại" + +#: src/modules/displaymanager/main.py:735 +msgid "Cannot configure LightDM" +msgstr "Không thể cấu hình LXDM" + +#: src/modules/displaymanager/main.py:736 +msgid "No LightDM greeter installed." +msgstr "Màn hình chào mừng LightDM không được cài đặt." + +#: src/modules/displaymanager/main.py:767 +msgid "Cannot write SLIM configuration file" +msgstr "Không thể ghi vào tập tin cấu hình SLIM" + +#: src/modules/displaymanager/main.py:768 +msgid "SLIM config file {!s} does not exist" +msgstr "Tập tin cấu hình SLIM {!s} không tồn tại" + +#: src/modules/displaymanager/main.py:894 +msgid "No display managers selected for the displaymanager module." +msgstr "" +"Không có trình quản lý hiển thị nào được chọn cho mô-đun quản lý hiển thị" + +#: src/modules/displaymanager/main.py:895 +msgid "" +"The displaymanagers list is empty or undefined in both globalstorage and " +"displaymanager.conf." +msgstr "" +"Danh sách quản lý hiện thị trống hoặc không được định nghĩa cả trong " +"globalstorage và displaymanager.conf." + +#: src/modules/displaymanager/main.py:977 +msgid "Display manager configuration was incomplete" +msgstr "Cầu hình quản lý hiện thị không hoàn tất" + +#: src/modules/initcpiocfg/main.py:28 +msgid "Configuring mkinitcpio." +msgstr "Đang cấu hình mkinitcpio." + +#: src/modules/initcpiocfg/main.py:201 +#: src/modules/luksopenswaphookcfg/main.py:91 +#: src/modules/initramfscfg/main.py:90 src/modules/openrcdmcryptcfg/main.py:74 +#: src/modules/fstab/main.py:368 src/modules/localecfg/main.py:136 +#: src/modules/networkcfg/main.py:40 +msgid "No root mount point is given for
{!s}
to use." +msgstr "Không có điểm kết nối gốc cho
{!s}
để dùng." + +#: src/modules/luksopenswaphookcfg/main.py:26 +msgid "Configuring encrypted swap." +msgstr "Đang cấu hình hoán đổi mã hoá" + +#: src/modules/rawfs/main.py:26 +msgid "Installing data." +msgstr "Đang cài đặt dữ liệu." + +#: src/modules/services-openrc/main.py:29 +msgid "Configure OpenRC services" +msgstr "Cấu hình dịch vụ OpenRC" + +#: src/modules/services-openrc/main.py:57 +msgid "Cannot add service {name!s} to run-level {level!s}." +msgstr "Không thể thêm dịch vụ {name!s} vào run-level {level!s}." + +#: src/modules/services-openrc/main.py:59 +msgid "Cannot remove service {name!s} from run-level {level!s}." +msgstr "Không thể loại bỏ dịch vụ {name!s} từ run-level {level!s}." + +#: src/modules/services-openrc/main.py:61 +msgid "" +"Unknown service-action {arg!s} for service {name!s} in run-" +"level {level!s}." +msgstr "" +"Không nhận ra thao tác {arg!s} cho dịch vụ {name!s} ở run-level" +" {level!s}." + +#: src/modules/services-openrc/main.py:94 +msgid "" +"rc-update {arg!s} call in chroot returned error code {num!s}." +msgstr "" +"Lệnh rc-update {arg!s} trong môi trường chroot trả về lỗi " +"{num!s}." + +#: src/modules/services-openrc/main.py:101 +msgid "Target runlevel does not exist" +msgstr "Nhóm dịch vụ khởi động không tồn tại" + +#: src/modules/services-openrc/main.py:102 +msgid "" +"The path for runlevel {level!s} is {path!s}, which does not " +"exist." +msgstr "" +"Đường dẫn cho runlevel {level!s} là {path!s}, nhưng không tồn " +"tại." + +#: src/modules/services-openrc/main.py:110 +msgid "Target service does not exist" +msgstr "Nhóm dịch vụ không tồn tại" + +#: src/modules/services-openrc/main.py:111 +msgid "" +"The path for service {name!s} is {path!s}, which does not " +"exist." +msgstr "" +"Đường dẫn cho dịch vụ {name!s} là {path!s}, nhưng không tồn " +"tại." + +#: src/modules/plymouthcfg/main.py:27 +msgid "Configure Plymouth theme" +msgstr "Cấu hình giao diện Plymouth" + +#: src/modules/packages/main.py:50 src/modules/packages/main.py:59 +#: src/modules/packages/main.py:69 +msgid "Install packages." +msgstr "Đang cài đặt các gói ứng dụng." + +#: src/modules/packages/main.py:57 +#, python-format +msgid "Processing packages (%(count)d / %(total)d)" +msgstr "Đang xử lý gói (%(count)d / %(total)d)" + +#: src/modules/packages/main.py:62 +#, python-format +msgid "Installing one package." +msgid_plural "Installing %(num)d packages." +msgstr[0] "Đang cài đặt %(num)d gói ứng dụng." + +#: src/modules/packages/main.py:65 +#, python-format +msgid "Removing one package." +msgid_plural "Removing %(num)d packages." +msgstr[0] "Đang gỡ bỏ %(num)d gói ứng dụng." + +#: src/modules/bootloader/main.py:42 +msgid "Install bootloader." +msgstr "Đang cài đặt bộ khởi động." + +#: src/modules/hwclock/main.py:26 +msgid "Setting hardware clock." +msgstr "Đang thiết lập đồng hồ máy tính." + +#: src/modules/mkinitfs/main.py:27 +msgid "Creating initramfs with mkinitfs." +msgstr "Đang tạo initramfs bằng mkinitfs." + +#: src/modules/mkinitfs/main.py:49 +msgid "Failed to run mkinitfs on the target" +msgstr "Chạy mkinitfs thất bại ở hệ thống đích" + +#: src/modules/mkinitfs/main.py:50 src/modules/dracut/main.py:50 +msgid "The exit code was {}" +msgstr "Mã lỗi trả về là {}" + +#: src/modules/dracut/main.py:27 +msgid "Creating initramfs with dracut." +msgstr "Đang tạo initramfs bằng dracut." + +#: src/modules/dracut/main.py:49 +msgid "Failed to run dracut on the target" +msgstr "Chạy dracut thất bại ở hệ thống đích" + +#: src/modules/initramfscfg/main.py:32 +msgid "Configuring initramfs." +msgstr "Đang cấu hình initramfs." + +#: src/modules/openrcdmcryptcfg/main.py:25 +msgid "Configuring OpenRC dmcrypt service." +msgstr "Đang cấu hình dịch vụ OpenRC dmcrypt." + +#: src/modules/fstab/main.py:29 +msgid "Writing fstab." +msgstr "Đang viết vào fstab." + +#: src/modules/dummypython/main.py:35 +msgid "Dummy python job." +msgstr "Ví dụ công việc python." + +#: src/modules/dummypython/main.py:37 src/modules/dummypython/main.py:93 +#: src/modules/dummypython/main.py:94 +msgid "Dummy python step {}" +msgstr "Ví dụ python bước {}" + +#: src/modules/localecfg/main.py:30 +msgid "Configuring locales." +msgstr "Đang cấu hình ngôn ngữ." + +#: src/modules/networkcfg/main.py:28 +msgid "Saving network configuration." +msgstr "Đang lưu cấu hình mạng." diff --git a/lang/python/zh_TW/LC_MESSAGES/python.po b/lang/python/zh_TW/LC_MESSAGES/python.po index 92457638c..4196c3d0b 100644 --- a/lang/python/zh_TW/LC_MESSAGES/python.po +++ b/lang/python/zh_TW/LC_MESSAGES/python.po @@ -199,7 +199,7 @@ msgstr "未在顯示管理器模組中選取顯示管理器。" msgid "" "The displaymanagers list is empty or undefined in both globalstorage and " "displaymanager.conf." -msgstr "" +msgstr "顯示管理器清單為空或在 globalstorage 與 displaymanager.conf 中皆未定義。" #: src/modules/displaymanager/main.py:977 msgid "Display manager configuration was incomplete" From c36aa43f86118f2fd8c7c1304c27a3c7b6ce5605 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 29 Oct 2020 15:57:53 +0100 Subject: [PATCH 78/78] CI: use a larger tmpfs for the build (my local build/ is 112M) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1df81a6bf..7a1ba094d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,5 +19,5 @@ install: - docker build -t calamares . script: - - docker run -v $PWD:/src --tmpfs /build:rw,size=81920k -e SRCDIR=/src -e BUILDDIR=/build calamares "/src/ci/travis.sh" + - docker run -v $PWD:/src --tmpfs /build:rw,size=112M -e SRCDIR=/src -e BUILDDIR=/build calamares "/src/ci/travis.sh"