Merge branch 'calamares:calamares' into calamares

This commit is contained in:
abalfoort 2022-04-26 14:56:06 +02:00 committed by GitHub
commit 6ef243ba37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 66 additions and 36 deletions

1
.git-blame-ignore-revs Normal file
View File

@ -0,0 +1 @@
18fef8dfe5d926ec0bc979562553adf4db8db2e9

View File

@ -34,11 +34,13 @@ jobs:
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}"
message: |
OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
- name: "notify: fail"
if: ${{ failure() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}"
message: |
FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}

View File

@ -28,6 +28,22 @@ jobs:
- name: "build"
id: build
uses: calamares/actions/generic-build@v4
- name: "notify: ok"
if: ${{ success() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: |
OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
- name: "notify: fail"
if: ${{ failure() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: |
FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
- name: "Calamares: archive"
working-directory: ${{ env.BUILDDIR }}
run: |
@ -39,18 +55,4 @@ jobs:
name: calamares-tarball
path: ${{ env.BUILDDIR }}/calamares.tar.gz
if-no-files-found: error
retention-days: 3
- name: "notify: ok"
if: ${{ success() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}"
- name: "notify: fail"
if: ${{ failure() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}"
retention-days: 7

View File

@ -35,11 +35,12 @@ jobs:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: |
OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}"
OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
- name: "notify: fail"
if: ${{ failure() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}"
message: |
FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}

View File

@ -12,6 +12,7 @@ website will have to do for older versions.
This release contains contributions from (alphabetically by first name):
- Arjen Balfoort (new contributor! Welcome!)
- Victor Fuentes
## Core ##
- No core changes yet
@ -19,6 +20,8 @@ This release contains contributions from (alphabetically by first name):
## Modules ##
- *fstab* and *luksbootkeyfile* have better support for an **un**encrypted
`/boot` partition. #1931 (thanks Arjen)
- *packagechooser* and *packagechooserq* can now be given a custom name
in the side-panel. #1932 (thanks Victor)
# 3.2.56 (2022-04-22) #

View File

@ -237,6 +237,12 @@ Config::setPackageChoice( const QString& packageChoice )
emit packageChoiceChanged( m_packageChoice.value_or( QString() ) );
}
QString
Config::prettyName() const
{
return m_stepName ? m_stepName->get() : tr( "Packages" );
}
QString
Config::prettyStatus() const
{
@ -343,4 +349,14 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
cWarning() << "Single-selection QML module must use 'Legacy' method.";
}
}
bool labels_ok = false;
auto labels = CalamaresUtils::getSubMap( configurationMap, "labels", labels_ok );
if ( labels_ok )
{
if ( labels.contains( "step" ) )
{
m_stepName = new CalamaresUtils::Locale::TranslatedString( labels, "step" );
}
}
}

View File

@ -98,6 +98,7 @@ public:
QString packageChoice() const { return m_packageChoice.value_or( QString() ); }
void setPackageChoice( const QString& packageChoice );
QString prettyName() const;
QString prettyStatus() const;
signals:
@ -120,6 +121,7 @@ private:
* Reading the property will return an empty QString.
*/
std::optional< QString > m_packageChoice;
CalamaresUtils::Locale::TranslatedString* m_stepName; // As it appears in the sidebar
};

View File

@ -29,7 +29,6 @@ PackageChooserViewStep::PackageChooserViewStep( QObject* parent )
: Calamares::ViewStep( parent )
, m_config( new Config( this ) )
, m_widget( nullptr )
, m_stepName( nullptr )
{
emit nextStatusChanged( false );
}
@ -41,14 +40,13 @@ PackageChooserViewStep::~PackageChooserViewStep()
{
m_widget->deleteLater();
}
delete m_stepName;
}
QString
PackageChooserViewStep::prettyName() const
{
return m_stepName ? m_stepName->get() : tr( "Packages" );
return m_config->prettyName();
}
@ -139,16 +137,6 @@ PackageChooserViewStep::setConfigurationMap( const QVariantMap& configurationMap
m_config->setDefaultId( moduleInstanceKey() );
m_config->setConfigurationMap( configurationMap );
bool labels_ok = false;
auto labels = CalamaresUtils::getSubMap( configurationMap, "labels", labels_ok );
if ( labels_ok )
{
if ( labels.contains( "step" ) )
{
m_stepName = new CalamaresUtils::Locale::TranslatedString( labels, "step" );
}
}
if ( m_widget )
{
hookupModel();

View File

@ -50,7 +50,6 @@ private:
Config* m_config;
PackageChooserPage* m_widget;
CalamaresUtils::Locale::TranslatedString* m_stepName; // As it appears in the sidebar
};
CALAMARES_PLUGIN_FACTORY_DECLARATION( PackageChooserViewStepFactory )

View File

@ -29,7 +29,7 @@ PackageChooserQmlViewStep::PackageChooserQmlViewStep( QObject* parent )
QString
PackageChooserQmlViewStep::prettyName() const
{
return tr( "Packages" );
return m_config->prettyName();
}
QString

View File

@ -42,6 +42,19 @@
#
method: legacy
# Human-visible strings in this module. These are all optional.
# The following translated keys are used:
# - *step*, used in the overall progress view (left-hand pane)
#
# Each key can have a [locale] added to it, which is used as
# the translated string for that locale. For the strings
# associated with the "no-selection" item, see *items*, below
# with the explicit item-*id* "".
#
labels:
step: "Packages"
step[nl]: "Pakketten"
# The *packageChoice* value is used for setting the default selection
# in the QML view; this should match one of the keys used in the QML
# module for package names.

View File

@ -58,10 +58,13 @@ FormatPartitionJob::prettyDescription() const
QString
FormatPartitionJob::prettyStatusMessage() const
{
QString partitionLabel = m_partition->label().isEmpty()
? m_partition->partitionPath()
: tr( "%1 (%2)", "partition label %1 (device path %2)" )
.arg( m_partition->label(), m_partition->partitionPath() );
return tr( "Formatting partition %1 with "
"file system %2." )
.arg( m_partition->partitionPath() )
.arg( userVisibleFS( m_partition->fileSystem() ) );
.arg( partitionLabel, userVisibleFS( m_partition->fileSystem() ) );
}