From 8d60f6025dd15a6d1008920ff1c3f3a5e38e02d7 Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Wed, 9 Jan 2019 14:06:45 +0100 Subject: [PATCH 1/6] i18n: [calamares] Automatic merge of Transifex translations --- lang/calamares_eu.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lang/calamares_eu.ts b/lang/calamares_eu.ts index c93ffb6b1..8b888a599 100644 --- a/lang/calamares_eu.ts +++ b/lang/calamares_eu.ts @@ -366,7 +366,7 @@ Instalatzailea irten egingo da eta aldaketa guztiak galduko dira. %1 will be shrunk to %2MB and a new %3MB partition will be created for %4. - + %1 %2MB-ra txikituko da, eta %3MB-tako partizio berri bat sortuko da %4-(e)rako. @@ -389,7 +389,7 @@ Instalatzailea irten egingo da eta aldaketa guztiak galduko dira. <strong>Select a partition to shrink, then drag the bottom bar to resize</strong> - + <strong>Aukeratu partizioa txikitzeko eta gero arrastatu azpiko-barra tamaina aldatzeko</strong> @@ -427,7 +427,7 @@ Instalatzailea irten egingo da eta aldaketa guztiak galduko dira. This storage device has %1 on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device. - + Biltegiratze-gailuak %1 dauka. Zer egin nahiko zenuke? <br/>Zure aukerak berrikusteko eta berresteko aukera izango duzu aldaketak gauzatu aurretik biltegiratze-gailuan @@ -435,7 +435,7 @@ Instalatzailea irten egingo da eta aldaketa guztiak galduko dira. <strong>Install alongside</strong><br/>The installer will shrink a partition to make room for %1. - + <strong>Instalatu alboan</strong><br/>Instalatzaileak partizioa txikituko du lekua egiteko %1-(r)i. @@ -443,7 +443,7 @@ Instalatzailea irten egingo da eta aldaketa guztiak galduko dira. <strong>Replace a partition</strong><br/>Replaces a partition with %1. - + <strong>Ordeztu partizioa</strong><br/>ordezkatu partizioa %1-(e)kin. From 807861c97d137ec659095bf09573ac52ac0d05cf Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Wed, 9 Jan 2019 14:06:46 +0100 Subject: [PATCH 2/6] i18n: [dummypythonqt] Automatic merge of Transifex translations --- .../lang/ast/LC_MESSAGES/dummypythonqt.mo | Bin 918 -> 996 bytes .../lang/ast/LC_MESSAGES/dummypythonqt.po | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/dummypythonqt/lang/ast/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/ast/LC_MESSAGES/dummypythonqt.mo index 35ad2c9eaad305c6ad9d44070ebc1faff1ca92f4..da5256c9f7f3e515aa1d049ca6d8a7a160ccde75 100644 GIT binary patch delta 230 zcmbQn{)D~$o)F7a1|VPuVi_O~0b*_-?g3&D*a5`6K)e%(HGudy5OV_Y2Ot&);$J{4 z2E;;)3=C#KS`$bw1mXlB76kH{m?7dKKw1dM_Xg5(KspXcD=;u{G1LMXu0Vl#6DyTD z*?8 delta 174 zcmaFDK8?Npo)F7a1|VPqVi_Rz0b*_-t^r~YSOLVmK)e!&HGp_K5OV_Y10WUy;#WXy z2E>ev3=9i_*aC<;kn~~9cvmBE?BWFO-;kCJ$xv7eiYnU?t*#j3- diff --git a/src/modules/dummypythonqt/lang/ast/LC_MESSAGES/dummypythonqt.po b/src/modules/dummypythonqt/lang/ast/LC_MESSAGES/dummypythonqt.po index 0fc16c2b9..6721edaea 100644 --- a/src/modules/dummypythonqt/lang/ast/LC_MESSAGES/dummypythonqt.po +++ b/src/modules/dummypythonqt/lang/ast/LC_MESSAGES/dummypythonqt.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# enolp , 2017 +# enolp , 2019 # #, fuzzy msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-10-05 11:34-0400\n" "PO-Revision-Date: 2016-12-16 12:18+0000\n" -"Last-Translator: enolp , 2017\n" +"Last-Translator: enolp , 2019\n" "Language-Team: Asturian (https://www.transifex.com/calamares/teams/20061/ast/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -23,7 +23,7 @@ msgstr "" #: src/modules/dummypythonqt/main.py:84 msgid "Click me!" -msgstr "¡Prímime!" +msgstr "¡Fai clic en min!" #: src/modules/dummypythonqt/main.py:94 msgid "A new QLabel." @@ -31,7 +31,7 @@ msgstr "Una QLabel nueva." #: src/modules/dummypythonqt/main.py:97 msgid "Dummy PythonQt ViewStep" -msgstr "" +msgstr "ViewStep maniquín de PythonQT" #: src/modules/dummypythonqt/main.py:183 msgid "The Dummy PythonQt Job" From d096ca6a8d52ba30a957da8e82bc8828362d572b Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Wed, 9 Jan 2019 14:06:47 +0100 Subject: [PATCH 3/6] i18n: [python] Automatic merge of Transifex translations --- lang/python/ast/LC_MESSAGES/python.mo | Bin 668 -> 424 bytes lang/python/ast/LC_MESSAGES/python.po | 10 +++------- lang/python/de/LC_MESSAGES/python.mo | Bin 2800 -> 2802 bytes lang/python/de/LC_MESSAGES/python.po | 6 +++--- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lang/python/ast/LC_MESSAGES/python.mo b/lang/python/ast/LC_MESSAGES/python.mo index 213918efd0d565717962efbca9090a235e51bfc3..666f07af3ca42c885c76153c13dbe0eb72e0931c 100644 GIT binary patch delta 68 zcmbQkx`Nr_o)F7a1|VPrVi_P-0b*t#)&XJ=umIvbprj>`2C0F8iEH{N=P^D60RDjp A4gdfE delta 311 zcmZ3%JcqUZo)F7a1|VPoVi_Q|0b*7ljsap2C;(zXAT9)A5g=}c(ldbcLPiFLwLluA z&!35bK^jQs0BK<$-2tS5(hST%3^E(Yg#ee*+}uiqg36MN{5*v$-TWjy1{9&RJZ()V$Q9#FA8n+{EOJ%)C_H%oM$e7X1drCAuL+iFw62i6!|(Rtl+k`8fp&Hekx3 zI6tiM-(BufdK&7l2HW! diff --git a/lang/python/ast/LC_MESSAGES/python.po b/lang/python/ast/LC_MESSAGES/python.po index 815095319..786839323 100644 --- a/lang/python/ast/LC_MESSAGES/python.po +++ b/lang/python/ast/LC_MESSAGES/python.po @@ -3,9 +3,6 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -# Translators: -# enolp , 2017 -# #, fuzzy msgid "" msgstr "" @@ -13,7 +10,6 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-10-05 11:34-0400\n" "PO-Revision-Date: 2017-08-09 10:34+0000\n" -"Last-Translator: enolp , 2017\n" "Language-Team: Asturian (https://www.transifex.com/calamares/teams/20061/ast/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -86,15 +82,15 @@ msgstr "" #: src/modules/dummypython/main.py:44 msgid "Dummy python job." -msgstr "Trabayu maniquín de python." +msgstr "" #: src/modules/dummypython/main.py:97 msgid "Dummy python step {}" -msgstr "Pasu maniquín de python {}" +msgstr "" #: src/modules/machineid/main.py:35 msgid "Generate machine-id." -msgstr "Xenerar machine-id." +msgstr "" #: src/modules/packages/main.py:62 #, python-format diff --git a/lang/python/de/LC_MESSAGES/python.mo b/lang/python/de/LC_MESSAGES/python.mo index 9d613105a2bf633a1e0f3c711559d2118c421605..62936843d489b193e32d07020eb6666ffa1bbb64 100644 GIT binary patch delta 119 zcmew$`bl(y4r8n#0|P?~2Lpo+klqHQb%FF_AZ-Ao1vwcQRDiS-khTNT=|EZ&NG}7@ x+CcgOkOry$1EiCIv=$cwgBOtQ1JV*e`sU_NMiq8Oh0SX@Tp1Y^CV%4m2LJ-}63GAn delta 115 zcmew)`ayJq4r8nV0|P?~2Lpo+klqTUb%FFFAPo{1;ACJ>0n&~@+73vk0clMjy%b1m s0qOHV8l?UgkWL2D8e9wvUO>7BNJ{|e>zg|nRoFML<8Wo1{Dt!$0Km->c>n+a diff --git a/lang/python/de/LC_MESSAGES/python.po b/lang/python/de/LC_MESSAGES/python.po index 8b6cf8b24..7328d957c 100644 --- a/lang/python/de/LC_MESSAGES/python.po +++ b/lang/python/de/LC_MESSAGES/python.po @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. # # Translators: -# Dirk Hein , 2017 +# Adriaan de Groot , 2017 # Christian Spaan, 2018 # Andreas Eitel, 2018 # @@ -115,11 +115,11 @@ msgstr "Pakete installieren " msgid "Installing one package." msgid_plural "Installing %(num)d packages." msgstr[0] "Installiere ein Paket" -msgstr[1] "Installiere %(num)dPakete." +msgstr[1] "Installiere %(num)d Pakete." #: src/modules/packages/main.py:70 #, python-format msgid "Removing one package." msgid_plural "Removing %(num)d packages." msgstr[0] "Entferne ein Paket" -msgstr[1] "Entferne %(num)dPakete." +msgstr[1] "Entferne %(num)d Pakete." From dfb5412c574dc0a37120a524dc985e96b85ceca5 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Thu, 10 Jan 2019 16:28:05 +0100 Subject: [PATCH 4/6] [partition] Preserve current device when going to manual partitioning Fixes #1043 Signed-off-by: Arnaud Ferraris --- src/modules/partition/gui/ChoicePage.cpp | 14 ++++++++++++++ src/modules/partition/gui/ChoicePage.h | 4 ++++ src/modules/partition/gui/PartitionPage.cpp | 13 +++++++++++++ src/modules/partition/gui/PartitionPage.h | 4 ++++ src/modules/partition/gui/PartitionViewStep.cpp | 5 +++++ 5 files changed, 40 insertions(+) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index ba49bd95d..3aeb4d258 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -2,6 +2,7 @@ * * Copyright 2014-2017, Teo Mrnjavac * Copyright 2017-2018, 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 @@ -1523,3 +1524,16 @@ ChoicePage::updateSwapChoicesTr(QComboBox* box) } } } + +int +ChoicePage::lastSelectedDeviceIndex() +{ + return m_lastSelectedDeviceIndex; +} + +void +ChoicePage::setLastSelectedDeviceIndex( int index ) +{ + m_lastSelectedDeviceIndex = index; + m_drivesCombo->setCurrentIndex( m_lastSelectedDeviceIndex ); +} diff --git a/src/modules/partition/gui/ChoicePage.h b/src/modules/partition/gui/ChoicePage.h index 07d052c2d..a53f3fff1 100644 --- a/src/modules/partition/gui/ChoicePage.h +++ b/src/modules/partition/gui/ChoicePage.h @@ -2,6 +2,7 @@ * * Copyright 2014-2016, Teo Mrnjavac * Copyright 2018, 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 @@ -97,6 +98,9 @@ public: */ void applyActionChoice( ChoicePage::InstallChoice choice ); + int lastSelectedDeviceIndex(); + void setLastSelectedDeviceIndex( int index ); + signals: void nextStatusChanged( bool ); void actionChosen(); diff --git a/src/modules/partition/gui/PartitionPage.cpp b/src/modules/partition/gui/PartitionPage.cpp index 9d972c8fd..86de992e6 100644 --- a/src/modules/partition/gui/PartitionPage.cpp +++ b/src/modules/partition/gui/PartitionPage.cpp @@ -5,6 +5,7 @@ * Copyright 2018, Adriaan de Groot * Copyright 2018, Andrius Štikonas * Copyright 2018, Caio Jordão 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 @@ -609,3 +610,15 @@ PartitionPage::getCurrentUsedMountpoints() return mountPoints; } + +int +PartitionPage::selectedDeviceIndex() +{ + return m_ui->deviceComboBox->currentIndex(); +} + +void +PartitionPage::selectDeviceByIndex ( int index ) +{ + m_ui->deviceComboBox->setCurrentIndex( index ); +} diff --git a/src/modules/partition/gui/PartitionPage.h b/src/modules/partition/gui/PartitionPage.h index 70d8ccdfb..8289f2cdd 100644 --- a/src/modules/partition/gui/PartitionPage.h +++ b/src/modules/partition/gui/PartitionPage.h @@ -2,6 +2,7 @@ * * Copyright 2014, Aurélien Gâteau * Copyright 2018, 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 @@ -46,6 +47,9 @@ public: void onRevertClicked(); + int selectedDeviceIndex(); + void selectDeviceByIndex( int index ); + private: QScopedPointer< Ui_PartitionPage > m_ui; PartitionCoreModule* m_core; diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 0152f8bec..01dac7c39 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -3,6 +3,7 @@ * Copyright 2014, Aurélien Gâteau * Copyright 2014-2017, Teo Mrnjavac * Copyright 2018, 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 @@ -286,6 +287,7 @@ PartitionViewStep::next() if ( m_choicePage->currentChoice() == ChoicePage::Manual ) { m_widget->setCurrentWidget( m_manualPartitionPage ); + m_manualPartitionPage->selectDeviceByIndex( m_choicePage->lastSelectedDeviceIndex() ); if ( m_core->isDirty() ) m_manualPartitionPage->onRevertClicked(); } @@ -315,7 +317,10 @@ void PartitionViewStep::back() { if ( m_widget->currentWidget() != m_choicePage ) + { m_widget->setCurrentWidget( m_choicePage ); + m_choicePage->setLastSelectedDeviceIndex( m_manualPartitionPage->selectedDeviceIndex() ); + } } From ba63084c7ec15f8bbd93ecc159816431bd206177 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 10 Jan 2019 23:54:57 +0100 Subject: [PATCH 5/6] [partition] Refactor fstype naming - Use locale "C" for checking filesystem names - Also check other possibilities and case-insensitive, to be more forgiving of weird configurations (and localizations) --- .../partition/gui/PartitionViewStep.cpp | 80 +++++++++++++------ 1 file changed, 56 insertions(+), 24 deletions(-) diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 0152f8bec..b4cc43b29 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -495,6 +495,61 @@ nameToChoice( QString name, bool& ok ) return SwapChoice::NoSwap; } +/** @brief translate @p defaultFS into a recognized name + * + * Makes several attempts to translate the string into a + * name that KPMCore will recognize. + */ +static QString +findFS( QString defaultFS ) +{ + QStringList fsLanguage { QLatin1Literal( "C" ) }; // Required language list to turn off localization + if ( defaultFS.isEmpty() ) + defaultFS = QStringLiteral( "ext4" ); + if ( FileSystem::typeForName( defaultFS, fsLanguage ) != FileSystem::Unknown ) + { + cDebug() << "Partition-module setting *defaultFileSystemType*" << defaultFS; + return defaultFS; + } + + // First pass: try the default language instead of C locale + auto fsType = FileSystem::typeForName( defaultFS ); + if ( fsType != FileSystem::Unknown ) + { + defaultFS = FileSystem::nameForType( fsType, fsLanguage ); + cWarning() << "Partition-module setting *defaultFileSystemType* changed" << defaultFS; + return defaultFS; + } + + // Second pass: try case-insensitive, both unlocalized and localized + const auto fstypes = FileSystem::types(); + for ( FileSystem::Type t : fstypes ) + { + if ( ( 0 == QString::compare( defaultFS, FileSystem::nameForType( t, fsLanguage ), Qt::CaseInsensitive ) ) || + ( 0 == QString::compare( defaultFS, FileSystem::nameForType( t ), Qt::CaseInsensitive ) ) ) + { + defaultFS = FileSystem::nameForType( fsType, fsLanguage ); + cWarning() << "Partition-module setting *defaultFileSystemType* changed" << defaultFS; + return defaultFS; + } + } + + cWarning() << "Partition-module setting *defaultFileSystemType* is bad (" << defaultFS << ") using ext4."; + defaultFS = QStringLiteral( "ext4" ); +#ifdef DEBUG_FILESYSTEMS + // This bit is for distro's debugging their settings, and shows + // all the strings that KPMCore is matching against for FS type. + { + Logger::CLog d( Logger::LOGDEBUG ); + using TR = Logger::DebugRow< int, QString >; + const auto fstypes = FileSystem::types(); + d << "Available types (" << fstypes.count() << ')'; + for ( FileSystem::Type t : fstypes ) + d << TR( static_cast( t ), FileSystem::nameForType( t, fsLanguage ) ); + } +#endif + return defaultFS; +} void PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap ) @@ -570,30 +625,7 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap ) gs->insert( "drawNestedPartitions", CalamaresUtils::getBool( configurationMap, "drawNestedPartitions", false ) ); gs->insert( "alwaysShowPartitionLabels", CalamaresUtils::getBool( configurationMap, "alwaysShowPartitionLabels", true ) ); gs->insert( "enableLuksAutomatedPartitioning", CalamaresUtils::getBool( configurationMap, "enableLuksAutomatedPartitioning", true ) ); - - QString defaultFS = CalamaresUtils::getString( configurationMap, "defaultFileSystemType" ); - if ( defaultFS.isEmpty() ) - defaultFS = QStringLiteral( "ext4" ); - else - cDebug() << "Partition-module setting *defaultFileSystemType*" << defaultFS; - if ( FileSystem::typeForName( defaultFS ) == FileSystem::Unknown ) - { - cWarning() << "Partition-module setting *defaultFileSystemType* is bad (" << defaultFS << ") using ext4."; - defaultFS = QStringLiteral( "ext4" ); -#ifdef DEBUG_FILESYSTEMS - // This bit is for distro's debugging their settings, and shows - // all the strings that KPMCore is matching against for FS type. - { - Logger::CLog d( Logger::LOGDEBUG ); - using TR = Logger::DebugRow< int, QString >; - const auto fstypes = FileSystem::types(); - d << "Available types (" << fstypes.count() << ')'; - for ( FileSystem::Type t : fstypes ) - d << TR( static_cast( t ), FileSystem::nameForType( t ) ); - } -#endif - } - gs->insert( "defaultFileSystemType", defaultFS ); + gs->insert( "defaultFileSystemType", findFS( CalamaresUtils::getString( configurationMap, "defaultFileSystemType" ) ) ); // Now that we have the config, we load the PartitionCoreModule in the background From dfad21bfa91e4a26cee1c81d10eb022401dc4ed0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 11 Jan 2019 12:22:23 +0100 Subject: [PATCH 6/6] Changes: update contributors and add notes --- CHANGES | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 0f8963ae1..bd7dbfc7c 100644 --- a/CHANGES +++ b/CHANGES @@ -8,7 +8,9 @@ website will have to do for older versions. This release contains contributions from (alphabetically by first name): - Alf Gaida - aliveafter1000 + - Arnaud Ferraris - Caio Carvalho + - Collabora LTD - Kevin Kofler - Philip Mueller - Scott Harvey @@ -32,10 +34,15 @@ This release contains contributions from (alphabetically by first name): and Calamares no longer reserves 2GiB of space in calculations for internal use (this means that it no longer mysteriously drops swap when the disk size is close to the required installation size). + * The name of the type of default filesystem (e.g. ext4 or btrfs) is now handled + case- and localization-insensitively. This means that *btrfs* is now always + an acceptable spelling. + * The currently-selected disk device is remembered between manual partitioning + and the partitioning-overview pages. (Thanks to Arnaud) * The *keyboard* module now handles the (bogus) Austrian keymap for - the system console properly. + the system console properly. (Thanks to Kevin) * The *preservefiles* module now has a mechanism for setting the permissions - (and ownership) of preserved files. + (and ownership) of preserved files. (Thanks to Scott) * New module *fsresizer* can be used to resize filesystems. It is intended for use in OEM installs where an image of fixed size is created, and then sized to the actual SD card the user has used.