From 094110dccf230314359a7d4ad8ff4390a603de8f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Apr 2019 09:52:43 -0400 Subject: [PATCH 01/57] CI: make the release script more flexible --- ci/RELEASE.sh | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/ci/RELEASE.sh b/ci/RELEASE.sh index 142d6b0c0..a835ebcb3 100644 --- a/ci/RELEASE.sh +++ b/ci/RELEASE.sh @@ -15,30 +15,52 @@ # - pulling translations # - updating the language list # - switching to the right branch +# +# You can influence the script a little with environment variables: +# - BUILD_DEFAULT set to false to avoid first build with gcc +# - BUILD_CLANG set to false to avoid second build with clang +# - BUILD_ONLY set to true to break after building test -d .git || { echo "Not at top-level." ; exit 1 ; } test -d src/modules || { echo "No src/modules." ; exit 1 ; } which cmake > /dev/null 2>&1 || { echo "No cmake(1) available." ; exit 1 ; } -### Build with default compiler +test -z "$BUILD_DEFAULT" && BUILD_DEFAULT=true +test -z "$BUILD_CLANG" && BUILD_CLANG=true +test -z "$BUILD_ONLY" && BUILD_ONLY=false + +### Setup # # BUILDDIR=$(mktemp -d --suffix=-build --tmpdir=.) -rm -rf "$BUILDDIR" -mkdir "$BUILDDIR" || { echo "Could not create build directory." ; exit 1 ; } -( cd "$BUILDDIR" && cmake .. && make -j4 ) || { echo "Could not perform test-build." ; exit 1 ; } -( cd "$BUILDDIR" && make test ) || { echo "Tests failed." ; exit 1 ; } + +### Build with default compiler +# +# +if test "x$BUILD_DEFAULT" = "xtrue" ; then + rm -rf "$BUILDDIR" + mkdir "$BUILDDIR" || { echo "Could not create build directory." ; exit 1 ; } + ( cd "$BUILDDIR" && cmake .. && make -j4 ) || { echo "Could not perform test-build." ; exit 1 ; } + ( cd "$BUILDDIR" && make test ) || { echo "Tests failed." ; exit 1 ; } +fi ### Build with clang # # -if which clang++ > /dev/null 2>&1 ; then - # Do build again with clang - rm -rf "$BUILDDIR" - mkdir "$BUILDDIR" || { echo "Could not create build directory." ; exit 1 ; } - ( cd "$BUILDDIR" && CC=clang CXX=clang++ cmake .. && make -j4 ) || { echo "Could not perform test-build." ; exit 1 ; } - ( cd "$BUILDDIR" && make test ) || { echo "Tests failed." ; exit 1 ; } +if test "x$BUILD_CLANG" = "xtrue" ; then + if which clang++ > /dev/null 2>&1 ; then + # Do build again with clang + rm -rf "$BUILDDIR" + mkdir "$BUILDDIR" || { echo "Could not create build directory." ; exit 1 ; } + ( cd "$BUILDDIR" && CC=clang CXX=clang++ cmake .. && make -j4 ) || { echo "Could not perform test-build." ; exit 1 ; } + ( cd "$BUILDDIR" && make test ) || { echo "Tests failed." ; exit 1 ; } + fi +fi + +if test "x$BUILD_ONLY" = "xtrue" ; then + echo "Builds completed, release stopped." + exit 1 fi ### Get version number for this release From 009dfd7de58b0a857e4e1e5648bada2992616fcb Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Apr 2019 10:03:12 -0400 Subject: [PATCH 02/57] [locale] Reduce warnings (shadowed global) --- src/modules/locale/timezonewidget/localeglobal.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/locale/timezonewidget/localeglobal.cpp b/src/modules/locale/timezonewidget/localeglobal.cpp index 6ac66357e..6303ffdcb 100644 --- a/src/modules/locale/timezonewidget/localeglobal.cpp +++ b/src/modules/locale/timezonewidget/localeglobal.cpp @@ -148,18 +148,18 @@ LocaleGlobal::initLocations() { continue; Location location; - QStringList timezone = list.at(2).split('/', QString::SkipEmptyParts); + QStringList timezoneParts = list.at(2).split('/', QString::SkipEmptyParts); int cooSplitPos = QString(list.at(1)).remove(0, 1).indexOf(QRegExp("[-+]")) + 1; - if (timezone.size() < 2) + if (timezoneParts.size() < 2) continue; QString countryCode = list.at(0).trimmed(); if (countryCode.size() != 2) continue; - location.region = timezone.takeFirst(); - location.zone = timezone.join( '/' ); + location.region = timezoneParts.takeFirst(); + location.zone = timezoneParts.join( '/' ); location.latitude = getRightGeoLocation(list.at(1).mid(0, cooSplitPos)); location.longitude = getRightGeoLocation(list.at(1).mid(cooSplitPos)); location.country = countryCode; From 75f1a05fecced44ee8f84f360ea66f243c1676a6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Apr 2019 10:05:29 -0400 Subject: [PATCH 03/57] [partition] No copy-constructor for CDebug --- 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 f4d04ce62..584b90797 100644 --- a/src/modules/partition/core/PartUtils.cpp +++ b/src/modules/partition/core/PartUtils.cpp @@ -163,7 +163,7 @@ canBeResized( Partition* candidate ) } else if ( ok ) { - auto deb = cDebug(); + Logger::CDebug deb; deb << Logger::SubEntry << "NO, insufficient storage"; deb << Logger::Continuation << "Required storage B:" << advisedStorageB << QString( "(%1GB)" ).arg( advisedStorageGB ); From 1a4a2652629c5aeae42c440bbc6130ae76ae9ce9 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Apr 2019 10:06:03 -0400 Subject: [PATCH 04/57] [partition] Refactor check for ISO9660 --- src/modules/partition/core/DeviceList.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/modules/partition/core/DeviceList.cpp b/src/modules/partition/core/DeviceList.cpp index e9cc34138..2beaa34dc 100644 --- a/src/modules/partition/core/DeviceList.cpp +++ b/src/modules/partition/core/DeviceList.cpp @@ -54,17 +54,22 @@ hasRootPartition( Device* device ) } static bool -isIso9660( const Device* device ) +blkIdCheckIso9660( const QString& path ) { - QString path = device->deviceNode(); - if ( path.isEmpty() ) - return false; - QProcess blkid; blkid.start( "blkid", { path } ); blkid.waitForFinished(); QString output = QString::fromLocal8Bit( blkid.readAllStandardOutput() ); - if ( output.contains( "iso9660" ) ) + return output.contains( "iso9660" ); +} + +static bool +isIso9660( const Device* device ) +{ + const QString path = device->deviceNode(); + if ( path.isEmpty() ) + return false; + if ( blkIdCheckIso9660( path ) ) return true; if ( device->partitionTable() && @@ -72,11 +77,7 @@ isIso9660( const Device* device ) { for ( const Partition* partition : device->partitionTable()->children() ) { - path = partition->partitionPath(); - blkid.start( "blkid", { path } ); - blkid.waitForFinished(); - QString output = QString::fromLocal8Bit( blkid.readAllStandardOutput() ); - if ( output.contains( "iso9660" ) ) + if ( blkIdCheckIso9660( partition->partitionPath() ) ) return true; } } From d2404851cd23c6f3e2363b45530d6b593f17f044 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Apr 2019 10:06:21 -0400 Subject: [PATCH 05/57] [partition] Reduce warnings (shadow, ;, types) --- src/modules/partition/core/PartitionActions.h | 4 ++-- src/modules/partition/core/PartitionLayout.cpp | 4 ++-- src/modules/partition/core/PartitionLayout.h | 2 +- src/modules/partition/core/PartitionModel.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/partition/core/PartitionActions.h b/src/modules/partition/core/PartitionActions.h index d17852b63..cc9716123 100644 --- a/src/modules/partition/core/PartitionActions.h +++ b/src/modules/partition/core/PartitionActions.h @@ -64,10 +64,10 @@ namespace Choices quint64 requiredSpaceB; // estimated required space for root partition SwapChoice swap; - AutoPartitionOptions( const QString& fs, const QString& luks, const QString& efi, qint64 r, SwapChoice s ) + AutoPartitionOptions( const QString& fs, const QString& luks, const QString& efi, qint64 requiredBytes, SwapChoice s ) : ReplacePartitionOptions( fs, luks ) , efiPartitionMountPoint( efi ) - , requiredSpaceB( r > 0 ? r : 0 ) + , requiredSpaceB( requiredBytes > 0 ? static_cast( requiredBytes ) : 0 ) , swap( s ) { } diff --git a/src/modules/partition/core/PartitionLayout.cpp b/src/modules/partition/core/PartitionLayout.cpp index 36a61d088..963a6ceb1 100644 --- a/src/modules/partition/core/PartitionLayout.cpp +++ b/src/modules/partition/core/PartitionLayout.cpp @@ -60,8 +60,8 @@ PartitionLayout::PartitionLayout( PartitionLayout::PartitionEntry entry ) } PartitionLayout::PartitionLayout( const PartitionLayout& layout ) - : m_partLayout( layout.m_partLayout ) - , m_defaultFsType( layout.m_defaultFsType ) + : m_defaultFsType( layout.m_defaultFsType ) + , m_partLayout( layout.m_partLayout ) { } diff --git a/src/modules/partition/core/PartitionLayout.h b/src/modules/partition/core/PartitionLayout.h index fd6075ba0..cc7478226 100644 --- a/src/modules/partition/core/PartitionLayout.h +++ b/src/modules/partition/core/PartitionLayout.h @@ -51,7 +51,7 @@ public: PartUtils::SizeUnit partMaxSizeUnit = PartUtils::SizeUnit::Percent; /// @brief All-zeroes PartitionEntry - PartitionEntry() {}; + PartitionEntry() {} /// @brief Parse @p size, @p min and @p max to their respective member variables PartitionEntry( const QString& size, const QString& min, const QString& max ); }; diff --git a/src/modules/partition/core/PartitionModel.cpp b/src/modules/partition/core/PartitionModel.cpp index 8f0ecba81..0515184b5 100644 --- a/src/modules/partition/core/PartitionModel.cpp +++ b/src/modules/partition/core/PartitionModel.cpp @@ -65,7 +65,7 @@ PartitionModel::init( Device* device , const OsproberEntryList& osproberEntries } int -PartitionModel::columnCount( const QModelIndex& parent ) const +PartitionModel::columnCount( const QModelIndex& ) const { return ColumnCount; } @@ -247,7 +247,7 @@ PartitionModel::data( const QModelIndex& index, int role ) const } QVariant -PartitionModel::headerData( int section, Qt::Orientation orientation, int role ) const +PartitionModel::headerData( int section, Qt::Orientation, int role ) const { if ( role != Qt::DisplayRole ) return QVariant(); From dbac9ecf7b1fb3eeeb557a49ca7aa483ad3b02e3 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Apr 2019 10:14:37 -0400 Subject: [PATCH 06/57] [partition] Remove unused code - The name table is in PartitionActions::Choices --- src/modules/partition/gui/PartitionViewStep.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 7053740c9..85e1b63aa 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -462,22 +462,6 @@ PartitionViewStep::onLeave() } -static PartitionActions::Choices::SwapChoice -nameToChoice( QString name, bool& ok ) -{ - using namespace PartitionActions::Choices; - - static const NamedEnumTable names { - { QStringLiteral( "none" ), SwapChoice::NoSwap }, - { QStringLiteral( "small" ), SwapChoice::SmallSwap }, - { QStringLiteral( "suspend" ), SwapChoice::FullSwap }, - { QStringLiteral( "reuse" ), SwapChoice::ReuseSwap }, - { QStringLiteral( "file" ), SwapChoice::SwapFile } - }; - - return names.find( name, ok ); -} - void PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { From 93be1a65828e085e620d7b6b567d55cfad0976d6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Apr 2019 10:16:09 -0400 Subject: [PATCH 07/57] [partition] Remove confusing spaces in logging --- src/modules/partition/core/PartUtils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/partition/core/PartUtils.cpp b/src/modules/partition/core/PartUtils.cpp index 584b90797..04e857774 100644 --- a/src/modules/partition/core/PartUtils.cpp +++ b/src/modules/partition/core/PartUtils.cpp @@ -169,8 +169,8 @@ canBeResized( Partition* candidate ) << QString( "(%1GB)" ).arg( advisedStorageGB ); deb << Logger::Continuation << "Available storage B:" << availableStorageB << QString( "(%1GB)" ).arg( availableStorageB / 1024 / 1024 / 1024 ) - << "for" << convenienceName( candidate ) << " length:" << candidate->length() - << " sectorsUsed:" << candidate->sectorsUsed() << " fsType:" << candidate->fileSystem().name(); + << "for" << convenienceName( candidate ) << "length:" << candidate->length() + << "sectorsUsed:" << candidate->sectorsUsed() << "fsType:" << candidate->fileSystem().name(); return false; } else From 329bd36929efe96ded9f4935fbde1da2ce3a4dba Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Apr 2019 10:44:13 -0400 Subject: [PATCH 08/57] [libcalamares] Sanitize logging --- .../utils/CalamaresUtilsSystem.cpp | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index e8819aa31..1b603a7e7 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp +++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp @@ -38,6 +38,41 @@ #include #endif +/** @brief When logging commands, don't log everything. + * + * The command-line arguments to some commands may contain the + * encrypted password set by the user. Don't log that password, + * since the log may get posted to bug reports, or stored in + * the target system. + */ +struct RedactedList +{ + RedactedList( const QStringList& l ) + : list(l) + { + } + + const QStringList& list; +} ; + +QDebug& +operator<<( QDebug& s, const RedactedList& l ) +{ + // Special case logging: don't log the (encrypted) password. + if ( l.list.contains( "usermod" ) ) + { + for ( const auto& item : l.list ) + if ( item.startsWith( "$6$" ) ) + s << ""; + else + s << item; + } + else + s << l.list; + + return s; +} + namespace CalamaresUtils { @@ -158,7 +193,7 @@ System::runCommand( return -3; } - cDebug() << "Running" << program << arguments; + cDebug() << "Running" << program << RedactedList( arguments ); process.start(); if ( !process.waitForStarted() ) { @@ -191,7 +226,7 @@ System::runCommand( cDebug() << "Finished. Exit code:" << r; if ( ( r != 0 ) || Calamares::Settings::instance()->debugMode() ) { - cDebug() << "Target cmd:" << args; + cDebug() << "Target cmd:" << RedactedList( args ); cDebug().noquote().nospace() << "Target output:\n" << output; } return ProcessResult(r, output); From 44de00406866c051a669f5417e1de5ee569dae05 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Apr 2019 11:25:23 -0400 Subject: [PATCH 09/57] CHANGES: Fix up Caio's name --- CHANGES | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 3573f2098..73cea5d96 100644 --- a/CHANGES +++ b/CHANGES @@ -59,7 +59,7 @@ This release contains contributions from (alphabetically by first name): - Alf Gaida - aliveafter1000 - Arnaud Ferraris - - Caio Carvalho + - Caio Jordão Carvalho - Collabora LTD - Gabriel Craciunescu - Kevin Kofler @@ -145,7 +145,7 @@ There are no core changes in this release. This release contains contributions from (alphabetically by first name): - Andrius Štikonas - artoo@cromnix.org - - Caio Carvalho + - Caio Jordão Carvalho - Harald Sitter - Philip Müller - Simon Quigley @@ -245,7 +245,7 @@ This release contains contributions from (alphabetically by first name): This release contains contributions from (alphabetically by first name): - Alf Gaida - AlmAck - - Caio Carvalho + - Caio Jordão Carvalho - Frede H ## Modules ## From c6d51f252723316aee808d7047a3e8e50ee66abb Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Apr 2019 11:25:51 -0400 Subject: [PATCH 10/57] CHANGES: Fix release date of 3.2.5 --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 73cea5d96..13081169b 100644 --- a/CHANGES +++ b/CHANGES @@ -12,7 +12,7 @@ This release contains contributions from (alphabetically by first name): ## Modules ## -# 3.2.5 (unreleased) # +# 3.2.5 (2019-04-15) # This release contains contributions from (alphabetically by first name): - Arnaud Ferraris From 1f66062c814403c385990c1f3ae4a4cd77dc6286 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Apr 2019 11:27:25 -0400 Subject: [PATCH 11/57] CMake: bump version, new stub in CHANGES --- CHANGES | 9 +++++++++ CMakeLists.txt | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 13081169b..431da632c 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,15 @@ contributors are listed. Note that Calamares does not have a historical changelog -- this log starts with version 3.2.0. The release notes on the website will have to do for older versions. +# 3.2.7 (unreleased) # + +This release contains contributions from (alphabetically by first name): + +## Core ## + +## Modules ## + + # 3.2.6 (unreleased) # This release contains contributions from (alphabetically by first name): diff --git a/CMakeLists.txt b/CMakeLists.txt index 504f30c6b..c9dddb547 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,10 +37,10 @@ cmake_minimum_required( VERSION 3.2 FATAL_ERROR ) project( CALAMARES - VERSION 3.2.5 + VERSION 3.2.6 LANGUAGES C CXX ) -set( CALAMARES_VERSION_RC 0 ) # Set to 0 during release cycle, 1 during development +set( CALAMARES_VERSION_RC 1 ) # Set to 0 during release cycle, 1 during development ### OPTIONS # From 5994e9b4cecd1f417127e662d21b9e55483e3a44 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 16 Apr 2019 15:34:09 +0200 Subject: [PATCH 12/57] Changes: document what this branch will do --- CHANGES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index 431da632c..e6cc6ff79 100644 --- a/CHANGES +++ b/CHANGES @@ -20,6 +20,10 @@ This release contains contributions from (alphabetically by first name): ## Modules ## + * *Welcome* module has improved usability: a standard icon + alongside the *Language* label, for improved recognition, + and improved language-list display and sorting. #1107 + # 3.2.5 (2019-04-15) # From 5e951466dfd09e617a9ddbed1606773e191d1800 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 16 Apr 2019 15:38:06 +0200 Subject: [PATCH 13/57] [libcalamaresui] Sort languages by ISO code - this puts the Englishes together, and is less confusing than sorting with American first. --- src/libcalamaresui/utils/CalamaresUtilsGui.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.h b/src/libcalamaresui/utils/CalamaresUtilsGui.h index 6a036b218..49f94e6a4 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.h +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.h @@ -154,11 +154,7 @@ public: */ bool operator <( const LocaleLabel& other ) const { - if ( isEnglish() ) - return !other.isEnglish(); - if ( other.isEnglish() ) - return false; - return m_sortKey < other.m_sortKey; + return m_localeId < other.m_localeId; } /** @brief Is this locale English? From 620940c75b90d422d73a98285c816cc4a1e8a52b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 16 Apr 2019 23:49:27 +0200 Subject: [PATCH 14/57] [libcalamaresui] Drop now-unused sortKey from LocaleLabel - sortKey is unused - add englishLabel for reverse-i18n --- src/libcalamaresui/utils/CalamaresUtilsGui.cpp | 12 +++--------- src/libcalamaresui/utils/CalamaresUtilsGui.h | 8 +++++++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp index 69924f1b8..123d9858c 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp @@ -269,26 +269,20 @@ LocaleLabel::LocaleLabel( const QString& locale, LabelFormat format ) //: language[name] (country[name]) QString longFormat = QObject::tr( "%1 (%2)" ); - QString sortKey = QLocale::languageToString( m_locale.language() ); QString languageName = m_locale.nativeLanguageName(); + QString englishName = m_locale.languageToString( m_locale.language() ); QString countryName; if ( languageName.isEmpty() ) - languageName = QString( QLatin1Literal( "* %1 (%2)" ) ).arg( locale, sortKey ); + languageName = QString( QLatin1Literal( "* %1 (%2)" ) ).arg( locale, englishName ); bool needsCountryName = ( format == LabelFormat::AlwaysWithCountry ) || (locale.contains( '_' ) && QLocale::countriesForLanguage( m_locale.language() ).count() > 1 ); if ( needsCountryName ) - { - sortKey.append( '+' ); - sortKey.append( QLocale::countryToString( m_locale.country() ) ); - countryName = m_locale.nativeCountryName(); - } - - m_sortKey = sortKey; m_label = needsCountryName ? longFormat.arg( languageName ).arg( countryName ) : languageName; + m_englishLabel = englishName; } QLocale LocaleLabel::getLocale( const QString& localeName ) diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.h b/src/libcalamaresui/utils/CalamaresUtilsGui.h index 49f94e6a4..124594800 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.h +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.h @@ -172,6 +172,12 @@ public: { return m_label; } + /** @brief Get the *English* human-readable name for this locale. */ + QString englishLabel() const + { + return m_englishLabel; + } + /** @brief Get the Qt locale. */ QLocale locale() const { @@ -188,8 +194,8 @@ public: protected: QLocale m_locale; QString m_localeId; // the locale identifier, e.g. "en_GB" - QString m_sortKey; // the English name of the locale QString m_label; // the native name of the locale + QString m_englishLabel; } ; From 92b60dac65a5fb5723d3faf456f664aad96df7dc Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 17 Apr 2019 10:57:29 +0200 Subject: [PATCH 15/57] [libcalamares] Warnings-- over extra ; --- src/libcalamares/CppJob.cpp | 2 +- src/libcalamares/utils/Logger.cpp | 4 +--- src/libcalamares/utils/PluginFactory.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libcalamares/CppJob.cpp b/src/libcalamares/CppJob.cpp index b3f2385c6..0512df377 100644 --- a/src/libcalamares/CppJob.cpp +++ b/src/libcalamares/CppJob.cpp @@ -41,7 +41,7 @@ CppJob::setModuleInstanceKey( const QString& instanceKey ) void CppJob::setConfigurationMap( const QVariantMap& configurationMap ) { - Q_UNUSED( configurationMap ); + Q_UNUSED( configurationMap ) } } diff --git a/src/libcalamares/utils/Logger.cpp b/src/libcalamares/utils/Logger.cpp index 5f4401ca1..cbe711698 100644 --- a/src/libcalamares/utils/Logger.cpp +++ b/src/libcalamares/utils/Logger.cpp @@ -99,12 +99,10 @@ log( const char* msg, unsigned int debugLevel ) static void -CalamaresLogHandler( QtMsgType type, const QMessageLogContext& context, const QString& msg ) +CalamaresLogHandler( QtMsgType type, const QMessageLogContext&, const QString& msg ) { static QMutex s_mutex; - Q_UNUSED( context ); - QByteArray ba = msg.toUtf8(); const char* message = ba.constData(); diff --git a/src/libcalamares/utils/PluginFactory.h b/src/libcalamares/utils/PluginFactory.h index 22966b829..7338d53de 100644 --- a/src/libcalamares/utils/PluginFactory.h +++ b/src/libcalamares/utils/PluginFactory.h @@ -269,7 +269,7 @@ protected: template static QObject* createInstance( QWidget* parentWidget, QObject* parent ) { - Q_UNUSED( parentWidget ); + Q_UNUSED( parentWidget ) ParentType* p = nullptr; if ( parent ) { From 680b0bc472825e5d035c9f03d32469c741d9a914 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Wed, 17 Apr 2019 18:16:06 +0200 Subject: [PATCH 16/57] Add missing header to NamedEnum Signed-off-by: Arnaud Ferraris --- src/libcalamares/utils/NamedEnum.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcalamares/utils/NamedEnum.h b/src/libcalamares/utils/NamedEnum.h index b4c7dcd56..fd3791e72 100644 --- a/src/libcalamares/utils/NamedEnum.h +++ b/src/libcalamares/utils/NamedEnum.h @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2019, Adriaan de Groot + * Copyright 2019, Collabora Ltd * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,6 +31,7 @@ #include +#include #include #include From 3a58ae5e8bf184f28c43402608b2af11bee09a15 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Wed, 17 Apr 2019 18:23:13 +0200 Subject: [PATCH 17/57] Introduce new partition size class based on NamedSuffix In order to maintain consistency, and make use, create a new PartSize class in the PartUtils namespace, which inherits from NamedSuffix for easier parsing and handling of size strings. The switch to using this class instead of the previous functions will be done in a follow-up commit. Signed-off-by: Arnaud Ferraris --- src/modules/partition/core/PartUtils.cpp | 210 +++++++++++++++++++++++ src/modules/partition/core/PartUtils.h | 67 +++++++- 2 files changed, 275 insertions(+), 2 deletions(-) diff --git a/src/modules/partition/core/PartUtils.cpp b/src/modules/partition/core/PartUtils.cpp index 04e857774..b923ddbbb 100644 --- a/src/modules/partition/core/PartUtils.cpp +++ b/src/modules/partition/core/PartUtils.cpp @@ -43,6 +43,216 @@ namespace PartUtils { +static const NamedEnumTable& +unitSuffixes() +{ + static const NamedEnumTable names{ + { QStringLiteral( "%" ), SizeUnit::Percent }, + { QStringLiteral( "B" ), SizeUnit::Byte }, + { QStringLiteral( "K" ), SizeUnit::KiB }, + { QStringLiteral( "M" ), SizeUnit::MiB }, + { QStringLiteral( "G" ), SizeUnit::GiB } + }; + + return names; +} + +PartSize::PartSize( const QString& s ) + : NamedSuffix( unitSuffixes(), s ) +{ + if ( ( unit() == SizeUnit::Percent ) && ( value() > 100 || value() < 0 ) ) + { + cDebug() << "Percent value" << value() << "is not valid."; + m_value = 0; + } + + if ( m_unit == SizeUnit::None ) + { + m_value = s.toInt(); + if ( m_value > 0 ) + m_unit = SizeUnit::Byte; + } + + if ( m_value <= 0 ) + { + m_value = 0; + m_unit = SizeUnit::None; + } +} + +qint64 +PartSize::toSectors( qint64 totalSectors, qint64 sectorSize ) const +{ + if ( !isValid() ) + return -1; + if ( totalSectors < 1 || sectorSize < 1 ) + return -1; + + switch ( m_unit ) + { + case unit_t::None: + return -1; + case unit_t::Percent: + if ( value() == 100 ) + return totalSectors; // Common-case, avoid futzing around + else + return totalSectors * value() / 100; + case unit_t::Byte: + case unit_t::KiB: + case unit_t::MiB: + case unit_t::GiB: + return bytesToSectors ( toBytes(), sectorSize ); + } + + return -1; +} + +qint64 +PartSize::toBytes( qint64 totalSectors, qint64 sectorSize ) const +{ + if ( !isValid() ) + return -1; + + switch ( m_unit ) + { + case unit_t::None: + return -1; + case unit_t::Percent: + if ( totalSectors < 1 || sectorSize < 1 ) + return -1; + if ( value() == 100 ) + return totalSectors * sectorSize; // Common-case, avoid futzing around + else + return totalSectors * value() / 100; + case unit_t::Byte: + case unit_t::KiB: + case unit_t::MiB: + case unit_t::GiB: + return toBytes(); + } + + // notreached + return -1; +} + +qint64 +PartSize::toBytes( qint64 totalBytes ) const +{ + if ( !isValid() ) + return -1; + + switch ( m_unit ) + { + case unit_t::None: + return -1; + case unit_t::Percent: + if ( totalBytes < 1 ) + return -1; + if ( value() == 100 ) + return totalBytes; // Common-case, avoid futzing around + else + return totalBytes * value() / 100; + case unit_t::Byte: + case unit_t::KiB: + case unit_t::MiB: + case unit_t::GiB: + return toBytes(); + } + + // notreached + return -1; +} + +qint64 +PartSize::toBytes() const +{ + if ( !isValid() ) + return -1; + + switch ( m_unit ) + { + case unit_t::Byte: + return value(); + case unit_t::KiB: + return CalamaresUtils::KiBtoBytes( static_cast( value() ) ); + case unit_t::MiB: + return CalamaresUtils::MiBtoBytes( static_cast( value() ) ); + case unit_t::GiB: + return CalamaresUtils::GiBtoBytes( static_cast( value() ) ); + default: + break; + } + + // Reached only when unit is Percent or None + return -1; +} + +bool +PartSize::operator< ( const PartSize& other ) const +{ + if ( ( m_unit == SizeUnit::None || other.m_unit == SizeUnit::None ) || + ( m_unit == SizeUnit::Percent && other.m_unit != SizeUnit::Percent ) || + ( m_unit != SizeUnit::Percent && other.m_unit == SizeUnit::Percent ) ) + return false; + + switch ( m_unit ) + { + case SizeUnit::Percent: + return ( m_value < other.m_value ); + case SizeUnit::Byte: + case SizeUnit::KiB: + case SizeUnit::MiB: + case SizeUnit::GiB: + return ( toBytes() < other.toBytes () ); + } + + return false; +} + +bool +PartSize::operator> ( const PartSize& other ) const +{ + if ( ( m_unit == SizeUnit::None || other.m_unit == SizeUnit::None ) || + ( m_unit == SizeUnit::Percent && other.m_unit != SizeUnit::Percent ) || + ( m_unit != SizeUnit::Percent && other.m_unit == SizeUnit::Percent ) ) + return false; + + switch ( m_unit ) + { + case SizeUnit::Percent: + return ( m_value > other.m_value ); + case SizeUnit::Byte: + case SizeUnit::KiB: + case SizeUnit::MiB: + case SizeUnit::GiB: + return ( toBytes() > other.toBytes () ); + } + + return false; +} + +bool +PartSize::operator== ( const PartSize& other ) const +{ + if ( ( m_unit == SizeUnit::None || other.m_unit == SizeUnit::None ) || + ( m_unit == SizeUnit::Percent && other.m_unit != SizeUnit::Percent ) || + ( m_unit != SizeUnit::Percent && other.m_unit == SizeUnit::Percent ) ) + return false; + + switch ( m_unit ) + { + case SizeUnit::Percent: + return ( m_value == other.m_value ); + case SizeUnit::Byte: + case SizeUnit::KiB: + case SizeUnit::MiB: + case SizeUnit::GiB: + return ( toBytes() == other.toBytes () ); + } + + return false; +} + QString convenienceName( const Partition* const candidate ) { diff --git a/src/modules/partition/core/PartUtils.h b/src/modules/partition/core/PartUtils.h index 9b4efeec9..2e1420006 100644 --- a/src/modules/partition/core/PartUtils.h +++ b/src/modules/partition/core/PartUtils.h @@ -23,6 +23,7 @@ #include "OsproberEntry.h" #include "utils/Units.h" +#include "utils/NamedSuffix.h" // KPMcore #include @@ -37,15 +38,77 @@ namespace PartUtils { using CalamaresUtils::MiBtoBytes; -enum SizeUnit +enum class SizeUnit { - Percent = 0, + None, + Percent, Byte, KiB, MiB, GiB }; +/** @brief Partition size expressions + * + * Sizes can be specified in bytes, KiB, MiB, GiB or percent (of + * the available drive space are on). This class handles parsing + * of such strings from the config file. + */ +class PartSize : public NamedSuffix +{ +public: + PartSize() : NamedSuffix() { }; + PartSize( int v, unit_t u ) : NamedSuffix( v, u ) { }; + PartSize( const QString& ); + + bool isValid() const + { + return ( unit() != SizeUnit::None ) && ( value() > 0 ); + } + + bool operator< ( const PartSize& other ) const; + bool operator> ( const PartSize& other ) const; + bool operator== ( const PartSize& other ) const; + + /** @brief Convert the size to the number of sectors @p totalSectors . + * + * Each sector has size @p sectorSize, for converting sizes in Bytes, + * KiB, MiB or GiB to sector counts. + * + * @return the number of sectors needed, or -1 for invalid sizes. + */ + qint64 toSectors( qint64 totalSectors, qint64 sectorSize ) const; + + /** @brief Convert the size to bytes. + * + * The device's sectors count @p totalSectors and sector size + * @p sectoreSize are used to calculated the total size, which + * is then used to calculate the size when using Percent. + * + * @return the size in bytes, or -1 for invalid sizes. + */ + qint64 toBytes( qint64 totalSectors, qint64 sectorSize ) const; + + /** @brief Convert the size to bytes. + * + * Total size @p totalBytes is needed for sizes in Percent. This + * parameter is unused in any other case. + * + * @return the size in bytes, or -1 for invalid sizes. + */ + qint64 toBytes( qint64 totalBytes ) const; + + /** @brief Convert the size to bytes. + * + * This method is only valid for sizes in Bytes, KiB, MiB or GiB. + * It will return -1 in any other case. + * + * @return the size in bytes, or -1 if it cannot be calculated. + */ + qint64 toBytes() const; +}; + + /** * @brief Provides a nice human-readable name for @p candidate * From d32733bf5920cf9e3bcf81a765ff4076337c54aa Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Wed, 17 Apr 2019 18:40:30 +0200 Subject: [PATCH 18/57] Switch to using PartSize class for partition sizes Every call of `ParseStringSize` is replaced by using an instance of the `PartUtils::PartSize` class. This commit also removes the now-unused previous size parsing functions. Signed-off-by: Arnaud Ferraris --- src/modules/partition/core/PartUtils.cpp | 93 ------------------- src/modules/partition/core/PartUtils.h | 16 ---- .../partition/core/PartitionActions.cpp | 7 +- .../partition/core/PartitionLayout.cpp | 14 +-- src/modules/partition/core/PartitionLayout.h | 11 +-- 5 files changed, 17 insertions(+), 124 deletions(-) diff --git a/src/modules/partition/core/PartUtils.cpp b/src/modules/partition/core/PartUtils.cpp index b923ddbbb..75b49701d 100644 --- a/src/modules/partition/core/PartUtils.cpp +++ b/src/modules/partition/core/PartUtils.cpp @@ -694,99 +694,6 @@ findFS( QString fsName, FileSystem::Type* fsType ) return fsName; } -static qint64 -sizeToBytes( double size, SizeUnit unit, qint64 totalSize ) -{ - qint64 bytes; - - switch ( unit ) - { - case SizeUnit::Percent: - bytes = qint64( static_cast( totalSize ) * size / 100.0L ); - break; - case SizeUnit::KiB: - bytes = CalamaresUtils::KiBtoBytes(size); - break; - case SizeUnit::MiB: - bytes = CalamaresUtils::MiBtoBytes(size); - break; - case SizeUnit::GiB: - bytes = CalamaresUtils::GiBtoBytes(size); - break; - default: - bytes = size; - break; - } - - return bytes; -} - -double -parseSizeString( const QString& sizeString, SizeUnit* unit ) -{ - double value; - bool ok; - QString valueString; - QString unitString; - - QRegExp rx( "[KkMmGg%]" ); - int pos = rx.indexIn( sizeString ); - if (pos > 0) - { - valueString = sizeString.mid( 0, pos ); - unitString = sizeString.mid( pos ); - } - else - valueString = sizeString; - - value = valueString.toDouble( &ok ); - if ( !ok ) - { - /* - * In case the conversion fails, a size of 100% allows a few cases to pass - * anyway (e.g. when it is the last partition of the layout) - */ - *unit = SizeUnit::Percent; - return 100.0L; - } - - if ( unitString.length() > 0 ) - { - if ( unitString.at(0) == '%' ) - *unit = SizeUnit::Percent; - else if ( unitString.at(0).toUpper() == 'K' ) - *unit = SizeUnit::KiB; - else if ( unitString.at(0).toUpper() == 'M' ) - *unit = SizeUnit::MiB; - else if ( unitString.at(0).toUpper() == 'G' ) - *unit = SizeUnit::GiB; - else - *unit = SizeUnit::Byte; - } - else - { - *unit = SizeUnit::Byte; - } - - return value; -} - -qint64 -parseSizeString( const QString& sizeString, qint64 totalSize ) -{ - SizeUnit unit; - double value = parseSizeString( sizeString, &unit ); - - return sizeToBytes( value, unit, totalSize ); -} - -qint64 -sizeToSectors( double size, SizeUnit unit, qint64 totalSectors, qint64 logicalSize ) -{ - qint64 bytes = sizeToBytes( size, unit, totalSectors * logicalSize ); - return bytesToSectors( static_cast( bytes ), logicalSize ); -} - } // nmamespace PartUtils /* Implementation of methods for FstabEntry, from OsproberEntry.h */ diff --git a/src/modules/partition/core/PartUtils.h b/src/modules/partition/core/PartUtils.h index 2e1420006..e6a5209ed 100644 --- a/src/modules/partition/core/PartUtils.h +++ b/src/modules/partition/core/PartUtils.h @@ -171,22 +171,6 @@ bool isEfiBootable( const Partition* candidate ); */ QString findFS( QString fsName, FileSystem::Type* fsType ); -/** - * @brief Parse a partition size string and return its value and unit used. - * @param sizeString the string to parse. - * @param unit pointer to a SizeUnit variable for storing the parsed unit. - * @return the size value, as parsed from the input string. - */ -double parseSizeString( const QString& sizeString, SizeUnit* unit ); - -/** - * @brief Parse a partition size string and return its value in bytes. - * @param sizeString the string to parse. - * @param totalSize the size of the selected drive (used when the size is expressed in %) - * @return the size value in bytes. - */ -qint64 parseSizeString( const QString& sizeString, qint64 totalSize ); - /** * @brief Convert a partition size to a sectors count. * @param size the partition size. diff --git a/src/modules/partition/core/PartitionActions.cpp b/src/modules/partition/core/PartitionActions.cpp index 074783186..0bc0d1860 100644 --- a/src/modules/partition/core/PartitionActions.cpp +++ b/src/modules/partition/core/PartitionActions.cpp @@ -102,9 +102,14 @@ doAutopartition( PartitionCoreModule* core, Device* dev, Choices::AutoPartitionO if ( isEfi ) { if ( gs->contains( "efiSystemPartitionSize" ) ) - uefisys_part_sizeB = PartUtils::parseSizeString( gs->value( "efiSystemPartitionSize" ).toString(), dev->capacity() ); + { + PartUtils::PartSize part_size = PartUtils::PartSize( gs->value( "efiSystemPartitionSize" ).toString() ); + uefisys_part_sizeB = part_size.toBytes( dev->capacity() ); + } else + { uefisys_part_sizeB = 300_MiB; + } } // Since sectors count from 0, if the space is 2048 sectors in size, diff --git a/src/modules/partition/core/PartitionLayout.cpp b/src/modules/partition/core/PartitionLayout.cpp index 963a6ceb1..0f2724868 100644 --- a/src/modules/partition/core/PartitionLayout.cpp +++ b/src/modules/partition/core/PartitionLayout.cpp @@ -2,7 +2,7 @@ * * Copyright 2014-2017, Teo Mrnjavac * Copyright 2017-2018, Adriaan de Groot - * Copyright 2018, Collabora Ltd + * Copyright 2018-2019, Collabora Ltd * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -77,11 +77,11 @@ PartitionLayout::addEntry( PartitionLayout::PartitionEntry entry ) PartitionLayout::PartitionEntry::PartitionEntry( const QString& size, const QString& min, const QString& max ) { - partSize = PartUtils::parseSizeString( size , &partSizeUnit ); + partSize = PartUtils::PartSize( size ); if ( !min.isEmpty() ) - partMinSize = PartUtils::parseSizeString( min , &partMinSizeUnit ); + partMinSize = PartUtils::PartSize( min ); if ( !max.isEmpty() ) - partMaxSize = PartUtils::parseSizeString( max , &partMaxSizeUnit ); + partMaxSize = PartUtils::PartSize( max ); } void @@ -128,9 +128,9 @@ PartitionLayout::execute( Device *dev, qint64 firstSector, Partition *currentPartition = nullptr; // Calculate partition size - size = PartUtils::sizeToSectors( part.partSize, part.partSizeUnit, totalSize, dev->logicalSize() ); - minSize = PartUtils::sizeToSectors( part.partMinSize, part.partMinSizeUnit, totalSize, dev->logicalSize() ); - maxSize = PartUtils::sizeToSectors( part.partMaxSize, part.partMaxSizeUnit, totalSize, dev->logicalSize() ); + size = part.partSize.toSectors( totalSize, dev->logicalSize() ); + minSize = part.partMinSize.toSectors( totalSize, dev->logicalSize() ); + maxSize = part.partMaxSize.toSectors( totalSize, dev->logicalSize() ); if ( size < minSize ) size = minSize; if ( size > maxSize ) diff --git a/src/modules/partition/core/PartitionLayout.h b/src/modules/partition/core/PartitionLayout.h index cc7478226..034182669 100644 --- a/src/modules/partition/core/PartitionLayout.h +++ b/src/modules/partition/core/PartitionLayout.h @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2018, Collabora Ltd + * Copyright 2018-2019, Collabora Ltd * Copyright 2019, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify @@ -43,12 +43,9 @@ public: QString partLabel; QString partMountPoint; FileSystem::Type partFileSystem = FileSystem::Unknown; - double partSize = 0.0L; - PartUtils::SizeUnit partSizeUnit = PartUtils::SizeUnit::Percent; - double partMinSize = 0.0L; - PartUtils::SizeUnit partMinSizeUnit = PartUtils::SizeUnit::Percent; - double partMaxSize = 100.0L; - PartUtils::SizeUnit partMaxSizeUnit = PartUtils::SizeUnit::Percent; + PartUtils::PartSize partSize = PartUtils::PartSize(0, PartUtils::SizeUnit::Percent); + PartUtils::PartSize partMinSize = PartUtils::PartSize(0, PartUtils::SizeUnit::Percent); + PartUtils::PartSize partMaxSize = PartUtils::PartSize(100, PartUtils::SizeUnit::Percent); /// @brief All-zeroes PartitionEntry PartitionEntry() {} From 123222c0a8035df5a95f2fb95a3a870376126766 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Wed, 17 Apr 2019 19:16:48 +0200 Subject: [PATCH 19/57] Add global checks for partition layout This commit adds several checks while reading the configuration of the `partition` module, in case the partition layout configuration is misformed. If an error is encountered, an message is printed to the console and the module reverts to the default partition layout. Checks are also added when implementing the partition layout, in case a problem occurs that couldn't be anticipated (for example, when a partition size is in %, checking its absolute value require knowing the total device size, which is not the case when the configuration is being read). Signed-off-by: Arnaud Ferraris --- .../partition/core/PartitionCoreModule.cpp | 34 ++++++-- .../partition/core/PartitionLayout.cpp | 81 ++++++++++++++++--- src/modules/partition/core/PartitionLayout.h | 20 +++-- 3 files changed, 111 insertions(+), 24 deletions(-) diff --git a/src/modules/partition/core/PartitionCoreModule.cpp b/src/modules/partition/core/PartitionCoreModule.cpp index 27ac14d29..f78419259 100644 --- a/src/modules/partition/core/PartitionCoreModule.cpp +++ b/src/modules/partition/core/PartitionCoreModule.cpp @@ -4,6 +4,7 @@ * Copyright 2014-2015, Teo Mrnjavac * Copyright 2017-2018, Adriaan de Groot * Copyright 2018, Caio Carvalho + * Copyright 2019, Collabora Ltd * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -797,6 +798,16 @@ PartitionCoreModule::initLayout( const QVariantList& config ) { QVariantMap pentry = r.toMap(); + if ( !pentry.contains( "name" ) || !pentry.contains( "mountPoint" ) || + !pentry.contains( "filesystem" ) || !pentry.contains( "size" ) ) + { + cError() << "Partition layout entry #" << config.indexOf(r) + << "lacks mandatory attributes, switching to default layout."; + delete( m_partLayout ); + initLayout(); + break; + } + if ( pentry.contains("size") && CalamaresUtils::getString( pentry, "size" ).isEmpty() ) sizeString.setNum( CalamaresUtils::getInteger( pentry, "size", 0 ) ); else @@ -808,17 +819,24 @@ PartitionCoreModule::initLayout( const QVariantList& config ) minSizeString = CalamaresUtils::getString( pentry, "minSize" ); if ( pentry.contains("maxSize") && CalamaresUtils::getString( pentry, "maxSize" ).isEmpty() ) - maxSizeString.setNum( CalamaresUtils::getInteger( pentry, "maxSize", 100 ) ); + maxSizeString.setNum( CalamaresUtils::getInteger( pentry, "maxSize", 0 ) ); else maxSizeString = CalamaresUtils::getString( pentry, "maxSize" ); - m_partLayout->addEntry( CalamaresUtils::getString( pentry, "name" ), - CalamaresUtils::getString( pentry, "mountPoint" ), - CalamaresUtils::getString( pentry, "filesystem" ), - sizeString, - minSizeString, - maxSizeString - ); + if ( !m_partLayout->addEntry( CalamaresUtils::getString( pentry, "name" ), + CalamaresUtils::getString( pentry, "mountPoint" ), + CalamaresUtils::getString( pentry, "filesystem" ), + sizeString, + minSizeString, + maxSizeString + ) ) + { + cError() << "Partition layout entry #" << config.indexOf(r) + << "is invalid, switching to default layout."; + delete( m_partLayout ); + initLayout(); + break; + } } } diff --git a/src/modules/partition/core/PartitionLayout.cpp b/src/modules/partition/core/PartitionLayout.cpp index 0f2724868..35a540a96 100644 --- a/src/modules/partition/core/PartitionLayout.cpp +++ b/src/modules/partition/core/PartitionLayout.cpp @@ -21,6 +21,8 @@ #include "GlobalStorage.h" #include "JobQueue.h" +#include "utils/Logger.h" + #include "core/PartitionLayout.h" #include "core/KPMHelpers.h" @@ -69,37 +71,67 @@ PartitionLayout::~PartitionLayout() { } -void +bool PartitionLayout::addEntry( PartitionLayout::PartitionEntry entry ) { + if ( !entry.isValid() ) + { + cError() << "Partition size is invalid or has min size > max size"; + return false; + } + m_partLayout.append( entry ); + + return true; } PartitionLayout::PartitionEntry::PartitionEntry( const QString& size, const QString& min, const QString& max ) { partSize = PartUtils::PartSize( size ); - if ( !min.isEmpty() ) - partMinSize = PartUtils::PartSize( min ); - if ( !max.isEmpty() ) - partMaxSize = PartUtils::PartSize( max ); + partMinSize = PartUtils::PartSize( min ); + partMaxSize = PartUtils::PartSize( max ); } -void +bool PartitionLayout::addEntry( const QString& mountPoint, const QString& size, const QString& min, const QString& max ) { PartitionLayout::PartitionEntry entry( size, min, max ); + if ( !entry.isValid() ) + { + cError() << "Partition size" << size << "is invalid or" << min << ">" << max; + return false; + } + if ( mountPoint.isEmpty() || !mountPoint.startsWith( QString( "/" ) ) ) + { + cError() << "Partition mount point" << mountPoint << "is invalid"; + return false; + } + entry.partMountPoint = mountPoint; entry.partFileSystem = m_defaultFsType; m_partLayout.append( entry ); + + return true; } -void +bool PartitionLayout::addEntry( const QString& label, const QString& mountPoint, const QString& fs, const QString& size, const QString& min, const QString& max ) { PartitionLayout::PartitionEntry entry( size, min, max ); + if ( !entry.isValid() ) + { + cError() << "Partition size" << size << "is invalid or" << min << ">" << max; + return false; + } + if ( mountPoint.isEmpty() || !mountPoint.startsWith( QString( "/" ) ) ) + { + cError() << "Partition mount point" << mountPoint << "is invalid"; + return false; + } + entry.partLabel = label; entry.partMountPoint = mountPoint; PartUtils::findFS( fs, &entry.partFileSystem ); @@ -107,6 +139,8 @@ PartitionLayout::addEntry( const QString& label, const QString& mountPoint, cons entry.partFileSystem = m_defaultFsType; m_partLayout.append( entry ); + + return true; } QList< Partition* > @@ -128,9 +162,36 @@ PartitionLayout::execute( Device *dev, qint64 firstSector, Partition *currentPartition = nullptr; // Calculate partition size - size = part.partSize.toSectors( totalSize, dev->logicalSize() ); - minSize = part.partMinSize.toSectors( totalSize, dev->logicalSize() ); - maxSize = part.partMaxSize.toSectors( totalSize, dev->logicalSize() ); + if ( part.partSize.isValid() ) + { + size = part.partSize.toSectors( totalSize, dev->logicalSize() ); + } + else + { + cWarning() << "Partition" << part.partMountPoint << "size (" + << size << "sectors) is invalid, skipping..."; + continue; + } + + if ( part.partMinSize.isValid() ) + minSize = part.partMinSize.toSectors( totalSize, dev->logicalSize() ); + else + minSize = 0; + + if ( part.partMaxSize.isValid() ) + maxSize = part.partMaxSize.toSectors( totalSize, dev->logicalSize() ); + else + maxSize = availableSize; + + // Make sure we never go under minSize once converted to sectors + if ( maxSize < minSize ) + { + cWarning() << "Partition" << part.partMountPoint << "max size (" << maxSize + << "sectors) is < min size (" << minSize << "sectors), using min size"; + maxSize = minSize; + } + + // Adjust partition size based on user-defined boundaries and available space if ( size < minSize ) size = minSize; if ( size > maxSize ) diff --git a/src/modules/partition/core/PartitionLayout.h b/src/modules/partition/core/PartitionLayout.h index 034182669..626c90b66 100644 --- a/src/modules/partition/core/PartitionLayout.h +++ b/src/modules/partition/core/PartitionLayout.h @@ -43,14 +43,22 @@ public: QString partLabel; QString partMountPoint; FileSystem::Type partFileSystem = FileSystem::Unknown; - PartUtils::PartSize partSize = PartUtils::PartSize(0, PartUtils::SizeUnit::Percent); - PartUtils::PartSize partMinSize = PartUtils::PartSize(0, PartUtils::SizeUnit::Percent); - PartUtils::PartSize partMaxSize = PartUtils::PartSize(100, PartUtils::SizeUnit::Percent); + PartUtils::PartSize partSize; + PartUtils::PartSize partMinSize; + PartUtils::PartSize partMaxSize; /// @brief All-zeroes PartitionEntry PartitionEntry() {} /// @brief Parse @p size, @p min and @p max to their respective member variables PartitionEntry( const QString& size, const QString& min, const QString& max ); + + bool isValid() const + { + if ( !partSize.isValid() || + ( partMinSize.isValid() && partMaxSize.isValid() && partMinSize > partMaxSize ) ) + return false; + return true; + } }; PartitionLayout(); @@ -58,9 +66,9 @@ public: PartitionLayout( const PartitionLayout& layout ); ~PartitionLayout(); - void addEntry( PartitionEntry entry ); - void addEntry( const QString& mountPoint, const QString& size, const QString& min = QString(), const QString& max = QString() ); - void addEntry( const QString& label, const QString& mountPoint, const QString& fs, const QString& size, const QString& min = QString(), const QString& max = QString() ); + bool addEntry( PartitionEntry entry ); + bool addEntry( const QString& mountPoint, const QString& size, const QString& min = QString(), const QString& max = QString() ); + bool addEntry( const QString& label, const QString& mountPoint, const QString& fs, const QString& size, const QString& min = QString(), const QString& max = QString() ); /** * @brief Apply the current partition layout to the selected drive space. From 27140ff5bb8e3f3798a8f85fbb0843dfee28fc8c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 11:59:51 +0200 Subject: [PATCH 20/57] [libcalamares] Reduce warnings in KDAB code - This is an older copy of kdsingleapplicationguard, now updated for C++11 warnings; removed __ in header guards, fixed up last of 0-for- nullptr, signedness mismatch. --- .../kdsingleapplicationguard/kdsingleapplicationguard.h | 2 +- src/libcalamares/kdsingleapplicationguard/kdtoolsglobal.cpp | 2 +- src/libcalamares/kdsingleapplicationguard/kdtoolsglobal.h | 2 +- src/libcalamares/kdsingleapplicationguard/pimpl_ptr.h | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libcalamares/kdsingleapplicationguard/kdsingleapplicationguard.h b/src/libcalamares/kdsingleapplicationguard/kdsingleapplicationguard.h index 3bd1e644d..d529fdb3e 100644 --- a/src/libcalamares/kdsingleapplicationguard/kdsingleapplicationguard.h +++ b/src/libcalamares/kdsingleapplicationguard/kdsingleapplicationguard.h @@ -34,7 +34,7 @@ public: explicit KDSingleApplicationGuard( QObject * parent=nullptr ); explicit KDSingleApplicationGuard( Policy policy, QObject * parent=nullptr ); explicit KDSingleApplicationGuard( const QStringList & arguments, QObject * parent=nullptr ); - explicit KDSingleApplicationGuard( const QStringList & arguments, Policy policy, QObject * parent=0 ); + explicit KDSingleApplicationGuard( const QStringList & arguments, Policy policy, QObject * parent=nullptr ); ~KDSingleApplicationGuard(); bool isOperational() const; diff --git a/src/libcalamares/kdsingleapplicationguard/kdtoolsglobal.cpp b/src/libcalamares/kdsingleapplicationguard/kdtoolsglobal.cpp index 23f19051c..f530cc85b 100644 --- a/src/libcalamares/kdsingleapplicationguard/kdtoolsglobal.cpp +++ b/src/libcalamares/kdsingleapplicationguard/kdtoolsglobal.cpp @@ -27,7 +27,7 @@ static Version kdParseQtVersion( const char * const version ) { return result; } -bool _kdCheckQtVersion_impl( int major, int minor, int patchlevel ) { +bool _kdCheckQtVersion_impl( unsigned int major, unsigned int minor, unsigned int patchlevel ) { static const Version actual = kdParseQtVersion( qVersion() ); // do this only once each run... const Version requested = { { static_cast< unsigned char >( major ), static_cast< unsigned char >( minor ), diff --git a/src/libcalamares/kdsingleapplicationguard/kdtoolsglobal.h b/src/libcalamares/kdsingleapplicationguard/kdtoolsglobal.h index e23b78965..c0e37ac76 100644 --- a/src/libcalamares/kdsingleapplicationguard/kdtoolsglobal.h +++ b/src/libcalamares/kdsingleapplicationguard/kdtoolsglobal.h @@ -78,7 +78,7 @@ inline T & __kdtools__dereference_for_methodcall( T * o ) { #define KDAB_SET_OBJECT_NAME( x ) __kdtools__dereference_for_methodcall( x ).setObjectName( QLatin1String( #x ) ) -KDTOOLSCORE_EXPORT bool _kdCheckQtVersion_impl( int major, int minor=0, int patchlevel=0 ); +KDTOOLSCORE_EXPORT bool _kdCheckQtVersion_impl( unsigned int major, unsigned int minor=0, unsigned int patchlevel=0 ); static inline bool kdCheckQtVersion( unsigned int major, unsigned int minor=0, unsigned int patchlevel=0 ) { return (major<<16|minor<<8|patchlevel) <= static_cast(QT_VERSION) || _kdCheckQtVersion_impl( major, minor, patchlevel ); diff --git a/src/libcalamares/kdsingleapplicationguard/pimpl_ptr.h b/src/libcalamares/kdsingleapplicationguard/pimpl_ptr.h index 6f01cd64c..b66bd11a2 100644 --- a/src/libcalamares/kdsingleapplicationguard/pimpl_ptr.h +++ b/src/libcalamares/kdsingleapplicationguard/pimpl_ptr.h @@ -1,5 +1,5 @@ -#ifndef KDTOOLSCORE__PIMPL_PTR_H -#define KDTOOLSCORE__PIMPL_PTR_H +#ifndef KDTOOLSCORE_PIMPL_PTR_H +#define KDTOOLSCORE_PIMPL_PTR_H #include "kdtoolsglobal.h" @@ -40,5 +40,5 @@ namespace kdtools { } // namespace kdtools #endif -#endif /* KDTOOLSCORE__PIMPL_PTR_H */ +#endif /* KDTOOLSCORE_PIMPL_PTR_H */ From c83395ff6dcedae7ef3eb6bdd853f879aaa412cb Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 17 Apr 2019 11:43:21 +0200 Subject: [PATCH 21/57] Reduce warnings for yaml-cpp - Use only utils/YamlUtils.h to pull in yaml-cpp and supporting code. - When compiling with clang, turn off warnings that the system header for yaml-cpp would generate. --- src/libcalamares/Settings.cpp | 2 -- src/libcalamares/utils/YamlUtils.cpp | 2 -- src/libcalamares/utils/YamlUtils.h | 20 ++++++++++++++----- src/libcalamaresui/Branding.cpp | 3 --- src/libcalamaresui/modulesystem/Module.cpp | 2 -- .../modulesystem/ModuleManager.cpp | 2 -- src/modules/contextualprocess/Tests.cpp | 2 -- src/modules/fsresizer/Tests.cpp | 2 -- src/modules/locale/GeoIPJSON.cpp | 2 -- src/modules/locale/LocaleViewStep.cpp | 2 -- src/modules/netinstall/NetInstallPage.cpp | 2 -- src/modules/netinstall/PackageModel.h | 5 ++++- src/modules/shellprocess/Tests.cpp | 2 -- src/modules/test_conf.cpp | 4 ++-- 14 files changed, 21 insertions(+), 31 deletions(-) diff --git a/src/libcalamares/Settings.cpp b/src/libcalamares/Settings.cpp index 710846a2c..00f17c2b2 100644 --- a/src/libcalamares/Settings.cpp +++ b/src/libcalamares/Settings.cpp @@ -27,8 +27,6 @@ #include #include -#include - static bool hasValue( const YAML::Node& v ) { diff --git a/src/libcalamares/utils/YamlUtils.cpp b/src/libcalamares/utils/YamlUtils.cpp index b9b3425e6..b60978919 100644 --- a/src/libcalamares/utils/YamlUtils.cpp +++ b/src/libcalamares/utils/YamlUtils.cpp @@ -20,8 +20,6 @@ #include "utils/Logger.h" -#include - #include #include #include diff --git a/src/libcalamares/utils/YamlUtils.h b/src/libcalamares/utils/YamlUtils.h index 0fa48e270..68268efdf 100644 --- a/src/libcalamares/utils/YamlUtils.h +++ b/src/libcalamares/utils/YamlUtils.h @@ -26,11 +26,21 @@ class QByteArray; class QFileInfo; -namespace YAML -{ -class Node; -class Exception; -} +// The yaml-cpp headers are not C++11 warning-proof, especially +// with picky compilers like Clang 8. Since we use Clang for the +// find-all-the-warnings case, switch those warnings off for +// the we-can't-change-them system headers. +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" +#pragma clang diagnostic ignored "-Wshadow" +#endif + +#include + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif /// @brief Appends all te elements of @p node to the string list @p v void operator>>( const YAML::Node& node, QStringList& v ); diff --git a/src/libcalamaresui/Branding.cpp b/src/libcalamaresui/Branding.cpp index e31130520..1838105d7 100644 --- a/src/libcalamaresui/Branding.cpp +++ b/src/libcalamaresui/Branding.cpp @@ -32,9 +32,6 @@ #include #include -#include - - namespace Calamares { diff --git a/src/libcalamaresui/modulesystem/Module.cpp b/src/libcalamaresui/modulesystem/Module.cpp index 73a026fb9..97833edb2 100644 --- a/src/libcalamaresui/modulesystem/Module.cpp +++ b/src/libcalamaresui/modulesystem/Module.cpp @@ -36,8 +36,6 @@ #include "PythonQtViewModule.h" #endif -#include - #include #include #include diff --git a/src/libcalamaresui/modulesystem/ModuleManager.cpp b/src/libcalamaresui/modulesystem/ModuleManager.cpp index b8dbc4ded..d2aa3f5c8 100644 --- a/src/libcalamaresui/modulesystem/ModuleManager.cpp +++ b/src/libcalamaresui/modulesystem/ModuleManager.cpp @@ -28,8 +28,6 @@ #include "utils/Logger.h" #include "utils/YamlUtils.h" -#include - #include #include #include diff --git a/src/modules/contextualprocess/Tests.cpp b/src/modules/contextualprocess/Tests.cpp index 89fb1922c..055e35c53 100644 --- a/src/modules/contextualprocess/Tests.cpp +++ b/src/modules/contextualprocess/Tests.cpp @@ -22,8 +22,6 @@ #include "utils/CommandList.h" #include "utils/YamlUtils.h" -#include - #include #include diff --git a/src/modules/fsresizer/Tests.cpp b/src/modules/fsresizer/Tests.cpp index 0da5d9dab..3c204327a 100644 --- a/src/modules/fsresizer/Tests.cpp +++ b/src/modules/fsresizer/Tests.cpp @@ -25,8 +25,6 @@ #include "utils/Logger.h" #include "utils/YamlUtils.h" -#include - #include #include diff --git a/src/modules/locale/GeoIPJSON.cpp b/src/modules/locale/GeoIPJSON.cpp index b4daf2084..d6a309af7 100644 --- a/src/modules/locale/GeoIPJSON.cpp +++ b/src/modules/locale/GeoIPJSON.cpp @@ -25,8 +25,6 @@ #include -#include - GeoIPJSON::GeoIPJSON(const QString& attribute) : GeoIP( attribute.isEmpty() ? QStringLiteral( "time_zone" ) : attribute ) { diff --git a/src/modules/locale/LocaleViewStep.cpp b/src/modules/locale/LocaleViewStep.cpp index a7dc432f8..b78365dc2 100644 --- a/src/modules/locale/LocaleViewStep.cpp +++ b/src/modules/locale/LocaleViewStep.cpp @@ -42,8 +42,6 @@ #include #include -#include - CALAMARES_PLUGIN_FACTORY_DEFINITION( LocaleViewStepFactory, registerPlugin(); ) diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index 5b7f55be3..607251488 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -36,8 +36,6 @@ #include -#include - using CalamaresUtils::yamlToVariant; NetInstallPage::NetInstallPage( QWidget* parent ) diff --git a/src/modules/netinstall/PackageModel.h b/src/modules/netinstall/PackageModel.h index f3ae567ce..f84b2779d 100644 --- a/src/modules/netinstall/PackageModel.h +++ b/src/modules/netinstall/PackageModel.h @@ -27,7 +27,10 @@ #include #include -#include +namespace YAML +{ + class Node; +} class PackageModel : public QAbstractItemModel { diff --git a/src/modules/shellprocess/Tests.cpp b/src/modules/shellprocess/Tests.cpp index 4928e28dd..3672586f0 100644 --- a/src/modules/shellprocess/Tests.cpp +++ b/src/modules/shellprocess/Tests.cpp @@ -26,8 +26,6 @@ #include "utils/Logger.h" #include "utils/YamlUtils.h" -#include - #include #include diff --git a/src/modules/test_conf.cpp b/src/modules/test_conf.cpp index ca6b72cc7..d0746421f 100644 --- a/src/modules/test_conf.cpp +++ b/src/modules/test_conf.cpp @@ -21,13 +21,13 @@ * shipped with each module for correctness -- well, for parseability. */ +#include "utils/YamlUtils.h" + #include #include #include -#include - #include #include From cef2f50510aefa0fd0853c32c957cd4bbda1be6a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 17 Apr 2019 11:57:46 +0200 Subject: [PATCH 22/57] Reduce warnings about extra ; - Trailing ; after Q_UNUSED - Trailing ; after CALAMARES_RETRANSLATE --- src/calamares/progresstree/ProgressTreeModel.cpp | 6 +++--- src/calamares/progresstree/ViewStepItem.cpp | 2 +- src/libcalamares/PythonJob.cpp | 2 +- src/libcalamaresui/utils/CalamaresUtilsGui.cpp | 2 +- src/libcalamaresui/viewpages/ViewStep.cpp | 2 +- src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp | 2 +- src/modules/finished/FinishedPage.cpp | 2 +- src/modules/finished/FinishedViewStep.cpp | 4 ++-- src/modules/keyboard/KeyboardLayoutModel.cpp | 2 +- src/modules/keyboard/KeyboardPage.cpp | 4 ++-- src/modules/license/LicensePage.cpp | 3 +-- src/modules/locale/LocalePage.cpp | 2 +- src/modules/netinstall/PackageModel.cpp | 2 +- src/modules/partition/gui/ChoicePage.cpp | 4 ++-- src/modules/partition/gui/PartitionLabelsView.cpp | 12 ++++++------ .../partition/gui/PartitionSplitterWidget.cpp | 4 ++-- src/modules/summary/SummaryPage.cpp | 2 +- src/modules/welcome/checker/GeneralRequirements.cpp | 2 +- 18 files changed, 29 insertions(+), 30 deletions(-) diff --git a/src/calamares/progresstree/ProgressTreeModel.cpp b/src/calamares/progresstree/ProgressTreeModel.cpp index cf0a0e44a..e3b4fa030 100644 --- a/src/calamares/progresstree/ProgressTreeModel.cpp +++ b/src/calamares/progresstree/ProgressTreeModel.cpp @@ -98,9 +98,9 @@ ProgressTreeModel::data( const QModelIndex& index, int role ) const QVariant ProgressTreeModel::headerData( int section, Qt::Orientation orientation, int role ) const { - Q_UNUSED( section ); - Q_UNUSED( orientation ); - Q_UNUSED( role ); + Q_UNUSED( section ) + Q_UNUSED( orientation ) + Q_UNUSED( role ) return QVariant(); } diff --git a/src/calamares/progresstree/ViewStepItem.cpp b/src/calamares/progresstree/ViewStepItem.cpp index 50cf0b9f8..7c17ff5ae 100644 --- a/src/calamares/progresstree/ViewStepItem.cpp +++ b/src/calamares/progresstree/ViewStepItem.cpp @@ -46,7 +46,7 @@ void ViewStepItem::appendChild( ProgressTreeItem* item ) { Q_ASSERT( false ); - Q_UNUSED( item ); + Q_UNUSED( item ) } diff --git a/src/libcalamares/PythonJob.cpp b/src/libcalamares/PythonJob.cpp index 65a5c4506..6e8323e49 100644 --- a/src/libcalamares/PythonJob.cpp +++ b/src/libcalamares/PythonJob.cpp @@ -92,7 +92,7 @@ BOOST_PYTHON_MODULE( libcalamares ) bp::object utilsModule( bp::handle<>( bp::borrowed( PyImport_AddModule( "libcalamares.utils" ) ) ) ); bp::scope().attr( "utils" ) = utilsModule; bp::scope utilsScope = utilsModule; - Q_UNUSED( utilsScope ); + Q_UNUSED( utilsScope ) bp::def( "debug", diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp index 69924f1b8..24b42d4e5 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp @@ -40,7 +40,7 @@ static int s_defaultFontHeight = 0; QPixmap defaultPixmap( ImageType type, ImageMode mode, const QSize& size ) { - Q_UNUSED( mode ); + Q_UNUSED( mode ) QPixmap pixmap; switch ( type ) diff --git a/src/libcalamaresui/viewpages/ViewStep.cpp b/src/libcalamaresui/viewpages/ViewStep.cpp index 8a76a05ce..cdfc7bbc9 100644 --- a/src/libcalamaresui/viewpages/ViewStep.cpp +++ b/src/libcalamaresui/viewpages/ViewStep.cpp @@ -71,7 +71,7 @@ ViewStep::setModuleInstanceKey( const QString& instanceKey ) void ViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { - Q_UNUSED( configurationMap ); + Q_UNUSED( configurationMap ) } diff --git a/src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp b/src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp index 140090b97..d1094bb7c 100644 --- a/src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp +++ b/src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp @@ -43,7 +43,7 @@ FixedAspectRatioLabel::setPixmap( const QPixmap& pixmap ) void FixedAspectRatioLabel::resizeEvent( QResizeEvent* event ) { - Q_UNUSED( event ); + Q_UNUSED( event ) QLabel::setPixmap( m_pixmap.scaled( contentsRect().size(), Qt::KeepAspectRatio, diff --git a/src/modules/finished/FinishedPage.cpp b/src/modules/finished/FinishedPage.cpp index cad05bda4..1bc935d0d 100644 --- a/src/modules/finished/FinishedPage.cpp +++ b/src/modules/finished/FinishedPage.cpp @@ -125,7 +125,7 @@ FinishedPage::focusInEvent( QFocusEvent* e ) void FinishedPage::onInstallationFailed( const QString& message, const QString& details ) { - Q_UNUSED( details ); + Q_UNUSED( details ) if ( Calamares::Settings::instance()->isSetupMode() ) ui->mainText->setText( tr( "

Setup Failed


" "%1 has not been set up on your computer.
" diff --git a/src/modules/finished/FinishedViewStep.cpp b/src/modules/finished/FinishedViewStep.cpp index 721df9765..d01a99ce9 100644 --- a/src/modules/finished/FinishedViewStep.cpp +++ b/src/modules/finished/FinishedViewStep.cpp @@ -148,8 +148,8 @@ FinishedViewStep::jobs() const void FinishedViewStep::onInstallationFailed( const QString& message, const QString& details ) { - Q_UNUSED( message ); - Q_UNUSED( details ); + Q_UNUSED( message ) + Q_UNUSED( details ) installFailed = true; } diff --git a/src/modules/keyboard/KeyboardLayoutModel.cpp b/src/modules/keyboard/KeyboardLayoutModel.cpp index 5b5d37130..0abd89ae2 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.cpp +++ b/src/modules/keyboard/KeyboardLayoutModel.cpp @@ -32,7 +32,7 @@ KeyboardLayoutModel::KeyboardLayoutModel( QObject* parent ) int KeyboardLayoutModel::rowCount( const QModelIndex& parent ) const { - Q_UNUSED( parent ); + Q_UNUSED( parent ) return m_layouts.count(); } diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 5a82e2545..241d4553e 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -436,7 +436,7 @@ void KeyboardPage::onListLayoutCurrentItemChanged( const QModelIndex& current, const QModelIndex& previous ) { - Q_UNUSED( previous ); + Q_UNUSED( previous ) if ( !current.isValid() ) return; @@ -457,7 +457,7 @@ static inline QStringList xkbmap_args( QStringList&& r, const QString& layout, c void KeyboardPage::onListVariantCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous ) { - Q_UNUSED( previous ); + Q_UNUSED( previous ) QPersistentModelIndex layoutIndex = ui->listLayout->currentIndex(); LayoutItem* variantItem = dynamic_cast< LayoutItem* >( current ); diff --git a/src/modules/license/LicensePage.cpp b/src/modules/license/LicensePage.cpp index 351c55d79..1fb3de7a8 100644 --- a/src/modules/license/LicensePage.cpp +++ b/src/modules/license/LicensePage.cpp @@ -87,8 +87,7 @@ LicensePage::LicensePage(QWidget *parent) CALAMARES_RETRANSLATE( ui->acceptCheckBox->setText( tr( "I accept the terms and conditions above." ) ); - ); - + ) } diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp index 1ddb2cc0a..c1309a129 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -101,7 +101,7 @@ LocalePage::LocalePage( QWidget* parent ) static_cast< void ( QComboBox::* )( int ) >( &QComboBox::currentIndexChanged ), [this]( int currentIndex ) { - Q_UNUSED( currentIndex ); + Q_UNUSED( currentIndex ) QHash< QString, QList< LocaleGlobal::Location > > regions = LocaleGlobal::getLocations(); if ( !regions.contains( m_regionCombo->currentData().toString() ) ) return; diff --git a/src/modules/netinstall/PackageModel.cpp b/src/modules/netinstall/PackageModel.cpp index f64bd778f..588646816 100644 --- a/src/modules/netinstall/PackageModel.cpp +++ b/src/modules/netinstall/PackageModel.cpp @@ -127,7 +127,7 @@ bool PackageModel::setHeaderData( int section, Qt::Orientation orientation, const QVariant& value, int role ) { - Q_UNUSED( role ); + Q_UNUSED( role ) if ( orientation == Qt::Horizontal ) { diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index fc57d1fad..801f3491e 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -540,7 +540,7 @@ void ChoicePage::doAlongsideSetupSplitter( const QModelIndex& current, const QModelIndex& previous ) { - Q_UNUSED( previous ); + Q_UNUSED( previous ) if ( !current.isValid() ) return; @@ -718,7 +718,7 @@ void ChoicePage::onPartitionToReplaceSelected( const QModelIndex& current, const QModelIndex& previous ) { - Q_UNUSED( previous ); + Q_UNUSED( previous ) if ( !current.isValid() ) return; diff --git a/src/modules/partition/gui/PartitionLabelsView.cpp b/src/modules/partition/gui/PartitionLabelsView.cpp index 36774cd20..0da7beba8 100644 --- a/src/modules/partition/gui/PartitionLabelsView.cpp +++ b/src/modules/partition/gui/PartitionLabelsView.cpp @@ -100,7 +100,7 @@ PartitionLabelsView::sizeHint() const void PartitionLabelsView::paintEvent( QPaintEvent* event ) { - Q_UNUSED( event ); + Q_UNUSED( event ) QPainter painter( viewport() ); painter.fillRect( rect(), palette().window() ); @@ -478,7 +478,7 @@ PartitionLabelsView::visualRect( const QModelIndex& idx ) const QRegion PartitionLabelsView::visualRegionForSelection( const QItemSelection& selection ) const { - Q_UNUSED( selection ); + Q_UNUSED( selection ) return QRegion(); } @@ -543,8 +543,8 @@ PartitionLabelsView::setExtendedPartitionHidden( bool hidden ) QModelIndex PartitionLabelsView::moveCursor( CursorAction cursorAction, Qt::KeyboardModifiers modifiers ) { - Q_UNUSED( cursorAction ); - Q_UNUSED( modifiers ); + Q_UNUSED( cursorAction ) + Q_UNUSED( modifiers ) return QModelIndex(); } @@ -553,7 +553,7 @@ PartitionLabelsView::moveCursor( CursorAction cursorAction, Qt::KeyboardModifier bool PartitionLabelsView::isIndexHidden( const QModelIndex& index ) const { - Q_UNUSED( index ); + Q_UNUSED( index ) return false; } @@ -598,7 +598,7 @@ PartitionLabelsView::mouseMoveEvent( QMouseEvent* event ) void PartitionLabelsView::leaveEvent( QEvent* event ) { - Q_UNUSED( event ); + Q_UNUSED( event ) QGuiApplication::restoreOverrideCursor(); if ( m_hoveredIndex.isValid() ) diff --git a/src/modules/partition/gui/PartitionSplitterWidget.cpp b/src/modules/partition/gui/PartitionSplitterWidget.cpp index ae73ecfcd..0281ab32c 100644 --- a/src/modules/partition/gui/PartitionSplitterWidget.cpp +++ b/src/modules/partition/gui/PartitionSplitterWidget.cpp @@ -286,7 +286,7 @@ PartitionSplitterWidget::minimumSizeHint() const void PartitionSplitterWidget::paintEvent( QPaintEvent* event ) { - Q_UNUSED( event ); + Q_UNUSED( event ) QPainter painter( this ); painter.fillRect( rect(), palette().window() ); @@ -401,7 +401,7 @@ PartitionSplitterWidget::mouseMoveEvent( QMouseEvent* event ) void PartitionSplitterWidget::mouseReleaseEvent( QMouseEvent* event ) { - Q_UNUSED( event ); + Q_UNUSED( event ) m_resizing = false; } diff --git a/src/modules/summary/SummaryPage.cpp b/src/modules/summary/SummaryPage.cpp index bddfe9dcc..6913d3e17 100644 --- a/src/modules/summary/SummaryPage.cpp +++ b/src/modules/summary/SummaryPage.cpp @@ -41,7 +41,7 @@ SummaryPage::SummaryPage( const SummaryViewStep* thisViewStep, QWidget* parent ) , m_contentWidget( nullptr ) , m_scrollArea( new QScrollArea( this ) ) { - Q_UNUSED( parent ); + Q_UNUSED( parent ) Q_ASSERT( m_thisViewStep ); QVBoxLayout* layout = new QVBoxLayout( this ); layout->setContentsMargins( 0, 0, 0, 0 ); diff --git a/src/modules/welcome/checker/GeneralRequirements.cpp b/src/modules/welcome/checker/GeneralRequirements.cpp index 067105b28..675d43ed4 100644 --- a/src/modules/welcome/checker/GeneralRequirements.cpp +++ b/src/modules/welcome/checker/GeneralRequirements.cpp @@ -278,7 +278,7 @@ bool GeneralRequirements::checkEnoughStorage( qint64 requiredSpace ) { #ifdef WITHOUT_LIBPARTED - Q_UNUSED( requiredSpace ); + Q_UNUSED( requiredSpace ) cWarning() << "GeneralRequirements is configured without libparted."; return false; #else From bdb7bf71a8ed1cef055cdc50a648ce7cd3e33db8 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 17 Apr 2019 12:19:12 +0200 Subject: [PATCH 23/57] Reduce warnings from moc-generated code - The auto-generated code produces a lot of warnings from Clang 8; this obscures the more meaningful warnings from actual Calamares code, so tone the warnings down. - For Clang, set CALAMARES_MOC_OPTIONS. - Add convenience CMake function for automoccing. It applies the options as needed to a given target. --- CMakeLists.txt | 3 +++ CMakeModules/CalamaresAddLibrary.cmake | 7 +++-- CMakeModules/CalamaresAutomoc.cmake | 36 ++++++++++++++++++++++++++ src/libcalamares/CMakeLists.txt | 4 +-- src/libcalamares/utils/moc-warnings.h | 4 +++ 5 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 CMakeModules/CalamaresAutomoc.cmake create mode 100644 src/libcalamares/utils/moc-warnings.h diff --git a/CMakeLists.txt b/CMakeLists.txt index c9dddb547..ce627fc9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -208,6 +208,8 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) set( CMAKE_TOOLCHAIN_PREFIX "llvm-" ) set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) + + set( CALAMARES_AUTOMOC_OPTIONS "-butils/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" ) @@ -509,6 +511,7 @@ install( "CMakeModules/CalamaresAddLibrary.cmake" "CMakeModules/CalamaresAddBrandingSubdirectory.cmake" "CMakeModules/CalamaresAddTranslations.cmake" + "CMakeModules/CalamaresAutomoc.cmake" "CMakeModules/CMakeColors.cmake" DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" diff --git a/CMakeModules/CalamaresAddLibrary.cmake b/CMakeModules/CalamaresAddLibrary.cmake index d5d734989..e731e2b15 100644 --- a/CMakeModules/CalamaresAddLibrary.cmake +++ b/CMakeModules/CalamaresAddLibrary.cmake @@ -44,6 +44,7 @@ # flag (i.e. `-D`) so only state the name (optionally, also the value) # without a `-D` prefixed to it. Pass in a CMake list as needed. include( CMakeParseArguments ) +include( CalamaresAutomoc ) function(calamares_add_library) # parse arguments (name needs to be saved before passing ARGN into the macro) @@ -81,10 +82,8 @@ function(calamares_add_library) add_library(${target} SHARED ${LIBRARY_SOURCES}) endif() - # definitions - can this be moved into set_target_properties below? - add_definitions(${QT_DEFINITIONS}) - set_target_properties(${target} PROPERTIES AUTOMOC TRUE) - + calamares_automoc(${target}) + if(LIBRARY_EXPORT_MACRO) set_target_properties(${target} PROPERTIES COMPILE_DEFINITIONS ${LIBRARY_EXPORT_MACRO}) endif() diff --git a/CMakeModules/CalamaresAutomoc.cmake b/CMakeModules/CalamaresAutomoc.cmake new file mode 100644 index 000000000..0ca5cd89a --- /dev/null +++ b/CMakeModules/CalamaresAutomoc.cmake @@ -0,0 +1,36 @@ +# === This file is part of Calamares - === +# +# Calamares is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Calamares is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Calamares. If not, see . +# +# SPDX-License-Identifier: GPL-3.0+ +# License-Filename: LICENSE +# +### +# +# Helper function for doing automoc on a target. +# +# Sets AUTOMOC TRUE for a target. +# +# If the global variable CALAMARES_AUTOMOC_OPTIONS is set, uses that +# as well to set options passed to MOC. This can be used to add +# libcalamares/utils/moc-warnings.h file to the moc, which in turn +# reduces compiler warnings in generated MOC code. +# + +function(calamares_automoc TARGET) + set_target_properties( ${TARGET} PROPERTIES AUTOMOC TRUE ) + if ( CALAMARES_AUTOMOC_OPTIONS ) + set_target_properties( ${TARGET} PROPERTIES AUTOMOC_MOC_OPTIONS "${CALAMARES_AUTOMOC_OPTIONS}" ) + endif() +endfunction() diff --git a/src/libcalamares/CMakeLists.txt b/src/libcalamares/CMakeLists.txt index a7dd1c0fe..340f8fe3b 100644 --- a/src/libcalamares/CMakeLists.txt +++ b/src/libcalamares/CMakeLists.txt @@ -84,10 +84,10 @@ endif() add_library( calamares SHARED ${libSources} ${kdsagSources} ${utilsSources} ) set_target_properties( calamares PROPERTIES - AUTOMOC TRUE VERSION ${CALAMARES_VERSION_SHORT} SOVERSION ${CALAMARES_VERSION_SHORT} ) +calamares_automoc( calamares ) target_link_libraries( calamares LINK_PRIVATE @@ -114,7 +114,7 @@ if ( ECM_FOUND AND BUILD_TESTING ) Qt5::Core Qt5::Test ) - set_target_properties( libcalamarestest PROPERTIES AUTOMOC TRUE ) + calamares_automoc( libcalamarestest ) endif() # Make symlink lib/calamares/libcalamares.so to lib/libcalamares.so.VERSION so diff --git a/src/libcalamares/utils/moc-warnings.h b/src/libcalamares/utils/moc-warnings.h new file mode 100644 index 000000000..b773c176b --- /dev/null +++ b/src/libcalamares/utils/moc-warnings.h @@ -0,0 +1,4 @@ +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wextra-semi-stmt" +#pragma clang diagnostic ignored "-Wredundant-parens" +#endif From 123c774a478b906a17f6ed9bfbfe42ed503c0494 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 12:01:41 +0200 Subject: [PATCH 24/57] Use new automoc options --- src/calamares/CMakeLists.txt | 2 +- src/modules/contextualprocess/CMakeLists.txt | 2 +- src/modules/locale/CMakeLists.txt | 5 +++-- src/modules/shellprocess/CMakeLists.txt | 2 +- src/modules/users/CMakeLists.txt | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/calamares/CMakeLists.txt b/src/calamares/CMakeLists.txt index e1f8e4236..c913c0959 100644 --- a/src/calamares/CMakeLists.txt +++ b/src/calamares/CMakeLists.txt @@ -38,10 +38,10 @@ set( final_src ${calamaresSources} ${calamaresRc} ${trans_outfile} ) add_executable( calamares_bin ${final_src} ) set_target_properties(calamares_bin PROPERTIES - AUTOMOC TRUE ENABLE_EXPORTS TRUE RUNTIME_OUTPUT_NAME calamares ) +calamares_automoc( calamares_bin ) if( WITH_KF5Crash ) set( LINK_LIBRARIES diff --git a/src/modules/contextualprocess/CMakeLists.txt b/src/modules/contextualprocess/CMakeLists.txt index f75946b58..a7e9ed05b 100644 --- a/src/modules/contextualprocess/CMakeLists.txt +++ b/src/modules/contextualprocess/CMakeLists.txt @@ -21,5 +21,5 @@ if( ECM_FOUND AND BUILD_TESTING ) Qt5::Core Qt5::Test ) - set_target_properties( contextualprocesstest PROPERTIES AUTOMOC TRUE ) + calamares_automoc( contextualprocesstest ) endif() diff --git a/src/modules/locale/CMakeLists.txt b/src/modules/locale/CMakeLists.txt index 8faf8468c..affaa3753 100644 --- a/src/modules/locale/CMakeLists.txt +++ b/src/modules/locale/CMakeLists.txt @@ -54,7 +54,7 @@ if( ECM_FOUND AND BUILD_TESTING ) ${geoip_libs} ${YAMLCPP_LIBRARY} ) - set_target_properties( geoiptest PROPERTIES AUTOMOC TRUE ) + calamares_automoc( geoiptest ) ecm_add_test( Tests.cpp @@ -65,10 +65,11 @@ if( ECM_FOUND AND BUILD_TESTING ) calamares Qt5::Test ) - set_target_properties( localetest PROPERTIES AUTOMOC TRUE ) + calamares_automoc( localetest ) endif() if( BUILD_TESTING ) add_executable( test_geoip test_geoip.cpp ${geoip_src} ) target_link_libraries( test_geoip calamaresui Qt5::Network ${geoip_libs} ${YAMLCPP_LIBRARY} ) + calamares_automoc( test_geoip ) endif() diff --git a/src/modules/shellprocess/CMakeLists.txt b/src/modules/shellprocess/CMakeLists.txt index 82ae8b911..166dff17d 100644 --- a/src/modules/shellprocess/CMakeLists.txt +++ b/src/modules/shellprocess/CMakeLists.txt @@ -20,5 +20,5 @@ if( ECM_FOUND AND BUILD_TESTING ) Qt5::Core Qt5::Test ) - set_target_properties( shellprocesstest PROPERTIES AUTOMOC TRUE ) + calamares_automoc( shellprocesstest ) endif() diff --git a/src/modules/users/CMakeLists.txt b/src/modules/users/CMakeLists.txt index 207ffbb3a..d0e7b6d9d 100644 --- a/src/modules/users/CMakeLists.txt +++ b/src/modules/users/CMakeLists.txt @@ -51,5 +51,5 @@ if( ECM_FOUND AND BUILD_TESTING ) Qt5::Test ${CRYPT_LIBRARIES} ) - set_target_properties( passwordtest PROPERTIES AUTOMOC TRUE ) + calamares_automoc( passwordtest ) endif() From a1e08d2236d5e91d5f4d91c1be294e51258c8848 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 11:40:47 +0200 Subject: [PATCH 25/57] [keyboard] Don't use useless rvalue-ref - Weird && usage here made redundant through RVO, just return something normally instead. --- src/modules/keyboard/KeyboardPage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 241d4553e..3a0da2866 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -446,9 +446,9 @@ KeyboardPage::onListLayoutCurrentItemChanged( const QModelIndex& current, /* Returns stringlist with suitable setxkbmap command-line arguments * to set the given @p layout and @p variant. */ -static inline QStringList xkbmap_args( QStringList&& r, const QString& layout, const QString& variant ) +static inline QStringList xkbmap_args( const QString& layout, const QString& variant ) { - r << "-layout" << layout; + QStringList r{ "-layout", layout }; if ( !variant.isEmpty() ) r << "-variant" << variant; return r; @@ -483,7 +483,7 @@ KeyboardPage::onListVariantCurrentItemChanged( QListWidgetItem* current, QListWi connect( &m_setxkbmapTimer, &QTimer::timeout, this, [=] { - QProcess::execute( "setxkbmap", xkbmap_args( QStringList(), layout, variant ) ); + QProcess::execute( "setxkbmap", xkbmap_args( layout, variant ) ); cDebug() << "xkbmap selection changed to: " << layout << '-' << variant; m_setxkbmapTimer.disconnect( this ); } ); From 3ccbcdc1bd7522847d1c1fc7ee5d058af1f02968 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 12:16:27 +0200 Subject: [PATCH 26/57] [libcalamares] Don't moc on JobQueue - There is no reason for JobThread to have a Q_OBJECT macro, so drop the moccing (this also stops some warnings from the generated moc code). - Define the (virtual) destructor out-of-line to avoid vtable warnings. --- src/libcalamares/JobQueue.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libcalamares/JobQueue.cpp b/src/libcalamares/JobQueue.cpp index 46d58d429..6ef055ffc 100644 --- a/src/libcalamares/JobQueue.cpp +++ b/src/libcalamares/JobQueue.cpp @@ -35,7 +35,6 @@ namespace Calamares class JobThread : public QThread { - Q_OBJECT public: JobThread( JobQueue* queue ) : QThread( queue ) @@ -44,6 +43,8 @@ public: { } + virtual ~JobThread() override; + void setJobs( const JobList& jobs ) { m_jobs = jobs; @@ -122,6 +123,10 @@ private: } }; +JobThread::~JobThread() +{ +} + JobQueue* JobQueue::s_instance = nullptr; @@ -184,5 +189,3 @@ JobQueue::enqueue( const JobList& jobs ) } } // namespace Calamares - -#include "JobQueue.moc" From 3e88b408fa419085a8c23dbf26604f214ef77ad0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 12:40:04 +0200 Subject: [PATCH 27/57] [calamares] Remove unused item Role --- src/calamares/progresstree/ProgressTreeItem.cpp | 4 +--- src/calamares/progresstree/ProgressTreeModel.h | 1 - src/calamares/progresstree/ViewStepItem.cpp | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/calamares/progresstree/ProgressTreeItem.cpp b/src/calamares/progresstree/ProgressTreeItem.cpp index 769ffaf90..0445962ab 100644 --- a/src/calamares/progresstree/ProgressTreeItem.cpp +++ b/src/calamares/progresstree/ProgressTreeItem.cpp @@ -84,9 +84,7 @@ ProgressTreeRoot::ProgressTreeRoot() QVariant -ProgressTreeRoot::data( int role ) const +ProgressTreeRoot::data( int ) const { - if ( role == ProgressTreeModel::ProgressTreeItemRole ) - return this; return QVariant(); } diff --git a/src/calamares/progresstree/ProgressTreeModel.h b/src/calamares/progresstree/ProgressTreeModel.h index d89707183..0e9574516 100644 --- a/src/calamares/progresstree/ProgressTreeModel.h +++ b/src/calamares/progresstree/ProgressTreeModel.h @@ -35,7 +35,6 @@ class ProgressTreeModel : public QAbstractItemModel public: enum Role { - ProgressTreeItemRole = Qt::UserRole + 10, ProgressTreeItemCurrentRole = Qt::UserRole + 11 }; diff --git a/src/calamares/progresstree/ViewStepItem.cpp b/src/calamares/progresstree/ViewStepItem.cpp index 7c17ff5ae..fe2fe6034 100644 --- a/src/calamares/progresstree/ViewStepItem.cpp +++ b/src/calamares/progresstree/ViewStepItem.cpp @@ -53,8 +53,6 @@ ViewStepItem::appendChild( ProgressTreeItem* item ) QVariant ViewStepItem::data( int role ) const { - if ( role == ProgressTreeModel::ProgressTreeItemRole ) - return this; if ( role == Qt::DisplayRole ) { return m_step ? m_step->prettyName() From b704933b582127058a0158bbfc2c5f1ace160fa3 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 12:56:56 +0200 Subject: [PATCH 28/57] [keyboard] Avoid crash with unconfigured keyboards - If there's no items at all, ->currentItem() can return nullptr, so don't dereference that. Found on FreeBSD. --- src/modules/keyboard/KeyboardPage.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 3a0da2866..4509a5dbd 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -216,12 +216,12 @@ QString KeyboardPage::prettyStatus() const { QString status; - status += tr( "Set keyboard model to %1.
" ) - .arg( ui->comboBoxModel->currentText() ); - status += tr( "Set keyboard layout to %1/%2." ) - .arg( ui->listLayout->currentIndex().data().toString() ) - .arg( ui->listVariant->currentItem()->text() ); - + 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; } From 3c014a868c830ab5781123efa16516d55a20fa90 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 13:06:50 +0200 Subject: [PATCH 29/57] [keyboard] Make keyboard preview more robust - Replace #define with static const char - Handle FreeBSD as well (for testing purposes) --- src/modules/keyboard/keyboardwidget/keyboardglobal.cpp | 10 ++++++++-- src/modules/keyboard/keyboardwidget/keyboardglobal.h | 2 -- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp b/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp index 8b6cac4be..98fca85fe 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp +++ b/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp @@ -24,18 +24,24 @@ #include "utils/Logger.h" +#ifdef Q_OS_FREEBSD +static const char XKB_FILE[] = "/usr/local/share/X11/xkb/rules/base.lst"; +#else +static const char XKB_FILE[] = "/usr/share/X11/xkb/rules/base.lst"; +#endif + //### //### Public methods //### QMap KeyboardGlobal::getKeyboardLayouts() { - return parseKeyboardLayouts(XKB_FILE); + return parseKeyboardLayouts( XKB_FILE ); } QMap KeyboardGlobal::getKeyboardModels() { - return parseKeyboardModels(XKB_FILE); + return parseKeyboardModels( XKB_FILE ); } diff --git a/src/modules/keyboard/keyboardwidget/keyboardglobal.h b/src/modules/keyboard/keyboardwidget/keyboardglobal.h index 01730ced4..a438ed53c 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardglobal.h +++ b/src/modules/keyboard/keyboardwidget/keyboardglobal.h @@ -35,8 +35,6 @@ #include #include -#define XKB_FILE "/usr/share/X11/xkb/rules/base.lst" - class KeyboardGlobal { public: From fa70b3aa60a92deb1f3fbaef3a22356ad78329c5 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 13:22:12 +0200 Subject: [PATCH 30/57] [keyboard] Refactor keyboard model loading - Don't need private static methods - Pass char* if that's what we've got --- .../keyboardwidget/keyboardglobal.cpp | 46 ++++++++----------- .../keyboard/keyboardwidget/keyboardglobal.h | 8 +--- 2 files changed, 20 insertions(+), 34 deletions(-) diff --git a/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp b/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp index 98fca85fe..e51f8ef16 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp +++ b/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014, Teo Mrnjavac + * Copyright 2019, Adriaan de Groot * * Originally from the Manjaro Installation Framework * by Roland Singer @@ -30,31 +31,10 @@ static const char XKB_FILE[] = "/usr/local/share/X11/xkb/rules/base.lst"; static const char XKB_FILE[] = "/usr/share/X11/xkb/rules/base.lst"; #endif -//### -//### Public methods -//### - - -QMap KeyboardGlobal::getKeyboardLayouts() { - return parseKeyboardLayouts( XKB_FILE ); -} - - -QMap KeyboardGlobal::getKeyboardModels() { - return parseKeyboardModels( XKB_FILE ); -} - - - -//### -//### Private methods -//### - - //### Source by Georg Grabler ###// -QMap KeyboardGlobal::parseKeyboardModels(QString filepath) +static KeyboardGlobal::ModelsMap parseKeyboardModels(const char* filepath) { - QMap models; + KeyboardGlobal::ModelsMap models; QFile fh(filepath); fh.open(QIODevice::ReadOnly); @@ -97,10 +77,9 @@ QMap KeyboardGlobal::parseKeyboardModels(QString filepath) } - -QMap< QString, KeyboardGlobal::KeyboardInfo > KeyboardGlobal::parseKeyboardLayouts(QString filepath) +KeyboardGlobal::LayoutsMap parseKeyboardLayouts(const char* filepath) { - QMap< QString, KeyboardInfo > layouts; + KeyboardGlobal::LayoutsMap layouts; //### Get Layouts ###// @@ -130,7 +109,7 @@ QMap< QString, KeyboardGlobal::KeyboardInfo > KeyboardGlobal::parseKeyboardLayou // insert into the layout map if (rx.indexIn(line) != -1) { - KeyboardInfo info; + KeyboardGlobal::KeyboardInfo info; info.description = rx.cap(2); info.variants.insert(QObject::tr("Default"), ""); layouts.insert(rx.cap(1), info); @@ -166,7 +145,7 @@ QMap< QString, KeyboardGlobal::KeyboardInfo > KeyboardGlobal::parseKeyboardLayou layouts.find(rx.cap(2)).value().variants.insert(rx.cap(3), rx.cap(1)); } else { // create a new map in the multimap - the value was not found. - KeyboardInfo info; + KeyboardGlobal::KeyboardInfo info; info.description = rx.cap(2); info.variants.insert(QObject::tr("Default"), ""); info.variants.insert(rx.cap(3), rx.cap(1)); @@ -177,3 +156,14 @@ QMap< QString, KeyboardGlobal::KeyboardInfo > KeyboardGlobal::parseKeyboardLayou return layouts; } + + +KeyboardGlobal::LayoutsMap KeyboardGlobal::getKeyboardLayouts() { + return parseKeyboardLayouts( XKB_FILE ); +} + + +KeyboardGlobal::ModelsMap KeyboardGlobal::getKeyboardModels() { + return parseKeyboardModels( XKB_FILE ); +} + diff --git a/src/modules/keyboard/keyboardwidget/keyboardglobal.h b/src/modules/keyboard/keyboardwidget/keyboardglobal.h index a438ed53c..349ef2d36 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardglobal.h +++ b/src/modules/keyboard/keyboardwidget/keyboardglobal.h @@ -44,14 +44,10 @@ public: }; using LayoutsMap = QMap< QString, KeyboardInfo >; + using ModelsMap = QMap< QString, QString >; static LayoutsMap getKeyboardLayouts(); - static QMap< QString, QString > getKeyboardModels(); - - -private: - static QMap< QString, QString > parseKeyboardModels(QString filepath); - static LayoutsMap parseKeyboardLayouts(QString filepath); + static ModelsMap getKeyboardModels(); }; #endif // KEYBOARDGLOBAL_H From 118f9255fdee77c7fe85bc772c6ece09d77f7393 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 13:36:12 +0200 Subject: [PATCH 31/57] [keyboard] Refactor sectioning - Look for section in a consistent fashion - Simplify parsing loops --- .../keyboardwidget/keyboardglobal.cpp | 56 ++++++++++--------- .../keyboard/keyboardwidget/keyboardglobal.h | 2 +- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp b/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp index e51f8ef16..54805ecb4 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp +++ b/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp @@ -31,6 +31,27 @@ static const char XKB_FILE[] = "/usr/local/share/X11/xkb/rules/base.lst"; static const char XKB_FILE[] = "/usr/share/X11/xkb/rules/base.lst"; #endif +// The xkb rules file is made of several "sections". Each section +// starts with a line "! ". The static methods here +// handle individual sections. + +/** @brief Scans a file for a named section + * + * Reads from @p fh incrementally until it finds a section named @p name + * or hits end-of-file. Returns true if the section is found. The + * @p name must include the "! " section marker as well. + */ +static bool findSection( QFile& fh, const char* name ) +{ + while ( !fh.atEnd() ) + { + QByteArray line = fh.readLine(); + if ( line.startsWith( name ) ) + return true; + } + return false; +} + //### Source by Georg Grabler ###// static KeyboardGlobal::ModelsMap parseKeyboardModels(const char* filepath) { @@ -44,18 +65,14 @@ static KeyboardGlobal::ModelsMap parseKeyboardModels(const char* filepath) return models; } - bool modelsFound = false; + bool modelsFound = findSection( fh, "! model" ); // read the file until the end or until we break the loop - while (!fh.atEnd()) { + while (modelsFound && !fh.atEnd()) { QByteArray line = fh.readLine(); - // check if we start with the model section in the file - if (!modelsFound && line.startsWith("! model")) - modelsFound = true; - else if (modelsFound && line.startsWith ("!")) + // check if we start a new section + if ( line.startsWith( '!' ) ) break; - else if (!modelsFound) - continue; // here we are in the model section, otherwhise we would continue or break QRegExp rx; @@ -91,18 +108,13 @@ KeyboardGlobal::LayoutsMap parseKeyboardLayouts(const char* filepath) return layouts; } - bool layoutsFound = false; + bool layoutsFound = findSection( fh, "! layout" ); // read the file until the end or we break the loop - while (!fh.atEnd()) { + while ( layoutsFound && !fh.atEnd() ) { QByteArray line = fh.readLine(); - // find the layout section otherwhise continue. If the layout section is at it's end, break the loop - if (!layoutsFound && line.startsWith("! layout")) - layoutsFound = true; - else if (layoutsFound && line.startsWith ("!")) + if ( line.startsWith( '!' ) ) break; - else if (!layoutsFound) - continue; QRegExp rx; rx.setPattern("^\\s+(\\S+)\\s+(\\w.*)\n$"); @@ -121,19 +133,13 @@ KeyboardGlobal::LayoutsMap parseKeyboardLayouts(const char* filepath) //### Get Variants ###// - bool variantsFound = false; + bool variantsFound = findSection( fh, "! variant" ); // read the file until the end or until we break - while (!fh.atEnd()) { + while (variantsFound && !fh.atEnd() ) { QByteArray line = fh.readLine(); - // continue until we found the variant section. If found, read until the next section is found - if (!variantsFound && line.startsWith("! variant")) { - variantsFound = true; - continue; - } else if (variantsFound && line.startsWith ("!")) + if ( line.startsWith( '!' ) ) break; - else if (!variantsFound) - continue; QRegExp rx; rx.setPattern("^\\s+(\\S+)\\s+(\\S+): (\\w.*)\n$"); diff --git a/src/modules/keyboard/keyboardwidget/keyboardglobal.h b/src/modules/keyboard/keyboardwidget/keyboardglobal.h index 349ef2d36..1732dc913 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardglobal.h +++ b/src/modules/keyboard/keyboardwidget/keyboardglobal.h @@ -1,7 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * Copyright 2017, 2019, Adriaan de Groot * * Originally from the Manjaro Installation Framework * by Roland Singer From cf51eb7aab13ec79dcce3e81b2e7be112017b68c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 13:39:14 +0200 Subject: [PATCH 32/57] [keyboard] Apply source formatting - Move errant attribution line to the copyright headers; unsure of the year though. - Apply Calamares coding style. --- .../keyboardwidget/keyboardglobal.cpp | 86 +++++++++++-------- 1 file changed, 50 insertions(+), 36 deletions(-) diff --git a/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp b/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp index 54805ecb4..f363ea844 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp +++ b/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp @@ -7,6 +7,8 @@ * by Roland Singer * Copyright (C) 2007 Free Software Foundation, Inc. * + * Source by Georg Grabler + * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -36,7 +38,7 @@ static const char XKB_FILE[] = "/usr/share/X11/xkb/rules/base.lst"; // handle individual sections. /** @brief Scans a file for a named section - * + * * Reads from @p fh incrementally until it finds a section named @p name * or hits end-of-file. Returns true if the section is found. The * @p name must include the "! " section marker as well. @@ -52,22 +54,23 @@ static bool findSection( QFile& fh, const char* name ) return false; } -//### Source by Georg Grabler ###// -static KeyboardGlobal::ModelsMap parseKeyboardModels(const char* filepath) +static KeyboardGlobal::ModelsMap parseKeyboardModels( const char* filepath ) { KeyboardGlobal::ModelsMap models; - QFile fh(filepath); - fh.open(QIODevice::ReadOnly); + QFile fh( filepath ); + fh.open( QIODevice::ReadOnly ); - if (!fh.isOpen()) { + if ( !fh.isOpen() ) + { cDebug() << "X11 Keyboard model definitions not found!"; return models; } bool modelsFound = findSection( fh, "! model" ); // read the file until the end or until we break the loop - while (modelsFound && !fh.atEnd()) { + while ( modelsFound && !fh.atEnd() ) + { QByteArray line = fh.readLine(); // check if we start a new section @@ -76,17 +79,18 @@ static KeyboardGlobal::ModelsMap parseKeyboardModels(const char* filepath) // here we are in the model section, otherwhise we would continue or break QRegExp rx; - rx.setPattern("^\\s+(\\S+)\\s+(\\w.*)\n$"); + rx.setPattern( "^\\s+(\\S+)\\s+(\\w.*)\n$" ); // insert into the model map - if (rx.indexIn(line) != -1) { - QString modelDesc = rx.cap(2); - QString model = rx.cap(1); + if ( rx.indexIn( line ) != -1 ) + { + QString modelDesc = rx.cap( 2 ); + QString model = rx.cap( 1 ); - if (model == "pc105") - modelDesc += " - " + QObject::tr("Default Keyboard Model"); + if ( model == "pc105" ) + modelDesc += " - " + QObject::tr( "Default Keyboard Model" ); - models.insert(modelDesc, model); + models.insert( modelDesc, model ); } } @@ -94,37 +98,40 @@ static KeyboardGlobal::ModelsMap parseKeyboardModels(const char* filepath) } -KeyboardGlobal::LayoutsMap parseKeyboardLayouts(const char* filepath) +KeyboardGlobal::LayoutsMap parseKeyboardLayouts( const char* filepath ) { KeyboardGlobal::LayoutsMap layouts; //### Get Layouts ###// - QFile fh(filepath); - fh.open(QIODevice::ReadOnly); + QFile fh( filepath ); + fh.open( QIODevice::ReadOnly ); - if (!fh.isOpen()) { + if ( !fh.isOpen() ) + { cDebug() << "X11 Keyboard layout definitions not found!"; return layouts; } bool layoutsFound = findSection( fh, "! layout" ); // read the file until the end or we break the loop - while ( layoutsFound && !fh.atEnd() ) { + while ( layoutsFound && !fh.atEnd() ) + { QByteArray line = fh.readLine(); if ( line.startsWith( '!' ) ) break; QRegExp rx; - rx.setPattern("^\\s+(\\S+)\\s+(\\w.*)\n$"); + rx.setPattern( "^\\s+(\\S+)\\s+(\\w.*)\n$" ); // insert into the layout map - if (rx.indexIn(line) != -1) { + if ( rx.indexIn( line ) != -1 ) + { KeyboardGlobal::KeyboardInfo info; - info.description = rx.cap(2); - info.variants.insert(QObject::tr("Default"), ""); - layouts.insert(rx.cap(1), info); + info.description = rx.cap( 2 ); + info.variants.insert( QObject::tr( "Default" ), "" ); + layouts.insert( rx.cap( 1 ), info ); } } @@ -135,27 +142,32 @@ KeyboardGlobal::LayoutsMap parseKeyboardLayouts(const char* filepath) bool variantsFound = findSection( fh, "! variant" ); // read the file until the end or until we break - while (variantsFound && !fh.atEnd() ) { + while ( variantsFound && !fh.atEnd() ) + { QByteArray line = fh.readLine(); if ( line.startsWith( '!' ) ) break; QRegExp rx; - rx.setPattern("^\\s+(\\S+)\\s+(\\S+): (\\w.*)\n$"); + rx.setPattern( "^\\s+(\\S+)\\s+(\\S+): (\\w.*)\n$" ); // insert into the variants multimap, if the pattern matches - if (rx.indexIn(line) != -1) { - if (layouts.find(rx.cap(2)) != layouts.end()) { + if ( rx.indexIn( line ) != -1 ) + { + if ( layouts.find( rx.cap( 2 ) ) != layouts.end() ) + { // in this case we found an entry in the multimap, and add the values to the multimap - layouts.find(rx.cap(2)).value().variants.insert(rx.cap(3), rx.cap(1)); - } else { + layouts.find( rx.cap( 2 ) ).value().variants.insert( rx.cap( 3 ), rx.cap( 1 ) ); + } + else + { // create a new map in the multimap - the value was not found. KeyboardGlobal::KeyboardInfo info; - info.description = rx.cap(2); - info.variants.insert(QObject::tr("Default"), ""); - info.variants.insert(rx.cap(3), rx.cap(1)); - layouts.insert(rx.cap(2), info); + info.description = rx.cap( 2 ); + info.variants.insert( QObject::tr( "Default" ), "" ); + info.variants.insert( rx.cap( 3 ), rx.cap( 1 ) ); + layouts.insert( rx.cap( 2 ), info ); } } } @@ -164,12 +176,14 @@ KeyboardGlobal::LayoutsMap parseKeyboardLayouts(const char* filepath) } -KeyboardGlobal::LayoutsMap KeyboardGlobal::getKeyboardLayouts() { +KeyboardGlobal::LayoutsMap KeyboardGlobal::getKeyboardLayouts() +{ return parseKeyboardLayouts( XKB_FILE ); } -KeyboardGlobal::ModelsMap KeyboardGlobal::getKeyboardModels() { +KeyboardGlobal::ModelsMap KeyboardGlobal::getKeyboardModels() +{ return parseKeyboardModels( XKB_FILE ); } From f04d08454835b2619df5226748b62429d84a1e26 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 14:27:37 +0200 Subject: [PATCH 33/57] [welcome] Start on a model for the locale choices --- src/modules/welcome/CMakeLists.txt | 1 + src/modules/welcome/LocaleModel.cpp | 52 +++++++++++++++++++++++++++++ src/modules/welcome/LocaleModel.h | 43 ++++++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 src/modules/welcome/LocaleModel.cpp create mode 100644 src/modules/welcome/LocaleModel.h diff --git a/src/modules/welcome/CMakeLists.txt b/src/modules/welcome/CMakeLists.txt index f627db032..415faa500 100644 --- a/src/modules/welcome/CMakeLists.txt +++ b/src/modules/welcome/CMakeLists.txt @@ -27,6 +27,7 @@ calamares_add_plugin( welcome EXPORT_MACRO PLUGINDLLEXPORT_PRO SOURCES ${CHECKER_SOURCES} + LocaleModel.cpp WelcomeViewStep.cpp WelcomePage.cpp UI diff --git a/src/modules/welcome/LocaleModel.cpp b/src/modules/welcome/LocaleModel.cpp new file mode 100644 index 000000000..5fd032a52 --- /dev/null +++ b/src/modules/welcome/LocaleModel.cpp @@ -0,0 +1,52 @@ +/* === This file is part of Calamares - === + * + * Copyright 2019, Adriaan de Groot + * + * Calamares is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Calamares is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Calamares. If not, see . + */ + +#include "LocaleModel.h" + +int +LocaleModel::columnCount( const QModelIndex& ) const +{ + return 2; +} + +int +LocaleModel::rowCount( const QModelIndex& ) const +{ + return m_locales.size(); +} + +QVariant +LocaleModel::data( const QModelIndex& index, int role ) const +{ + if ( role != Qt::DisplayRole ) + return QVariant(); + + if ( !index.isValid() ) + return QVariant(); + + const auto& locale = m_locales.at( index.row() ); + switch ( index.column() ) + { + case 0: + return locale.label(); + case 1: + return locale.englishLabel(); + default: + return QVariant(); + } +} diff --git a/src/modules/welcome/LocaleModel.h b/src/modules/welcome/LocaleModel.h new file mode 100644 index 000000000..06a6a74c2 --- /dev/null +++ b/src/modules/welcome/LocaleModel.h @@ -0,0 +1,43 @@ +/* === This file is part of Calamares - === + * + * Copyright 2019, Adriaan de Groot + * + * Calamares is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Calamares is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Calamares. If not, see . + */ + +#ifndef WELCOME_LOCALEMODEL_H +#define WELCOME_LOCALEMODEL_H + +#include + +#include + +#include "utils/CalamaresUtilsGui.h" + +class LocaleModel : public QAbstractItemModel +{ +public: + LocaleModel( const QStringList& locales, QObject* parent = nullptr ); + virtual ~LocaleModel(); + + int rowCount( const QModelIndex& parent ) const override; + int columnCount( const QModelIndex& parent ) const override; + + QVariant data( const QModelIndex& index, int role ) const override; + +private: + std::vector< CalamaresUtils::LocaleLabel > m_locales; +} ; + +#endif From 7f8411c3b775bf4281d79dea34b9b13f17b0a689 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 22:38:12 +0200 Subject: [PATCH 34/57] [welcome] Add standard language-chooser icon - After discussion with Red Hat UI advice, switch to standard icon - Tooltip as well --- src/modules/welcome/CMakeLists.txt | 2 + src/modules/welcome/WelcomePage.ui | 40 +++++++------------- src/modules/welcome/language-icon-128px.png | Bin 0 -> 4634 bytes src/modules/welcome/language-icon-48px.png | Bin 0 -> 2315 bytes src/modules/welcome/welcome.qrc | 6 +++ 5 files changed, 21 insertions(+), 27 deletions(-) create mode 100644 src/modules/welcome/language-icon-128px.png create mode 100644 src/modules/welcome/language-icon-48px.png create mode 100644 src/modules/welcome/welcome.qrc diff --git a/src/modules/welcome/CMakeLists.txt b/src/modules/welcome/CMakeLists.txt index 415faa500..d702321f7 100644 --- a/src/modules/welcome/CMakeLists.txt +++ b/src/modules/welcome/CMakeLists.txt @@ -32,6 +32,8 @@ calamares_add_plugin( welcome WelcomePage.cpp UI WelcomePage.ui + RESOURCES + welcome.qrc LINK_PRIVATE_LIBRARIES calamaresui ${CHECKER_LINK_LIBRARIES} diff --git a/src/modules/welcome/WelcomePage.ui b/src/modules/welcome/WelcomePage.ui index a5197fef5..51fa19c04 100644 --- a/src/modules/welcome/WelcomePage.ui +++ b/src/modules/welcome/WelcomePage.ui @@ -13,6 +13,9 @@ Form + + Select language + @@ -46,7 +49,7 @@ - + @@ -64,21 +67,15 @@ - - - - 1 - 0 - + + + Select language - &Language: + - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - languageWidget + + :/welcome/language-icon-48px.png @@ -92,19 +89,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -217,6 +201,8 @@ - + + + diff --git a/src/modules/welcome/language-icon-128px.png b/src/modules/welcome/language-icon-128px.png new file mode 100644 index 0000000000000000000000000000000000000000..9f4bf21477c314cdc5e459fe3beb457abda077a8 GIT binary patch literal 4634 zcma)Ac{r5c`+jE(LLplrOBk|CvJXObld|vY*!MlcC?#vk_7O(5EMv)sVEb zE+zXxaH8_nG7kU%8is!Z@@+Pf1b$=*yl)n$=8v)ubo24%HgfYq0TQ>xCFR6#-%<8W z=>`!u{vix~oC8Db{ZYU@Cm#nCw}zWPD#XX%BY<1Y@UCCOk~9E7+1-rH0?qXGf*676^#4dcvuq;5UCxlytZf{`Gwd1+ z%ekzB>kEaYnr;@n`fgep;Kg6wTsl3wbL*kRYR-sKsIJudhSbb0-3)hYqub|uTMF>| zoMW*IIU}28VPZ;KiOus7Hcl=2EGvO;4hoRLC~KkYH&s7Ol72b7T?s2II_t=DPP?J{ zi~l{>ADO--5>1wSVIO|grbja;F-H9K*)TWNJJ^8KsuYnS%m@09qFNd+CbA3E%T8vBZU8`8_ODu0LI^uE+9U%0jd znR(jXlXlcckln&oh#L@&V-crWV&<9SddE4|LOTg9u5x#U8m2|+=lFYb=b1Gcrajpt z+qf7OYJa%w+N*HJ3r%=2*37idryJe*qiw`9}gO_%Zi+6+EH5jjdZ>Sx*Ekwf%XHG&J z5p(8AHRLimWUJ2uzAE8 zhhX01CeVhSw@cQMbb5szad?XLE0^?AmgBsWLXj9Gx{w&ptZ!Two}QiR0;h@cC?c@u5Xm=|W#(p_j} zXfIx;hJU88pnwm7utw&}!z=S)M5|KB1vQD0ek~$3`+DNIyLiF#vEC$hf$G-%__U0S z#*IKYaK#k%jxG~D99k_fx^|#iFI3*2@vu;%e^9(bL;#sXpU}OSvXl-?ivtn6Mh|$P zX3686ZYu|UeOl&iVGTDFf`{Bngdwg?hQKL)4)X=Dqw+F# zjH2%iTz8rH`I&=s_Uv|`ErSaB>b1LQ72*PWK1=1{g#vf|ZB;X~>vhhnMi9}-kczJnIgmU9Y zW@c-9r}NjQ0gc6nkov%8Oe4tS!oosr=$^yWN1wd!1cD%>iS;ARJJFIB9w1_EtmGA+ zfPijfWc&B=aUn<(p99Qr;F_N~ zP$fH?3&!5Pe~g2_;5094UVL`EW;Xb$Gh z8=jVsoul}%2yLJ;Mj1M*xJ0q@TXt9GN#8n$3IH`Clfzln$Cju`LT2UVZ2g)!xmeIj zR%+RuHZPA>3}SDx)PH8M^>4<|f*iR5m?Lzxq73_FTX+a(h^Y zgO2@g;9!C6j$8V$dOf;>i9B^9kw|N^Ei!d3BhE98UOCE9nATRsLj5~2W-6VXojKmQ zAaxe;2?;-cdgw(u9&kay{_;zg z>F6>K4i2O9t=dmk*sF~pjy;JrXN~w`-OMi|BO@+Y-~qj^0*t$WklWqeUF$Z+ zKh@}!eFG6@#Ky+v+0z!h_0|c6>PP(f!Hf2suJ89g-DbdL`?RkcMDpvuErJofK^&ig zf~9hv82Z`gSN%|7uC(qc-b$9Tn_Ipo-g9d~tLV4!bk$m!Q)O;J&ifr-g@ zpqQlOH;B0IV8yoMSC*u|7I)ImbjagBBy^*x%B=^{R{jr@qfp>?{M}~%| zzZd6^OicwQs%QN#m849PK9I4`SjYQXs1vDDSQhZ!nVP2;}%OUS{h?xUd$zG)8QuE(Dn6F8emy9cqpGNr-I8_ za&!c)GjK&5ye9Z1ba&3Rg;yqrJb(DvOwj-ec2Awq&?Z0<(bC`D zE;@uft%NI{yT#hjWeVhx0bN*O+tI$x|75>kfTw`D(6Z6fZR62>b@jgHpv|I!g3f%Y z+^e|h29Mb{bck!>Hi4*gg9%2Qsci&ddHFfbHH%zvK|!}hZoXT$v{r_*1!8GA-0Q-8 zjQ|J);(zqZJlm~4WXUz$a7J2nf&oXsnxcL*`9Y_**$4!J^pbV^6LU=1h9Fj8W4mQ1 z13Xw}NV$bjEiJ7NkM--OL>L8-X>tK8eP=rz;_2z>$kmK4O2`qgva|txT=BE1HZl z4X|(=!65X{H$YLwM!D3OIf2HfGIoLnh^jy2m=!nUo0J$cktX* z2*~f8^E3*DGD$F=ranJCOkG}fIyqU*tNf;;rDXucJ4$E6m6Y1o1>HUL(S=5)rY-fR zyI=z@`tSk2K^2_8&7x9UTU+5dI5cDg#iwF0V(6Hdn7;m0f!vF>LfNq^t%u{5a5((_ z{_o$#AhImbUwSC(PVYdnVF^+YBDLRr%~nfA1r7SZkKv^goK;9l1;c}nmm|)O8m2g1 zKQUD$;UBw@2@45n>F5;X=SPF2Qy4&F<9R7T9(SbAk*KJ8jN%_N73y>3+AQ5Tl zaeO7}GBfV&U608cM@qx@diK4^95C4N_h54GlG4(bpf6~cs=*+_85kKIQ|?nxbAz=B z3N1Z+r!Dj8Q)qL@j(3`%O<{XGrnL0dw{PE$Nxw(Rs;emzeJGo<&3+v~{R0BJ=jUym zM=-Nh>4>UDVfOn+>tmY#bSd6`Twvb@RA+wTQB_xm%}4!3sJ*zn{ynH2QDyb16WrsK zhR>T&i7Y*JP0jGL+ISO*R`xY7^_cyA|H9#2R{4;+GYTG6ZEY$!Ik_j`F)%EhzP1r) z0h#m*Lrj+}DwA!KEv~6^dHB9Sg60S51JD8rXhq_;q@^fG7~~a{%GLJz&QAnZfvcuT zmVJ#nNg*Ebd+3e{yGFj;c}H}&N)+YR4uv8`D~(kV$E>1E>{kT)+GXduPogE+qnHCY z4i~)A&DF#e$|(EnPi_^A7&F!ZWRP9u9LS{l4+a`}mRT3SR;FeQFyvgv#LTR1VPR2s zj&52%P_-kM=tDnAhS;%pV z7%F6sSuSy*=gDT!I?eIGFIj8bl8~6iS!)09@&SK33j z$;Zj&N6le)9x2)`v9ABbEHxL!h$y1&+YoVuL||JzAe7?+-7%R2&LBZvtSdT7P55@+ zpD*N!4L4k1)3T?`bj3R!dgPL${Qn90kg$KF;M4Dn!?$CVEe^|eA6{r|9)@t>Z@2T6 z`DW#-h&Gb%hAa(jG{q3}#ht@b2$L+hC%j1;rBCRr)HXQ}r6yT4Ujq9z!57BwK1K%z znNc@AW*i(1V;m1}V0$25?`?TkMpNo=_G8rv#9qb@$^yOC^!Uz5K@!_(=bK9UdY-=w zGFu9?U&x{e9NCU((Yep*i4SnqKU&L-aZ$iuS2V&A|H79&?^whB0&=PKssQOl5<*Y5yWxT`(Z5ho7 z*<`n3cJ1~NqQ7$BdozNOo@(g6B~56~3R0#}R3J}n23t;se-RY%Hu=I~PQ^}Ig7GE9 zqTSU8f-FRoxs0-Y5(ZHIAxsn=|gniB2_qz$*wIbE71929}4FCWD literal 0 HcmV?d00001 diff --git a/src/modules/welcome/language-icon-48px.png b/src/modules/welcome/language-icon-48px.png new file mode 100644 index 0000000000000000000000000000000000000000..4012a4bee05f8f3e38a6f9efe0ff705361b094a7 GIT binary patch literal 2315 zcma)8XHXN`5>5hGKoA8(HDII$2wg*{N&->^Bs3|ZM2dvuL8N(+qF$sU0V7?J0SN*c z+NC6*NW0V#5CuXJFd&8|oq#X?et+JN-92;8w>$HFyE}7|>}<^i`6c-Q0Dz#y4U_{n zYW%TNC%E1jw4cZgr-?UQ!vFw*^M4HZiTQxTy#$lcE+o@XoHr?u5F+ash{pjmG}X2A z)HSt@iJ6^Tg!CW8Ey5jAgm)+oaLte4gOfE248=tdLhpvjn%>g=PyPHA001Nv=;%Un zv9U(_67X>EKQMSCo(KQ}Fpg$w2*Cfo1jMr^`_l6@L{H4d6nzM7&-K#zG9D&@RS3Scl&o1+V)JN(E4>uw?MZE6BE*=HY%~YImW&wHRg~ia3 znSxhuO>K(^tJ>!v7_TOAck(mgka6X%!Uv5h%4yILI&$DHZe*}BFQOaDLTZosmA%Hl zRH3!mQVu%1vUhsM5bVk~>ULv$iG~Nca97G_>%9UG*jh?UfSxX_enPcwTA{me=7L%M zM6je5UFQ58ZOVV$+XRvf8^?>hn{1uQan#W!z4Jr(LgDNdCU%TqbCWjKUool&h1` z<}~Vx=kQG^cpe<^H#9qj_@a39tO_kFo`AsdV_>yoieR1$wKvTYA7_bLbxxF=a)**m zol>~Rr|*oNxd*T@of;dNlPhNj6U$gg)g?C8-}D7RR3oiUmI4%O=yGYt43}(P)ZOmD@J8sY&m_ z+O*;6#102HH{=Rv;T0Iv9A{_}$Ug~s0YMP7ayci3r0rT-T5u$iW7(!MuQlHL#l=14 z378Z>ir7G-X$_B#mWD?}SgC@^et!i4$@uH`*)^i*<;JhU^C6A5rx`ISRI0)~POO=U zt84BTc6cCxK%r7$xyG>!mnx?~JU%BrKE4iWloW^SdzQoup;TAHlTc77baR!d&*dSr zbxRcex$3rJcZLkbJOg5(BYD)tS8x(lK9bbycfN%QZwz5(&CSg{$|A&`@F}KeS{4JJ*T92lqpiiyE77PUi1>M^oTx?+$Rj+K3{clu_EL*!U?~YgZ zHsB{qOG{CyX0Nt(cm0oeqoboyC=>>xnLkibWa0`t8HUVst#VQY3kW6hWOSRN(R_3| z-MuMP{_^2irE~4Q6(@iw`Xz&5Bz84UnorfURh-h-nIxhZxxXpj63+f`r}iBGV=Y<) zLRwT*R5;BH$j}46b4e9b_Zpw*AL8!yVH6ap-)RTNc#c!m{=F|AN;?o;kl23xCTU~97jgGF> zTR!7SOG_)EQh6U<8xO7ETrVh?xN7Jc_Di)jtdKRgx?b9sve8Wm@-hKjW{HJ{Sjm?7O* z4FGX#$sS_-puZ`MB`zc5Kai*E=;+x0u`n<XUsr~wKG1S7#tN1k)MuB_e#Q--V-P5J@ zpjA~>r~T!)RkeHsRvy?nyb@vD-H4fFHa*4 z28V}*O-)TDCQZPgPv?XZH=^lNtx>n8LK=T_W%B}EjazIVibrBkYa7hOS`UIykL;8l z4YB6A1GJ$Zv3iCPz5SzaV`D>T_R@s>xE#J6iWPV(vUdsV^LI^3=EJz&^`)hy7v<&t zU)FYGfm6K4$>ILUi=Z<+gQ>?L8NTowPn_ZF>4G1aX2RxYupXQbDIo zwlYVoz14^kdxq;)=S^P&T+onBIflsNEMhsXF1N{=Xwm%qtl3}hJE81wB(vs2Pf5_ycTi;$1eNWOiT2VcN$`F4Os z0N^;y$=>MjU=6VDUst2&wHP?g(8q{{jm-KtKQh literal 0 HcmV?d00001 diff --git a/src/modules/welcome/welcome.qrc b/src/modules/welcome/welcome.qrc new file mode 100644 index 000000000..37462e0a6 --- /dev/null +++ b/src/modules/welcome/welcome.qrc @@ -0,0 +1,6 @@ + + + language-icon-128px.png + language-icon-48px.png + + From 589168685eb3a4fbdecd9ccd1a598e83ed81858e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 23:16:02 +0200 Subject: [PATCH 35/57] [welcome] Complete LocaleModel implementation - It's a table with two columns (localized name and english name) --- src/modules/welcome/LocaleModel.cpp | 13 +++++++++++++ src/modules/welcome/LocaleModel.h | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/modules/welcome/LocaleModel.cpp b/src/modules/welcome/LocaleModel.cpp index 5fd032a52..67e306a3a 100644 --- a/src/modules/welcome/LocaleModel.cpp +++ b/src/modules/welcome/LocaleModel.cpp @@ -18,6 +18,19 @@ #include "LocaleModel.h" +LocaleModel::LocaleModel(const QStringList& locales, QObject* parent) + : QAbstractTableModel( parent ) +{ + m_locales.reserve( locales.count() ); + + for ( const auto& l : locales ) + m_locales.emplace_back( l ); +} + +LocaleModel::~LocaleModel() +{ +} + int LocaleModel::columnCount( const QModelIndex& ) const { diff --git a/src/modules/welcome/LocaleModel.h b/src/modules/welcome/LocaleModel.h index 06a6a74c2..9e622a43f 100644 --- a/src/modules/welcome/LocaleModel.h +++ b/src/modules/welcome/LocaleModel.h @@ -25,7 +25,7 @@ #include "utils/CalamaresUtilsGui.h" -class LocaleModel : public QAbstractItemModel +class LocaleModel : public QAbstractTableModel { public: LocaleModel( const QStringList& locales, QObject* parent = nullptr ); From 94765d40cdb7e859f7a9851e7ad4617a28888083 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 18 Apr 2019 23:17:49 +0200 Subject: [PATCH 36/57] [welcome] Switch to using LocaleModel for language combobox - Use the model instead of inserting items - While here, tidy includes and documentation --- src/modules/welcome/WelcomePage.cpp | 35 +++++++++-------------------- src/modules/welcome/WelcomePage.h | 7 ++++++ 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp index 92dab668b..b0090bc2c 100644 --- a/src/modules/welcome/WelcomePage.cpp +++ b/src/modules/welcome/WelcomePage.cpp @@ -2,7 +2,7 @@ * * Copyright 2014-2015, Teo Mrnjavac * Copyright 2015, Anke Boersma - * Copyright 2017-2018, Adriaan de Groot + * Copyright 2017-2019, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,16 +21,18 @@ #include "WelcomePage.h" #include "ui_WelcomePage.h" -#include "CalamaresVersion.h" +#include "LocaleModel.h" #include "checker/CheckerContainer.h" + +#include "Branding.h" +#include "CalamaresVersion.h" +#include "Settings.h" +#include "ViewManager.h" +#include "modulesystem/ModuleManager.h" #include "utils/Logger.h" #include "utils/CalamaresUtilsGui.h" #include "utils/Retranslator.h" -#include "modulesystem/ModuleManager.h" -#include "Settings.h" -#include "ViewManager.h" - #include #include #include @@ -39,13 +41,11 @@ #include #include -#include "Branding.h" - - WelcomePage::WelcomePage( QWidget* parent ) : QWidget( parent ) , ui( new Ui::WelcomePage ) , m_checkingWidget( new CheckerContainer( this ) ) + , m_languages( nullptr ) { connect( Calamares::ModuleManager::instance(), &Calamares::ModuleManager::requirementsResult, m_checkingWidget, &CheckerContainer::requirementsChecked ); connect( Calamares::ModuleManager::instance(), &Calamares::ModuleManager::requirementsComplete, m_checkingWidget, &CheckerContainer::requirementsComplete ); @@ -156,21 +156,8 @@ WelcomePage::initLanguages() ui->languageWidget->clear(); ui->languageWidget->setInsertPolicy( QComboBox::InsertAtBottom ); - { - std::list< CalamaresUtils::LocaleLabel > localeList; - const auto locales = QString( CALAMARES_TRANSLATION_LANGUAGES ).split( ';'); - for ( const QString& locale : locales ) - { - localeList.emplace_back( locale ); - } - - localeList.sort(); // According to the sortkey, which is english - - for ( const auto& locale : localeList ) - { - ui->languageWidget->addItem( locale.label(), locale.locale() ); - } - } + m_languages = new LocaleModel( QString( CALAMARES_TRANSLATION_LANGUAGES ).split( ';') ); + ui->languageWidget->setModel( m_languages ); // Find the best initial translation QLocale defaultLocale = QLocale( QLocale::system().name() ); diff --git a/src/modules/welcome/WelcomePage.h b/src/modules/welcome/WelcomePage.h index 65b619c79..ec689735b 100644 --- a/src/modules/welcome/WelcomePage.h +++ b/src/modules/welcome/WelcomePage.h @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014, Teo Mrnjavac + * Copyright 2019, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +28,7 @@ class WelcomePage; } class CheckerContainer; +class LocaleModel; class WelcomePage : public QWidget { @@ -34,19 +36,24 @@ class WelcomePage : public QWidget public: explicit WelcomePage( QWidget* parent = nullptr ); + /// @brief Configure the buttons for URLs from the branding configuration void setUpLinks( bool showSupportUrl, bool showKnownIssuesUrl, bool showReleaseNotesUrl ); + /// @brief Results of requirements checking bool verdict() const; protected: void focusInEvent( QFocusEvent* e ) override; //choose the child widget to focus private: + /// @brief Fill the list of languages with the available translations void initLanguages(); + Ui::WelcomePage* ui; CheckerContainer* m_checkingWidget; + LocaleModel *m_languages; }; #endif // WELCOMEPAGE_H From bd0af4bb77dd6a39ca42ab91b5533cb53789c3e0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 09:18:26 +0200 Subject: [PATCH 37/57] [libcalamaresui] Give LocaleLabel a default constructor - Needed for use in containers - While here refactor building the english label --- src/libcalamaresui/utils/CalamaresUtilsGui.cpp | 16 +++++++++++++++- src/libcalamaresui/utils/CalamaresUtilsGui.h | 5 +++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp index 123d9858c..9f68cf742 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp @@ -262,9 +262,23 @@ clearLayout( QLayout* layout ) } } +LocaleLabel::LocaleLabel() + : m_locale( QLocale() ) +{ + m_localeId = m_locale.name(); + + setLabels( QString(), LabelFormat::IfNeededWithCountry ); +} + LocaleLabel::LocaleLabel( const QString& locale, LabelFormat format ) : m_locale( LocaleLabel::getLocale( locale ) ) , m_localeId( locale ) +{ + setLabels( locale, format ); +} + +void +LocaleLabel::setLabels( const QString& locale, LabelFormat format ) { //: language[name] (country[name]) QString longFormat = QObject::tr( "%1 (%2)" ); @@ -274,7 +288,7 @@ LocaleLabel::LocaleLabel( const QString& locale, LabelFormat format ) QString countryName; if ( languageName.isEmpty() ) - languageName = QString( QLatin1Literal( "* %1 (%2)" ) ).arg( locale, englishName ); + languageName = QString( "* %1 (%2)" ).arg( locale, englishName ); bool needsCountryName = ( format == LabelFormat::AlwaysWithCountry ) || (locale.contains( '_' ) && QLocale::countriesForLanguage( m_locale.language() ).count() > 1 ); diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.h b/src/libcalamaresui/utils/CalamaresUtilsGui.h index 124594800..9df4f48c6 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.h +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.h @@ -140,6 +140,9 @@ public: /** @brief Formatting option for label -- add (country) to label. */ enum class LabelFormat { AlwaysWithCountry, IfNeededWithCountry } ; + /** @brief Empty locale. This uses the system-default locale. */ + LocaleLabel(); + /** @brief Construct from a locale name. * * The @p localeName should be one that Qt recognizes, e.g. en_US or ar_EY. @@ -192,6 +195,8 @@ public: static QLocale getLocale( const QString& localeName ); protected: + void setLabels( const QString& name, LabelFormat format ); + QLocale m_locale; QString m_localeId; // the locale identifier, e.g. "en_GB" QString m_label; // the native name of the locale From 314aee8d68534ea9e692fad5766d02e5020bfbf3 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 09:31:16 +0200 Subject: [PATCH 38/57] [welcome] Switch to QVector - QVector is a better match with passing in QStringList, otherwise you end up dealing with Qt's int indexes vs. std::vector's uint indexes everywhere. - Introduce find() --- src/modules/welcome/LocaleModel.cpp | 35 +++++++++++++++++++++++++++-- src/modules/welcome/LocaleModel.h | 22 +++++++++++++++--- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/src/modules/welcome/LocaleModel.cpp b/src/modules/welcome/LocaleModel.cpp index 67e306a3a..d2517a461 100644 --- a/src/modules/welcome/LocaleModel.cpp +++ b/src/modules/welcome/LocaleModel.cpp @@ -21,10 +21,11 @@ LocaleModel::LocaleModel(const QStringList& locales, QObject* parent) : QAbstractTableModel( parent ) { + Q_ASSERT( locales.count() > 0 ); m_locales.reserve( locales.count() ); for ( const auto& l : locales ) - m_locales.emplace_back( l ); + m_locales.push_back( CalamaresUtils::LocaleLabel( l ) ); } LocaleModel::~LocaleModel() @@ -40,7 +41,7 @@ LocaleModel::columnCount( const QModelIndex& ) const int LocaleModel::rowCount( const QModelIndex& ) const { - return m_locales.size(); + return m_locales.count(); } QVariant @@ -63,3 +64,33 @@ LocaleModel::data( const QModelIndex& index, int role ) const return QVariant(); } } + +const CalamaresUtils::LocaleLabel& +LocaleModel::locale(int row) +{ + if ( ( row < 0 ) || ( row >= m_locales.count() ) ) + { + for ( const auto& l : m_locales ) + if ( l.isEnglish() ) + return l; + return m_locales[0]; + } + return m_locales[row]; +} + +int +LocaleModel::find(std::function predicate) const +{ + for ( int row = 0; row < m_locales.count() ; ++row ) + { + if ( predicate( m_locales[row] ) ) + return row; + } + return -1; +} + +int +LocaleModel::find(std::function predicate) const +{ + return find( [&]( const LocaleLabel& l ){ return predicate( l.locale() ); } ); +} diff --git a/src/modules/welcome/LocaleModel.h b/src/modules/welcome/LocaleModel.h index 9e622a43f..68cede172 100644 --- a/src/modules/welcome/LocaleModel.h +++ b/src/modules/welcome/LocaleModel.h @@ -20,24 +20,40 @@ #define WELCOME_LOCALEMODEL_H #include +#include -#include #include "utils/CalamaresUtilsGui.h" class LocaleModel : public QAbstractTableModel { public: + using LocaleLabel = CalamaresUtils::LocaleLabel; + LocaleModel( const QStringList& locales, QObject* parent = nullptr ); - virtual ~LocaleModel(); + virtual ~LocaleModel() override; int rowCount( const QModelIndex& parent ) const override; int columnCount( const QModelIndex& parent ) const override; QVariant data( const QModelIndex& index, int role ) const override; + /** @brief Gets locale information for entry #n + * + * This is the backing data for the model; if @p row is out-of-range, + * returns a reference to en_US. + */ + const LocaleLabel& locale( int row ); + + /** @brief Searches for an item that matches @p predicate + * + * Returns the row number of the first match, or -1 if there isn't one. + */ + int find( std::function predicate) const; + int find( std::function predicate) const; + private: - std::vector< CalamaresUtils::LocaleLabel > m_locales; + QVector< LocaleLabel > m_locales; } ; #endif From 0c868dbd17f913be449763e2673aec9bec404a1e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 09:39:19 +0200 Subject: [PATCH 39/57] [welcome] Another find() overload - Also find a specific locale - While here, apply Calamares coding style --- src/modules/welcome/LocaleModel.cpp | 40 +++++++++++++++++++---------- src/modules/welcome/LocaleModel.h | 13 +++++----- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/src/modules/welcome/LocaleModel.cpp b/src/modules/welcome/LocaleModel.cpp index d2517a461..43d13ea6c 100644 --- a/src/modules/welcome/LocaleModel.cpp +++ b/src/modules/welcome/LocaleModel.cpp @@ -18,7 +18,7 @@ #include "LocaleModel.h" -LocaleModel::LocaleModel(const QStringList& locales, QObject* parent) +LocaleModel::LocaleModel( const QStringList& locales, QObject* parent ) : QAbstractTableModel( parent ) { Q_ASSERT( locales.count() > 0 ); @@ -56,17 +56,17 @@ LocaleModel::data( const QModelIndex& index, int role ) const const auto& locale = m_locales.at( index.row() ); switch ( index.column() ) { - case 0: - return locale.label(); - case 1: - return locale.englishLabel(); - default: - return QVariant(); + case 0: + return locale.label(); + case 1: + return locale.englishLabel(); + default: + return QVariant(); } } -const CalamaresUtils::LocaleLabel& -LocaleModel::locale(int row) +const CalamaresUtils::LocaleLabel& +LocaleModel::locale( int row ) { if ( ( row < 0 ) || ( row >= m_locales.count() ) ) { @@ -78,8 +78,8 @@ LocaleModel::locale(int row) return m_locales[row]; } -int -LocaleModel::find(std::function predicate) const +int +LocaleModel::find( std::function predicate ) const { for ( int row = 0; row < m_locales.count() ; ++row ) { @@ -89,8 +89,20 @@ LocaleModel::find(std::function predicate) const return -1; } -int -LocaleModel::find(std::function predicate) const +int +LocaleModel::find( std::function predicate ) const { - return find( [&]( const LocaleLabel& l ){ return predicate( l.locale() ); } ); + return find( [&]( const LocaleLabel& l ) + { + return predicate( l.locale() ); + } ); +} + +int +LocaleModel::find( const QLocale& locale ) const +{ + return find( [&]( const LocaleLabel& l ) + { + return locale == l.locale(); + } ); } diff --git a/src/modules/welcome/LocaleModel.h b/src/modules/welcome/LocaleModel.h index 68cede172..4df183048 100644 --- a/src/modules/welcome/LocaleModel.h +++ b/src/modules/welcome/LocaleModel.h @@ -29,7 +29,7 @@ class LocaleModel : public QAbstractTableModel { public: using LocaleLabel = CalamaresUtils::LocaleLabel; - + LocaleModel( const QStringList& locales, QObject* parent = nullptr ); virtual ~LocaleModel() override; @@ -39,18 +39,19 @@ public: QVariant data( const QModelIndex& index, int role ) const override; /** @brief Gets locale information for entry #n - * + * * This is the backing data for the model; if @p row is out-of-range, * returns a reference to en_US. */ const LocaleLabel& locale( int row ); - + /** @brief Searches for an item that matches @p predicate - * + * * Returns the row number of the first match, or -1 if there isn't one. */ - int find( std::function predicate) const; - int find( std::function predicate) const; + int find( std::function predicate ) const; + int find( std::function predicate ) const; + int find( const QLocale& ) const; private: QVector< LocaleLabel > m_locales; From 242d75673175af2930774d201fd61ec3acd683db Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 09:55:51 +0200 Subject: [PATCH 40/57] [libcalamaresui] Add convenience name() to LocaleLabel --- src/libcalamaresui/utils/CalamaresUtilsGui.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.h b/src/libcalamaresui/utils/CalamaresUtilsGui.h index 9df4f48c6..f1a20964f 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.h +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.h @@ -187,6 +187,11 @@ public: return m_locale; } + QString LocaleLabel::name() const + { + return m_locale.name(); + } + /** @brief Get a Qt locale for the given @p localeName * * This special-cases `sr@latin`, which is used as a translation From 58aa9f49899a57d2069a5b5d174cc4ae785d0d93 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 10:04:49 +0200 Subject: [PATCH 41/57] [libcalamares] Move LocaleLabel from libcalamaresui to libcalamares - This isn't a UI-dependent class - Doesn't make much sense in CalamaresUtilsGui either --- src/libcalamares/CMakeLists.txt | 1 + src/libcalamares/utils/LocaleLabel.cpp | 73 +++++++++++ src/libcalamares/utils/LocaleLabel.h | 113 ++++++++++++++++++ .../utils/CalamaresUtilsGui.cpp | 51 +------- src/libcalamaresui/utils/CalamaresUtilsGui.h | 82 ------------- 5 files changed, 188 insertions(+), 132 deletions(-) create mode 100644 src/libcalamares/utils/LocaleLabel.cpp create mode 100644 src/libcalamares/utils/LocaleLabel.h diff --git a/src/libcalamares/CMakeLists.txt b/src/libcalamares/CMakeLists.txt index a7dd1c0fe..fc1f026ae 100644 --- a/src/libcalamares/CMakeLists.txt +++ b/src/libcalamares/CMakeLists.txt @@ -23,6 +23,7 @@ set( utilsSources utils/CalamaresUtils.cpp utils/CalamaresUtilsSystem.cpp utils/CommandList.cpp + utils/LocaleLabel.cpp utils/Logger.cpp utils/PluginFactory.cpp utils/Retranslator.cpp diff --git a/src/libcalamares/utils/LocaleLabel.cpp b/src/libcalamares/utils/LocaleLabel.cpp new file mode 100644 index 000000000..275ece622 --- /dev/null +++ b/src/libcalamares/utils/LocaleLabel.cpp @@ -0,0 +1,73 @@ +/* === This file is part of Calamares - === + * + * Copyright 2014-2015, Teo Mrnjavac + * Copyright 2017-2018, Adriaan de Groot + * + * Calamares is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Calamares is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Calamares. If not, see . + */ + +#include "LocaleLabel.h" + +namespace CalamaresUtils +{ + +LocaleLabel::LocaleLabel() + : m_locale( QLocale() ) +{ + m_localeId = m_locale.name(); + + setLabels( QString(), LabelFormat::IfNeededWithCountry ); +} + +LocaleLabel::LocaleLabel( const QString& locale, LabelFormat format ) + : m_locale( LocaleLabel::getLocale( locale ) ) + , m_localeId( locale ) +{ + setLabels( locale, format ); +} + +void +LocaleLabel::setLabels( const QString& locale, LabelFormat format ) +{ + //: language[name] (country[name]) + QString longFormat = QObject::tr( "%1 (%2)" ); + + QString languageName = m_locale.nativeLanguageName(); + QString englishName = m_locale.languageToString( m_locale.language() ); + QString countryName; + + if ( languageName.isEmpty() ) + languageName = QString( "* %1 (%2)" ).arg( locale, englishName ); + + bool needsCountryName = ( format == LabelFormat::AlwaysWithCountry ) || + (locale.contains( '_' ) && QLocale::countriesForLanguage( m_locale.language() ).count() > 1 ); + + if ( needsCountryName ) + countryName = m_locale.nativeCountryName(); + m_label = needsCountryName ? longFormat.arg( languageName ).arg( countryName ) : languageName; + m_englishLabel = englishName; +} + +QLocale LocaleLabel::getLocale( const QString& localeName ) +{ + if ( localeName.contains( "@latin" ) ) + { + QLocale loc( localeName ); // Ignores @latin + return QLocale( loc.language(), QLocale::Script::LatinScript, loc.country() ); + } + else + return QLocale( localeName ); +} + +} // namespace diff --git a/src/libcalamares/utils/LocaleLabel.h b/src/libcalamares/utils/LocaleLabel.h new file mode 100644 index 000000000..d3113c869 --- /dev/null +++ b/src/libcalamares/utils/LocaleLabel.h @@ -0,0 +1,113 @@ +/* === This file is part of Calamares - === + * + * Copyright 2014-2015, Teo Mrnjavac + * Copyright 2017-2018, Adriaan de Groot + * + * Calamares is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Calamares is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Calamares. If not, see . + */ + +#ifndef LIBCALAMARES_LOCALELABEL_H +#define LIBCALAMARES_LOCALELABEL_H + +#include +#include + +namespace CalamaresUtils +{ + +/** + * @brief Consistent locale (language + country) naming. + * + * Support class to turn locale names (as used by Calamares's + * translation system) into QLocales, and also into consistent + * human-readable text labels. + */ +class LocaleLabel +{ +public: + /** @brief Formatting option for label -- add (country) to label. */ + enum class LabelFormat { AlwaysWithCountry, IfNeededWithCountry } ; + + /** @brief Empty locale. This uses the system-default locale. */ + LocaleLabel(); + + /** @brief Construct from a locale name. + * + * The @p localeName should be one that Qt recognizes, e.g. en_US or ar_EY. + * The @p format determines whether the country name is always present + * in the label (human-readable form) or only if needed for disambiguation. + */ + LocaleLabel( const QString& localeName, LabelFormat format = LabelFormat::IfNeededWithCountry ); + + /** @brief Define a sorting order. + * + * English (@see isEnglish() -- it means en_US) is sorted at the top. + */ + bool operator <( const LocaleLabel& other ) const + { + return m_localeId < other.m_localeId; + } + + /** @brief Is this locale English? + * + * en_US and en (American English) is defined as English. The Queen's + * English -- proper English -- is relegated to non-English status. + */ + bool isEnglish() const + { + return m_localeId == QLatin1Literal( "en_US" ) || m_localeId == QLatin1Literal( "en" ); + } + + /** @brief Get the human-readable name for this locale. */ + QString label() const + { + return m_label; + } + /** @brief Get the *English* human-readable name for this locale. */ + QString englishLabel() const + { + return m_englishLabel; + } + + /** @brief Get the Qt locale. */ + QLocale locale() const + { + return m_locale; + } + + QString name() const + { + return m_locale.name(); + } + + /** @brief Get a Qt locale for the given @p localeName + * + * This special-cases `sr@latin`, which is used as a translation + * name in Calamares, while Qt recognizes `sr@latn`. + */ + static QLocale getLocale( const QString& localeName ); + +protected: + void setLabels( const QString& name, LabelFormat format ); + + QLocale m_locale; + QString m_localeId; // the locale identifier, e.g. "en_GB" + QString m_label; // the native name of the locale + QString m_englishLabel; +} ; + + +} // namespace CalamaresUtils + +#endif // LIBCALAMARES_LOCALELABEL_H diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp index 9f68cf742..ef239b9d8 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp @@ -262,53 +262,4 @@ clearLayout( QLayout* layout ) } } -LocaleLabel::LocaleLabel() - : m_locale( QLocale() ) -{ - m_localeId = m_locale.name(); - - setLabels( QString(), LabelFormat::IfNeededWithCountry ); -} - -LocaleLabel::LocaleLabel( const QString& locale, LabelFormat format ) - : m_locale( LocaleLabel::getLocale( locale ) ) - , m_localeId( locale ) -{ - setLabels( locale, format ); -} - -void -LocaleLabel::setLabels( const QString& locale, LabelFormat format ) -{ - //: language[name] (country[name]) - QString longFormat = QObject::tr( "%1 (%2)" ); - - QString languageName = m_locale.nativeLanguageName(); - QString englishName = m_locale.languageToString( m_locale.language() ); - QString countryName; - - if ( languageName.isEmpty() ) - languageName = QString( "* %1 (%2)" ).arg( locale, englishName ); - - bool needsCountryName = ( format == LabelFormat::AlwaysWithCountry ) || - (locale.contains( '_' ) && QLocale::countriesForLanguage( m_locale.language() ).count() > 1 ); - - if ( needsCountryName ) - countryName = m_locale.nativeCountryName(); - m_label = needsCountryName ? longFormat.arg( languageName ).arg( countryName ) : languageName; - m_englishLabel = englishName; -} - -QLocale LocaleLabel::getLocale( const QString& localeName ) -{ - if ( localeName.contains( "@latin" ) ) - { - QLocale loc( localeName ); // Ignores @latin - return QLocale( loc.language(), QLocale::Script::LatinScript, loc.country() ); - } - else - return QLocale( localeName ); -} - - -} +} // namespace diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.h b/src/libcalamaresui/utils/CalamaresUtilsGui.h index f1a20964f..135a57c43 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.h +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.h @@ -127,88 +127,6 @@ constexpr int windowMinimumHeight = 520; constexpr int windowPreferredWidth = 1024; constexpr int windowPreferredHeight = 520; -/** - * @brief Consistent locale (language + country) naming. - * - * Support class to turn locale names (as used by Calamares's - * translation system) into QLocales, and also into consistent - * human-readable text labels. - */ -class LocaleLabel -{ -public: - /** @brief Formatting option for label -- add (country) to label. */ - enum class LabelFormat { AlwaysWithCountry, IfNeededWithCountry } ; - - /** @brief Empty locale. This uses the system-default locale. */ - LocaleLabel(); - - /** @brief Construct from a locale name. - * - * The @p localeName should be one that Qt recognizes, e.g. en_US or ar_EY. - * The @p format determines whether the country name is always present - * in the label (human-readable form) or only if needed for disambiguation. - */ - LocaleLabel( const QString& localeName, LabelFormat format = LabelFormat::IfNeededWithCountry ); - - /** @brief Define a sorting order. - * - * English (@see isEnglish() -- it means en_US) is sorted at the top. - */ - bool operator <( const LocaleLabel& other ) const - { - return m_localeId < other.m_localeId; - } - - /** @brief Is this locale English? - * - * en_US and en (American English) is defined as English. The Queen's - * English -- proper English -- is relegated to non-English status. - */ - bool isEnglish() const - { - return m_localeId == QLatin1Literal( "en_US" ) || m_localeId == QLatin1Literal( "en" ); - } - - /** @brief Get the human-readable name for this locale. */ - QString label() const - { - return m_label; - } - /** @brief Get the *English* human-readable name for this locale. */ - QString englishLabel() const - { - return m_englishLabel; - } - - /** @brief Get the Qt locale. */ - QLocale locale() const - { - return m_locale; - } - - QString LocaleLabel::name() const - { - return m_locale.name(); - } - - /** @brief Get a Qt locale for the given @p localeName - * - * This special-cases `sr@latin`, which is used as a translation - * name in Calamares, while Qt recognizes `sr@latn`. - */ - static QLocale getLocale( const QString& localeName ); - -protected: - void setLabels( const QString& name, LabelFormat format ); - - QLocale m_locale; - QString m_localeId; // the locale identifier, e.g. "en_GB" - QString m_label; // the native name of the locale - QString m_englishLabel; -} ; - - } // namespace CalamaresUtils #endif // CALAMARESUTILSGUI_H From 57452b8c380b1d83745ca97d59db5db82ab9857a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 10:10:36 +0200 Subject: [PATCH 42/57] [locale] [welcome] Adjust to moved LocaleLabel - Adjust #includes - In [welcome], use find() on the model rather than querying the combo-box. --- src/modules/locale/LocalePage.cpp | 12 ++++--- src/modules/welcome/LocaleModel.h | 2 +- src/modules/welcome/WelcomePage.cpp | 56 +++++++---------------------- 3 files changed, 21 insertions(+), 49 deletions(-) diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp index 1ddb2cc0a..ba76eb763 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -19,23 +19,25 @@ #include "LocalePage.h" -#include "timezonewidget/timezonewidget.h" #include "SetTimezoneJob.h" -#include "utils/CalamaresUtilsGui.h" -#include "utils/Logger.h" -#include "utils/Retranslator.h" +#include "timezonewidget/timezonewidget.h" + #include "GlobalStorage.h" #include "JobQueue.h" #include "LCLocaleDialog.h" #include "Settings.h" +#include "utils/CalamaresUtilsGui.h" +#include "utils/LocaleLabel.h" +#include "utils/Logger.h" +#include "utils/Retranslator.h" + #include #include #include #include #include - LocalePage::LocalePage( QWidget* parent ) : QWidget( parent ) , m_blockTzWidgetSet( false ) diff --git a/src/modules/welcome/LocaleModel.h b/src/modules/welcome/LocaleModel.h index 4df183048..805a1df65 100644 --- a/src/modules/welcome/LocaleModel.h +++ b/src/modules/welcome/LocaleModel.h @@ -23,7 +23,7 @@ #include -#include "utils/CalamaresUtilsGui.h" +#include "utils/LocaleLabel.h" class LocaleModel : public QAbstractTableModel { diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp index b0090bc2c..30e828dfc 100644 --- a/src/modules/welcome/WelcomePage.cpp +++ b/src/modules/welcome/WelcomePage.cpp @@ -29,8 +29,9 @@ #include "Settings.h" #include "ViewManager.h" #include "modulesystem/ModuleManager.h" -#include "utils/Logger.h" #include "utils/CalamaresUtilsGui.h" +#include "utils/LocaleLabel.h" +#include "utils/Logger.h" #include "utils/Retranslator.h" #include @@ -123,32 +124,6 @@ WelcomePage::WelcomePage( QWidget* parent ) } -/** @brief Match the combobox of languages with a predicate - * - * Scans the entries in the @p list (actually a ComboBox) and if one - * matches the given @p predicate, returns true and sets @p matchFound - * to the locale that matched. - * - * If none match, returns false and leaves @p matchFound unchanged. - */ -static -bool matchLocale( QComboBox& list, QLocale& matchFound, std::function predicate) -{ - for (int i = 0; i < list.count(); i++) - { - QLocale thisLocale = list.itemData( i, Qt::UserRole ).toLocale(); - if ( predicate(thisLocale) ) - { - list.setCurrentIndex( i ); - cDebug() << Logger::SubEntry << "Matched locale " << thisLocale.name(); - matchFound = thisLocale; - return true; - } - } - - return false; -} - void WelcomePage::initLanguages() { @@ -161,38 +136,33 @@ WelcomePage::initLanguages() // Find the best initial translation QLocale defaultLocale = QLocale( QLocale::system().name() ); - QLocale matchedLocale; cDebug() << "Matching exact locale" << defaultLocale; - bool isTranslationAvailable = - matchLocale( *(ui->languageWidget), matchedLocale, - [&](const QLocale& x){ return x.language() == defaultLocale.language() && x.country() == defaultLocale.country(); } ); + int matchedLocaleIndex = m_languages->find( + [&](const QLocale& x){ return x.language() == defaultLocale.language() && x.country() == defaultLocale.country(); } ); - if ( !isTranslationAvailable ) + if ( matchedLocaleIndex < 0 ) { cDebug() << "Matching approximate locale" << defaultLocale.language(); - isTranslationAvailable = - matchLocale( *(ui->languageWidget), matchedLocale, - [&](const QLocale& x){ return x.language() == defaultLocale.language(); } ) ; + matchedLocaleIndex = m_languages->find( + [&](const QLocale& x){ return x.language() == defaultLocale.language(); } ); } - if ( !isTranslationAvailable ) + if ( matchedLocaleIndex < 0 ) { QLocale en_us( QLocale::English, QLocale::UnitedStates ); cDebug() << "Matching English (US)"; - isTranslationAvailable = - matchLocale( *(ui->languageWidget), matchedLocale, - [&](const QLocale& x){ return x == en_us; } ); + matchedLocaleIndex = m_languages->find( en_us ); // Now, if it matched, because we didn't match the system locale, switch to the one found - if ( isTranslationAvailable ) - QLocale::setDefault( matchedLocale ); + if ( matchedLocaleIndex >= 0 ) + QLocale::setDefault( m_languages->locale( matchedLocaleIndex ).locale() ); } - if ( isTranslationAvailable ) - CalamaresUtils::installTranslator( matchedLocale.name(), + if ( matchedLocaleIndex >= 0 ) + CalamaresUtils::installTranslator( m_languages->locale( matchedLocaleIndex ).name(), Calamares::Branding::instance()->translationsPathPrefix(), qApp ); else From e5d1c0ae274f5f96d018b0c1ddcf08aaa88b5398 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 10:15:57 +0200 Subject: [PATCH 43/57] [welcome] Fix matched-with-a-locale - Previously the matchLocale() function set the index in the combobox; do it separately now. --- src/modules/welcome/WelcomePage.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp index 30e828dfc..8185d7f77 100644 --- a/src/modules/welcome/WelcomePage.cpp +++ b/src/modules/welcome/WelcomePage.cpp @@ -137,13 +137,13 @@ WelcomePage::initLanguages() // Find the best initial translation QLocale defaultLocale = QLocale( QLocale::system().name() ); - cDebug() << "Matching exact locale" << defaultLocale; + cDebug() << "Matching locale" << defaultLocale; int matchedLocaleIndex = m_languages->find( [&](const QLocale& x){ return x.language() == defaultLocale.language() && x.country() == defaultLocale.country(); } ); if ( matchedLocaleIndex < 0 ) { - cDebug() << "Matching approximate locale" << defaultLocale.language(); + cDebug() << Logger::SubEntry << "Matching approximate locale" << defaultLocale.language(); matchedLocaleIndex = m_languages->find( [&](const QLocale& x){ return x.language() == defaultLocale.language(); } ); @@ -153,7 +153,7 @@ WelcomePage::initLanguages() { QLocale en_us( QLocale::English, QLocale::UnitedStates ); - cDebug() << "Matching English (US)"; + cDebug() << Logger::SubEntry << "Matching English (US)"; matchedLocaleIndex = m_languages->find( en_us ); // Now, if it matched, because we didn't match the system locale, switch to the one found @@ -162,9 +162,13 @@ WelcomePage::initLanguages() } if ( matchedLocaleIndex >= 0 ) - CalamaresUtils::installTranslator( m_languages->locale( matchedLocaleIndex ).name(), - Calamares::Branding::instance()->translationsPathPrefix(), - qApp ); + { + QString name = m_languages->locale( matchedLocaleIndex ).name(); + cDebug() << Logger::SubEntry << "Matched with index" << matchedLocaleIndex << name; + + CalamaresUtils::installTranslator( name, Calamares::Branding::instance()->translationsPathPrefix(), qApp ); + ui->languageWidget->setCurrentIndex( matchedLocaleIndex ); + } else cWarning() << "No available translation matched" << defaultLocale; From 53fd1590b87d2d8319fd9fe2d16d3d18bae7c399 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 10:24:10 +0200 Subject: [PATCH 44/57] [welcome] Don't use combobox itemdata for locale information --- src/modules/welcome/WelcomePage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp index 8185d7f77..2f859cd91 100644 --- a/src/modules/welcome/WelcomePage.cpp +++ b/src/modules/welcome/WelcomePage.cpp @@ -177,7 +177,7 @@ WelcomePage::initLanguages() this, [&]( int newIndex ) { - QLocale selectedLocale = ui->languageWidget->itemData( newIndex, Qt::UserRole ).toLocale(); + const auto& selectedLocale = m_languages->locale( newIndex ).locale(); cDebug() << "Selected locale" << selectedLocale; QLocale::setDefault( selectedLocale ); From 0b833b1e756398b0a9a65ef81123768a5aea80d8 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 11:38:43 +0200 Subject: [PATCH 45/57] [welcome] Switch model to a list model - There doesn't seem to be a real benefit to providing the name and label as separate columns. --- src/modules/welcome/LocaleModel.cpp | 8 +------- src/modules/welcome/LocaleModel.h | 5 ++--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/modules/welcome/LocaleModel.cpp b/src/modules/welcome/LocaleModel.cpp index 43d13ea6c..b735983c1 100644 --- a/src/modules/welcome/LocaleModel.cpp +++ b/src/modules/welcome/LocaleModel.cpp @@ -19,7 +19,7 @@ #include "LocaleModel.h" LocaleModel::LocaleModel( const QStringList& locales, QObject* parent ) - : QAbstractTableModel( parent ) + : QAbstractListModel( parent ) { Q_ASSERT( locales.count() > 0 ); m_locales.reserve( locales.count() ); @@ -32,12 +32,6 @@ LocaleModel::~LocaleModel() { } -int -LocaleModel::columnCount( const QModelIndex& ) const -{ - return 2; -} - int LocaleModel::rowCount( const QModelIndex& ) const { diff --git a/src/modules/welcome/LocaleModel.h b/src/modules/welcome/LocaleModel.h index 805a1df65..c8125c0d8 100644 --- a/src/modules/welcome/LocaleModel.h +++ b/src/modules/welcome/LocaleModel.h @@ -19,13 +19,13 @@ #ifndef WELCOME_LOCALEMODEL_H #define WELCOME_LOCALEMODEL_H -#include +#include #include #include "utils/LocaleLabel.h" -class LocaleModel : public QAbstractTableModel +class LocaleModel : public QAbstractListModel { public: using LocaleLabel = CalamaresUtils::LocaleLabel; @@ -34,7 +34,6 @@ public: virtual ~LocaleModel() override; int rowCount( const QModelIndex& parent ) const override; - int columnCount( const QModelIndex& parent ) const override; QVariant data( const QModelIndex& index, int role ) const override; From 81acc496dc18ca7822514bbd4a6931501a87226d Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 13:34:25 +0200 Subject: [PATCH 46/57] [welcome] Introduce a delegate for drawing the languages list - Show the native name left, English name right --- src/modules/welcome/CMakeLists.txt | 2 +- src/modules/welcome/LocaleModel.cpp | 15 +++++++++++---- src/modules/welcome/LocaleModel.h | 16 +++++++++++++++- src/modules/welcome/WelcomePage.cpp | 5 +++-- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/modules/welcome/CMakeLists.txt b/src/modules/welcome/CMakeLists.txt index d702321f7..e6ddd2bd7 100644 --- a/src/modules/welcome/CMakeLists.txt +++ b/src/modules/welcome/CMakeLists.txt @@ -16,9 +16,9 @@ include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ) set( CHECKER_SOURCES checker/CheckerContainer.cpp + checker/GeneralRequirements.cpp checker/ResultWidget.cpp checker/ResultsListWidget.cpp - checker/GeneralRequirements.cpp ${PARTMAN_SRC} ) diff --git a/src/modules/welcome/LocaleModel.cpp b/src/modules/welcome/LocaleModel.cpp index b735983c1..0ecf0fd1c 100644 --- a/src/modules/welcome/LocaleModel.cpp +++ b/src/modules/welcome/LocaleModel.cpp @@ -41,18 +41,18 @@ LocaleModel::rowCount( const QModelIndex& ) const QVariant LocaleModel::data( const QModelIndex& index, int role ) const { - if ( role != Qt::DisplayRole ) + if ( ( role != LabelRole ) && ( role != EnglishLabelRole ) ) return QVariant(); if ( !index.isValid() ) return QVariant(); const auto& locale = m_locales.at( index.row() ); - switch ( index.column() ) + switch ( role ) { - case 0: + case LabelRole: return locale.label(); - case 1: + case EnglishLabelRole: return locale.englishLabel(); default: return QVariant(); @@ -100,3 +100,10 @@ LocaleModel::find( const QLocale& locale ) const return locale == l.locale(); } ); } + +void +LocaleTwoColumnDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + QStyledItemDelegate::paint( painter, option, index ); + option.widget->style()->drawItemText( painter, option.rect, Qt::AlignRight | Qt::AlignVCenter, option.palette, false, index.data( LocaleModel::EnglishLabelRole ).toString() ); +} diff --git a/src/modules/welcome/LocaleModel.h b/src/modules/welcome/LocaleModel.h index c8125c0d8..b1566d336 100644 --- a/src/modules/welcome/LocaleModel.h +++ b/src/modules/welcome/LocaleModel.h @@ -20,9 +20,9 @@ #define WELCOME_LOCALEMODEL_H #include +#include #include - #include "utils/LocaleLabel.h" class LocaleModel : public QAbstractListModel @@ -30,6 +30,12 @@ class LocaleModel : public QAbstractListModel public: using LocaleLabel = CalamaresUtils::LocaleLabel; + enum + { + LabelRole = Qt::DisplayRole, + EnglishLabelRole = Qt::UserRole + 1 + }; + LocaleModel( const QStringList& locales, QObject* parent = nullptr ); virtual ~LocaleModel() override; @@ -56,4 +62,12 @@ private: QVector< LocaleLabel > m_locales; } ; +class LocaleTwoColumnDelegate : public QStyledItemDelegate +{ +public: + using QStyledItemDelegate::QStyledItemDelegate; + + void paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const override; +} ; + #endif diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp index 2f859cd91..afb63971d 100644 --- a/src/modules/welcome/WelcomePage.cpp +++ b/src/modules/welcome/WelcomePage.cpp @@ -36,10 +36,10 @@ #include #include +#include #include #include #include -#include #include WelcomePage::WelcomePage( QWidget* parent ) @@ -133,6 +133,7 @@ WelcomePage::initLanguages() m_languages = new LocaleModel( QString( CALAMARES_TRANSLATION_LANGUAGES ).split( ';') ); ui->languageWidget->setModel( m_languages ); + ui->languageWidget->setItemDelegate( new LocaleTwoColumnDelegate( ui->languageWidget ) ); // Find the best initial translation QLocale defaultLocale = QLocale( QLocale::system().name() ); @@ -165,7 +166,7 @@ WelcomePage::initLanguages() { QString name = m_languages->locale( matchedLocaleIndex ).name(); cDebug() << Logger::SubEntry << "Matched with index" << matchedLocaleIndex << name; - + CalamaresUtils::installTranslator( name, Calamares::Branding::instance()->translationsPathPrefix(), qApp ); ui->languageWidget->setCurrentIndex( matchedLocaleIndex ); } From cb5825a521b2be9c078c9eb3544b925126d573db Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 13:52:19 +0200 Subject: [PATCH 47/57] [libcalamares] English label with country --- src/libcalamares/utils/LocaleLabel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcalamares/utils/LocaleLabel.cpp b/src/libcalamares/utils/LocaleLabel.cpp index 275ece622..26480ef14 100644 --- a/src/libcalamares/utils/LocaleLabel.cpp +++ b/src/libcalamares/utils/LocaleLabel.cpp @@ -26,7 +26,7 @@ LocaleLabel::LocaleLabel() : m_locale( QLocale() ) { m_localeId = m_locale.name(); - + setLabels( QString(), LabelFormat::IfNeededWithCountry ); } @@ -55,8 +55,8 @@ LocaleLabel::setLabels( const QString& locale, LabelFormat format ) if ( needsCountryName ) countryName = m_locale.nativeCountryName(); - m_label = needsCountryName ? longFormat.arg( languageName ).arg( countryName ) : languageName; - m_englishLabel = englishName; + m_label = needsCountryName ? longFormat.arg( languageName, countryName ) : languageName; + m_englishLabel = needsCountryName ? longFormat.arg( englishName, QLocale::countryToString( m_locale.country() ) ) : englishName; } QLocale LocaleLabel::getLocale( const QString& localeName ) From 3ec1fea083082282083cc8ce00ab107b747b449b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 16:29:25 +0200 Subject: [PATCH 48/57] Changes: document some things fixed-in-passing, add Credits --- CHANGES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index e6cc6ff79..f2f137e95 100644 --- a/CHANGES +++ b/CHANGES @@ -15,11 +15,17 @@ This release contains contributions from (alphabetically by first name): # 3.2.6 (unreleased) # This release contains contributions from (alphabetically by first name): + - Arnaud Ferraris ## Core ## + * Under-the-hood code cleanups in lots of parts of the core. Calamares now + builds without warnings when Clang 8 is used. + ## Modules ## + * *Partition* module has additional checks for validity partition layouts. + (Thanks to Arnaud) * *Welcome* module has improved usability: a standard icon alongside the *Language* label, for improved recognition, and improved language-list display and sorting. #1107 From df37c51c1e02726e7cabd1f5fe58d2a0f366fc19 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 16:39:41 +0200 Subject: [PATCH 49/57] [bootloader] [hwclock] Translate module name --- src/modules/bootloader/main.py | 13 ++++++++++++- src/modules/hwclock/main.py | 12 ++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index f64d412f1..77b030f9d 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -11,7 +11,7 @@ # Copyright 2015-2018, Philip Mueller # Copyright 2016-2017, Teo Mrnjavac # Copyright 2017, Alf Gaida -# Copyright 2017-2018, Adriaan de Groot +# Copyright 2017-2019, Adriaan de Groot # Copyright 2017, Gabriel Craciunescu # Copyright 2017, Ben Green # @@ -37,6 +37,17 @@ import libcalamares from libcalamares.utils import check_target_env_call +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Install bootloader.") + + def get_uuid(): """ Checks and passes 'uuid' to other routine. diff --git a/src/modules/hwclock/main.py b/src/modules/hwclock/main.py index 9cac929ba..f18cf12a9 100644 --- a/src/modules/hwclock/main.py +++ b/src/modules/hwclock/main.py @@ -7,6 +7,7 @@ # Copyright 2014, Teo Mrnjavac # Copyright 2017, Alf Gaida # Copyright 2017-2018, Gabriel Craciunescu +# Copyright 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,6 +24,17 @@ import libcalamares +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Setting hardware clock.") + + def run(): """ Set hardware clock. From 333f0d9215b3f92eacbb7f9b20d67e7e728a6737 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 16:43:07 +0200 Subject: [PATCH 50/57] [bootloader] Simplify finding the ESP --- src/modules/bootloader/main.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index 77b030f9d..56eecdb3b 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -440,15 +440,9 @@ def run(): return None partitions = libcalamares.globalstorage.value("partitions") - if fw_type == "efi": - esp_found = False - - for partition in partitions: - if (partition["mountPoint"] == - libcalamares.globalstorage.value("efiSystemPartition")): - esp_found = True - + efi_system_partition = libcalamares.globalstorage.value("efiSystemPartition") + esp_found = [ p for p in partitions if p["mountPoint"] == efi_system_partition ] if not esp_found: return None From dd5c0d1629c176f7e35818f8f7a070499f06372e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 16:47:53 +0200 Subject: [PATCH 51/57] [bootloader] Log when the bootloader-module does nothing --- src/modules/bootloader/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index 56eecdb3b..4a0bef326 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -435,8 +435,8 @@ def run(): fw_type = libcalamares.globalstorage.value("firmwareType") - if (libcalamares.globalstorage.value("bootLoader") is None - and fw_type != "efi"): + if (libcalamares.globalstorage.value("bootLoader") is None and fw_type != "efi"): + libcalamares.utils.warning( "Non-EFI system, and no bootloader is set." ) return None partitions = libcalamares.globalstorage.value("partitions") @@ -444,6 +444,7 @@ def run(): efi_system_partition = libcalamares.globalstorage.value("efiSystemPartition") esp_found = [ p for p in partitions if p["mountPoint"] == efi_system_partition ] if not esp_found: + libcalamares.utils.warning( "EFI system, but nothing mounted on {!s}".format(efi_system_partition) ) return None prepare_bootloader(fw_type) From ff6a3608a6f1e2db1634eddc190c79bc0b6c3510 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 17:02:03 +0200 Subject: [PATCH 52/57] [mount] [networkcfg] [openrcdmcryptcfg] Translate module name --- src/modules/mount/main.py | 11 +++++++++++ src/modules/networkcfg/main.py | 11 +++++++++++ src/modules/openrcdmcryptcfg/main.py | 15 ++++++++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/modules/mount/main.py b/src/modules/mount/main.py index 29d04e310..50b74b844 100644 --- a/src/modules/mount/main.py +++ b/src/modules/mount/main.py @@ -5,6 +5,7 @@ # # Copyright 2014, Aurélien Gâteau # Copyright 2017, Alf Gaida +# Copyright 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,6 +25,16 @@ import subprocess import libcalamares +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Mounting partitions.") + def mount_partitions(root_mount_point, partitions): """ diff --git a/src/modules/networkcfg/main.py b/src/modules/networkcfg/main.py index 05ebfb70b..5509be205 100644 --- a/src/modules/networkcfg/main.py +++ b/src/modules/networkcfg/main.py @@ -6,6 +6,7 @@ # Copyright 2014, Philip Müller # Copyright 2014, Teo Mrnjavac # Copyright 2017, Alf Gaida +# Copyright 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,6 +26,16 @@ import shutil import libcalamares +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Saving network configuration.") + def run(): """ diff --git a/src/modules/openrcdmcryptcfg/main.py b/src/modules/openrcdmcryptcfg/main.py index e8f901e15..20b306442 100644 --- a/src/modules/openrcdmcryptcfg/main.py +++ b/src/modules/openrcdmcryptcfg/main.py @@ -4,6 +4,7 @@ # === This file is part of Calamares - === # # Copyright 2017, Ghiunhan Mamut +# Copyright 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,9 +19,21 @@ # You should have received a copy of the GNU General Public License # along with Calamares. If not, see . -import libcalamares import os.path +import libcalamares + +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Configuring OpenRC dmcrypt service.") + + def write_dmcrypt_conf(partitions, root_mount_point, dmcrypt_conf_path): crypto_target = "" crypto_source = "" From c364e4fc38f2520135c235805badc4ac57b0e797 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 19 Apr 2019 17:08:53 +0200 Subject: [PATCH 53/57] [dracut] [fstab] Translate module names and error messages --- src/modules/dracut/main.py | 16 ++++++++++++++-- src/modules/fstab/main.py | 11 +++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/modules/dracut/main.py b/src/modules/dracut/main.py index 64dcd4e8e..a929ac70b 100644 --- a/src/modules/dracut/main.py +++ b/src/modules/dracut/main.py @@ -6,6 +6,7 @@ # Copyright 2014-2015, Philip Müller # Copyright 2014, Teo Mrnjavac # Copyright 2017, Alf Gaida +# Copyright 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,6 +25,17 @@ import libcalamares from libcalamares.utils import target_env_call +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Creating initramfs with dracut.") + + def run_dracut(): """ Creates initramfs, even when initramfs already exists. @@ -43,5 +55,5 @@ def run(): return_code = run_dracut() if return_code != 0: - return ("Failed to run dracut on the target", - "The exit code was {}".format(return_code)) + return ( _("Failed to run dracut on the target"), + _("The exit code was {}").format(return_code) ) diff --git a/src/modules/fstab/main.py b/src/modules/fstab/main.py index b3a092924..1aea5523e 100644 --- a/src/modules/fstab/main.py +++ b/src/modules/fstab/main.py @@ -6,6 +6,7 @@ # Copyright 2014, Aurélien Gâteau # Copyright 2016, Teo Mrnjavac # Copyright 2017, Alf Gaida +# Copyright 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,6 +27,16 @@ import subprocess import libcalamares +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Writing fstab.") + FSTAB_HEADER = """# /etc/fstab: static file system information. # From e326b658ef97c197cca19608d22c916f4cb49dff Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 20 Apr 2019 11:22:32 +0200 Subject: [PATCH 54/57] Enable translation in Python modules - covers all the remaining Python modules - most only get a translatable pretty name, some also return error messages --- src/modules/grubcfg/main.py | 12 +++++++++++- src/modules/initcpio/main.py | 11 +++++++++++ src/modules/initcpiocfg/main.py | 11 +++++++++++ src/modules/initramfs/main.py | 18 ++++++++++++++++-- src/modules/initramfscfg/main.py | 13 ++++++++++++- src/modules/localecfg/main.py | 13 ++++++++++++- src/modules/luksbootkeyfile/main.py | 20 +++++++++++++++----- src/modules/luksopenswaphookcfg/main.py | 16 +++++++++++++--- 8 files changed, 101 insertions(+), 13 deletions(-) diff --git a/src/modules/grubcfg/main.py b/src/modules/grubcfg/main.py index b19ebf588..83441a736 100644 --- a/src/modules/grubcfg/main.py +++ b/src/modules/grubcfg/main.py @@ -6,7 +6,7 @@ # Copyright 2014-2015, Philip Müller # Copyright 2015-2017, Teo Mrnjavac # Copyright 2017, Alf Gaida -# Copyright 2017, Adriaan de Groot +# Copyright 2017, 2019, Adriaan de Groot # Copyright 2017-2018, Gabriel Craciunescu # # Calamares is free software: you can redistribute it and/or modify @@ -26,6 +26,16 @@ import libcalamares import os import re +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Configure GRUB.") + def modify_grub_default(partitions, root_mount_point, distributor): """ diff --git a/src/modules/initcpio/main.py b/src/modules/initcpio/main.py index 62277f0c4..20d841de5 100644 --- a/src/modules/initcpio/main.py +++ b/src/modules/initcpio/main.py @@ -4,6 +4,7 @@ # === This file is part of Calamares - === # # Copyright 2014, Philip Müller +# Copyright 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,6 +22,16 @@ import libcalamares from libcalamares.utils import check_target_env_call +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Creating initramfs with mkinitcpio.") + def run_mkinitcpio(): """ Runs mkinitcpio with given kernel profile """ diff --git a/src/modules/initcpiocfg/main.py b/src/modules/initcpiocfg/main.py index b990893ed..2207816d9 100644 --- a/src/modules/initcpiocfg/main.py +++ b/src/modules/initcpiocfg/main.py @@ -6,6 +6,7 @@ # Copyright 2014, Rohan Garg # Copyright 2015, Philip Müller # Copyright 2017, Alf Gaida +# Copyright 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,6 +25,16 @@ import libcalamares import os from collections import OrderedDict +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Configuring mkinitcpio.") + def cpuinfo(): """ diff --git a/src/modules/initramfs/main.py b/src/modules/initramfs/main.py index 5738b63c6..7741c95d5 100644 --- a/src/modules/initramfs/main.py +++ b/src/modules/initramfs/main.py @@ -5,6 +5,7 @@ # # Copyright 2014, Philip Müller # Copyright 2017, Alf Gaida +# Copyright 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,9 +20,21 @@ # You should have received a copy of the GNU General Public License # along with Calamares. If not, see . +import libcalamares from libcalamares.utils import target_env_call +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Creating initramfs.") + + def run(): """ Generate an initramfs image. @@ -31,7 +44,8 @@ def run(): "-t"]) if return_code != 0: + libcalamares.utils.debug("update-initramfs returned {}".format(return_code) return ( - "Failed to run update-initramfs on the target", - "The exit code was {}".format(return_code) + _("Failed to run update-initramfs on the target"), + _("The exit code was {}").format(return_code) ) diff --git a/src/modules/initramfscfg/main.py b/src/modules/initramfscfg/main.py index ba4aa762d..b62e4e5f7 100644 --- a/src/modules/initramfscfg/main.py +++ b/src/modules/initramfscfg/main.py @@ -8,7 +8,7 @@ # Copyright 2016, David McKinney # Copyright 2016, Kevin Kofler # Copyright 2017, Alf Gaida -# Copyright 2017, Adriaan de Groot +# Copyright 2017, 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,6 +30,17 @@ import os import shutil +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Configuring initramfs.") + + def copy_initramfs_hooks(partitions, root_mount_point): """ Copies initramfs hooks so they are picked up by update-initramfs diff --git a/src/modules/localecfg/main.py b/src/modules/localecfg/main.py index 713b1e321..5a9938774 100644 --- a/src/modules/localecfg/main.py +++ b/src/modules/localecfg/main.py @@ -7,7 +7,7 @@ # Copyright 2015, Philip Müller # Copyright 2016, Teo Mrnjavac # Copyright 2018, AlmAck -# Copyright 2018, Adriaan de Groot +# Copyright 2018-2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,6 +26,17 @@ import os import re import shutil +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Configuring locales.") + + RE_IS_COMMENT = re.compile("^ *#") def is_comment(line): """ diff --git a/src/modules/luksbootkeyfile/main.py b/src/modules/luksbootkeyfile/main.py index 74e742080..0c025ca31 100644 --- a/src/modules/luksbootkeyfile/main.py +++ b/src/modules/luksbootkeyfile/main.py @@ -5,7 +5,7 @@ # # Copyright 2016, Teo Mrnjavac # Copyright 2017, Alf Gaida -# Copyright 2017, Adriaan de Groot +# Copyright 2017, 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,10 +21,20 @@ # along with Calamares. If not, see . import libcalamares - from libcalamares.utils import check_target_env_call +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Configuring LUKS key file.") + + def run(): """ This module sets up a file crypto_keyfile.bin on the rootfs, assuming the @@ -54,10 +64,10 @@ def run(): return None if not luks_root_passphrase: + libcalamares.utils.debug("No LUKS passphrase, root {!s}".format(luks_root_device)) return ( - "Encrypted rootfs setup error", - "Rootfs partition {!s} is LUKS but no passphrase found." - .format(luks_root_device)) + _("Encrypted rootfs setup error"), + _("Rootfs partition {!s} is LUKS but no passphrase found.").format(luks_root_device)) # Generate random keyfile check_target_env_call(["dd", diff --git a/src/modules/luksopenswaphookcfg/main.py b/src/modules/luksopenswaphookcfg/main.py index 20dcb1e70..e32fbbbfd 100644 --- a/src/modules/luksopenswaphookcfg/main.py +++ b/src/modules/luksopenswaphookcfg/main.py @@ -5,6 +5,7 @@ # # Copyright 2016, Teo Mrnjavac # Copyright 2017, Alf Gaida +# Copyright 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,6 +24,17 @@ import libcalamares import os.path +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Configuring encrypted swap.") + + def write_openswap_conf(partitions, root_mount_point, openswap_conf_path): swap_outer_uuid = "" swap_mapper_name = "" @@ -80,6 +92,4 @@ def run(): openswap_conf_path = openswap_conf_path.lstrip('/') - return write_openswap_conf( - partitions, root_mount_point, openswap_conf_path - ) + return write_openswap_conf(partitions, root_mount_point, openswap_conf_path) From da46db96a67fbed21caa22db680872a2e2c90b79 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 20 Apr 2019 11:27:36 +0200 Subject: [PATCH 55/57] Changes: document Python module translation --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index f2f137e95..350761d77 100644 --- a/CHANGES +++ b/CHANGES @@ -24,6 +24,7 @@ This release contains contributions from (alphabetically by first name): ## Modules ## + * All of the Python-based modules now have translations enabled. * *Partition* module has additional checks for validity partition layouts. (Thanks to Arnaud) * *Welcome* module has improved usability: a standard icon From e012532c8f0d3aca2029eb4c806a13e7aa5f95f2 Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Sat, 20 Apr 2019 08:42:58 -0400 Subject: [PATCH 56/57] i18n: [calamares] Automatic merge of Transifex translations --- lang/calamares_ast.ts | 29 ++++++++-------- lang/calamares_cs_CZ.ts | 26 +++++++------- lang/calamares_de.ts | 77 +++++++++++++++++++++-------------------- lang/calamares_fr.ts | 57 +++++++++++++++--------------- lang/calamares_he.ts | 15 ++++---- lang/calamares_hr.ts | 77 +++++++++++++++++++++-------------------- lang/calamares_ko.ts | 57 +++++++++++++++--------------- lang/calamares_lt.ts | 57 +++++++++++++++--------------- lang/calamares_pt_PT.ts | 2 +- lang/calamares_sk.ts | 15 ++++---- lang/calamares_sq.ts | 55 ++++++++++++++--------------- lang/calamares_zh_TW.ts | 57 +++++++++++++++--------------- 12 files changed, 267 insertions(+), 257 deletions(-) diff --git a/lang/calamares_ast.ts b/lang/calamares_ast.ts index 5e6f0f2b2..be0e7fc1e 100644 --- a/lang/calamares_ast.ts +++ b/lang/calamares_ast.ts @@ -257,12 +257,12 @@ Continue with installation? - + ¿Siguir cola instalación? 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> - + El programa d'instalación de %1 ta a piques de facer cambeos nel discu pa configurar %2.<br/><strong>Nun vas ser a desfacer estos cambeos.<strong> @@ -298,7 +298,8 @@ Do you really want to cancel the current setup process? The setup program will quit and all changes will be lost. - + ¿De xuru que quies encaboxar el procesu actual de configuración? +El programa de configuración va colar y van perdese tolos cambeos. @@ -1091,7 +1092,7 @@ L'instalador va colar y van perdese tolos cambeos. <Restart checkbox tooltip> - + <Restart checkbox tooltip> @@ -1139,7 +1140,7 @@ L'instalador va colar y van perdese tolos cambeos. Setup Complete - + Configuración completada @@ -1149,7 +1150,7 @@ L'instalador va colar y van perdese tolos cambeos. The setup of %1 is complete. - + La configuración de %1 ta completada. @@ -1235,7 +1236,7 @@ L'instalador va colar y van perdese tolos cambeos. The screen is too small to display the setup program. - + La pantalla ye mui pequeña como p'amosar el programa de configuración. @@ -2455,7 +2456,7 @@ Salida: This computer does not satisfy the minimum requirements for setting up %1.<br/>Setup cannot continue. <a href="#details">Details...</a> - + Esti ordenador nun satisfaz dalgún de los requirimientos mínimos pa configurar %1.<br/>La configuración nun pue siguir. <a href="#details">Detalles...</a> @@ -2465,7 +2466,7 @@ Salida: This computer does not satisfy some of the recommended requirements for setting up %1.<br/>Setup can continue, but some features might be disabled. - + Esti ordenador nun satisfaz dalgún de los requirimientos aconseyaos pa configurar %1.<br/>La configuración pue siguir pero dalgunes carauterístiques podríen desactivase. @@ -2871,12 +2872,12 @@ Salida: <small>If more than one person will use this computer, you can create multiple accounts after setup.</small> - + <small>Si va usar l'ordenador más d'una persona, pues crear más cuentes tres la configuración.</small> <small>If more than one person will use this computer, you can create multiple accounts after installation.</small> - + <small>Si va usar l'ordenador más d'una persona, pues crear más cuentes tres la instalación.</small> @@ -3016,17 +3017,17 @@ Salida: <h1>Welcome to the Calamares setup program for %1.</h1> - + <h1>Afáyate nel programa de configuración de Calamares pa %1.</h1> <h1>Welcome to %1 setup.</h1> - + <h1>Afáyate na configuración de %1.</h1> About %1 setup - + Tocante a la configuración de %1 diff --git a/lang/calamares_cs_CZ.ts b/lang/calamares_cs_CZ.ts index d3f598f69..220a61eae 100644 --- a/lang/calamares_cs_CZ.ts +++ b/lang/calamares_cs_CZ.ts @@ -226,7 +226,7 @@ Cancel setup without changing the system. - + Zrušit nastavení bez změny v systému. @@ -237,7 +237,7 @@ Setup Failed - + Nastavení se nezdařilo @@ -257,7 +257,7 @@ Continue with installation? - + Pokračovat v instalaci? @@ -267,12 +267,12 @@ &Set up now - + Na&stavit nyní &Set up - + Na&stavit @@ -282,12 +282,12 @@ Setup is complete. Close the setup program. - + Nastavení je dokončeno. Ukončete nastavovací program. Cancel setup? - + Zrušit nastavování? @@ -1091,7 +1091,7 @@ Instalační program bude ukončen a všechny změny ztraceny. <Restart checkbox tooltip> - + <Restart checkbox tooltip> @@ -1139,7 +1139,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Setup Complete - + Nastavení dokončeno @@ -1149,7 +1149,7 @@ Instalační program bude ukončen a všechny změny ztraceny. The setup of %1 is complete. - + Nastavení %1 je dokončeno. @@ -1225,7 +1225,7 @@ Instalační program bude ukončen a všechny změny ztraceny. The setup program is not running with administrator rights. - + Nastavovací program není spuštěn s právy správce systému. @@ -1235,7 +1235,7 @@ Instalační program bude ukončen a všechny změny ztraceny. The screen is too small to display the setup program. - + Rozlišení obrazovky je příliš malé pro zobrazení nastavovacího programu. @@ -3026,7 +3026,7 @@ Výstup: About %1 setup - + O nastavování %1 diff --git a/lang/calamares_de.ts b/lang/calamares_de.ts index 0587fdc23..643d7d610 100644 --- a/lang/calamares_de.ts +++ b/lang/calamares_de.ts @@ -115,12 +115,12 @@ Job failed (%1) - + Auftrag fehlgeschlagen (%1) Programmed job failure was explicitly requested. - + Ein programmierter Auftragsfehler wurde explizit gefordert. @@ -136,7 +136,7 @@ Example job (%1) - + Beispielauftrag (%1) @@ -190,17 +190,17 @@ Waiting for %n module(s). - + Warten auf %n Modul.Warten auf %n Modul(e). (%n second(s)) - + (%n Sekunde)(%n Sekunde(n)) System-requirements checking is complete. - + Die Überprüfung der Systemvoraussetzungen ist abgeschlossen. @@ -226,7 +226,7 @@ Cancel setup without changing the system. - + Brechen Sie die Installation ab, ohne das System zu verändern. @@ -237,7 +237,7 @@ Setup Failed - + Setup fehlgeschlagen @@ -257,22 +257,22 @@ Continue with installation? - + Installation fortsetzen? 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> - + Das %1 Installationsprogramm ist dabei, Änderungen an Ihrer Festplatte vorzunehmen, um %2 einzurichten.<br/><strong> Sie werden diese Änderungen nicht rückgängig machen können.</strong> &Set up now - + &Jetzt einrichten &Set up - + &Einrichten @@ -282,12 +282,12 @@ Setup is complete. Close the setup program. - + Setup ist abgeschlossen. Schließe das Installationsprogramm. Cancel setup? - + Installation abbrechen? @@ -298,7 +298,8 @@ Do you really want to cancel the current setup process? The setup program will quit and all changes will be lost. - + Wollen Sie wirklich die aktuelle Installation abbrechen? +Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. @@ -391,7 +392,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. %1 Setup Program - + %1 Installationsprogramm @@ -1091,7 +1092,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. <Restart checkbox tooltip> - + <Restart checkbox tooltip> @@ -1101,12 +1102,12 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. <h1>All done.</h1><br/>%1 has been set up on your computer.<br/>You may now start using your new system. - + <h1>Alles erledigt.</h1><br/>%1 wurde auf Ihrem Computer eingerichtet.<br/>Sie können nun mit Ihrem neuen System arbeiten. <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>Wenn diese Option aktiviert ist, genügt zum Neustart des Systems ein Klick auf <span style="font-style:italic;">Fertig</span> oder das Schließen des Installationsprogramms.</p></body></html> @@ -1116,12 +1117,12 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. <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>Wenn diese Option aktiviert ist, genügt zum Neustart des Systems ein Klick auf <span style="font-style:italic;">Fertig</span> oder das Schließen des Installationsprogramms.</p></body></html> <h1>Setup Failed</h1><br/>%1 has not been set up on your computer.<br/>The error message was: %2. - + <h1>Installation fehlgeschlagen</h1><br/>%1 wurde nicht auf Ihrem Computer eingerichtet.<br/>Die Fehlermeldung war: %2. @@ -1139,7 +1140,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. Setup Complete - + Installation komplett @@ -1149,7 +1150,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. The setup of %1 is complete. - + Die Installation von %1 ist abgeschlossen. @@ -1225,7 +1226,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. The setup program is not running with administrator rights. - + Das Installationsprogramm wird nicht mit Administratorrechten ausgeführt. @@ -1235,7 +1236,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. The screen is too small to display the setup program. - + Der Bildschirm ist zu klein, um das Installationsprogramm anzuzeigen. @@ -2045,12 +2046,12 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. has at least one disk device available. - + hat mindestens ein Festplattengerät zur Verfügung. There are no partitons to install on. - + Es gibt keine Partitonen, auf denen man installieren könnte. @@ -2077,7 +2078,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. 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. - + Bitte wählen Sie ein Erscheinungsbild für den KDE Plasma Desktop. Sie können diesen Schritt auch überspringen und das Erscheinungsbild festlegen, sobald das System eingerichtet ist. Per Klick auf einen Eintrag können Sie sich eine Vorschau dieses Erscheinungsbildes anzeigen lassen. @@ -2226,7 +2227,7 @@ Ausgabe: Requirements checking for module <i>%1</i> is complete. - + Die Anforderungsprüfung für das Modul <i>%1</i> ist abgeschlossen. @@ -2455,7 +2456,7 @@ Ausgabe: This computer does not satisfy the minimum requirements for setting up %1.<br/>Setup cannot continue. <a href="#details">Details...</a> - + Dieser Computer erfüllt nicht die Mindestvoraussetzungen für die Installation von %1.<br/>Die Installation kann nicht fortgesetzt werden. <a href="#details">Details...</a> @@ -2465,7 +2466,7 @@ Ausgabe: This computer does not satisfy some of the recommended requirements for setting up %1.<br/>Setup can continue, but some features might be disabled. - + Dieser Computer erfüllt nicht alle Voraussetzungen für die Installation von %1.<br/>Die Installation kann fortgesetzt werden, aber es werden eventuell nicht alle Funktionen verfügbar sein. @@ -2747,7 +2748,7 @@ Ausgabe: This is an overview of what will happen once you start the setup procedure. - + Dies ist eine Übersicht der Aktionen, die nach dem Starten des Installationsprozesses durchgeführt werden. @@ -2871,12 +2872,12 @@ Ausgabe: <small>If more than one person will use this computer, you can create multiple accounts after setup.</small> - + <small>Falls dieser Computer von mehr als einer Person benutzt werden soll, können weitere Benutzerkonten nach der Installation eingerichtet werden.</small> <small>If more than one person will use this computer, you can create multiple accounts after installation.</small> - + <small>Falls dieser Computer von mehr als einer Person benutzt werden soll, können weitere Benutzerkonten nach der Installation eingerichtet werden.</small> @@ -3016,17 +3017,17 @@ Ausgabe: <h1>Welcome to the Calamares setup program for %1.</h1> - + <h1>Willkommen beim Calamares Installationsprogramm für %1.</h1> <h1>Welcome to %1 setup.</h1> - + <h1>Willkommen zur Installation von %1.</h1> About %1 setup - + Über das Installationsprogramm %1 @@ -3036,7 +3037,7 @@ Ausgabe: <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-2019 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/>für %3</strong><br/><br/>Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Copyright 2017-2019 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Dank an <a href="https://calamares.io/team/">das Calamares-Team</a> und das <a href="https://www.transifex.com/calamares/calamares/">Calamares Übersetzerteam</a>.<br/><br/>Die <a href="https://calamares.io/">Calamares</a>-Entwicklung wird unterstützt von<br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software. diff --git a/lang/calamares_fr.ts b/lang/calamares_fr.ts index cab92191a..92df5715f 100644 --- a/lang/calamares_fr.ts +++ b/lang/calamares_fr.ts @@ -226,7 +226,7 @@ Cancel setup without changing the system. - + Annuler l'installation sans toucher au système. @@ -237,7 +237,7 @@ Setup Failed - + Échec de l'installation @@ -257,22 +257,22 @@ Continue with installation? - + Continuer avec l'installation ? 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> - + L'installateur %1 est sur le point de procéder aux changements sur le disque afin d'installer %2.<br/> <strong>Vous ne pourrez pas annulez ces changements.</strong> &Set up now - + &Installer maintenant &Set up - + &Installer @@ -282,12 +282,12 @@ Setup is complete. Close the setup program. - + L'installation est terminée. Fermer l'installateur. Cancel setup? - + Annuler l'installation ? @@ -298,7 +298,8 @@ Do you really want to cancel the current setup process? The setup program will quit and all changes will be lost. - + Voulez-vous réellement abandonner le processus d'installation ? +L'installateur se fermera et les changements seront perdus. @@ -391,7 +392,7 @@ L'installateur se fermera et les changements seront perdus. %1 Setup Program - + Programme d'installation de %1 @@ -1091,7 +1092,7 @@ L'installateur se fermera et les changements seront perdus. <Restart checkbox tooltip> - + <Restart checkbox tooltip> @@ -1101,12 +1102,12 @@ L'installateur se fermera et les changements seront perdus. <h1>All done.</h1><br/>%1 has been set up on your computer.<br/>You may now start using your new system. - + <h1>Installation terminée.</h1><br/>%1 a été installé sur votre ordinateur.<br/>Vous pouvez maintenant utiliser votre nouveau système. <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>En sélectionnant cette option, votre système redémarrera immédiatement quand vous cliquerez sur <span style=" font-style:italic;">Terminé</span> ou fermerez l'installateur.</p></body></html> @@ -1116,12 +1117,12 @@ L'installateur se fermera et les changements seront perdus. <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>En sélectionnant cette option, votre système redémarrera immédiatement quand vous cliquerez sur <span style=" font-style:italic;">Terminé</span> ou fermerez l'installateur.</p></body></html> <h1>Setup Failed</h1><br/>%1 has not been set up on your computer.<br/>The error message was: %2. - + <h1>Installation échouée</h1><br/>%1 n'a pas été installée sur cet ordinateur.<br/>Le message d'erreur était : %2. @@ -1139,7 +1140,7 @@ L'installateur se fermera et les changements seront perdus. Setup Complete - + Installation terminée @@ -1149,7 +1150,7 @@ L'installateur se fermera et les changements seront perdus. The setup of %1 is complete. - + L'installation de %1 est terminée. @@ -1225,7 +1226,7 @@ L'installateur se fermera et les changements seront perdus. The setup program is not running with administrator rights. - + L'installateur ne dispose pas des droits administrateur. @@ -1235,7 +1236,7 @@ L'installateur se fermera et les changements seront perdus. The screen is too small to display the setup program. - + L'écran est trop petit pour afficher l'installateur. @@ -2077,7 +2078,7 @@ L'installateur se fermera et les changements seront perdus. 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. - + Merci de choisir l'apparence du bureau KDE Plasma. Vous pouvez aussi passer cette étape et configurer l'apparence une fois le système installé. Vous pouvez obtenir un aperçu des différentes apparences en cliquant sur celles-ci. @@ -2456,7 +2457,7 @@ Sortie This computer does not satisfy the minimum requirements for setting up %1.<br/>Setup cannot continue. <a href="#details">Details...</a> - + Cet ordinateur ne satisfait pas les minimum prérequis pour installer %1.<br/>L'installation ne peut pas continuer. <a href="#details">Détails...</a> @@ -2466,7 +2467,7 @@ Sortie This computer does not satisfy some of the recommended requirements for setting up %1.<br/>Setup can continue, but some features might be disabled. - + Cet ordinateur ne satisfait pas certains des prérequis recommandés pour installer %1.<br/>L'installation peut continuer, mais certaines fonctionnalités pourraient être désactivées. @@ -2748,7 +2749,7 @@ Sortie This is an overview of what will happen once you start the setup procedure. - + Ceci est un aperçu de ce qui va arriver lorsque vous commencerez l'installation. @@ -2872,12 +2873,12 @@ Sortie <small>If more than one person will use this computer, you can create multiple accounts after setup.</small> - + <small>si plusieurs personnes utilisent cet ordinateur, vous pourrez créer plusieurs comptes après l'installation.</small> <small>If more than one person will use this computer, you can create multiple accounts after installation.</small> - + <small>si plusieurs personnes utilisent cet ordinateur, vous pourrez créer plusieurs comptes après l'installation.</small> @@ -3017,17 +3018,17 @@ Sortie <h1>Welcome to the Calamares setup program for %1.</h1> - + <h1>Bienvenue dans l'installateur Calamares pour %1.</h1> <h1>Welcome to %1 setup.</h1> - + <h1>Bienvenue dans l'installation de %1.</h1> About %1 setup - + À propos de l'installation de %1 diff --git a/lang/calamares_he.ts b/lang/calamares_he.ts index 0e8a64ee2..af1ec65e3 100644 --- a/lang/calamares_he.ts +++ b/lang/calamares_he.ts @@ -226,7 +226,7 @@ Cancel setup without changing the system. - + ביטול ההתקנה ללא שינוי המערכת. @@ -237,7 +237,7 @@ Setup Failed - + ההתקנה נכשלה @@ -257,7 +257,7 @@ Continue with installation? - + להמשיך בהתקנה? @@ -282,12 +282,12 @@ Setup is complete. Close the setup program. - + ההתקנה הושלמה. נא לסגור את תכנית ההתקנה. Cancel setup? - + לבטל את ההתקנה? @@ -298,7 +298,8 @@ Do you really want to cancel the current setup process? The setup program will quit and all changes will be lost. - + לבטל את תהליך ההתקנה הנוכחי? +תכנית ההתקנה תצא וכל השינויים יאבדו. @@ -391,7 +392,7 @@ The installer will quit and all changes will be lost. %1 Setup Program - + תכנית התקנת %1 diff --git a/lang/calamares_hr.ts b/lang/calamares_hr.ts index 6b1ff79b9..8d09bb31f 100644 --- a/lang/calamares_hr.ts +++ b/lang/calamares_hr.ts @@ -115,12 +115,12 @@ Job failed (%1) - + Posao nije uspio (%1) Programmed job failure was explicitly requested. - + Programski neuspjeh posla je izričito zatražen. @@ -136,7 +136,7 @@ Example job (%1) - + Primjer posla (%1) @@ -190,17 +190,17 @@ Waiting for %n module(s). - + Čekam %1 modul(a).Čekam %1 modul(a).Čekam %1 modul(a). (%n second(s)) - + (%n sekunda(e))(%n sekunda(e))(%n sekunda(e)) System-requirements checking is complete. - + Provjera zahtjeva za instalaciju sustava je dovršena. @@ -226,7 +226,7 @@ Cancel setup without changing the system. - + Odustanite od instalacije bez promjena na sustavu. @@ -237,7 +237,7 @@ Setup Failed - + Instalacija nije uspjela @@ -257,22 +257,22 @@ Continue with installation? - + Nastaviti sa instalacijom? 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> - + Instalacijski program %1 će izvršiti promjene na vašem disku kako bi postavio %2. <br/><strong>Ne možete poništiti te promjene.</strong> &Set up now - + &Postaviti odmah &Set up - + &Postaviti @@ -282,12 +282,12 @@ Setup is complete. Close the setup program. - + Instalacija je završena. Zatvorite instalacijski program. Cancel setup? - + Prekinuti instalaciju? @@ -298,7 +298,8 @@ Do you really want to cancel the current setup process? The setup program will quit and all changes will be lost. - + Stvarno želite prekinuti instalacijski proces? +Instalacijski program će izaći i sve promjene će biti izgubljene. @@ -391,7 +392,7 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. %1 Setup Program - + %1 instalacijski program @@ -1091,7 +1092,7 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. <Restart checkbox tooltip> - + <Restart checkbox tooltip> @@ -1101,12 +1102,12 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. <h1>All done.</h1><br/>%1 has been set up on your computer.<br/>You may now start using your new system. - + <h1>Gotovo.</h1><br/>%1 je instaliran na vaše računalo.<br/>Sada možete koristiti vaš novi sustav. <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>Kada je odabrana ova opcija, vaš sustav će se ponovno pokrenuti kada kliknete na <span style="font-style:italic;">Gotovo</span> ili zatvorite instalacijski program.</p></body></html> @@ -1116,12 +1117,12 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. <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>Kada je odabrana ova opcija, vaš sustav će se ponovno pokrenuti kada kliknete na <span style="font-style:italic;">Gotovo</span> ili zatvorite instalacijski program.</p></body></html> <h1>Setup Failed</h1><br/>%1 has not been set up on your computer.<br/>The error message was: %2. - + <h1>Instalacija nije uspijela</h1><br/>%1 nije instaliran na vaše računalo.<br/>Greška: %2. @@ -1139,7 +1140,7 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. Setup Complete - + Instalacija je završena @@ -1149,7 +1150,7 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. The setup of %1 is complete. - + Instalacija %1 je završena. @@ -1225,7 +1226,7 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. The setup program is not running with administrator rights. - + Instalacijski program nije pokrenut sa administratorskim dozvolama. @@ -1235,7 +1236,7 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. The screen is too small to display the setup program. - + Zaslon je premalen za prikaz instalacijskog programa. @@ -2045,12 +2046,12 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. has at least one disk device available. - + ima barem jedan disk dostupan. There are no partitons to install on. - + Nema particija na koje bi se izvršila instalacija. @@ -2077,7 +2078,7 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. 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. - + Odaberite izgled KDE Plasme. Možete također preskočiti ovaj korak i konfigurirati izgled jednom kada sustav bude instaliran. Odabirom izgleda dobit ćete pregled uživo tog izgleda. @@ -2226,7 +2227,7 @@ Izlaz: Requirements checking for module <i>%1</i> is complete. - + Provjera zahtjeva za modul <i>%1</i> je dovršena. @@ -2455,7 +2456,7 @@ Izlaz: This computer does not satisfy the minimum requirements for setting up %1.<br/>Setup cannot continue. <a href="#details">Details...</a> - + Ovo računalo ne zadovoljava minimalne zahtjeve za instalaciju %1.<br/>Instalacija se ne može nastaviti.<a href="#details">Detalji...</a> @@ -2465,7 +2466,7 @@ Izlaz: This computer does not satisfy some of the recommended requirements for setting up %1.<br/>Setup can continue, but some features might be disabled. - + Računalo ne zadovoljava neke od preporučenih uvjeta za instalaciju %1.<br/>Instalacija se može nastaviti, ali neke značajke možda neće biti dostupne. @@ -2747,7 +2748,7 @@ Izlaz: This is an overview of what will happen once you start the setup procedure. - + Ovo je prikaz događaja koji će uslijediti jednom kad počne instalacijska procedura. @@ -2871,12 +2872,12 @@ Izlaz: <small>If more than one person will use this computer, you can create multiple accounts after setup.</small> - + <small>Ako će više osoba koristiti ovo računalo, možete postaviti više korisničkih računa poslije instalacije.</small> <small>If more than one person will use this computer, you can create multiple accounts after installation.</small> - + <small>Ako će više osoba koristiti ovo računalo, možete postaviti više korisničkih računa poslije instalacije.</small> @@ -3016,17 +3017,17 @@ Izlaz: <h1>Welcome to the Calamares setup program for %1.</h1> - + <h1>Dobrodošli u Calamares instalacijski program za %1.</h1> <h1>Welcome to %1 setup.</h1> - + <h1>Dobrodošli u %1 instalacijski program.</h1> About %1 setup - + O %1 instalacijskom programu @@ -3036,7 +3037,7 @@ Izlaz: <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-2019 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/>za %3</strong><br/><br/>Autorska prava 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Autorska prava 2017-2019 Adriaan de Groot &lt;groot@kde.org&gt;<br/> Hvala <a href="https://calamares.io/team/">Calamares timu</a> i <a href="https://www.transifex.com/calamares/calamares/">Calamares timu za prevođenje</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> sponzorira <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software. diff --git a/lang/calamares_ko.ts b/lang/calamares_ko.ts index 7174f141e..7a0acba17 100644 --- a/lang/calamares_ko.ts +++ b/lang/calamares_ko.ts @@ -226,7 +226,7 @@ Cancel setup without changing the system. - + 시스템을 변경 하지 않고 설치를 취소합니다. @@ -237,7 +237,7 @@ Setup Failed - + 설치 실패 @@ -257,22 +257,22 @@ Continue with installation? - + 설치를 계속하시겠습니까? 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> - + %1 설치 프로그램이 %2을(를) 설정하기 위해 디스크를 변경하려고 하는 중입니다.<br/><strong>이러한 변경은 취소할 수 없습니다.</strong> &Set up now - + 지금 설치 (&S) &Set up - + 설치 (&S) @@ -282,12 +282,12 @@ Setup is complete. Close the setup program. - + 설치가 완료 되었습니다. 설치 프로그램을 닫습니다. Cancel setup? - + 설치를 취소 하시겠습니까? @@ -298,7 +298,8 @@ Do you really want to cancel the current setup process? The setup program will quit and all changes will be lost. - + 현재 설정 프로세스를 취소하시겠습니까? +설치 프로그램이 종료되고 모든 변경 내용이 손실됩니다. @@ -391,7 +392,7 @@ The installer will quit and all changes will be lost. %1 Setup Program - + %1 설치 프로그램 @@ -1091,7 +1092,7 @@ The installer will quit and all changes will be lost. <Restart checkbox tooltip> - + <Restart checkbox tooltip> @@ -1101,12 +1102,12 @@ The installer will quit and all changes will be lost. <h1>All done.</h1><br/>%1 has been set up on your computer.<br/>You may now start using your new system. - + <h1>모두 완료.</h1><br/>%1이 컴퓨터에 설정되었습니다.<br/>이제 새 시스템을 사용할 수 있습니다. <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>이 확인란을 선택하면 <span style="font-style:italic;">완료</span>를 클릭하거나 설치 프로그램을 닫으면 시스템이 즉시 다시 시작됩니다.</p></body></html> @@ -1116,12 +1117,12 @@ The installer will quit and all changes will be lost. <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>이 확인란을 선택하면 <span style="font-style:italic;">완료</span>를 클릭하거나 설치 관리자를 닫으면 시스템이 즉시 다시 시작됩니다.</p></body></html> <h1>Setup Failed</h1><br/>%1 has not been set up on your computer.<br/>The error message was: %2. - + <h1>설치 실패</h1><br/>%1이 컴퓨터에 설정되지 않았습니다.<br/>오류 메시지 : %2. @@ -1139,7 +1140,7 @@ The installer will quit and all changes will be lost. Setup Complete - + 설치 완료 @@ -1149,7 +1150,7 @@ The installer will quit and all changes will be lost. The setup of %1 is complete. - + %1 설치가 완료되었습니다. @@ -1225,7 +1226,7 @@ The installer will quit and all changes will be lost. The setup program is not running with administrator rights. - + 설치 프로그램이 관리자 권한으로 실행되고 있지 않습니다. @@ -1235,7 +1236,7 @@ The installer will quit and all changes will be lost. The screen is too small to display the setup program. - + 화면이 너무 작아서 설정 프로그램을 표시할 수 없습니다. @@ -2077,7 +2078,7 @@ The installer will quit and all changes will be lost. 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. - + KDE Plasma Desktop의 모양과 느낌을 선택하세요. 시스템을 설정한 후 이 단계를 건너뛰고 모양과 느낌을 구성할 수도 있습니다. 모양과 느낌 선택을 클릭하면 해당 모양을 미리 볼 수 있습니다. @@ -2455,7 +2456,7 @@ Output: This computer does not satisfy the minimum requirements for setting up %1.<br/>Setup cannot continue. <a href="#details">Details...</a> - + 이 컴퓨터는 %1 설치를 위한 최소 요구 사항을 충족하지 않습니다.<br/>설치를 계속할 수 없습니다.<a href="#details">세부 정보...</a> @@ -2465,7 +2466,7 @@ Output: This computer does not satisfy some of the recommended requirements for setting up %1.<br/>Setup can continue, but some features might be disabled. - + 이 컴퓨터는 %1 설치를 위한 권장 요구 사항 중 일부를 충족하지 않습니다.<br/>설치를 계속할 수는 있지만 일부 기능을 사용하지 않도록 설정할 수도 있습니다. @@ -2747,7 +2748,7 @@ Output: This is an overview of what will happen once you start the setup procedure. - + 설치 절차를 시작하면 어떻게 되는지 간략히 설명합니다. @@ -2871,12 +2872,12 @@ Output: <small>If more than one person will use this computer, you can create multiple accounts after setup.</small> - + <small>둘 이상의 사용자가 이 컴퓨터를 사용할 경우, 설정 후 계정을 여러 개 만들 수 있습니다.</small> <small>If more than one person will use this computer, you can create multiple accounts after installation.</small> - + <small>둘 이상의 사용자가 이 컴퓨터를 사용할 경우 설치 후 계정을 여러 개 만들 수 있습니다.</small> @@ -3016,17 +3017,17 @@ Output: <h1>Welcome to the Calamares setup program for %1.</h1> - + <h1>%1에 대한 Calamares 설정 프로그램에 오신 것을 환영합니다.</h1> <h1>Welcome to %1 setup.</h1> - + <h1>%1 설치에 오신 것을 환영합니다.</h1> About %1 setup - + %1 설치 정보 diff --git a/lang/calamares_lt.ts b/lang/calamares_lt.ts index ee6c80d75..06e498c6a 100644 --- a/lang/calamares_lt.ts +++ b/lang/calamares_lt.ts @@ -226,7 +226,7 @@ Cancel setup without changing the system. - + Atsisakyti sąrankos, nieko sistemoje nekeičiant. @@ -237,7 +237,7 @@ Setup Failed - + Sąranka patyrė nesėkmę @@ -257,22 +257,22 @@ Continue with installation? - + Tęsti diegimą? 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> - + %1 sąrankos programa, siekdama nustatyti %2, ketina atlikti pakeitimus diske.<br/><strong>Šių pakeitimų nebegalėsite atšaukti.</strong> &Set up now - + Nu&statyti dabar &Set up - + Nu&statyti @@ -282,12 +282,12 @@ Setup is complete. Close the setup program. - + Sąranka užbaigta. Užverkite sąrankos programą. Cancel setup? - + Atsisakyti sąrankos? @@ -298,7 +298,8 @@ Do you really want to cancel the current setup process? The setup program will quit and all changes will be lost. - + Ar tikrai norite atsisakyti dabartinio sąrankos proceso? +Sąrankos programa užbaigs darbą ir visi pakeitimai bus prarasti. @@ -391,7 +392,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. %1 Setup Program - + %1 sąrankos programa @@ -1091,7 +1092,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. <Restart checkbox tooltip> - + <Restart checkbox tooltip> @@ -1101,12 +1102,12 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. <h1>All done.</h1><br/>%1 has been set up on your computer.<br/>You may now start using your new system. - + <h1>Viskas atlikta.</h1><br/>%1 sistema jūsų kompiuteryje jau nustatyta.<br/>Dabar galite pradėti naudotis savo naująja sistema. <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>Pažymėjus šį langelį, jūsų sistema nedelsiant pasileis iš naujo, kai spustelėsite <span style="font-style:italic;">Atlikta</span> ar užversite sąrankos programą.</p></body></html> @@ -1116,12 +1117,12 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. <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>Pažymėjus šį langelį, jūsų sistema nedelsiant pasileis iš naujo, kai spustelėsite <span style="font-style:italic;">Atlikta</span> ar užversite diegimo programą.</p></body></html> <h1>Setup Failed</h1><br/>%1 has not been set up on your computer.<br/>The error message was: %2. - + <h1>Sąranka nepavyko</h1><br/>%1 nebuvo nustatyta jūsų kompiuteryje.<br/>Klaidos pranešimas buvo: %2. @@ -1139,7 +1140,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. Setup Complete - + Sąranka užbaigta @@ -1149,7 +1150,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. The setup of %1 is complete. - + %1 sąranka yra užbaigta. @@ -1225,7 +1226,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. The setup program is not running with administrator rights. - + Sąrankos programa yra vykdoma be administratoriaus teisių. @@ -1235,7 +1236,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. The screen is too small to display the setup program. - + Ekranas yra per mažas, kad būtų parodyta sąrankos programa. @@ -2077,7 +2078,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. 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. - + Pasirinkite KDE Plasma darbalaukio išvaizdą ir turinį. Taip pat galite praleisti šį žingsnį ir konfigūruoti išvaizdą ir turinį, kai sistema bus nustatyta. Spustelėjus ant tam tikro išvaizdos ir turinio pasirinkimo, jums bus parodyta tiesioginė peržiūrą. @@ -2455,7 +2456,7 @@ Išvestis: This computer does not satisfy the minimum requirements for setting up %1.<br/>Setup cannot continue. <a href="#details">Details...</a> - + Šis kompiuteris netenkina minimalių %1 nustatymo reikalavimų.<br/>Sąranka negali būti tęsiama. <a href="#details">Išsamiau...</a> @@ -2465,7 +2466,7 @@ Išvestis: This computer does not satisfy some of the recommended requirements for setting up %1.<br/>Setup can continue, but some features might be disabled. - + Šis kompiuteris netenkina kai kurių %1 nustatymui rekomenduojamų reikalavimų.<br/>Sąranką galima tęsti, tačiau kai kurios funkcijos gali būti išjungtos. @@ -2747,7 +2748,7 @@ Išvestis: This is an overview of what will happen once you start the setup procedure. - + Tai yra apžvalga to, kas įvyks, prasidėjus sąrankos procedūrai. @@ -2871,12 +2872,12 @@ Išvestis: <small>If more than one person will use this computer, you can create multiple accounts after setup.</small> - + <small>Jei šiuo kompiuteriu naudosis keli žmonės, po sąrankos galite sukurti papildomas paskyras.</small> <small>If more than one person will use this computer, you can create multiple accounts after installation.</small> - + <small>Jei šiuo kompiuteriu naudosis keli žmonės, po diegimo galite sukurti papildomas paskyras.</small> @@ -3016,17 +3017,17 @@ Išvestis: <h1>Welcome to the Calamares setup program for %1.</h1> - + <h1>Jus sveikina Calamares sąrankos programa, skirta %1 sistemai.</h1> <h1>Welcome to %1 setup.</h1> - + <h1>Jus sveikina %1 sąranka.</h1> About %1 setup - + Apie %1 sąranką diff --git a/lang/calamares_pt_PT.ts b/lang/calamares_pt_PT.ts index 849f084e8..9a6743d0e 100644 --- a/lang/calamares_pt_PT.ts +++ b/lang/calamares_pt_PT.ts @@ -257,7 +257,7 @@ Continue with installation? - + Continuar com a instalação? diff --git a/lang/calamares_sk.ts b/lang/calamares_sk.ts index 1547ec13b..d2a203727 100644 --- a/lang/calamares_sk.ts +++ b/lang/calamares_sk.ts @@ -226,7 +226,7 @@ Cancel setup without changing the system. - + Zrušenie inštalácie bez zmien v systéme. @@ -237,7 +237,7 @@ Setup Failed - + Inštalácia zlyhala @@ -257,7 +257,7 @@ Continue with installation? - + Pokračovať v inštalácii? @@ -287,7 +287,7 @@ Cancel setup? - + Zrušiť inštaláciu? @@ -298,7 +298,8 @@ Do you really want to cancel the current setup process? The setup program will quit and all changes will be lost. - + Naozaj chcete zrušiť aktuálny priebeh inštalácie? +Inštalačný program bude ukončený a zmeny budú stratené. @@ -1139,7 +1140,7 @@ Inštalátor sa ukončí a všetky zmeny budú stratené. Setup Complete - + Inštalácia dokončená @@ -1149,7 +1150,7 @@ Inštalátor sa ukončí a všetky zmeny budú stratené. The setup of %1 is complete. - + Inštalácia distribúcie %1 je dokončená. diff --git a/lang/calamares_sq.ts b/lang/calamares_sq.ts index 4378eaa9f..e9e237984 100644 --- a/lang/calamares_sq.ts +++ b/lang/calamares_sq.ts @@ -226,7 +226,7 @@ Cancel setup without changing the system. - + Anuloje rregullimin pa ndryshuar sistemin. @@ -237,7 +237,7 @@ Setup Failed - + Rregullimi Dështoi @@ -257,22 +257,22 @@ Continue with installation? - + Të vazhdohet me instalimin? 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> - + Programi i rregullimit %1 është një hap larg nga bërja e ndryshimeve në diskun tuaj, që të mund të rregullojë %2.<br/><strong>S’do të jeni në gjendje t’i zhbëni këto ndryshime.</strong> &Set up now - + &Rregulloje tani &Set up - + &Rregulloje @@ -282,12 +282,12 @@ Setup is complete. Close the setup program. - + Rregullimi është i plotë. Mbylleni programin e rregullimit. Cancel setup? - + Të anulohet rregullimi? @@ -298,7 +298,8 @@ Do you really want to cancel the current setup process? The setup program will quit and all changes will be lost. - + Doni vërtet të anulohet procesi i tanishëm i rregullimit? +Programi i rregullimit do të mbyllet dhe krejt ndryshimet do të humbin. @@ -391,7 +392,7 @@ Instaluesi do të mbyllet dhe krejt ndryshimet do të hidhen tej. %1 Setup Program - + Programi i Rregullimit të %1 @@ -1101,12 +1102,12 @@ Instaluesi do të mbyllet dhe krejt ndryshimet do të hidhen tej. <h1>All done.</h1><br/>%1 has been set up on your computer.<br/>You may now start using your new system. - + <h1>Kaq qe.</h1><br/>%1 u rregullua në kompjuterin tuaj.<br/>Tani mundeni të filloni të përdorni sistemin tuaj të ri. <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>Kur i vihet shenjë kësaj kutie, sistemi juaj do të riniset menjëherë, kur klikoni mbi <span style=" font-style:italic;">U bë</span> ose mbyllni programin e rregullimit.</p></body></html> @@ -1116,12 +1117,12 @@ Instaluesi do të mbyllet dhe krejt ndryshimet do të hidhen tej. <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>Kur i vihet shenjë kësaj kutie, sistemi juaj do të riniset menjëherë, kur klikoni mbi <span style=" font-style:italic;">U bë</span> ose mbyllni instaluesin.</p></body></html> <h1>Setup Failed</h1><br/>%1 has not been set up on your computer.<br/>The error message was: %2. - + <h1>Rregullimi Dështoi</h1><br/>%1 s’u rregullua në kompjuterin tuaj.<br/>Mesazhi i gabimit qe: %2. @@ -1139,7 +1140,7 @@ Instaluesi do të mbyllet dhe krejt ndryshimet do të hidhen tej. Setup Complete - + Rregullim i Plotësuar @@ -1149,7 +1150,7 @@ Instaluesi do të mbyllet dhe krejt ndryshimet do të hidhen tej. The setup of %1 is complete. - + Rregullimi i %1 u plotësua. @@ -1225,7 +1226,7 @@ Instaluesi do të mbyllet dhe krejt ndryshimet do të hidhen tej. The setup program is not running with administrator rights. - + Programi i rregullimit nuk po xhirohen me të drejta përgjegjësi. @@ -1235,7 +1236,7 @@ Instaluesi do të mbyllet dhe krejt ndryshimet do të hidhen tej. The screen is too small to display the setup program. - + Ekrani është shumë i vogël për të shfaqur programin e rregullimit. @@ -2077,7 +2078,7 @@ Instaluesi do të mbyllet dhe krejt ndryshimet do të hidhen tej. 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. - + Ju lutemi, zgjidhni një grup parametrash pamje-dhe-ndjesi për KDE Plasma Desktop. Mundeni edhe ta anashkaloni këtë hap dhe të formësoni pamje-dhe-ndjesi pasi të jetë rregulluar sistemi. Klikimi mbi një përzgjedhje pamje-dhe-ndjesi do t’ju japë një paraparje të atypëratyshme të saj. @@ -2455,7 +2456,7 @@ Përfundim: This computer does not satisfy the minimum requirements for setting up %1.<br/>Setup cannot continue. <a href="#details">Details...</a> - + Ky kompjuter s’i plotëson kërkesat minimum për rregullimin e %1.<br/>Rregullimi s’mund të vazhdojë. <a href=\"#details\">Hollësi…</a> @@ -2465,7 +2466,7 @@ Përfundim: This computer does not satisfy some of the recommended requirements for setting up %1.<br/>Setup can continue, but some features might be disabled. - + Ky kompjuter s’i plotëson disa nga domosdoshmëritë e rekomanduara për rregullimin e %1.<br/>Rregullimi mund të vazhdojë, por disa veçori mund të përfundojnë të çaktivizuara. @@ -2747,7 +2748,7 @@ Përfundim: This is an overview of what will happen once you start the setup procedure. - + Kjo është një përmbledhje e asaj që do të ndodhë sapo të nisni procedurën e rregullimit. @@ -2871,12 +2872,12 @@ Përfundim: <small>If more than one person will use this computer, you can create multiple accounts after setup.</small> - + <small>Nëse këtë kompjuter do ta përdorë më shumë se një person, mund të krijoni disa llogari, pas rregullimit.</small> <small>If more than one person will use this computer, you can create multiple accounts after installation.</small> - + <small>Nëse këtë kompjuter do ta përdorë më shumë se një person, mund të krijoni disa llogari, pas instalimit.</small> @@ -3016,17 +3017,17 @@ Përfundim: <h1>Welcome to the Calamares setup program for %1.</h1> - + <h1>Mirë se vini te programi i rregullimit Calamares për %1.</h1> <h1>Welcome to %1 setup.</h1> - + <h1>Mirë se vini te rregullimi i %1.</h1> About %1 setup - + Mbi rregullimin e %1 diff --git a/lang/calamares_zh_TW.ts b/lang/calamares_zh_TW.ts index 9aa662e05..b6b1f2d23 100644 --- a/lang/calamares_zh_TW.ts +++ b/lang/calamares_zh_TW.ts @@ -226,7 +226,7 @@ Cancel setup without changing the system. - + 取消安裝,不更改系統。 @@ -237,7 +237,7 @@ Setup Failed - + 設定失敗 @@ -257,22 +257,22 @@ Continue with installation? - + 繼續安裝? 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> - + %1 設定程式將在您的磁碟上做出變更以設定 %2。<br/><strong>您將無法復原這些變更。</strong> &Set up now - + 現在進行設定 (&S) &Set up - + 設定 (&S) @@ -282,12 +282,12 @@ Setup is complete. Close the setup program. - + 設定完成。關閉設定程式。 Cancel setup? - + 取消設定? @@ -298,7 +298,8 @@ Do you really want to cancel the current setup process? The setup program will quit and all changes will be lost. - + 您真的想要取消目前的設定程序嗎? +設定程式將會結束,所有變更都將會遺失。 @@ -391,7 +392,7 @@ The installer will quit and all changes will be lost. %1 Setup Program - + %1 設定程式 @@ -1091,7 +1092,7 @@ The installer will quit and all changes will be lost. <Restart checkbox tooltip> - + <Restart checkbox tooltip> @@ -1101,12 +1102,12 @@ The installer will quit and all changes will be lost. <h1>All done.</h1><br/>%1 has been set up on your computer.<br/>You may now start using your new system. - + <h1>都完成了。</h1><br/>%1 已經在您的電腦上設定好了。<br/>您現在可能會想要開始使用您的新系統。 <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>當這個勾選框被選取時,您的系統將會在按下<span style="font-style:italic;">完成</span>或關閉設定程式時立刻重新啟動。</p></body></html> @@ -1116,12 +1117,12 @@ The installer will quit and all changes will be lost. <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>當這個勾選框被選取時,您的系統將會在按下<span style="font-style:italic;">完成</span>或關閉安裝程式時立刻重新啟動。</p></body></html> <h1>Setup Failed</h1><br/>%1 has not been set up on your computer.<br/>The error message was: %2. - + <h1>設定失敗</h1><br/>%1 並未在您的電腦設定好。<br/>錯誤訊息為:%2。 @@ -1139,7 +1140,7 @@ The installer will quit and all changes will be lost. Setup Complete - + 設定完成 @@ -1149,7 +1150,7 @@ The installer will quit and all changes will be lost. The setup of %1 is complete. - + %1 的設定完成。 @@ -1225,7 +1226,7 @@ The installer will quit and all changes will be lost. The setup program is not running with administrator rights. - + 設定程式並未以管理員權限執行。 @@ -1235,7 +1236,7 @@ The installer will quit and all changes will be lost. The screen is too small to display the setup program. - + 螢幕太小了,沒辦法顯示設定程式。 @@ -2077,7 +2078,7 @@ The installer will quit and all changes will be lost. 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. - + 請為 KDE Plasma 桌面選擇外觀與感覺。您也可以跳過此步驟並在系統設定好之後再設定。在外觀與感覺小節點按將會給您特定外觀與感覺的即時預覽。 @@ -2455,7 +2456,7 @@ Output: This computer does not satisfy the minimum requirements for setting up %1.<br/>Setup cannot continue. <a href="#details">Details...</a> - + 此電腦未滿足安裝 %1 的最低配備。<br/>設定無法繼續。<a href="#details">詳細資訊...</a> @@ -2465,7 +2466,7 @@ Output: This computer does not satisfy some of the recommended requirements for setting up %1.<br/>Setup can continue, but some features might be disabled. - + 此電腦未滿足一些安裝 %1 的推薦需求。<br/>設定可以繼續,但部份功能可能會被停用。 @@ -2747,7 +2748,7 @@ Output: This is an overview of what will happen once you start the setup procedure. - + 這是您開始安裝後所會發生的事的概覽。 @@ -2871,12 +2872,12 @@ Output: <small>If more than one person will use this computer, you can create multiple accounts after setup.</small> - + <small>如果將會有多於一人使用這臺電腦,您可以在安裝後設定多個帳號。</small> <small>If more than one person will use this computer, you can create multiple accounts after installation.</small> - + <small>如果將會有多於一人使用這臺電腦,您可以在安裝後設定多個帳號。</small> @@ -3016,17 +3017,17 @@ Output: <h1>Welcome to the Calamares setup program for %1.</h1> - + <h1>歡迎使用 %1 的 Calamares 安裝程式。</h1> <h1>Welcome to %1 setup.</h1> - + <h1>歡迎使用 %1 安裝程式。</h1> About %1 setup - + 關於 %1 安裝程式 From b933cb03f601634ac6f4306e9d2d0c423391e3c2 Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Sat, 20 Apr 2019 08:43:00 -0400 Subject: [PATCH 57/57] i18n: [python] Automatic merge of Transifex translations --- lang/python/cs_CZ/LC_MESSAGES/python.mo | Bin 6944 -> 7030 bytes lang/python/cs_CZ/LC_MESSAGES/python.po | 2 +- lang/python/de/LC_MESSAGES/python.mo | Bin 6580 -> 6658 bytes lang/python/de/LC_MESSAGES/python.po | 2 +- lang/python/he/LC_MESSAGES/python.mo | Bin 7618 -> 7708 bytes lang/python/he/LC_MESSAGES/python.po | 2 +- lang/python/hr/LC_MESSAGES/python.mo | Bin 6535 -> 6617 bytes lang/python/hr/LC_MESSAGES/python.po | 2 +- lang/python/hu/LC_MESSAGES/python.mo | Bin 2645 -> 4284 bytes lang/python/hu/LC_MESSAGES/python.po | 38 ++++++++++++------------ lang/python/ko/LC_MESSAGES/python.mo | Bin 6934 -> 7017 bytes lang/python/ko/LC_MESSAGES/python.po | 2 +- lang/python/lt/LC_MESSAGES/python.mo | Bin 6778 -> 6855 bytes lang/python/lt/LC_MESSAGES/python.po | 2 +- lang/python/sq/LC_MESSAGES/python.mo | Bin 6515 -> 6593 bytes lang/python/sq/LC_MESSAGES/python.po | 2 +- lang/python/zh_TW/LC_MESSAGES/python.mo | Bin 6055 -> 6125 bytes lang/python/zh_TW/LC_MESSAGES/python.po | 2 +- 18 files changed, 27 insertions(+), 27 deletions(-) diff --git a/lang/python/cs_CZ/LC_MESSAGES/python.mo b/lang/python/cs_CZ/LC_MESSAGES/python.mo index 4f213ce84da7d977813680b806890fe48db27a12..ff2870e7fbab761c2c804253f9ff0db418c623ed 100644 GIT binary patch delta 1268 zcmYM!OGs2v9LMp0&ZL%FrsmkoM$@!>mZp+!ii$E#sTL6}H1XN^plJd@nA}7~m@Qgl zAX*SfNQN(m`pXq&M{vZ$2W`r0)`-)tUof9}?Mkzacp9rPggH2a)%e`?r+d9L(X4{++i*RO zW1U&p?laiN7fV=xo+Ps(EJn>+aRY`>3*100`~XWaitF$jW?@3I*>UvYChS8WUPfJ? zMBN|3bk?^R1MPSLwULxn@r5g}i1|s}f+JXu6PSk!Sc1P$&lRjTtHi^ojSpikPNJTl z!v=hhXD}zltc>+7#GnQ5VKaWm9k?&m>=d5EHk?O=t}xB)0M?^6bP4_V6hD%_57^9n zel5|%jC2;l4pc;LViV3{SULa0pcZ|^WiPh4UPJ9ThI%j|!|W*LVkP$BF1&+^;462Y zkQonoH7YVqsMHN%30_5|^l>KfS1w=kMLT}N?bt-33NeU&yp1~f6I_FD@H#G`P8Q%| zIZmK9^uqNo9%NpY9lsvL-OTTz3jSR-@gHT7N`>eL#!x>vhdS|R)Jc=reh=26eqb8A z@hzUf29Bfq#<2^ZVJ8-IIz@O4m6C_pioa2jXbiIoDRUn7qr#<~QBzc>88vBJ={mJq z9-VAB1*O-il&%f2kLBiB9{nFEDrzcd)s~u<9#*BQX_suuX;pkuJI-svTWQpzlV5Nu zT9Hzk)OhRSwSkJ98dJ0>X2fF>CA%9nIpffleywKSnERXajFQgP6Yaa^4t_)s`P7g$9{lUS|*}?P7 V<~n-(x-mM_AA3|D*`KwT_z&=zg**TN delta 1182 zcmZA1Pe@cz6vy#XGnqMAj!tSdHe*><{>hqg8ni`}Qszj55mY23R7Qpy7e!D*M37)n z;4ED92O<|qix_CpHlb)a6a`^{3yY#w*4Dni`yMX3aQ)o#-n{qjJ?CEkrXHtqUn+xn zqqWnc^qFO5hwxH>KeXFHvm-d>`yMwF$5xnazyp}T0j$OQn8atkU;X=$60==gKaA_} z3Z~6+c9+2xF1*18{E3ZNvC@mvxSn_b^?}Q%58uOPoW?MI!U+Dreq6+j*k9^hA3^=@ zCRSh`lYHN%7-#~YQ4?6iMr>GRR)-nv#EV#uQ`m%WQO_-48`hS2&-dUa;t|yIcW@t0 z<7xbkE!Z70JIeQMltCZ9#vK@5ZFT}X@eEF&QuYVCFjVeMD2s98ah#`Y&#{kqVy#&g z=dcA6ELWKr#0*|TmHHj#_A>a!paWy%N1j5>IFEX;h`sn5+pwe3Y&Q<0YW={Ei&#S( ztnxAwMU`wnHsMKBDQ}@l_^68f4>EYgg>4w6fN?yCTJc$2gI94J$51P(=4LB)p(Zlw z`xLv0Kl=CUs?GKgXE231yn!!K&!=n1zg{@Rw6)SaYK1TG0?wgc(91H0@H!sDd32dz zIp>Lo@f;RWsZFyymEt&N@d+ve3rMBhJN0~6_1{WY-POpTOO4W`mB;A+H#WAF)0fkg zUiQ;c3oz1x)avQlh$PoIwQhkrx|)bKW-~pf+3uvb)7i-G2!XNJT+>NV<50L`vmLeT z)i~NN{Ye*jyI*CD(-ZzRPV-V@KN^{LdnANZsm%RT&@WmGlfhqs!o$)Jp~7Tjw&Wi# Cy=M6U diff --git a/lang/python/cs_CZ/LC_MESSAGES/python.po b/lang/python/cs_CZ/LC_MESSAGES/python.po index 4afc9924f..d4ede0f7b 100644 --- a/lang/python/cs_CZ/LC_MESSAGES/python.po +++ b/lang/python/cs_CZ/LC_MESSAGES/python.po @@ -68,7 +68,7 @@ msgstr "Odpojit souborové systémy." #: src/modules/unpackfs/main.py:40 msgid "Filling up filesystems." -msgstr "" +msgstr "Naplňování souborových systémů." #: src/modules/unpackfs/main.py:158 msgid "rsync failed with error code {}." diff --git a/lang/python/de/LC_MESSAGES/python.mo b/lang/python/de/LC_MESSAGES/python.mo index b09a077f02cbb2db695a837df347d83c1a1ed744..e3edc94bd07d588918c415aa641b61598d145938 100644 GIT binary patch delta 1260 zcmYk+%}Z2K7{~D^XH3mXQ&TIg>swmB=39bcSQaTnVMbX(M$E+2I0ZV9WKKp!yIRzu zC^3Z4^+*uuCTkJ23BsVL`3Dk%7PajAyLW^RbLMl-nLBgNeV*seT+{95*pD3lW23dw zi|8NMn04crk2l(s->e5;B>jn{%=f06ZN)R#gi$QSS!~9)N&h52uUTtW&-x&4#)sHu z7PFTO%2-HXIr`GfDzOSRKaN{4irU}-YU3HK!A0DJzc3F|(#?9Y0Jq^KEWmrH&nHpW z$1$7z?L7mXcnNio%nWbidaPvLhs8LC?f4W+a0#pNFY0^c>&zPP2$tC{E&1)8d_zAU98;MfL22poBj=by*J4eY=vtil8;vg!GrjrqjCnuP%t^aJ-%8^1yo*=N)buHXf9IBhH5L8agg z_M$3NKYRlF@h0kqz928_pn?_2Q>Yqvj=IsWF$Sc}-NZo^k~W~G+z?Tdwu8Qru2w=P z3+^EmO5J@UU7M^n-|FB$6)iPws)MTe=`n>#P5IFst2NQ7883Y3_i^SSF#Z}!jmWw=R$eJw_s^vTE9h>EPxzO8 z1&2f7a42%oiC%Srp>SY$ba*5%G+Y-SN?*(@?u-V5i}T@dAmUuR5^=iDj|4*A6@f@y Jygu)4>OU#3dN=?8 delta 1182 zcmZA0Pe@cz6vy#nGm|q;{u!N2%TiM_({aXT6v+rO|5Q}Q(4r_I2%^Gl;X+pq)gTU7 zB;>+PFdG+11Wl`;O$D`T5kX3jn-)?8LA49)`+M)=*_$ZQzLe0bgNmM`Qx}9 zr?A&7WB2JaG4U3g@jJF+MX@{X#ahOrs0Aib3qQaPT*e5lU=+V$8aHqkri1SMIO@8) zSb+$-oQp&!ghRzy6-n8u%^Vl{{-$~JdV2m9v;SJ zyoBo*!@;oG2^%12WqgQA*&iIhaH+eYv)I6R4sTPoCwPu=yxcX5 zos3se*9Cd(er&@I9K*~Yokcow4Ub_9dD8egDicrfD1JiKwzkqeFK3V%TGkuCM5X+f zXL*%-rrOb|J+g#N;SS7Ik^if7@=R!3;d@NrUsUO0 z+fb`>&(z4Avk|VdGNPXNzZEk?0b8B%#LJyxBO1Mnaw1bJkVr66av(iq68K|A(*eDEKN|n2u%x{{Xg6 BVtfDq diff --git a/lang/python/de/LC_MESSAGES/python.po b/lang/python/de/LC_MESSAGES/python.po index ce69c7f74..7dcf31ebd 100644 --- a/lang/python/de/LC_MESSAGES/python.po +++ b/lang/python/de/LC_MESSAGES/python.po @@ -70,7 +70,7 @@ msgstr "Dateisysteme aushängen." #: src/modules/unpackfs/main.py:40 msgid "Filling up filesystems." -msgstr "" +msgstr "Auffüllen von Dateisystemen." #: src/modules/unpackfs/main.py:158 msgid "rsync failed with error code {}." diff --git a/lang/python/he/LC_MESSAGES/python.mo b/lang/python/he/LC_MESSAGES/python.mo index 64bf80445242a82b04883a054c207e86b86c1100..6338a80600a15b62be4db4b3268223fe15bcc731 100644 GIT binary patch delta 1271 zcmYk+TS$~a6u|N0?pBsrrfX|zwVLLZu3FlvXqb^vL1<|q-4McJZIx)-z>qeJdMV04 zA1Yg{@RF~-MTKZVQO{1$?WG{1Lg>LBBKn_kg$6!FD==g+r=v*XHfIifABd)>->I64YCmzKjoWd12gKl&ritI-ZW??&e@G9zf4E6uV zF@^c%1r=TKH0nZ<7SBywf(5jjaW!^hHQvD-oW?@@jrv~R5|L8eg}U%AT!S&x_n%@7 zzQZG!ktE`0eu+?Nz=yaOf8hqKTPo6mr?3^DqlPX&S!4%Rqb}$odhrRq=lDKgJMG8I zMcObwMPw^pLtW4-)bD=9sP3?icr;@W592dz!pzjU{!ZLTdkPQYPt={%r_Fu%5^keC zffblQoOPlq)FW!awRiSDji2%Sbzi9_rkaxN3ayX#rw1PSTXH}4B|gQTQ;2h@T5H{j#?7?g@ zuO4FX=bzam&(uI&yWTyx@ zX+yURwdC+<_VSv&P8wbfsYYkMIOi+>xhY=P9=t%a(%mXuO?wWox<~4n0 a#N0B&=C--#H8C^BGhljkjQ>tQkoXV&GLVx1 delta 1182 zcmZA1Ur3Wt7{~F)Hfw5@)2(J%&Rl7wRyu1jGZCdfCdpP2*dmB75*b89-Hq_3ti~b@ zgyX?VU7A zC$*0Hro`+Jj(Ye*x#2ZCiZ_dX#4YseOU*W5FLq!GLwFaX__XM^;`6{tvt5iI#voq9 zm|4cMG#VM0#|ZwyCahZJ_G4H}KZTm$Dr({!w%`o<@e>Ac5fiwC8!_Q?$J40)8^bD` z#3=LIGz~4_3u*yN*o2WXvrTvm<2Zs1IE_2;E$Y2LxEn*|?)yh@GyOE`{X5u&Gk6An zVk`Dnm>p++yG&ycU*mT4uQof4aXg0;s3R+2A68Vl3mU>O{oA-e*q-4C{qePC7qEZ_ zaG33CK~t#j&Z0Kx=QuJaXzZskj9EpQ#8Iapd;;Nn;n=&#rhHIh3A;X<mt>sYj&qZYJ) zdargp-@rjsNOGw0SJ;LHe2Ec0z88OlIDb8;Bg3}h01n|LypD6&k9}m^D2`(i|KdR$ zAj2l`7LH+iGUIB(@Q1 zTS3(+kx$FTL#wseYe1b|4V7E#+y-4;ErfMAAeyAd&C7*+G$Lh0!N_$bb-DASK-=2#Q{La6{6k+!W&T|- G>H7zP5^2By diff --git a/lang/python/he/LC_MESSAGES/python.po b/lang/python/he/LC_MESSAGES/python.po index 5b8f67a7e..725450351 100644 --- a/lang/python/he/LC_MESSAGES/python.po +++ b/lang/python/he/LC_MESSAGES/python.po @@ -68,7 +68,7 @@ msgstr "ניתוק עיגון מערכות קבצים." #: src/modules/unpackfs/main.py:40 msgid "Filling up filesystems." -msgstr "" +msgstr "מערכות הקבצים מתמלאות." #: src/modules/unpackfs/main.py:158 msgid "rsync failed with error code {}." diff --git a/lang/python/hr/LC_MESSAGES/python.mo b/lang/python/hr/LC_MESSAGES/python.mo index 9ca57d29aaf8a2b345a429993f21a68e134afcc9..7ff5e738796914c39844841efbc29627426e27bd 100644 GIT binary patch delta 1264 zcmYk+U2IEn7{~F)+A+E@8{5oVJDZKYQtQlI7~(A!jfmKYY_g(z>6WxzOeQ7q5)t7> z2+86lS%^EmAi)LZ&hA)(AT9~Xa6x1jzQ5Bh@lT$9{{Pd{bDs13pVM>xxBkS(Jogo2 z1c*h%t7&H2amd97>4%JI=?; zxYjITBTSZY;1iajYlc}lR-o2FT!3-Z4KAT>d>5IFXnscn4eX7p}nOY_omXjqNy!DqUHQ*=B4)C3F(K_yot;z7H5= zeSc2MNvvVrlAB6=2 z*o{HFhCA^K>cRnjv=`g)5I#ipKrtP>0UNOakK=NDkYK`=IazyASqBJuiteOz#8P55 zp`of!eW$#7os`UKLdi}I*VN=c^$;3rXeFxQCK4*QhW1HMuHh%>8K?BTl}0~0ZwNR~ zqh?a}8oYH*Z)Bhu z<^Jv}+!F5T2}h22Mr)G2S*Ja|U|)Yc($z805$OtfJ3C^1vC!zn TNcgBX8jr>}T$7y0znb|E##DX$ delta 1182 zcmZA1OGs2v9LMp0&6tj3>Wq_VX_}duudF+oWs9DgGSMIri5e2rqGEzv7`T{)i;Ny7 zWYMNoNhGaimAf903)_VlL2ZO0aS`OIz`nnGFD^Q8{G4;=o_o&u|IhKWbIVD8jRvQT z(n>9(zTaThh1UZ7p^OL3dhoXIC#<4hk!7|GkD-HuSb~!n$Ctj}{NH1n%=Ys96mG$r z*lw1#`!sg(-~(3UGS*^Yw%2dRQu>3a2}V#8Kfp$u!3Zv541Z!TuHkm<&GDY6Q16Xl zAx>eO`E8np7VrhNfHkbe>X2DECa?pq;7**z2Ao5U`;9GFlIxA{#vSxisPXskFwWor z{=g@6sXmGtl8N7D8Rlk`UmJm;~Q zemUFK!V{=8r%(%fhG}wOZ)wOs*oJZ9bP%tiLiijH;Tvqizo-w_N6q$OAF6)`_2F66 zSz7d6MV*mok(Y{2ET-RIMEv_`+~9#iKaX4S7c#~|Bvdb!VHY~sh@+^5yucP*K&2v^ zFlnI;ScjKU5uLz#e2qtO2{pc^nE2~3on;msuIs2BjpGHJMNL@Bs*>1=34DzD@DiTG zd;Sv0f2e6J4T!TYMrffe|3y&!OyQ%t^igv99@t);VE2#e$4z`hM+eqd6 z#(7#V0b1IbigK>S5KIeFl}cS*9bTnL8%rxs3Qa3DL?x1L$@A4sP~lRz*G6Ggs8zVy zZnWZV&r6|pSxI&LXWZuX!g+MlNzjb5u0x&c{!`E!&6y{`l|bfc&R95eJoYH-A9F}# AU;qFB diff --git a/lang/python/hr/LC_MESSAGES/python.po b/lang/python/hr/LC_MESSAGES/python.po index ebb8a286d..7f58838ae 100644 --- a/lang/python/hr/LC_MESSAGES/python.po +++ b/lang/python/hr/LC_MESSAGES/python.po @@ -68,7 +68,7 @@ msgstr "Odmontiraj datotečne sustave." #: src/modules/unpackfs/main.py:40 msgid "Filling up filesystems." -msgstr "" +msgstr "Popunjavanje datotečnih sustava." #: src/modules/unpackfs/main.py:158 msgid "rsync failed with error code {}." diff --git a/lang/python/hu/LC_MESSAGES/python.mo b/lang/python/hu/LC_MESSAGES/python.mo index fd0e4fd22d3b5a5a2af20112eb3ede0ab00b7cb8..ad62e5a82bdfa0627f1e85eaac391cd82a1ba79b 100644 GIT binary patch literal 4284 zcma);O>7&-700J(`lYr`ntrBf+OcalQe%>mVN@fDUtHm0@P1C zpKt!}y?OiDb5Gx9cwWNqNBC`ifw2qVdr#pHo_D{<*eOteKLGy-ei!@*oCoiMKL!5- zo(7+NI$!GoNbm1}&x3yeY5s@c55Z5sv*16#Z-M^HESn zdAuxu)c-E{Tku2hSKtXakIuIS{sg=Uk{><*AzQE!2oJ?c@lY%vL_!R~^x)&7kBIPN zkR;eny3s>^q?my#7~C9mfEf%f48Enfqz79EE$M#>`{(GN;qx_+;t?{0ht5bklkKE4 zhS0>}y@AH!c+?a_rKmXFcviL*M4U zEfW|y>TrGMWfC3ESyZkYi#|_;7A?Ngo7#|MO=;D&R8)E+ zZMo8>sq(4yYo!g@Q#7Zvh(xXObF*`=m1gHlv#;~H+3G9jU!KJ?byYZD+O$HuSU{aB zPgEzJKYx~nzm8trN}*V3Q;MX@-%NE&SS2){ZhPN#)kF^|T<=H7*bzW*%(C@-TFK_w^?l+|`@9iOKk&xKkZzv-?`7j@&?6 zNe3;W43*$Ari+2mAu13+Wabea@Hvw&+(A~vvWw8c&X`w&X%KC^ajDhkxgirB#r6Kc z&f4@~CNHLsjv*Y|%Yo{!!wHWGr3cLz*4~E)%4pIWzG2)b2DAH7FS|D&FBXUHQ6&w7 zj`>;jAfj*s-xJ8G$?i~w+h$NqKlI2W^M2$CghqrEH-q5qhn3~*&!`|AW7{x#7x z-T8>|WSbZ=K;UNk7O@#V7?1Q))@Ao}zlW39W9O9`SJ#AlI-!swX#~&iqk!<9KwRtK z=tQQ1 Ms*4V4MI>VOe@usEKL7v# delta 659 zcmXZZK}Zx~6u|Mf?XK&t>$>S0foT(kl`h-vk{}d|6y&K0OAy*aqpTtA%qX*lSs-*5 ziARTuqVOml%IjWquLXg05lo_k*Cg%GssFdm2XB7ge9XLg?@j&O_sr6d&d4iaog&T< zUx;4fd58<^H=f1=JdcSJA{Q`+7x7+j{|vL-f54OY6*IUOco>|=!y;EX??Lh{$z3)k zVGT{f*JujZ#A~>RgV+-h$>S)R=NGVy@30&H;R}jPM~~mv7LiMwf5HLWK~rEfCUO~z znCJUaW@8d8qv>=NEv%!N$}SG!A({dPT15)@08J;$XbRfG67FLT`{TzAjH7w}CC*_3 z&*D%*B*gcdorGBoNK(xmzbBAdg@&6e9oUWx zN93mMx?ati^4w`%33uzC@QQwm+}DX{QQt<7^m9u=W3e&aj+HaxuH((SHEVjNTCx16 zey!s8T5o-lyCeQP{%w1xZ<50s`^jQRZ>6s2dTLhRcg*TS+WHUgkYXAD diff --git a/lang/python/hu/LC_MESSAGES/python.po b/lang/python/hu/LC_MESSAGES/python.po index 0d33b8724..4376ad37d 100644 --- a/lang/python/hu/LC_MESSAGES/python.po +++ b/lang/python/hu/LC_MESSAGES/python.po @@ -4,9 +4,9 @@ # FIRST AUTHOR , YEAR. # # Translators: -# miku84, 2017 # Adriaan de Groot , 2018 # Balázs Meskó , 2018 +# miku84, 2019 # #, fuzzy msgid "" @@ -15,7 +15,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-04-15 07:27-0400\n" "PO-Revision-Date: 2017-08-09 10:34+0000\n" -"Last-Translator: Balázs Meskó , 2018\n" +"Last-Translator: miku84, 2019\n" "Language-Team: Hungarian (https://www.transifex.com/calamares/teams/20061/hu/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -25,12 +25,12 @@ msgstr "" #: src/modules/services-systemd/main.py:35 msgid "Configure systemd services" -msgstr "" +msgstr "systemd szolgáltatások beállítása" #: src/modules/services-systemd/main.py:68 #: src/modules/services-openrc/main.py:102 msgid "Cannot modify service" -msgstr "" +msgstr "a szolgáltatást nem lehet módosítani" #: src/modules/services-systemd/main.py:69 msgid "" @@ -66,15 +66,15 @@ msgstr "Fájlrendszerek leválasztása." #: src/modules/unpackfs/main.py:40 msgid "Filling up filesystems." -msgstr "" +msgstr "Fájlrendszerek betöltése." #: src/modules/unpackfs/main.py:158 msgid "rsync failed with error code {}." -msgstr "" +msgstr "az rsync elhalt a(z) {} hibakóddal" #: src/modules/unpackfs/main.py:219 src/modules/unpackfs/main.py:237 msgid "Failed to unpack image \"{}\"" -msgstr "" +msgstr "\"{}\" kép kicsomagolása nem sikerült" #: src/modules/unpackfs/main.py:220 msgid "" @@ -84,7 +84,7 @@ msgstr "" #: src/modules/unpackfs/main.py:313 msgid "No mount point for root partition" -msgstr "" +msgstr "Nincs betöltési pont a root partíciónál" #: src/modules/unpackfs/main.py:314 msgid "globalstorage does not contain a \"rootMountPoint\" key, doing nothing" @@ -92,7 +92,7 @@ msgstr "" #: src/modules/unpackfs/main.py:319 msgid "Bad mount point for root partition" -msgstr "" +msgstr "Rossz betöltési pont a root partíciónál" #: src/modules/unpackfs/main.py:320 msgid "rootMountPoint is \"{}\", which does not exist, doing nothing" @@ -105,15 +105,15 @@ msgstr "" #: src/modules/unpackfs/main.py:334 msgid "The filesystem for \"{}\" ({}) is not supported" -msgstr "" +msgstr "A(z) ({}) fájlrendszer nem támogatott a következőhöz: \"{}\"" #: src/modules/unpackfs/main.py:341 msgid "The source filesystem \"{}\" does not exist" -msgstr "" +msgstr "A forrás fájlrendszer \"{}\" nem létezik" #: src/modules/unpackfs/main.py:346 msgid "The destination \"{}\" in the target system is not a directory" -msgstr "" +msgstr "Az elérés \"{}\" nem létező könyvtár a cél rendszerben" #: src/modules/displaymanager/main.py:380 msgid "Cannot write KDM configuration file" @@ -173,11 +173,11 @@ msgstr "A kijelzőkezelő konfigurációja hiányos volt" #: src/modules/rawfs/main.py:35 msgid "Installing data." -msgstr "" +msgstr "Adatok telepítése." #: src/modules/services-openrc/main.py:38 msgid "Configure OpenRC services" -msgstr "" +msgstr "OpenRC szolgáltatások beállítása" #: src/modules/services-openrc/main.py:66 msgid "Cannot add service {name!s} to run-level {level!s}." @@ -185,7 +185,7 @@ msgstr "" #: src/modules/services-openrc/main.py:68 msgid "Cannot remove service {name!s} from run-level {level!s}." -msgstr "" +msgstr "Nem lehet törölni a {name!s} szolgáltatást a {level!s} futás-szintből" #: src/modules/services-openrc/main.py:70 msgid "" @@ -200,7 +200,7 @@ msgstr "" #: src/modules/services-openrc/main.py:110 msgid "Target runlevel does not exist" -msgstr "" +msgstr "A cél futási szint nem létezik" #: src/modules/services-openrc/main.py:111 msgid "" @@ -210,7 +210,7 @@ msgstr "" #: src/modules/services-openrc/main.py:119 msgid "Target service does not exist" -msgstr "" +msgstr "A cél szolgáltatás nem létezik" #: src/modules/services-openrc/main.py:120 msgid "" @@ -220,7 +220,7 @@ msgstr "" #: src/modules/plymouthcfg/main.py:36 msgid "Configure Plymouth theme" -msgstr "" +msgstr "Plymouth téma beállítása" #: src/modules/machineid/main.py:36 msgid "Generate machine-id." @@ -251,7 +251,7 @@ msgstr[1] "%(num)d csomag eltávolítása." #: src/modules/removeuser/main.py:34 msgid "Remove live user from target system" -msgstr "" +msgstr "Éles felhasználó eltávolítása a cél rendszerből" #: src/modules/dummypython/main.py:44 msgid "Dummy python job." diff --git a/lang/python/ko/LC_MESSAGES/python.mo b/lang/python/ko/LC_MESSAGES/python.mo index 3c9aa2ef209f0f0fcaeb2e26e27e6a1ceff590a0..914142618509504db7b8d02a460023054c73aafd 100644 GIT binary patch delta 1264 zcmYM!T}YEr7{KvIx6HB+)8*{b*QsgwHB*;mH&TczoLOE}L@mT*wGB%b2*&!bE=;KC z<3iMmL<+)+QCE7=$LPkpz?&$cAc)>U&_zNJ{hxQk4xatadEa+?&v~Bbc+d0Q6aAcH zzbiBkeItD~O~i`>Ha=(%>>~T{VM-HS%y%piS&v7t79*ICPp}T(r2L(_Uy&hF&2>Mn z#hch55|v2?MO>K2Vzez4DaA6>`2k#q5!4slKz;FJtiZRp27jUh(=$a5q7ygZX>{T> z)cfP8&&M#E_e-3Cu6Pc0Az90kFRsQ?<{h{R2e1)Gun_0492Zc(SG-)rjV-7P@5jwJ zj{5x>+>Iac80Ke*RPug_FlfU^*owb!D>khVIgDq}kMB@JSF%!MFE*ks=pq_8jXk9A z6Z)C^R*Q7vGpxtl>|`Xp*uuOMqgxm}Ww0MVU@I07AAKN%UVMeRW62R|2N!O`KGYQ4 z$10pf-T5EXkQ=$lR5hTc?hrO%Fg2gbCH|Vr_go0#7p%oL5~W3U1vP||s3D9afAW3Y* z5o%Hj=&R`3bdhAkiiRF14ZrS;_b)cv;^_ZCcdJdKrM0EaPLFE7wCUMrQC8CwP%~Bz zIh8^^S|ZnSagtYemr8aZv6B29-jO2MiX9cyZ+Ve2?^2!wwPE+OJpRg-$5 zaIL)8V+q}Au}k)Z&Dk6X1_R-4Bhq7>3Iw})`+NJkLcLY7Q0BL+!o={fIW}#W*GJ8v diNw`Wb8OHsUksWf&wmWvG0cfuv35s1;~$%>hN%Dm delta 1182 zcmZA1%}Z2K7{~EPXPPF*%+bj-%dy6?e6JbB(x4YDt)#LRK^ay%k*OxA7SUY@QD9+^ zMG$SGSv0h1{(>+l2%$xbAhIHaUWg)U<-)$ddoM0JaOQKKbMMT(=XuVVuN`+foSCxV zq|w^xtLV=Q%=X}DfDhWWpxIu$?)wJU62}*rt;C&}#38K2TbRPfz90PSv5;9S^L@A+ zFJY&dV>cNjn0SG8_#Nx9bg>tAVioZa>H!x~51zm#%wZJYVhq3GAkJeo4u-w?H0r)F zEX7Go@qEiN&U)2%4J(Vh@AqR3aT@jg8`zCG zJdR(m8G9pU2Y9}nXE1`J;7n(nq_9E z(Lt5L4#l z!WH-nRibdYSF!}|Anx|#E2!&t%gO&JgQrX+F-`%My2Gf{Wl%Mp;DgO#k5HwV!3`K9 zEsfZUZFmfi;5cr^PyY2-h1n+J?Wo_$pca;^Apgw_rkT)6=5QA_u#9t<#;y1fcVjg> z@C2U1E%*%6IENV=A{O`L%rZE7NA~Eaa8qRM_1j|$ef!R)vJUar~lvB z*hZP21^gWH;Sl>@~M3-D(^P z_t+@y2~E&A+HP7?ZshF&ZLC_l%BjX_UTEw?Bf;(-VXtdb7rB25x}zn3FZd&ne-NIH JA<&_6^cXOI8@ diff --git a/lang/python/ko/LC_MESSAGES/python.po b/lang/python/ko/LC_MESSAGES/python.po index d2764690f..9708e95a5 100644 --- a/lang/python/ko/LC_MESSAGES/python.po +++ b/lang/python/ko/LC_MESSAGES/python.po @@ -67,7 +67,7 @@ msgstr "파일 시스템 마운트를 해제합니다." #: src/modules/unpackfs/main.py:40 msgid "Filling up filesystems." -msgstr "" +msgstr "파일 시스템을 채우는 중." #: src/modules/unpackfs/main.py:158 msgid "rsync failed with error code {}." diff --git a/lang/python/lt/LC_MESSAGES/python.mo b/lang/python/lt/LC_MESSAGES/python.mo index 913810b4a594178905807b814787a9756fc81eaf..4289773848ebd251c6784f27dfed71dcadd016ef 100644 GIT binary patch delta 1259 zcmYM!Pe@cz6vy$CGnzU5F*P-{dYb>rQK$SEQE+;``_ch5WbJpVSoZb^L3^G_MA zm0m`FyUOe^j{7*!?)uGoa3<|{tl)f4rdbJ|#U_knF+Rp-oJ;#V{d+LWtdaQv+=P?3 z*DPTV7;I-^2`kaJ+N=g^QRl~TGsaO1+(a$>2!r?vH{wq$z>I9O6Ig_$cnOQ}I_mdn z)b&ZsWqn&o*~Hw<4goWyK4NX6BUnopqK_zn_-Jw^U(p2IMHK&85e zi>fe+wK#=4aTXQuSFFQOVQRh~^=kX!xIXP5pCstxJ4x$3OonXM0d1-V|h15!?rl?LbLRae7)78r9 z%7pe&sSMJ0(^-F|`Bp~%2fNZk6|`zg%}-A#YBi;sSiIK6k=pS-8@@`T9=)i++s6j1 z)(MTT&il+VuwD~1ZIQC1MoD;Ep|ReW8ct;d`PWckWZv6jO28;wZ~t3R+u^n3g#U-H zsN0Q1+$$HI_^>nRM#8bN*hqLN){q>^UJjJ?EzAzPkqgnGXv`Tr=SCKiPR!K>QLZ>z H5X|}q$pd?u delta 1182 zcmZA0Pe@cz6vy#XGubp#>FDI2{yCa9nPXYb1JMf1EQ`z<2`UmIXi<~~;m+sYH}mG+d(OGj-tSEQLuq)- zXdZn%{pAv~12_=kgLXS?b_nkTzQJ1N)yvG*;$CdQeyqe%%;4j|kHPneBD3v0@5VKF z4O`9fc8|d(9!z5$&SMHomb-Z?Rx$5KEii;ycm&fpiE*641kPa=7jPYBBkuVi>UTG> z1jjJL`ZmEp8+eb}zyhYQZiU$fJdEvl0c&sq8}SwDy&u?&l~MQpLEOlE5cU3D+=Y{P z8oy!_cE!wkS>G-*=)o7*fbo@PC$JsQ;C)oce&Rlit#TVWib>|fI7`}|;7R7A#m;$5 zGwg(&?7#(F^6sV6svI#_hYowIibNKb`y48jkAm-?l@b3w9?bASMU^IjI%zMmrkz9Obcm0OIE+fsAFRh(e!K;{ zaVzFf8y!cbXf}9WT<#9kh66mmf_ndRIq^?2h*Y?pHDD+6PP~e@Pz(IUl*d6*g}k&f>{kJ`~=s+blnC;SsPKBR2zBSd4OVT55W!bC;TvPKQYSqKAD8y683 zL_|Si1d=O*VQ^E6Ub~{5o9MA|l~Ev3tLXc?bFl+wKIh!m`QQKf-&t;c*^>EO=DlaM z7=0`K-72$FnD+2PoA#Qu<73w)tY+R?Xto)juUvn-=Oe4lnmFE%6?g{^ zm}P8+!A=f*!5Z|eF{{HcYJL_sVG6atZPda~F@mpg1OCKvEGRPT#7f+Pm$4EjQRk;n z*JrVm_3bSKMZACt#P7>5+=O+^yKoz(F^&(h3Ky^*|Df)xDK^`SCsBb<;C7rs-Twj) z<45elpx>;4^)1Dq1E1g-T*lqlw$|)CUcr8RgGycPI8hN>v)iaUOMjgo^6ac|3=6 zs0BP!XdgD>5Z*$)`7b<;WklbGy%@sj3dTBQn*VK8eg5W z*9EB5tC4l5J~Y<$DKl#IbZXey!eZpFq1wo(Q`Ky(QMk^Z%YLk-J1u+N``uG{d^nL9 u9=#Y!T@4KlCkB%f$??IFWMg)uDC+l(g+>Na$xDNycb^5zvyTD`h5rEQdvhQF delta 1182 zcmZA0%}Z2K7{~F)W;Auu=FKvDnXxR(mzl{KY09vS!d@w+782RZCYcB~MK2KCMF<5I z6-l(Hb_Pih4DN!ojQRr%qQF{8<)&cjW34M#D8Uoeh8v4Hcq8Vi-)^+DACZekdR zF~|39gpLOA4K;vyY{sT4v$c2_yYK=w;t00lC)9Iun8EsL@A(6`j(iaH{9W9Mqj(Bu zupRe>%#QMXyF}**zQ-*XS!ULUU3eBBp-T1-_hP8V8_+RKlHb7_EZZwQLEf_5)4?|K zDbzs9nD!1#pel0`oo+f;=xBsvzJG8Vd766Z!2#TkL%12=q6RvH`am@5<-1TXE~1uf z2(_o4qu%!hdBo;0h7~dDf0|AMnM!#bxo1z2LECH8i^fp{_=@^)oP}<|ZfwV*?_=yG z|KQ)Rp=>GgJnH`gn8t^G{;rPtC%G`og#^~F@Jf`z%j8AW1JhX0{gr0N@f_-fV|WIC z;CbB54%Lib;31sE9t<;!Bo>gBvJN6cM6~`J3C&7Pv)As{tZNAkYH?#@8%u3V2;Oh( zr-c@vr;4aG655Cq%{aC0(&*^65?WR*oukoeCY?kTLFL@WUUQpHf*OayJvLf@EtMKa z+qM!pB{ZF$O+=E&5^9|0g{CE?kVdhLy{=7N?Ut9mrAkkNvw_mH%1o&AJNCK!Kk`Xq A<^TWy diff --git a/lang/python/sq/LC_MESSAGES/python.po b/lang/python/sq/LC_MESSAGES/python.po index 272eb1054..061eeaba7 100644 --- a/lang/python/sq/LC_MESSAGES/python.po +++ b/lang/python/sq/LC_MESSAGES/python.po @@ -68,7 +68,7 @@ msgstr "Çmontoni sisteme kartelash." #: src/modules/unpackfs/main.py:40 msgid "Filling up filesystems." -msgstr "" +msgstr "Po mbushen sisteme kartelash." #: src/modules/unpackfs/main.py:158 msgid "rsync failed with error code {}." diff --git a/lang/python/zh_TW/LC_MESSAGES/python.mo b/lang/python/zh_TW/LC_MESSAGES/python.mo index 08fe3b1596849f5d15884840fb390e497c71aad9..3cbf5d03e0455f141d552ffefb67996fb9a7b614 100644 GIT binary patch delta 1252 zcmYk+OGs2v9LMp$&R8~P+N3k~o_v>&u{0}`K$u%4W_M^5(D4Zi(X-gB1WQrZhj1lEQ4?H4O?(f_@fj}1@0f$B>1ItB#MRh^LA;E* zKZ1Hbf!WM&FKB4R)2M}HEJ;or#uBcZaV_>?9p1nVIE`ia8}(kH&#Vd?Q48+Gf|DyJ`hIsk01NGuX)D}EMh4>BXOTW6; zJ|5P%#TdXk)WVxk&vl@-&8twcH=l|;6JGTz>4HR4mAK>g?B^K*~ z!l`qo7{F8lEcn%<`5Wv4f#%j5Jh9FjKp>RT()8n)hUSq@4P3t zr!x}iJbOA6Jr_FF8ENn7?K$7x-BX$9PVe>Q&Wt{oop?HXe`t2}>Re)CZhY)>|E0u? Hf71I8o5g$R delta 1182 zcmZA1Pe_zO7{~F)_APDK)LpmS%5t+U`?I!|Yb+>2;s4CUixCOI(xt)<9rCtF#TN8O zArEyZ=wQ&&X^$Qv3KTlj!9y73Eu!$Gc@eSi?|ol9H2Cc2o!OmvXP%jHDfK#)`w?-b zjM75X5+6&ZW%`8QG5AMV< z%$ViuF%Ji6n8gJC!3L}<_39biO??FQg4?JUPhb)Y7{;#{#osuD8@LyT%Dnbb)bH+K z6;5HA_uDiNn!q>I1U9e%6Wh)9VL!IwH9UaRcpT?Y{Z_CEV?nQfFYc#4it7Ie+pvI_ z@fS8?XUOaV@3&h#oW~D%6vO3a7qJzu;8Rq}{$dA)c6bvS#5nbbIL@}c#bN5HO3yrM z0*j~&t|KY88kVn24Ps7vb(IJC-1jqTPaX0V!3?V7IaKQJqEh=3wbB{CzJMBd6?b8X z&YE~V>USBe!C}AsW`z8A(r}Lk4g3i;z)$4Q*7(o>71dtq6R1Plg<4q_<2dfOzrxeh z-=Vf@6&o?epxW9lRQq*ww