Merge branch 'calamares' of https://github.com/calamares/calamares into development
This commit is contained in:
commit
a9e2f87868
2
.github/workflows/nightly-debian.yml
vendored
2
.github/workflows/nightly-debian.yml
vendored
@ -11,6 +11,8 @@ env:
|
||||
CMAKE_ARGS: |
|
||||
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DBUILD_APPSTREAM=ON
|
||||
-DBUILD_APPDATA=ON
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
2
.github/workflows/nightly-fedora-qt6.yml
vendored
2
.github/workflows/nightly-fedora-qt6.yml
vendored
@ -12,6 +12,8 @@ env:
|
||||
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DWITH_QT6=ON
|
||||
-DBUILD_APPSTREAM=ON
|
||||
-DBUILD_APPDATA=ON
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
2
.github/workflows/nightly-opensuse.yml
vendored
2
.github/workflows/nightly-opensuse.yml
vendored
@ -13,6 +13,8 @@ env:
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DBUILD_SCHEMA_TESTING=ON
|
||||
-DBUILD_TESTING=ON
|
||||
-DBUILD_APPSTREAM=ON
|
||||
-DBUILD_APPDATA=ON
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
36
.github/workflows/nightly-ubuntu.yml
vendored
Normal file
36
.github/workflows/nightly-ubuntu.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: nightly-ubuntu
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "12 23 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
BUILDDIR: /build
|
||||
SRCDIR: ${{ github.workspace }}
|
||||
CMAKE_ARGS: |
|
||||
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DBUILD_APPSTREAM=ON
|
||||
-DBUILD_APPDATA=ON
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker://ubuntu:devel
|
||||
options: --tmpfs /build:rw --user 0:0
|
||||
steps:
|
||||
- name: "prepare git"
|
||||
shell: bash
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get -y install git-core jq curl ninja-build
|
||||
- name: "prepare source"
|
||||
uses: calamares/actions/generic-checkout@v5
|
||||
- name: "install dependencies"
|
||||
shell: bash
|
||||
run: ./ci/deps-ubuntu.sh
|
||||
- name: "build"
|
||||
shell: bash
|
||||
run: ./ci/build.sh
|
29
CHANGES-3.3
29
CHANGES-3.3
@ -8,6 +8,35 @@ changelog -- this log starts with version 3.3.0. See CHANGES-3.2 for
|
||||
the history of the 3.2 series (2018-05 - 2022-08).
|
||||
|
||||
|
||||
# 3.3.1 (unreleased)
|
||||
|
||||
This release sets `BUILD_APPDATA` and `BUILD_APSTREAM` to default to **OFF**,
|
||||
where previously they defaulted to **ON**. When enabled, the dependencies for
|
||||
both features are required -- previously they would silently switch off if
|
||||
the dependencies were not found. Distributions are strongly advised to check
|
||||
their package-building instructions.
|
||||
|
||||
This release contains contributions from (alphabetically by first name):
|
||||
- Adriaan de Groot
|
||||
- Aleksey Samoilov
|
||||
- Emir Sari
|
||||
- Simon Quigley
|
||||
|
||||
## Core ##
|
||||
- There has been internal code re-organization (e.g. not using functions
|
||||
named `tr()`) to help translation tools.
|
||||
- Strings everywhere have been given more context. (thanks Emir)
|
||||
- In CMake, "view" is no longer accepted as an alias of the module
|
||||
type "viewmodule" in function `calamares_add_plugin()`.
|
||||
- Plain Ubuntu builds have been added to the CI roster. (thanks Simon)
|
||||
- Commands that run in the target system (in the chroot) no longer
|
||||
use the TMP-related environment variables from the host. #2269
|
||||
|
||||
## Modules ##
|
||||
- The *displaymanager* module configuration for `greetd` has some more
|
||||
options now. (thanks Aleksey)
|
||||
|
||||
|
||||
# 3.3.0 (2023-12-12)
|
||||
|
||||
This release contains contributions from (alphabetically by first name):
|
||||
|
@ -47,8 +47,8 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
||||
|
||||
set(CALAMARES_VERSION 3.3.0)
|
||||
set(CALAMARES_RELEASE_MODE ON) # Set to ON during a release
|
||||
set(CALAMARES_VERSION 3.3.1)
|
||||
set(CALAMARES_RELEASE_MODE OFF) # Set to ON during a release
|
||||
|
||||
if(CMAKE_SCRIPT_MODE_FILE)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CMakeModules/ExtendedVersion.cmake)
|
||||
@ -513,6 +513,7 @@ if(NOT CALAMARES_RELEASE_MODE)
|
||||
list(APPEND CALAMARES_TRANSLATION_LANGUAGES ${_tx_incomplete})
|
||||
endif()
|
||||
list(SORT CALAMARES_TRANSLATION_LANGUAGES)
|
||||
list(REMOVE_DUPLICATES CALAMARES_TRANSLATION_LANGUAGES)
|
||||
|
||||
add_subdirectory(lang) # i18n tools
|
||||
|
||||
|
86
CMakeModules/AppStreamHelper.cmake
Normal file
86
CMakeModules/AppStreamHelper.cmake
Normal file
@ -0,0 +1,86 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2023 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
###
|
||||
#
|
||||
# Finds AppStream-Qt suitable for the Qt version that is in use.
|
||||
# Creates target calamares::appstreamqt to alias whatever is found.
|
||||
# Sets AppStreamQt_FOUND appropriately, regardless of the underlying
|
||||
# variables (e.g. might be AppStreamQt6_FOUND).
|
||||
#
|
||||
|
||||
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" OFF)
|
||||
|
||||
if(TARGET calaappstream)
|
||||
if(TARGET calamares::appstreamqt)
|
||||
message(STATUS "AppStreamQt has already been found")
|
||||
set(AppStreamQt_FOUND TRUE)
|
||||
else()
|
||||
message(STATUS "AppStreamQt has been searched-for and not found")
|
||||
set(AppStreamQt_FOUND FALSE)
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
if(NOT BUILD_APPSTREAM)
|
||||
return()
|
||||
endif()
|
||||
|
||||
### FIND APPSTREAM
|
||||
#
|
||||
# First, look for a Qt-versioned variety of the package.
|
||||
# If that is not found, look for an unversioned one.
|
||||
set(HAVE_APPSTREAM OFF)
|
||||
find_package(AppStream${qtname})
|
||||
# Not everyone renames the variables consistently
|
||||
if(AppStream${qtname}_FOUND OR AppStreamQt_FOUND)
|
||||
set(_appstream_name AppStream${qtname})
|
||||
set(HAVE_APPSTREAM ON)
|
||||
else()
|
||||
find_package(AppStreamQt)
|
||||
if(AppStreamQt_FOUND)
|
||||
set(_appstream_name AppStreamQt)
|
||||
# TODO: how to check underlying Qt version?
|
||||
set(HAVE_APPSTREAM ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(HAVE_APPSTREAM)
|
||||
# Look for the directory name containing the headers
|
||||
find_file(_appstream_header NAMES ${_appstream_name}/pool.h AppStreamQt/pool.h)
|
||||
if(NOT _appstream_header)
|
||||
set(HAVE_APPSTREAM OFF)
|
||||
else()
|
||||
if(_appstream_header MATCHES /${_appstream_name}/)
|
||||
set(_appstream_header_directory ${_appstream_name})
|
||||
else()
|
||||
set(_appstream_header_directory AppStreamQt)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
# Placeholder name
|
||||
set(_appstream_name AppStreamQt)
|
||||
endif()
|
||||
|
||||
set(_appstream_dependency_type OPTIONAL)
|
||||
if(BUILD_APPSTREAM)
|
||||
set(_appstream_dependency_type REQUIRED)
|
||||
endif()
|
||||
|
||||
set_package_properties(
|
||||
${_appstream_name}
|
||||
PROPERTIES
|
||||
DESCRIPTION "Support for AppStream (cache) data"
|
||||
URL "https://github.com/ximion/appstream"
|
||||
PURPOSE "AppStream provides package data"
|
||||
TYPE ${_appstream_dependency_type}
|
||||
)
|
||||
|
||||
add_library(calaappstream INTERFACE) # Always, but might not be populated
|
||||
if(HAVE_APPSTREAM)
|
||||
target_compile_definitions(calaappstream INTERFACE HAVE_APPSTREAM_VERSION=${${_appstream_name}_VERSION_MAJOR} HAVE_APPSTREAM_HEADERS=${_appstream_header_directory})
|
||||
target_link_libraries(calaappstream INTERFACE ${_appstream_name})
|
||||
add_library(calamares::appstreamqt ALIAS calaappstream)
|
||||
endif()
|
||||
set(AppStreamQt_FOUND ${HAVE_APPSTREAM})
|
@ -19,7 +19,7 @@
|
||||
#
|
||||
# calamares_add_plugin(
|
||||
# module-name
|
||||
# TYPE <view|job>
|
||||
# TYPE <viewmodule|job>
|
||||
# EXPORT_MACRO macro-name
|
||||
# SOURCES source-file...
|
||||
# UI ui-file...
|
||||
@ -35,7 +35,7 @@
|
||||
# [WEIGHT w]
|
||||
# )
|
||||
#
|
||||
# Function parameters:
|
||||
# Function optional parameters:
|
||||
# - COMPILE_DEFINITIONS
|
||||
# Definitions are set on the resulting module with a suitable
|
||||
# flag (i.e. `-D`) so only state the name (optionally, also the value)
|
||||
@ -65,6 +65,9 @@
|
||||
# SKIPPED_MODULES is set in the parent (i.e. caller's) scope with the
|
||||
# reason why. This should rarely be a concern as AddModuleSubdirectory
|
||||
# already handles skip-reasons and collects them for reporting.
|
||||
#
|
||||
# The target defined this way is called "calamares_<TYPE>_<module-name>",
|
||||
# e.g. "calamares_viewmodule_packagechooserq".
|
||||
|
||||
include( CMakeParseArguments )
|
||||
|
||||
@ -126,7 +129,7 @@ function( calamares_add_plugin )
|
||||
set( target "calamares_${PLUGIN_TYPE}_${PLUGIN_NAME}" )
|
||||
|
||||
# automatic library linkage
|
||||
if(PLUGIN_TYPE STREQUAL "view" OR PLUGIN_TYPE STREQUAL "viewmodule")
|
||||
if(PLUGIN_TYPE STREQUAL "viewmodule")
|
||||
list(APPEND PLUGIN_LINK_PRIVATE_LIBRARIES Calamares::calamaresui)
|
||||
elseif(PLUGIN_TYPE STREQUAL "job")
|
||||
list(APPEND PLUGIN_LINK_PRIVATE_LIBRARIES Calamares::calamares)
|
||||
|
@ -10,7 +10,8 @@
|
||||
#
|
||||
# This file has not yet been documented for use outside of Calamares itself.
|
||||
|
||||
include( CMakeParseArguments )
|
||||
include(CMakeParseArguments)
|
||||
include(FeatureSummary)
|
||||
|
||||
# The Gettext module is still old-fashioned, ALLCAPS variables
|
||||
find_package( Gettext )
|
||||
|
@ -43,4 +43,8 @@ zypper --non-interactive in \
|
||||
|
||||
# Not actual dependencies, but good to have
|
||||
zypper --non-interactive in python311-PyYAML python311-jsonschema
|
||||
# vi to edit things inside the docker
|
||||
zypper --non-interactive in vim
|
||||
# noto so that running Calamares in the docker is readable
|
||||
zypper --non-interactive in noto-sans-fonts
|
||||
true
|
||||
|
47
ci/deps-ubuntu.sh
Executable file
47
ci/deps-ubuntu.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Install dependencies for the nightly-ubuntu (devel) build
|
||||
# These build dependencies are grabbed directly from the Debian package
|
||||
#
|
||||
apt-get update
|
||||
apt-get -y install git-core jq curl ninja
|
||||
apt-get -y install \
|
||||
build-essential \
|
||||
cmake \
|
||||
extra-cmake-modules \
|
||||
gettext \
|
||||
libappstreamqt5-dev \
|
||||
libkf5config-dev \
|
||||
libkf5coreaddons-dev \
|
||||
libkf5crash-dev \
|
||||
libkf5i18n-dev \
|
||||
libkf5iconthemes-dev \
|
||||
libkf5kio-dev \
|
||||
libkf5parts-dev \
|
||||
libkf5plasma-dev \
|
||||
libkf5service-dev \
|
||||
libkf5solid-dev \
|
||||
libkpmcore-dev \
|
||||
libparted-dev \
|
||||
libpolkit-qt5-1-dev \
|
||||
libpwquality-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5webkit5-dev \
|
||||
libyaml-cpp-dev \
|
||||
os-prober \
|
||||
pkg-config \
|
||||
pkg-kde-tools \
|
||||
polkitd \
|
||||
python3-dev \
|
||||
python3-jsonschema \
|
||||
python3-yaml \
|
||||
qml-module-qtquick-layouts \
|
||||
qml-module-qtquick-privatewidgets \
|
||||
qml-module-qtquick-window2 \
|
||||
qml-module-qtquick2 \
|
||||
qtbase5-dev \
|
||||
qtdeclarative5-dev \
|
||||
qtlocation5-dev \
|
||||
qttools5-dev \
|
||||
qttools5-dev-tools
|
||||
true
|
@ -105,6 +105,7 @@ fi
|
||||
# those are done separately.
|
||||
_srcdirs="src/calamares src/libcalamares src/libcalamaresui src/modules src/qml"
|
||||
$LUPDATE -no-obsolete $_srcdirs -ts lang/calamares_en.ts
|
||||
grep '{1?}' lang/calamares_en.ts && { echo "lupdate has introduced weird markers." ; exit 1 ; }
|
||||
# Non-Transifex special-cases
|
||||
#
|
||||
# - timezone names can be translated, but that's 700+ strings I don't want
|
||||
|
1701
lang/calamares_en.ts
1701
lang/calamares_en.ts
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-09-28 22:49+0200\n"
|
||||
"POT-Creation-Date: 2023-12-27 20:44+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -22,15 +22,15 @@ msgstr ""
|
||||
msgid "Install bootloader."
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/bootloader/main.py:644
|
||||
#: src/modules/bootloader/main.py:666
|
||||
msgid "Failed to install grub, no partitions defined in global storage"
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/bootloader/main.py:899
|
||||
#: src/modules/bootloader/main.py:926
|
||||
msgid "Bootloader installation error"
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/bootloader/main.py:900
|
||||
#: src/modules/bootloader/main.py:927
|
||||
msgid ""
|
||||
"The bootloader could not be installed. The installation command <pre>{!s}</"
|
||||
"pre> returned error code {!s}."
|
||||
@ -99,8 +99,8 @@ msgstr ""
|
||||
msgid "Dummy python job."
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/dummypython/main.py:37 src/modules/dummypython/main.py:93
|
||||
#: src/modules/dummypython/main.py:94
|
||||
#: src/modules/dummypython/main.py:37 src/modules/dummypython/main.py:104
|
||||
#: src/modules/dummypython/main.py:105
|
||||
msgid "Dummy python step {}"
|
||||
msgstr ""
|
||||
|
||||
@ -112,20 +112,20 @@ msgstr ""
|
||||
#: src/modules/fstab/main.py:411 src/modules/initcpiocfg/main.py:256
|
||||
#: src/modules/initcpiocfg/main.py:260 src/modules/initramfscfg/main.py:85
|
||||
#: src/modules/initramfscfg/main.py:89 src/modules/localecfg/main.py:140
|
||||
#: src/modules/mount/main.py:329 src/modules/networkcfg/main.py:105
|
||||
#: src/modules/mount/main.py:334 src/modules/networkcfg/main.py:106
|
||||
#: src/modules/openrcdmcryptcfg/main.py:72
|
||||
#: src/modules/openrcdmcryptcfg/main.py:76 src/modules/rawfs/main.py:164
|
||||
msgid "Configuration Error"
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/fstab/main.py:378 src/modules/initramfscfg/main.py:86
|
||||
#: src/modules/mount/main.py:330 src/modules/openrcdmcryptcfg/main.py:73
|
||||
#: src/modules/mount/main.py:335 src/modules/openrcdmcryptcfg/main.py:73
|
||||
#: src/modules/rawfs/main.py:165
|
||||
msgid "No partitions are defined for <pre>{!s}</pre> to use."
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/fstab/main.py:384 src/modules/initramfscfg/main.py:90
|
||||
#: src/modules/localecfg/main.py:141 src/modules/networkcfg/main.py:106
|
||||
#: src/modules/localecfg/main.py:141 src/modules/networkcfg/main.py:107
|
||||
#: src/modules/openrcdmcryptcfg/main.py:77
|
||||
msgid "No root mount point is given for <pre>{!s}</pre> to use."
|
||||
msgstr ""
|
||||
@ -134,7 +134,7 @@ msgstr ""
|
||||
msgid "No <pre>{!s}</pre> configuration is given for <pre>{!s}</pre> to use."
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/grubcfg/main.py:29
|
||||
#: src/modules/grubcfg/main.py:30
|
||||
msgid "Configure GRUB."
|
||||
msgstr ""
|
||||
|
||||
@ -194,11 +194,11 @@ msgstr ""
|
||||
msgid "Failed to set zfs mountpoint"
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/mount/main.py:365
|
||||
#: src/modules/mount/main.py:370
|
||||
msgid "zfs mounting error"
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/networkcfg/main.py:29
|
||||
#: src/modules/networkcfg/main.py:30
|
||||
msgid "Saving network configuration."
|
||||
msgstr ""
|
||||
|
||||
|
@ -190,7 +190,7 @@ install(
|
||||
DESTINATION include/libcalamares
|
||||
)
|
||||
# Install each subdir-worth of header files
|
||||
foreach(subdir geoip locale modulesystem network partition utils)
|
||||
foreach(subdir geoip locale modulesystem network partition utils compat packages)
|
||||
file(GLOB subdir_headers "${subdir}/*.h")
|
||||
install(FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir})
|
||||
endforeach()
|
||||
|
@ -378,7 +378,7 @@ LocaleTests::testTZLookup()
|
||||
|
||||
QVERIFY( zones.find( "America", "New_York" ) );
|
||||
QCOMPARE( zones.find( "America", "New_York" )->zone(), QStringLiteral( "New_York" ) );
|
||||
QCOMPARE( zones.find( "America", "New_York" )->tr(), QStringLiteral( "New York" ) );
|
||||
QCOMPARE( zones.find( "America", "New_York" )->translated(), QStringLiteral( "New York" ) );
|
||||
|
||||
QVERIFY( !zones.find( "Europe", "New_York" ) );
|
||||
QVERIFY( !zones.find( "America", "New York" ) );
|
||||
|
@ -76,7 +76,7 @@ TimeZoneData::TimeZoneData( const QString& region,
|
||||
}
|
||||
|
||||
QString
|
||||
TimeZoneData::tr() const
|
||||
TimeZoneData::translated() const
|
||||
{
|
||||
// NOTE: context name must match what's used in zone-extractor.py
|
||||
return QObject::tr( m_human, "tz_names" );
|
||||
@ -86,11 +86,11 @@ class RegionData : public TranslatableString
|
||||
{
|
||||
public:
|
||||
using TranslatableString::TranslatableString;
|
||||
QString tr() const override;
|
||||
QString translated() const override;
|
||||
};
|
||||
|
||||
QString
|
||||
RegionData::tr() const
|
||||
RegionData::translated() const
|
||||
{
|
||||
// NOTE: context name must match what's used in zone-extractor.py
|
||||
return QObject::tr( m_human, "tz_regions" );
|
||||
@ -276,7 +276,7 @@ RegionsModel::data( const QModelIndex& index, int role ) const
|
||||
const auto& region = m_private->m_regions[ index.row() ];
|
||||
if ( role == NameRole )
|
||||
{
|
||||
return region->tr();
|
||||
return region->translated();
|
||||
}
|
||||
if ( role == KeyRole )
|
||||
{
|
||||
@ -292,13 +292,13 @@ RegionsModel::roleNames() const
|
||||
}
|
||||
|
||||
QString
|
||||
RegionsModel::tr( const QString& region ) const
|
||||
RegionsModel::translated( const QString& region ) const
|
||||
{
|
||||
for ( const auto* p : m_private->m_regions )
|
||||
{
|
||||
if ( p->key() == region )
|
||||
{
|
||||
return p->tr();
|
||||
return p->translated();
|
||||
}
|
||||
}
|
||||
return region;
|
||||
@ -330,7 +330,7 @@ ZonesModel::data( const QModelIndex& index, int role ) const
|
||||
switch ( role )
|
||||
{
|
||||
case NameRole:
|
||||
return zone->tr();
|
||||
return zone->translated();
|
||||
case KeyRole:
|
||||
return zone->key();
|
||||
case RegionRole:
|
||||
|
@ -48,7 +48,7 @@ class TimeZoneData : public QObject, TranslatableString
|
||||
|
||||
Q_PROPERTY( QString region READ region CONSTANT )
|
||||
Q_PROPERTY( QString zone READ zone CONSTANT )
|
||||
Q_PROPERTY( QString name READ tr CONSTANT )
|
||||
Q_PROPERTY( QString name READ translated CONSTANT )
|
||||
Q_PROPERTY( QString countryCode READ country CONSTANT )
|
||||
|
||||
public:
|
||||
@ -60,7 +60,7 @@ public:
|
||||
TimeZoneData( const TimeZoneData& ) = delete;
|
||||
TimeZoneData( TimeZoneData&& ) = delete;
|
||||
|
||||
QString tr() const override;
|
||||
QString translated() const override;
|
||||
|
||||
QString region() const { return m_region; }
|
||||
QString zone() const { return key(); }
|
||||
@ -106,7 +106,7 @@ public Q_SLOTS:
|
||||
* Returns @p region unchanged if there is no such region
|
||||
* or no translation for the region's name.
|
||||
*/
|
||||
QString tr( const QString& region ) const;
|
||||
QString translated( const QString& region ) const;
|
||||
|
||||
private:
|
||||
Private* m_private;
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
virtual ~TranslatableString();
|
||||
|
||||
/// @brief Give the localized human-readable form
|
||||
virtual QString tr() const = 0;
|
||||
virtual QString translated() const = 0;
|
||||
QString key() const { return m_key; }
|
||||
|
||||
bool operator==( const TranslatableString& other ) const { return m_key == other.m_key; }
|
||||
|
@ -128,6 +128,14 @@ Calamares::Utils::Runner::run()
|
||||
{
|
||||
auto env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert( "LC_ALL", "C" );
|
||||
// No guarantees that host settings for /tmp/ make sense in target
|
||||
if ( m_location == RunLocation::RunInTarget )
|
||||
{
|
||||
env.remove( "TEMP" );
|
||||
env.remove( "TEMPDIR" );
|
||||
env.remove( "TMP" );
|
||||
env.remove( "TMPDIR" );
|
||||
}
|
||||
process.setProcessEnvironment( env );
|
||||
}
|
||||
process.setProcessChannelMode( QProcess::MergedChannels );
|
||||
|
@ -73,7 +73,9 @@ ExecutionViewStep::ExecutionViewStep( QObject* parent )
|
||||
{
|
||||
m_widget->setObjectName( "slideshow" );
|
||||
m_progressBar->setObjectName( "exec-progress" );
|
||||
m_progressBar->setFormat( tr( "%p%", "Progress percentage indicator: %p is where the number 0..100 is placed" ) );
|
||||
CALAMARES_RETRANSLATE(
|
||||
m_progressBar->setFormat( tr( "%p%", "Progress percentage indicator: %p is where the number 0..100 is placed" ) );
|
||||
);
|
||||
m_label->setObjectName( "exec-message" );
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout( m_widget );
|
||||
|
@ -65,11 +65,14 @@ sysconfigSetup: false
|
||||
# greetd has configurable user and group; the user and group is created if it
|
||||
# does not exist, and the user is set as default-session user.
|
||||
#
|
||||
# Some greeters for greetd (e.g gtkgreet or regreet) have support for a user's GTK CSS style to change appearance.
|
||||
#
|
||||
# lightdm has a list of greeters to look for, preferring them in order if
|
||||
# they are installed (if not, picks the alphabetically first greeter that is installed).
|
||||
#
|
||||
greetd:
|
||||
greeter_user: "tom_bombadil"
|
||||
greeter_group: "wheel"
|
||||
greeter_css_location: "/etc/greetd/style.css"
|
||||
lightdm:
|
||||
preferred_greeters: ["lightdm-greeter.desktop", "slick-greeter.desktop"]
|
||||
|
@ -25,6 +25,7 @@ properties:
|
||||
properties:
|
||||
greeter_user: { type: string }
|
||||
greeter_group: { type: string }
|
||||
greeter_css_location: { type: string }
|
||||
additionalProperties: false
|
||||
lightdm:
|
||||
type: object
|
||||
|
@ -781,6 +781,7 @@ class DMgreetd(DisplayManager):
|
||||
executable = "greetd"
|
||||
greeter_user = "greeter"
|
||||
greeter_group = "greetd"
|
||||
greeter_css_location = None
|
||||
config_data = {}
|
||||
|
||||
def os_path(self, path):
|
||||
@ -848,6 +849,8 @@ class DMgreetd(DisplayManager):
|
||||
de_command = default_desktop_environment.executable
|
||||
if os.path.exists(self.os_path("usr/bin/gtkgreet")) and os.path.exists(self.os_path("usr/bin/cage")):
|
||||
self.config_data['default_session']['command'] = "cage -d -s -- gtkgreet"
|
||||
if self.greeter_css_location:
|
||||
self.config_data['default_session']['command'] += f" -s {self.greeter_css_location}"
|
||||
elif os.path.exists(self.os_path("usr/bin/tuigreet")):
|
||||
tuigreet_base_cmd = "tuigreet --remember --time --issue --asterisks --cmd "
|
||||
self.config_data['default_session']['command'] = tuigreet_base_cmd + de_command
|
||||
|
@ -390,7 +390,7 @@ Config::currentTimezoneName() const
|
||||
{
|
||||
if ( m_currentLocation )
|
||||
{
|
||||
return m_regionModel->tr( m_currentLocation->region() ) + '/' + m_currentLocation->tr();
|
||||
return m_regionModel->translated( m_currentLocation->region() ) + '/' + m_currentLocation->translated();
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
@ -407,15 +407,13 @@ localeLabel( const QString& s )
|
||||
QString
|
||||
Config::currentLanguageStatus() const
|
||||
{
|
||||
return tr( "The system language will be set to %1", "@info" )
|
||||
.arg( localeLabel( m_selectedLocaleConfiguration.language() ) );
|
||||
return tr( "The system language will be set to %1.", "@info" ).arg( localeLabel( m_selectedLocaleConfiguration.language() ) );
|
||||
}
|
||||
|
||||
QString
|
||||
Config::currentLCStatus() const
|
||||
{
|
||||
return tr( "The numbers and dates locale will be set to %1", "@info" )
|
||||
.arg( localeLabel( m_selectedLocaleConfiguration.lc_numeric ) );
|
||||
return tr( "The numbers and dates locale will be set to %1.", "@info" ).arg( localeLabel( m_selectedLocaleConfiguration.lc_numeric ) );
|
||||
}
|
||||
|
||||
QString
|
||||
|
@ -144,7 +144,7 @@ TimeZoneWidget::paintEvent( QPaintEvent* )
|
||||
#else
|
||||
auto textwidth = [ & ]( const QString& s ) { return fontMetrics.width( s ); };
|
||||
#endif
|
||||
const int textWidth = textwidth( m_currentLocation ? m_currentLocation->tr() : QString() );
|
||||
const int textWidth = textwidth( m_currentLocation ? m_currentLocation->translated() : QString() );
|
||||
const int textHeight = fontMetrics.height();
|
||||
|
||||
QRect rect = QRect( point.x() - textWidth / 2 - 5, point.y() - textHeight - 8, textWidth + 10, textHeight - 2 );
|
||||
@ -170,7 +170,7 @@ TimeZoneWidget::paintEvent( QPaintEvent* )
|
||||
painter.setBrush( QColor( 40, 40, 40 ) );
|
||||
painter.drawRoundedRect( rect, 3, 3 );
|
||||
painter.setPen( Qt::white );
|
||||
painter.drawText( rect.x() + 5, rect.bottom() - 4, m_currentLocation ? m_currentLocation->tr() : QString() );
|
||||
painter.drawText( rect.x() + 5, rect.bottom() - 4, m_currentLocation ? m_currentLocation->translated() : QString() );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -23,13 +23,13 @@
|
||||
|
||||
#include <QFile>
|
||||
|
||||
const NamedEnumTable< MachineId::SystemdMachineIdStyle >&
|
||||
const NamedEnumTable< SystemdMachineIdStyle >&
|
||||
styleNames()
|
||||
{
|
||||
using T = MachineId::SystemdMachineIdStyle;
|
||||
using T = SystemdMachineIdStyle;
|
||||
// *INDENT-OFF*
|
||||
// clang-format off
|
||||
static const NamedEnumTable< MachineId::SystemdMachineIdStyle > names {
|
||||
static const NamedEnumTable< SystemdMachineIdStyle > names {
|
||||
{ QStringLiteral( "none" ), T::Blank },
|
||||
{ QStringLiteral( "blank" ), T::Blank },
|
||||
{ QStringLiteral( "uuid" ), T::Uuid },
|
||||
@ -101,8 +101,8 @@ MachineIdJob::exec()
|
||||
QObject::tr( "Directory not found" ),
|
||||
QObject::tr( "Could not create new random file <pre>%1</pre>." ).arg( entropy_file ) );
|
||||
}
|
||||
auto r = MachineId::createEntropy( m_entropy_copy ? MachineId::EntropyGeneration::CopyFromHost
|
||||
: MachineId::EntropyGeneration::New,
|
||||
auto r = createEntropy( m_entropy_copy ? EntropyGeneration::CopyFromHost
|
||||
: EntropyGeneration::New,
|
||||
root,
|
||||
entropy_file );
|
||||
if ( !r )
|
||||
@ -116,7 +116,7 @@ MachineIdJob::exec()
|
||||
{
|
||||
cWarning() << "Could not create systemd data-directory.";
|
||||
}
|
||||
auto r = MachineId::createSystemdMachineId( m_systemd_style, root, target_systemd_machineid_file );
|
||||
auto r = createSystemdMachineId( m_systemd_style, root, target_systemd_machineid_file );
|
||||
if ( !r )
|
||||
{
|
||||
return r;
|
||||
@ -130,7 +130,7 @@ MachineIdJob::exec()
|
||||
}
|
||||
if ( m_dbus_symlink && QFile::exists( root + target_systemd_machineid_file ) )
|
||||
{
|
||||
auto r = MachineId::createDBusLink( root, target_dbus_machineid_file, target_systemd_machineid_file );
|
||||
auto r = createDBusLink( root, target_dbus_machineid_file, target_systemd_machineid_file );
|
||||
if ( !r )
|
||||
{
|
||||
return r;
|
||||
@ -138,7 +138,7 @@ MachineIdJob::exec()
|
||||
}
|
||||
else
|
||||
{
|
||||
auto r = MachineId::createDBusMachineId( root, target_dbus_machineid_file );
|
||||
auto r = createDBusMachineId( root, target_dbus_machineid_file );
|
||||
if ( !r )
|
||||
{
|
||||
return r;
|
||||
@ -157,7 +157,7 @@ MachineIdJob::setConfigurationMap( const QVariantMap& map )
|
||||
const auto style = Calamares::getString( map, "systemd-style", QString() );
|
||||
if ( !style.isEmpty() )
|
||||
{
|
||||
m_systemd_style = styleNames().find( style, MachineId::SystemdMachineIdStyle::Uuid );
|
||||
m_systemd_style = styleNames().find( style, SystemdMachineIdStyle::Uuid );
|
||||
}
|
||||
|
||||
m_dbus = Calamares::getBool( map, "dbus", false );
|
||||
@ -179,7 +179,7 @@ MachineIdJob::setConfigurationMap( const QVariantMap& map )
|
||||
m_entropy_files = Calamares::getStringList( map, "entropy-files" );
|
||||
if ( Calamares::getBool( map, "entropy", false ) )
|
||||
{
|
||||
cWarning() << "MachineId:: configuration setting *entropy* is deprecated, use *entropy-files* instead.";
|
||||
cWarning() << " configuration setting *entropy* is deprecated, use *entropy-files* instead.";
|
||||
m_entropy_files.append( QStringLiteral( "/var/lib/urandom/random-seed" ) );
|
||||
}
|
||||
m_entropy_files.removeDuplicates();
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
private:
|
||||
bool m_systemd = false; ///< write systemd's files
|
||||
|
||||
MachineId::SystemdMachineIdStyle m_systemd_style = MachineId::SystemdMachineIdStyle::Uuid;
|
||||
SystemdMachineIdStyle m_systemd_style = SystemdMachineIdStyle::Uuid;
|
||||
|
||||
bool m_dbus = false; ///< write dbus files
|
||||
bool m_dbus_symlink = false; ///< .. or just symlink to systemd
|
||||
|
@ -127,18 +127,18 @@ MachineIdTests::testCopyFile()
|
||||
QVERIFY( source.exists() );
|
||||
|
||||
// This should fail since "example" isn't standard in our test directory
|
||||
auto r0 = MachineId::copyFile( tempRoot.path(), "example" );
|
||||
auto r0 = copyFile( tempRoot.path(), "example" );
|
||||
QVERIFY( !r0 );
|
||||
|
||||
const QString sampleFile = QStringLiteral( "CMakeCache.txt" );
|
||||
if ( QFile::exists( sampleFile ) )
|
||||
{
|
||||
auto r1 = MachineId::copyFile( tempRoot.path(), sampleFile );
|
||||
auto r1 = copyFile( tempRoot.path(), sampleFile );
|
||||
// Also fail, because it's not an absolute path
|
||||
QVERIFY( !r1 );
|
||||
|
||||
QVERIFY( QFile::copy( sampleFile, tempISOdir.path() + '/' + sampleFile ) );
|
||||
auto r2 = MachineId::copyFile( tempRoot.path(), tempISOdir.path() + '/' + sampleFile );
|
||||
auto r2 = copyFile( tempRoot.path(), tempISOdir.path() + '/' + sampleFile );
|
||||
QVERIFY( r2 );
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,8 @@
|
||||
|
||||
#include "Workers.h"
|
||||
|
||||
#include "MachineIdJob.h"
|
||||
|
||||
#include "utils/Entropy.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/System.h"
|
||||
@ -46,9 +48,6 @@ getUrandomPoolSize()
|
||||
return ( poolSize >= minimumPoolSize ) ? poolSize : minimumPoolSize;
|
||||
}
|
||||
|
||||
namespace MachineId
|
||||
{
|
||||
|
||||
static inline bool
|
||||
isAbsolutePath( const QString& fileName )
|
||||
{
|
||||
@ -61,19 +60,19 @@ copyFile( const QString& rootMountPoint, const QString& fileName )
|
||||
if ( !isAbsolutePath( fileName ) )
|
||||
{
|
||||
return Calamares::JobResult::internalError(
|
||||
QObject::tr( "File not found" ),
|
||||
QObject::tr( "Path <pre>%1</pre> must be an absolute path." ).arg( fileName ),
|
||||
MachineIdJob::tr( "File not found" ),
|
||||
MachineIdJob::tr( "Path <pre>%1</pre> must be an absolute path." ).arg( fileName ),
|
||||
0 );
|
||||
}
|
||||
|
||||
QFile f( fileName );
|
||||
if ( !f.exists() )
|
||||
{
|
||||
return Calamares::JobResult::error( QObject::tr( "File not found" ), fileName );
|
||||
return Calamares::JobResult::error( MachineIdJob::tr( "File not found" ), fileName );
|
||||
}
|
||||
if ( !f.copy( rootMountPoint + fileName ) )
|
||||
{
|
||||
return Calamares::JobResult::error( QObject::tr( "File not found" ), rootMountPoint + fileName );
|
||||
return Calamares::JobResult::error( MachineIdJob::tr( "File not found" ), rootMountPoint + fileName );
|
||||
}
|
||||
return Calamares::JobResult::ok();
|
||||
}
|
||||
@ -90,8 +89,8 @@ createNewEntropy( int poolSize, const QString& rootMountPoint, const QString& fi
|
||||
if ( !entropyFile.open( QIODevice::WriteOnly ) )
|
||||
{
|
||||
return Calamares::JobResult::error(
|
||||
QObject::tr( "File not found" ),
|
||||
QObject::tr( "Could not create new random file <pre>%1</pre>." ).arg( fileName ) );
|
||||
MachineIdJob::tr( "File not found" ),
|
||||
MachineIdJob::tr( "Could not create new random file <pre>%1</pre>." ).arg( fileName ) );
|
||||
}
|
||||
|
||||
QByteArray data;
|
||||
@ -190,5 +189,3 @@ createDBusLink( const QString& rootMountPoint, const QString& fileName, const QS
|
||||
Q_UNUSED( rootMountPoint )
|
||||
return runCmd( QStringList { QStringLiteral( "ln" ), QStringLiteral( "-sf" ), systemdFileName, fileName }, true );
|
||||
}
|
||||
|
||||
} // namespace MachineId
|
||||
|
@ -7,14 +7,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WORKERS_H
|
||||
#define WORKERS_H
|
||||
#ifndef MACHINEID_WORKERS_H
|
||||
#define MACHINEID_WORKERS_H
|
||||
|
||||
#include "Job.h"
|
||||
|
||||
/// @brief Utility functions for doing the random-data stuff for MachineId
|
||||
namespace MachineId
|
||||
{
|
||||
/** @brief Utility functions
|
||||
*
|
||||
* These probably belong in libcalamares, since they're general utilities
|
||||
@ -70,7 +67,4 @@ enum class SystemdMachineIdStyle
|
||||
Calamares::JobResult
|
||||
createSystemdMachineId( SystemdMachineIdStyle style, const QString& rootMountPoint, const QString& fileName );
|
||||
|
||||
|
||||
} // namespace MachineId
|
||||
|
||||
#endif // WORKERS_H
|
||||
|
@ -10,9 +10,9 @@ set(_extra_src "")
|
||||
### OPTIONAL AppData XML support in PackageModel
|
||||
#
|
||||
#
|
||||
option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON)
|
||||
option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" OFF)
|
||||
if(BUILD_APPDATA)
|
||||
find_package(${qtname} COMPONENTS Xml)
|
||||
find_package(${qtname} REQUIRED COMPONENTS Xml)
|
||||
if(TARGET ${qtname}::Xml)
|
||||
add_definitions(-DHAVE_APPDATA)
|
||||
list(APPEND _extra_libraries ${qtname}::Xml)
|
||||
@ -23,23 +23,7 @@ endif()
|
||||
### OPTIONAL AppStream support in PackageModel
|
||||
#
|
||||
#
|
||||
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
|
||||
if(BUILD_APPSTREAM)
|
||||
find_package(AppStreamQt)
|
||||
set_package_properties(
|
||||
AppStreamQt
|
||||
PROPERTIES
|
||||
DESCRIPTION "Support for AppStream (cache) data"
|
||||
URL "https://github.com/ximion/appstream"
|
||||
PURPOSE "AppStream provides package data"
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
if(AppStreamQt_FOUND)
|
||||
add_definitions(-DHAVE_APPSTREAM_VERSION=${AppStreamQt_VERSION_MAJOR})
|
||||
list(APPEND _extra_libraries AppStreamQt)
|
||||
list(APPEND _extra_src ItemAppStream.cpp)
|
||||
endif()
|
||||
endif()
|
||||
include(AppStreamHelper)
|
||||
|
||||
calamares_add_plugin(packagechooser
|
||||
TYPE viewmodule
|
||||
@ -59,6 +43,11 @@ calamares_add_plugin(packagechooser
|
||||
SHARED_LIB
|
||||
)
|
||||
|
||||
if(AppStreamQt_FOUND)
|
||||
target_link_libraries(calamares_viewmodule_packagechooser PRIVATE calamares::appstreamqt)
|
||||
target_sources(calamares_viewmodule_packagechooser PRIVATE ItemAppStream.cpp)
|
||||
endif()
|
||||
|
||||
calamares_add_test(
|
||||
packagechoosertest
|
||||
GUI
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#ifdef HAVE_APPSTREAM_VERSION
|
||||
#include "ItemAppStream.h"
|
||||
#include <AppStreamQt/pool.h>
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
|
@ -7,20 +7,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/** @brief Loading items from AppData XML files.
|
||||
/** @brief Loading items from AppStream database.
|
||||
*
|
||||
* Only used if QtXML is found, implements PackageItem::fromAppData().
|
||||
* Only used if AppStreamQt is found, implements PackageItem::fromAppStream().
|
||||
*/
|
||||
#include "PackageModel.h"
|
||||
#include "ItemAppStream.h"
|
||||
|
||||
#include "locale/TranslationsModel.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Variant.h"
|
||||
|
||||
#include <AppStreamQt/image.h>
|
||||
#include <AppStreamQt/pool.h>
|
||||
#include <AppStreamQt/screenshot.h>
|
||||
|
||||
/// @brief Return number of pixels in a size, for < ordering purposes
|
||||
static inline quint64
|
||||
sizeOrder( const QSize& size )
|
||||
|
@ -12,10 +12,28 @@
|
||||
|
||||
#include "PackageModel.h"
|
||||
|
||||
namespace AppStream
|
||||
{
|
||||
class Pool;
|
||||
} // namespace AppStream
|
||||
/*
|
||||
* This weird include mechanism is because an #include line is allowed
|
||||
* to consist of preprocessor-tokens, which are expanded, and then
|
||||
* the #include is *re*processed. But if it starts with < or ", then
|
||||
* preprocessor tokens are not expanded. So we build up a #include <>
|
||||
* style line with a suitable path -- if we are given a value for
|
||||
* HAVE_APPSTREAM_HEADERS, that is the directory that the AppStreamQt
|
||||
* headers live in.
|
||||
*/
|
||||
#define CALAMARES_LT <
|
||||
#define CALAMARES_GT >
|
||||
|
||||
#ifndef HAVE_APPSTREAM_HEADERS
|
||||
#define HAVE_APPSTREAM_HEADERS AppStreamQt
|
||||
#endif
|
||||
|
||||
#include CALAMARES_LT HAVE_APPSTREAM_HEADERS/pool.h CALAMARES_GT
|
||||
#include CALAMARES_LT HAVE_APPSTREAM_HEADERS/image.h CALAMARES_GT
|
||||
#include CALAMARES_LT HAVE_APPSTREAM_HEADERS/screenshot.h CALAMARES_GT
|
||||
|
||||
#undef CALAMARES_LT
|
||||
#undef CALAMARES_GT
|
||||
|
||||
/** @brief Loads an item from AppStream data.
|
||||
*
|
||||
|
@ -10,9 +10,8 @@ if(NOT WITH_QML)
|
||||
endif()
|
||||
|
||||
find_package(${qtname} ${QT_VERSION} CONFIG REQUIRED Core)
|
||||
|
||||
# Add optional libraries here
|
||||
set(USER_EXTRA_LIB)
|
||||
set(_extra_libraries "")
|
||||
set(_extra_src "")
|
||||
|
||||
# include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser )
|
||||
set(_packagechooser ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser)
|
||||
@ -21,9 +20,9 @@ include_directories(${_packagechooser})
|
||||
### OPTIONAL AppData XML support in PackageModel
|
||||
#
|
||||
#
|
||||
option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON)
|
||||
option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" OFF)
|
||||
if(BUILD_APPDATA)
|
||||
find_package(${qtname} COMPONENTS Xml)
|
||||
find_package(${qtname} REQUIRED COMPONENTS Xml)
|
||||
if(TARGET ${qtname}::Xml)
|
||||
add_definitions(-DHAVE_APPDATA)
|
||||
list(APPEND _extra_libraries ${qtname}::Xml)
|
||||
@ -34,23 +33,7 @@ endif()
|
||||
### OPTIONAL AppStream support in PackageModel
|
||||
#
|
||||
#
|
||||
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
|
||||
if(BUILD_APPSTREAM)
|
||||
find_package(AppStreamQt)
|
||||
set_package_properties(
|
||||
AppStreamQt
|
||||
PROPERTIES
|
||||
DESCRIPTION "Support for AppStream (cache) data"
|
||||
URL "https://github.com/ximion/appstream"
|
||||
PURPOSE "AppStream provides package data"
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
if(AppStreamQt_FOUND)
|
||||
add_definitions(-DHAVE_APPSTREAM_VERSION=${AppStreamQt_VERSION_MAJOR})
|
||||
list(APPEND _extra_libraries AppStreamQt)
|
||||
list(APPEND _extra_src ${_packagechooser}/ItemAppStream.cpp)
|
||||
endif()
|
||||
endif()
|
||||
include(AppStreamHelper)
|
||||
|
||||
calamares_add_plugin(packagechooserq
|
||||
TYPE viewmodule
|
||||
@ -67,3 +50,8 @@ calamares_add_plugin(packagechooserq
|
||||
${_extra_libraries}
|
||||
SHARED_LIB
|
||||
)
|
||||
|
||||
if(AppStreamQt_FOUND)
|
||||
target_link_libraries(calamares_viewmodule_packagechooserq PRIVATE calamares::appstreamqt)
|
||||
target_sources(calamares_viewmodule_packagechooserq PRIVATE ${_packagechooser}/ItemAppStream.cpp)
|
||||
endif()
|
||||
|
@ -53,7 +53,7 @@ PartitionViewStep::PartitionViewStep( QObject* parent )
|
||||
m_waitingWidget = new WaitingWidget( QString() );
|
||||
m_widget->addWidget( m_waitingWidget );
|
||||
CALAMARES_RETRANSLATE(
|
||||
if ( m_waitingWidget ) { m_waitingWidget->setText( tr( "Gathering system information..." ) ); } );
|
||||
if ( m_waitingWidget ) { m_waitingWidget->setText( tr( "Gathering system information…", "@status" ) ); } );
|
||||
|
||||
m_core = new PartitionCoreModule( this ); // Unusable before init is complete!
|
||||
// We're not done loading, but we need the configuration map first.
|
||||
@ -104,7 +104,7 @@ PartitionViewStep::~PartitionViewStep()
|
||||
QString
|
||||
PartitionViewStep::prettyName() const
|
||||
{
|
||||
return tr( "Partitions" );
|
||||
return tr( "Partitions", "@label" );
|
||||
}
|
||||
|
||||
/** @brief Gather the pretty descriptions of all the partitioning jobs
|
||||
@ -140,17 +140,17 @@ modeDescription( Config::InstallChoice choice )
|
||||
switch ( choice )
|
||||
{
|
||||
case Config::InstallChoice::Alongside:
|
||||
return QCoreApplication::translate( context, "Install %1 <strong>alongside</strong> another operating system." )
|
||||
return QCoreApplication::translate( context, "Install %1 <strong>alongside</strong> another operating system", "@label" )
|
||||
.arg( branding->shortVersionedName() );
|
||||
case Config::InstallChoice::Erase:
|
||||
return QCoreApplication::translate( context, "<strong>Erase</strong> disk and install %1." )
|
||||
return QCoreApplication::translate( context, "<strong>Erase</strong> disk and install %1", "@label" )
|
||||
.arg( branding->shortVersionedName() );
|
||||
case Config::InstallChoice::Replace:
|
||||
return QCoreApplication::translate( context, "<strong>Replace</strong> a partition with %1." )
|
||||
return QCoreApplication::translate( context, "<strong>Replace</strong> a partition with %1", "@label" )
|
||||
.arg( branding->shortVersionedName() );
|
||||
case Config::InstallChoice::NoChoice:
|
||||
case Config::InstallChoice::Manual:
|
||||
return QCoreApplication::translate( context, "<strong>Manual</strong> partitioning." );
|
||||
return QCoreApplication::translate( context, "<strong>Manual</strong> partitioning", "@label" );
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
@ -176,26 +176,26 @@ diskDescription( int listLength, const PartitionCoreModule::SummaryInfo& info, C
|
||||
return QCoreApplication::translate(
|
||||
context,
|
||||
"Install %1 <strong>alongside</strong> another operating system on disk "
|
||||
"<strong>%2</strong> (%3)." )
|
||||
"<strong>%2</strong> (%3)", "@info" )
|
||||
.arg( branding->shortVersionedName() )
|
||||
.arg( info.deviceNode )
|
||||
.arg( info.deviceName );
|
||||
case Config::Erase:
|
||||
return QCoreApplication::translate( context,
|
||||
"<strong>Erase</strong> disk <strong>%2</strong> (%3) and install %1." )
|
||||
"<strong>Erase</strong> disk <strong>%2</strong> (%3) and install %1", "@info" )
|
||||
.arg( branding->shortVersionedName() )
|
||||
.arg( info.deviceNode )
|
||||
.arg( info.deviceName );
|
||||
case Config::Replace:
|
||||
return QCoreApplication::translate(
|
||||
context, "<strong>Replace</strong> a partition on disk <strong>%2</strong> (%3) with %1." )
|
||||
context, "<strong>Replace</strong> a partition on disk <strong>%2</strong> (%3) with %1", "@info" )
|
||||
.arg( branding->shortVersionedName() )
|
||||
.arg( info.deviceNode )
|
||||
.arg( info.deviceName );
|
||||
case Config::NoChoice:
|
||||
case Config::Manual:
|
||||
return QCoreApplication::translate(
|
||||
context, "<strong>Manual</strong> partitioning on disk <strong>%1</strong> (%2)." )
|
||||
context, "<strong>Manual</strong> partitioning on disk <strong>%1</strong> (%2)", "@info" )
|
||||
.arg( info.deviceNode )
|
||||
.arg( info.deviceName );
|
||||
}
|
||||
@ -203,7 +203,7 @@ diskDescription( int listLength, const PartitionCoreModule::SummaryInfo& info, C
|
||||
}
|
||||
else // multiple disk previews!
|
||||
{
|
||||
return QCoreApplication::translate( context, "Disk <strong>%1</strong> (%2)" )
|
||||
return QCoreApplication::translate( context, "Disk <strong>%1</strong> (%2)", "@info" )
|
||||
.arg( info.deviceNode )
|
||||
.arg( info.deviceName );
|
||||
}
|
||||
@ -293,7 +293,7 @@ PartitionViewStep::createSummaryWidget() const
|
||||
field->setSpacing( 6 );
|
||||
field->addWidget( preview );
|
||||
field->addWidget( previewLabels );
|
||||
formLayout->addRow( tr( "Current:" ), field );
|
||||
formLayout->addRow( tr( "Current:", "@label" ), field );
|
||||
|
||||
preview = new PartitionBarsView;
|
||||
preview->setNestedPartitionsMode( mode );
|
||||
@ -311,7 +311,7 @@ PartitionViewStep::createSummaryWidget() const
|
||||
field->setSpacing( 6 );
|
||||
field->addWidget( preview );
|
||||
field->addWidget( previewLabels );
|
||||
formLayout->addRow( tr( "After:" ), field );
|
||||
formLayout->addRow( tr( "After:", "@label" ), field );
|
||||
}
|
||||
const QStringList jobsLines = jobDescriptions( jobs() );
|
||||
if ( !jobsLines.isEmpty() )
|
||||
|
@ -57,7 +57,7 @@ BootLoaderModel::createMbrItems()
|
||||
{
|
||||
for ( auto device : m_devices )
|
||||
{
|
||||
QString text = tr( "Master Boot Record of %1" ).arg( device->name() );
|
||||
QString text = tr( "Master Boot Record of %1", "@info" ).arg( device->name() );
|
||||
appendRow( createBootLoaderItem( text, device->deviceNode(), false ) );
|
||||
}
|
||||
}
|
||||
@ -90,14 +90,14 @@ BootLoaderModel::updateInternal()
|
||||
Partition* partition = KPMHelpers::findPartitionByMountPoint( m_devices, "/boot" );
|
||||
if ( partition )
|
||||
{
|
||||
partitionText = tr( "Boot Partition" );
|
||||
partitionText = tr( "Boot Partition", "@info" );
|
||||
}
|
||||
else
|
||||
{
|
||||
partition = KPMHelpers::findPartitionByMountPoint( m_devices, "/" );
|
||||
if ( partition )
|
||||
{
|
||||
partitionText = tr( "System Partition" );
|
||||
partitionText = tr( "System Partition", "@info" );
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ BootLoaderModel::updateInternal()
|
||||
}
|
||||
// Create "don't install bootloader" item. This is always available,
|
||||
// also if there was no /boot or / partition found.
|
||||
appendRow( createBootLoaderItem( tr( "Do not install a boot loader" ), QString(), false ) );
|
||||
appendRow( createBootLoaderItem( tr( "Do not install a boot loader", "@label" ), QString(), false ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -154,11 +154,11 @@ PartitionModel::data( const QModelIndex& index, int role ) const
|
||||
{
|
||||
if ( isPartitionFreeSpace( partition ) )
|
||||
{
|
||||
return tr( "Free Space" );
|
||||
return tr( "Free Space", "@title" );
|
||||
}
|
||||
else
|
||||
{
|
||||
return isPartitionNew( partition ) ? tr( "New partition" ) : partition->partitionPath();
|
||||
return isPartitionNew( partition ) ? tr( "New Partition", "@title" ) : partition->partitionPath();
|
||||
}
|
||||
}
|
||||
if ( col == FileSystemColumn )
|
||||
@ -198,11 +198,11 @@ PartitionModel::data( const QModelIndex& index, int role ) const
|
||||
{
|
||||
if ( isPartitionFreeSpace( partition ) )
|
||||
{
|
||||
name = tr( "Free Space" );
|
||||
name = tr( "Free Space", "@title" );
|
||||
}
|
||||
else
|
||||
{
|
||||
name = isPartitionNew( partition ) ? tr( "New partition" ) : partition->partitionPath();
|
||||
name = isPartitionNew( partition ) ? tr( "New Partition", "@title" ) : partition->partitionPath();
|
||||
}
|
||||
}
|
||||
QString prettyFileSystem = Calamares::Partition::prettyNameForFileSystemType( partition->fileSystem().type() );
|
||||
@ -304,15 +304,15 @@ PartitionModel::headerData( int section, Qt::Orientation, int role ) const
|
||||
switch ( section )
|
||||
{
|
||||
case NameColumn:
|
||||
return tr( "Name" );
|
||||
return tr( "Name", "@title" );
|
||||
case FileSystemColumn:
|
||||
return tr( "File System" );
|
||||
return tr( "File System", "@title" );
|
||||
case FileSystemLabelColumn:
|
||||
return tr( "File System Label" );
|
||||
return tr( "File System Label", "@title" );
|
||||
case MountPointColumn:
|
||||
return tr( "Mount Point" );
|
||||
return tr( "Mount Point", "@title" );
|
||||
case SizeColumn:
|
||||
return tr( "Size" );
|
||||
return tr( "Size", "@title" );
|
||||
default:
|
||||
cDebug() << "Unknown column" << section;
|
||||
return QVariant();
|
||||
|
@ -134,9 +134,9 @@ void
|
||||
ChoicePage::retranslate()
|
||||
{
|
||||
retranslateUi( this );
|
||||
m_drivesLabel->setText( tr( "Select storage de&vice:" ) );
|
||||
m_previewBeforeLabel->setText( tr( "Current:" ) );
|
||||
m_previewAfterLabel->setText( tr( "After:" ) );
|
||||
m_drivesLabel->setText( tr( "Select storage de&vice:", "@label" ) );
|
||||
m_previewBeforeLabel->setText( tr( "Current:", "@label" ) );
|
||||
m_previewAfterLabel->setText( tr( "After:", "@label" ) );
|
||||
|
||||
updateSwapChoicesTr();
|
||||
updateChoiceButtonsTr();
|
||||
@ -893,7 +893,7 @@ ChoicePage::doReplaceSelectedPartition( const QModelIndex& current )
|
||||
m_reuseHomeCheckBox->setVisible( !homePartitionPath->isEmpty() );
|
||||
if ( !homePartitionPath->isEmpty() )
|
||||
{
|
||||
m_reuseHomeCheckBox->setText( tr( "Reuse %1 as home partition for %2." )
|
||||
m_reuseHomeCheckBox->setText( tr( "Reuse %1 as home partition for %2", "@label" )
|
||||
.arg( *homePartitionPath )
|
||||
.arg( Calamares::Branding::instance()->shortProductName() ) );
|
||||
}
|
||||
@ -1031,7 +1031,7 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
||||
{
|
||||
m_encryptWidget->show();
|
||||
}
|
||||
m_previewBeforeLabel->setText( tr( "Current:" ) );
|
||||
m_previewBeforeLabel->setText( tr( "Current:", "@label" ) );
|
||||
m_selectLabel->setText( tr( "<strong>Select a partition to shrink, "
|
||||
"then drag the bottom bar to resize</strong>" ) );
|
||||
m_selectLabel->show();
|
||||
@ -1057,7 +1057,7 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
||||
Q_UNUSED( path )
|
||||
sizeLabel->setText(
|
||||
tr( "%1 will be shrunk to %2MiB and a new "
|
||||
"%3MiB partition will be created for %4." )
|
||||
"%3MiB partition will be created for %4.", "@info, %1 is partition name, %4 is product name" )
|
||||
.arg( m_beforePartitionBarsView->selectionModel()->currentIndex().data().toString() )
|
||||
.arg( Calamares::BytesToMiB( size ) )
|
||||
.arg( Calamares::BytesToMiB( sizeNext ) )
|
||||
@ -1082,7 +1082,7 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
||||
case InstallChoice::Replace:
|
||||
{
|
||||
m_encryptWidget->setVisible( shouldShowEncryptWidget( choice ) );
|
||||
m_previewBeforeLabel->setText( tr( "Current:" ) );
|
||||
m_previewBeforeLabel->setText( tr( "Current:", "@label" ) );
|
||||
m_afterPartitionBarsView = new PartitionBarsView( m_previewAfterFrame );
|
||||
m_afterPartitionBarsView->setNestedPartitionsMode( mode );
|
||||
m_afterPartitionLabelsView = new PartitionLabelsView( m_previewAfterFrame );
|
||||
@ -1126,7 +1126,7 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
||||
m_beforePartitionLabelsView->setSelectionFilter( filter );
|
||||
|
||||
m_selectLabel->show();
|
||||
m_selectLabel->setText( tr( "<strong>Select a partition to install on</strong>" ) );
|
||||
m_selectLabel->setText( tr( "<strong>Select a partition to install on</strong>", "@label" ) );
|
||||
}
|
||||
|
||||
break;
|
||||
@ -1135,7 +1135,7 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
||||
case InstallChoice::Manual:
|
||||
m_selectLabel->hide();
|
||||
m_previewAfterFrame->hide();
|
||||
m_previewBeforeLabel->setText( tr( "Current:" ) );
|
||||
m_previewBeforeLabel->setText( tr( "Current:", "@label" ) );
|
||||
m_previewAfterLabel->hide();
|
||||
m_encryptWidget->hide();
|
||||
break;
|
||||
@ -1188,21 +1188,21 @@ ChoicePage::setupEfiSystemPartitionSelector()
|
||||
{
|
||||
m_efiLabel->setText( tr( "An EFI system partition cannot be found anywhere "
|
||||
"on this system. Please go back and use manual "
|
||||
"partitioning to set up %1." )
|
||||
"partitioning to set up %1.", "@info, %1 is product name" )
|
||||
.arg( Calamares::Branding::instance()->shortProductName() ) );
|
||||
updateNextEnabled();
|
||||
}
|
||||
else if ( efiSystemPartitions.count() == 1 ) //probably most usual situation
|
||||
{
|
||||
m_efiLabel->setText( tr( "The EFI system partition at %1 will be used for "
|
||||
"starting %2." )
|
||||
"starting %2.", "@info, %1 is partition path, %2 is product name" )
|
||||
.arg( efiSystemPartitions.first()->partitionPath() )
|
||||
.arg( Calamares::Branding::instance()->shortProductName() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_efiComboBox->show();
|
||||
m_efiLabel->setText( tr( "EFI system partition:" ) );
|
||||
m_efiLabel->setText( tr( "EFI system partition:", "@label" ) );
|
||||
for ( int i = 0; i < efiSystemPartitions.count(); ++i )
|
||||
{
|
||||
Partition* efiPartition = efiSystemPartitions.at( i );
|
||||
@ -1505,12 +1505,12 @@ ChoicePage::setupActions()
|
||||
{
|
||||
if ( atLeastOneIsMounted )
|
||||
{
|
||||
m_messageLabel->setText( tr( "This storage device has one of its partitions <strong>mounted</strong>." ) );
|
||||
m_messageLabel->setText( tr( "This storage device has one of its partitions <strong>mounted</strong>.", "@info" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_messageLabel->setText(
|
||||
tr( "This storage device is a part of an <strong>inactive RAID</strong> device." ) );
|
||||
tr( "This storage device is a part of an <strong>inactive RAID</strong> device.", "@info" ) );
|
||||
}
|
||||
|
||||
m_messageLabel->show();
|
||||
@ -1625,7 +1625,7 @@ ChoicePage::updateSwapChoicesTr()
|
||||
// toInt() returns 0 on failure, so check for ok
|
||||
if ( ok ) // It was explicitly set to 0
|
||||
{
|
||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "No Swap" ) );
|
||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "No swap", "@label" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1634,16 +1634,16 @@ ChoicePage::updateSwapChoicesTr()
|
||||
}
|
||||
break;
|
||||
case SwapChoice::ReuseSwap:
|
||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Reuse Swap" ) );
|
||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Reuse swap", "@label" ) );
|
||||
break;
|
||||
case SwapChoice::SmallSwap:
|
||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Swap (no Hibernate)" ) );
|
||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Swap (no Hibernate)", "@label" ) );
|
||||
break;
|
||||
case SwapChoice::FullSwap:
|
||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Swap (with Hibernate)" ) );
|
||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Swap (with Hibernate)", "@label" ) );
|
||||
break;
|
||||
case SwapChoice::SwapFile:
|
||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Swap to file" ) );
|
||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Swap to file", "@label" ) );
|
||||
break;
|
||||
default:
|
||||
cWarning() << "Box item" << index << m_eraseSwapChoiceComboBox->itemText( index ) << "has role" << value;
|
||||
@ -1684,7 +1684,7 @@ ChoicePage::createBootloaderPanel()
|
||||
mainLayout->setContentsMargins( 0, 0, 0, 0 );
|
||||
QLabel* widgetLabel = new QLabel( panelWidget );
|
||||
mainLayout->addWidget( widgetLabel );
|
||||
widgetLabel->setText( tr( "Boot loader location:" ) );
|
||||
widgetLabel->setText( tr( "Bootloader location:", "@label" ) );
|
||||
|
||||
QComboBox* comboForBootloader = new QComboBox( panelWidget );
|
||||
comboForBootloader->setModel( m_core->bootLoaderModel() );
|
||||
|
@ -64,7 +64,7 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device,
|
||||
, m_usedMountPoints( usedMountPoints )
|
||||
{
|
||||
m_ui->setupUi( this );
|
||||
m_ui->encryptWidget->setText( tr( "En&crypt" ) );
|
||||
m_ui->encryptWidget->setText( tr( "En&crypt", "@action" ) );
|
||||
m_ui->encryptWidget->hide();
|
||||
|
||||
if ( m_device->type() != Device::Type::LVM_Device )
|
||||
@ -192,12 +192,12 @@ CreatePartitionDialog::initMbrPartitionTypeUi()
|
||||
if ( !parentIsPartitionTable )
|
||||
{
|
||||
m_role = PartitionRole( PartitionRole::Logical );
|
||||
fixedPartitionString = tr( "Logical" );
|
||||
fixedPartitionString = tr( "Logical", "@label" );
|
||||
}
|
||||
else if ( m_device->partitionTable()->hasExtended() )
|
||||
{
|
||||
m_role = PartitionRole( PartitionRole::Primary );
|
||||
fixedPartitionString = tr( "Primary" );
|
||||
fixedPartitionString = tr( "Primary", "@label" );
|
||||
}
|
||||
|
||||
if ( fixedPartitionString.isEmpty() )
|
||||
@ -216,7 +216,7 @@ void
|
||||
CreatePartitionDialog::initGptPartitionTypeUi()
|
||||
{
|
||||
m_role = PartitionRole( PartitionRole::Primary );
|
||||
m_ui->fixedPartitionLabel->setText( tr( "GPT" ) );
|
||||
m_ui->fixedPartitionLabel->setText( tr( "GPT", "@label" ) );
|
||||
m_ui->primaryRadioButton->hide();
|
||||
m_ui->extendedRadioButton->hide();
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ CreateVolumeGroupDialog::CreateVolumeGroupDialog( QString& vgName,
|
||||
, m_selectedPVs( selectedPVs )
|
||||
, m_peSize( pSize )
|
||||
{
|
||||
setWindowTitle( tr( "Create Volume Group" ) );
|
||||
setWindowTitle( tr( "Create Volume Group", "@title" ) );
|
||||
|
||||
peSize()->setValue( pSize );
|
||||
|
||||
|
@ -150,12 +150,12 @@ EncryptWidget::updateState( const bool notify )
|
||||
if ( p1.isEmpty() && p2.isEmpty() )
|
||||
{
|
||||
applyPixmap( m_ui->m_iconLabel, Calamares::StatusWarning );
|
||||
m_ui->m_iconLabel->setToolTip( tr( "Please enter the same passphrase in both boxes." ) );
|
||||
m_ui->m_iconLabel->setToolTip( tr( "Please enter the same passphrase in both boxes.", "@tooltip" ) );
|
||||
}
|
||||
else if ( m_filesystem == FileSystem::Zfs && p1.length() < ZFS_MIN_LENGTH )
|
||||
{
|
||||
applyPixmap( m_ui->m_iconLabel, Calamares::StatusError );
|
||||
m_ui->m_iconLabel->setToolTip( tr( "Password must be a minimum of %1 characters" ).arg( ZFS_MIN_LENGTH ) );
|
||||
m_ui->m_iconLabel->setToolTip( tr( "Password must be a minimum of %1 characters.", "@tooltip" ).arg( ZFS_MIN_LENGTH ) );
|
||||
}
|
||||
else if ( p1 == p2 )
|
||||
{
|
||||
@ -165,7 +165,7 @@ EncryptWidget::updateState( const bool notify )
|
||||
else
|
||||
{
|
||||
applyPixmap( m_ui->m_iconLabel, Calamares::StatusError );
|
||||
m_ui->m_iconLabel->setToolTip( tr( "Please enter the same passphrase in both boxes." ) );
|
||||
m_ui->m_iconLabel->setToolTip( tr( "Please enter the same passphrase in both boxes.", "@tooltip" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,12 +88,12 @@ validateMountPoint( const QString& mountPoint, const QStringList& inUse, QLabel*
|
||||
|
||||
if ( inUse.contains( mountPoint ) )
|
||||
{
|
||||
msg = CreatePartitionDialog::tr( "Mountpoint already in use. Please select another one." );
|
||||
msg = CreatePartitionDialog::tr( "Mountpoint already in use. Please select another one.", "@info" );
|
||||
ok = false;
|
||||
}
|
||||
else if ( !mountPoint.isEmpty() && !mountPoint.startsWith( '/' ) )
|
||||
{
|
||||
msg = CreatePartitionDialog::tr( "Mountpoint must start with a <tt>/</tt>." );
|
||||
msg = CreatePartitionDialog::tr( "Mountpoint must start with a <tt>/</tt>.", "@info" );
|
||||
ok = false;
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ static const int CORNER_RADIUS = 2;
|
||||
static QStringList
|
||||
buildUnknownDisklabelTexts( Device* dev )
|
||||
{
|
||||
QStringList texts = { QObject::tr( "Unpartitioned space or unknown partition table" ),
|
||||
QStringList texts = { QObject::tr( "Unpartitioned space or unknown partition table", "@info" ),
|
||||
formatByteSize( dev->totalLogical() * dev->logicalSize() ) };
|
||||
return texts;
|
||||
}
|
||||
@ -179,28 +179,28 @@ PartitionLabelsView::buildTexts( const QModelIndex& index ) const
|
||||
}
|
||||
else if ( mountPoint == "/home" )
|
||||
{
|
||||
firstLine = tr( "Home" );
|
||||
firstLine = tr( "Home", "@label" );
|
||||
}
|
||||
else if ( mountPoint == "/boot" )
|
||||
{
|
||||
firstLine = tr( "Boot" );
|
||||
firstLine = tr( "Boot", "@label" );
|
||||
}
|
||||
else if ( mountPoint.contains( "/efi" )
|
||||
&& index.data( PartitionModel::FileSystemTypeRole ).toInt() == FileSystem::Fat32 )
|
||||
{
|
||||
firstLine = tr( "EFI system" );
|
||||
firstLine = tr( "EFI system", "@label" );
|
||||
}
|
||||
else if ( index.data( PartitionModel::FileSystemTypeRole ).toInt() == FileSystem::LinuxSwap )
|
||||
{
|
||||
firstLine = tr( "Swap" );
|
||||
firstLine = tr( "Swap", "@label" );
|
||||
}
|
||||
else if ( !mountPoint.isEmpty() )
|
||||
{
|
||||
firstLine = tr( "New partition for %1" ).arg( mountPoint );
|
||||
firstLine = tr( "New partition for %1", "@label" ).arg( mountPoint );
|
||||
}
|
||||
else
|
||||
{
|
||||
firstLine = tr( "New partition" );
|
||||
firstLine = tr( "New partition", "@label" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ ResizeVolumeGroupDialog::ResizeVolumeGroupDialog( LvmDevice* device,
|
||||
: VolumeGroupBaseDialog( device->name(), device->physicalVolumes(), parent )
|
||||
, m_selectedPVs( selectedPVs )
|
||||
{
|
||||
setWindowTitle( tr( "Resize Volume Group" ) );
|
||||
setWindowTitle( tr( "Resize Volume Group", "@title" ) );
|
||||
|
||||
for ( int i = 0; i < pvList()->count(); i++ )
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ ScanningDialog::run( const QFuture< void >& future,
|
||||
void
|
||||
ScanningDialog::run( const QFuture< void >& future, const std::function< void() >& callback, QWidget* parent )
|
||||
{
|
||||
ScanningDialog::run( future, tr( "Scanning storage devices..." ), tr( "Partitioning" ), callback, parent );
|
||||
ScanningDialog::run( future, tr( "Scanning storage devices…", "@status" ), tr( "Partitioning…", "@status" ), callback, parent );
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -19,7 +19,7 @@ AutoMountManagementJob::AutoMountManagementJob( bool disable )
|
||||
QString
|
||||
AutoMountManagementJob::prettyName() const
|
||||
{
|
||||
return tr( "Manage auto-mount settings" );
|
||||
return tr( "Managing auto-mount settings…", "@status" );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
@ -31,15 +31,14 @@ ChangeFilesystemLabelJob::ChangeFilesystemLabelJob( Device* device, Partition* p
|
||||
QString
|
||||
ChangeFilesystemLabelJob::prettyName() const
|
||||
{
|
||||
return tr( "Set filesystem label on %1." ).arg( partition()->partitionPath() );
|
||||
return tr( "Set filesystem label on %1", "@title" ).arg( partition()->partitionPath() );
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
ChangeFilesystemLabelJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Set filesystem label <strong>%1</strong> to partition "
|
||||
"<strong>%2</strong>." )
|
||||
return tr( "Set filesystem label <strong>%1</strong> to partition <strong>%2</strong>", "@info" )
|
||||
.arg( m_label )
|
||||
.arg( partition()->partitionPath() );
|
||||
}
|
||||
@ -48,7 +47,9 @@ ChangeFilesystemLabelJob::prettyDescription() const
|
||||
QString
|
||||
ChangeFilesystemLabelJob::prettyStatusMessage() const
|
||||
{
|
||||
return prettyDescription();
|
||||
return tr( "Setting filesystem label <strong>%1</strong> to partition <strong>%2</strong>…", "@status" )
|
||||
.arg( m_label )
|
||||
.arg( partition()->partitionPath() );
|
||||
}
|
||||
|
||||
|
||||
@ -68,7 +69,7 @@ ChangeFilesystemLabelJob::exec()
|
||||
return Calamares::JobResult::ok();
|
||||
}
|
||||
return Calamares::JobResult::error(
|
||||
tr( "The installer failed to update partition table on disk '%1'." ).arg( m_device->name() ) );
|
||||
tr( "The installer failed to update partition table on disk '%1'.", "@info" ).arg( m_device->name() ) );
|
||||
}
|
||||
|
||||
Report report( nullptr );
|
||||
@ -80,5 +81,6 @@ ChangeFilesystemLabelJob::exec()
|
||||
return Calamares::JobResult::ok();
|
||||
}
|
||||
return Calamares::JobResult::error(
|
||||
tr( "The installer failed to update partition table on disk '%1'." ).arg( m_device->name() ), report.toText() );
|
||||
tr( "The installer failed to update partition table on disk '%1'.", "@info" ).arg( m_device->name() ),
|
||||
report.toText() );
|
||||
}
|
||||
|
@ -368,13 +368,13 @@ ClearMountsJob::ClearMountsJob( Device* device )
|
||||
QString
|
||||
ClearMountsJob::prettyName() const
|
||||
{
|
||||
return tr( "Clear mounts for partitioning operations on %1" ).arg( m_deviceNode );
|
||||
return tr( "Clear mounts for partitioning operations on %1", "@title" ).arg( m_deviceNode );
|
||||
}
|
||||
|
||||
QString
|
||||
ClearMountsJob::prettyStatusMessage() const
|
||||
{
|
||||
return tr( "Clearing mounts for partitioning operations on %1." ).arg( m_deviceNode );
|
||||
return tr( "Clearing mounts for partitioning operations on %1…", "@status" ).arg( m_deviceNode );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
@ -30,14 +30,14 @@ ClearTempMountsJob::ClearTempMountsJob()
|
||||
QString
|
||||
ClearTempMountsJob::prettyName() const
|
||||
{
|
||||
return tr( "Clear all temporary mounts." );
|
||||
return tr( "Clearing all temporary mounts…", "@status" );
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
ClearTempMountsJob::prettyStatusMessage() const
|
||||
{
|
||||
return tr( "Clearing all temporary mounts." );
|
||||
return tr( "Clearing all temporary mounts…", "@status" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -178,7 +178,7 @@ CreatePartitionJob::prettyName() const
|
||||
QString entries = prettyGptEntries( m_partition );
|
||||
if ( !entries.isEmpty() )
|
||||
{
|
||||
return tr( "Create new %1MiB partition on %3 (%2) with entries %4." )
|
||||
return tr( "Create new %1MiB partition on %3 (%2) with entries %4", "@title" )
|
||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||
.arg( m_device->name() )
|
||||
.arg( m_device->deviceNode() )
|
||||
@ -186,14 +186,14 @@ CreatePartitionJob::prettyName() const
|
||||
}
|
||||
else
|
||||
{
|
||||
return tr( "Create new %1MiB partition on %3 (%2)." )
|
||||
return tr( "Create new %1MiB partition on %3 (%2)", "@title" )
|
||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||
.arg( m_device->name() )
|
||||
.arg( m_device->deviceNode() );
|
||||
}
|
||||
}
|
||||
|
||||
return tr( "Create new %2MiB partition on %4 (%3) with file system %1." )
|
||||
return tr( "Create new %2MiB partition on %4 (%3) with file system %1", "@title" )
|
||||
.arg( userVisibleFS( m_partition->fileSystem() ) )
|
||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||
.arg( m_device->name() )
|
||||
@ -210,7 +210,8 @@ CreatePartitionJob::prettyDescription() const
|
||||
if ( !entries.isEmpty() )
|
||||
{
|
||||
return tr( "Create new <strong>%1MiB</strong> partition on <strong>%3</strong> (%2) with entries "
|
||||
"<em>%4</em>." )
|
||||
"<em>%4</em>",
|
||||
"@info" )
|
||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||
.arg( m_device->name() )
|
||||
.arg( m_device->deviceNode() )
|
||||
@ -218,7 +219,7 @@ CreatePartitionJob::prettyDescription() const
|
||||
}
|
||||
else
|
||||
{
|
||||
return tr( "Create new <strong>%1MiB</strong> partition on <strong>%3</strong> (%2)." )
|
||||
return tr( "Create new <strong>%1MiB</strong> partition on <strong>%3</strong> (%2)", "@info" )
|
||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||
.arg( m_device->name() )
|
||||
.arg( m_device->deviceNode() );
|
||||
@ -226,7 +227,8 @@ CreatePartitionJob::prettyDescription() const
|
||||
}
|
||||
|
||||
return tr( "Create new <strong>%2MiB</strong> partition on <strong>%4</strong> "
|
||||
"(%3) with file system <strong>%1</strong>." )
|
||||
"(%3) with file system <strong>%1</strong>",
|
||||
"@info" )
|
||||
.arg( userVisibleFS( m_partition->fileSystem() ) )
|
||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||
.arg( m_device->name() )
|
||||
@ -249,10 +251,10 @@ CreatePartitionJob::prettyStatusMessage() const
|
||||
type = userVisibleFS( m_partition->fileSystem() );
|
||||
}
|
||||
|
||||
return tr( "Creating new %1 partition on %2." ).arg( type ).arg( m_device->deviceNode() );
|
||||
return tr( "Creating new %1 partition on %2…", "@status" ).arg( type ).arg( m_device->deviceNode() );
|
||||
}
|
||||
|
||||
return tr( "Creating new %1 partition on %2." )
|
||||
return tr( "Creating new %1 partition on %2…", "@status" )
|
||||
.arg( userVisibleFS( m_partition->fileSystem() ) )
|
||||
.arg( m_device->deviceNode() );
|
||||
}
|
||||
@ -269,7 +271,7 @@ CreatePartitionJob::exec()
|
||||
|
||||
return KPMHelpers::execute(
|
||||
NewOperation( *m_device, m_partition ),
|
||||
tr( "The installer failed to create partition on disk '%1'." ).arg( m_device->name() ) );
|
||||
tr( "The installer failed to create partition on disk '%1'.", "@info" ).arg( m_device->name() ) );
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -38,7 +38,7 @@ CreatePartitionTableJob::CreatePartitionTableJob( Device* device, PartitionTable
|
||||
QString
|
||||
CreatePartitionTableJob::prettyName() const
|
||||
{
|
||||
return tr( "Create new %1 partition table on %2." )
|
||||
return tr( "Creating new %1 partition table on %2…", "@status" )
|
||||
.arg( PartitionTable::tableTypeToName( m_type ) )
|
||||
.arg( m_device->deviceNode() );
|
||||
}
|
||||
@ -46,7 +46,7 @@ CreatePartitionTableJob::prettyName() const
|
||||
QString
|
||||
CreatePartitionTableJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Create new <strong>%1</strong> partition table on <strong>%2</strong> (%3)." )
|
||||
return tr( "Creating new <strong>%1</strong> partition table on <strong>%2</strong> (%3)…", "@status" )
|
||||
.arg( PartitionTable::tableTypeToName( m_type ).toUpper() )
|
||||
.arg( m_device->deviceNode() )
|
||||
.arg( m_device->name() );
|
||||
@ -55,7 +55,7 @@ CreatePartitionTableJob::prettyDescription() const
|
||||
QString
|
||||
CreatePartitionTableJob::prettyStatusMessage() const
|
||||
{
|
||||
return tr( "Creating new %1 partition table on %2." )
|
||||
return tr( "Creating new %1 partition table on %2…", "@status" )
|
||||
.arg( PartitionTable::tableTypeToName( m_type ).toUpper() )
|
||||
.arg( m_device->deviceNode() );
|
||||
}
|
||||
|
@ -29,19 +29,19 @@ CreateVolumeGroupJob::CreateVolumeGroupJob( Device*,
|
||||
QString
|
||||
CreateVolumeGroupJob::prettyName() const
|
||||
{
|
||||
return tr( "Create new volume group named %1." ).arg( m_vgName );
|
||||
return tr( "Creating new volume group named %1…", "@status" ).arg( m_vgName );
|
||||
}
|
||||
|
||||
QString
|
||||
CreateVolumeGroupJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Create new volume group named <strong>%1</strong>." ).arg( m_vgName );
|
||||
return tr( "Creating new volume group named <strong>%1</strong>…", "@status" ).arg( m_vgName );
|
||||
}
|
||||
|
||||
QString
|
||||
CreateVolumeGroupJob::prettyStatusMessage() const
|
||||
{
|
||||
return tr( "Creating new volume group named %1." ).arg( m_vgName );
|
||||
return tr( "Creating new volume group named %1…", "@status" ).arg( m_vgName );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
@ -23,19 +23,19 @@ DeactivateVolumeGroupJob::DeactivateVolumeGroupJob( LvmDevice* device )
|
||||
QString
|
||||
DeactivateVolumeGroupJob::prettyName() const
|
||||
{
|
||||
return tr( "Deactivate volume group named %1." ).arg( m_device->name() );
|
||||
return tr( "Deactivating volume group named %1…", "@status" ).arg( m_device->name() );
|
||||
}
|
||||
|
||||
QString
|
||||
DeactivateVolumeGroupJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Deactivate volume group named <strong>%1</strong>." ).arg( m_device->name() );
|
||||
return tr( "Deactivating volume group named <strong>%1</strong>…", "@status" ).arg( m_device->name() );
|
||||
}
|
||||
|
||||
QString
|
||||
DeactivateVolumeGroupJob::prettyStatusMessage() const
|
||||
{
|
||||
return tr( "Deactivate volume group named %1." ).arg( m_device->name() );
|
||||
return tr( "Deactivating volume group named %1…", "@status" ).arg( m_device->name() );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
@ -70,19 +70,19 @@ DeletePartitionJob::DeletePartitionJob( Device* device, Partition* partition )
|
||||
QString
|
||||
DeletePartitionJob::prettyName() const
|
||||
{
|
||||
return tr( "Delete partition %1." ).arg( m_partition->partitionPath() );
|
||||
return tr( "Deleting partition %1…", "@status" ).arg( m_partition->partitionPath() );
|
||||
}
|
||||
|
||||
QString
|
||||
DeletePartitionJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Delete partition <strong>%1</strong>." ).arg( m_partition->partitionPath() );
|
||||
return tr( "Deleting partition <strong>%1</strong>…", "@status" ).arg( m_partition->partitionPath() );
|
||||
}
|
||||
|
||||
QString
|
||||
DeletePartitionJob::prettyStatusMessage() const
|
||||
{
|
||||
return tr( "Deleting partition %1." ).arg( m_partition->partitionPath() );
|
||||
return tr( "Deleting partition %1…", "@status" ).arg( m_partition->partitionPath() );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
@ -176,7 +176,7 @@ FillGlobalStorageJob::FillGlobalStorageJob( const Config*, QList< Device* > devi
|
||||
QString
|
||||
FillGlobalStorageJob::prettyName() const
|
||||
{
|
||||
return tr( "Set partition information" );
|
||||
return tr( "Set partition information", "@title" );
|
||||
}
|
||||
|
||||
|
||||
@ -206,14 +206,15 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
if ( !features.isEmpty() )
|
||||
{
|
||||
lines.append( tr( "Install %1 on <strong>new</strong> %2 system partition "
|
||||
"with features <em>%3</em>" )
|
||||
"with features <em>%3</em>",
|
||||
"@info" )
|
||||
.arg( Calamares::Branding::instance()->shortProductName() )
|
||||
.arg( fsType )
|
||||
.arg( features ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
lines.append( tr( "Install %1 on <strong>new</strong> %2 system partition." )
|
||||
lines.append( tr( "Install %1 on <strong>new</strong> %2 system partition", "@info" )
|
||||
.arg( Calamares::Branding::instance()->shortProductName() )
|
||||
.arg( fsType ) );
|
||||
}
|
||||
@ -223,7 +224,8 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
if ( !features.isEmpty() )
|
||||
{
|
||||
lines.append( tr( "Set up <strong>new</strong> %2 partition with mount point "
|
||||
"<strong>%1</strong> and features <em>%3</em>." )
|
||||
"<strong>%1</strong> and features <em>%3</em>",
|
||||
"@info" )
|
||||
.arg( mountPoint )
|
||||
.arg( fsType )
|
||||
.arg( features ) );
|
||||
@ -231,7 +233,8 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
else
|
||||
{
|
||||
lines.append( tr( "Set up <strong>new</strong> %2 partition with mount point "
|
||||
"<strong>%1</strong>%3." )
|
||||
"<strong>%1</strong>%3",
|
||||
"@info" )
|
||||
.arg( mountPoint )
|
||||
.arg( fsType )
|
||||
.arg( features ) );
|
||||
@ -245,7 +248,8 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
if ( !features.isEmpty() )
|
||||
{
|
||||
lines.append( tr( "Install %2 on %3 system partition <strong>%1</strong>"
|
||||
" with features <em>%4</em>." )
|
||||
" with features <em>%4</em>",
|
||||
"@info" )
|
||||
.arg( path )
|
||||
.arg( Calamares::Branding::instance()->shortProductName() )
|
||||
.arg( fsType )
|
||||
@ -253,7 +257,7 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
}
|
||||
else
|
||||
{
|
||||
lines.append( tr( "Install %2 on %3 system partition <strong>%1</strong>." )
|
||||
lines.append( tr( "Install %2 on %3 system partition <strong>%1</strong>", "@info" )
|
||||
.arg( path )
|
||||
.arg( Calamares::Branding::instance()->shortProductName() )
|
||||
.arg( fsType ) );
|
||||
@ -264,7 +268,8 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
if ( !features.isEmpty() )
|
||||
{
|
||||
lines.append( tr( "Set up %3 partition <strong>%1</strong> with mount point "
|
||||
"<strong>%2</strong> and features <em>%4</em>." )
|
||||
"<strong>%2</strong> and features <em>%4</em>",
|
||||
"@info" )
|
||||
.arg( path )
|
||||
.arg( mountPoint )
|
||||
.arg( fsType )
|
||||
@ -273,7 +278,8 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
else
|
||||
{
|
||||
lines.append( tr( "Set up %3 partition <strong>%1</strong> with mount point "
|
||||
"<strong>%2</strong>%4." )
|
||||
"<strong>%2</strong>%4…",
|
||||
"@info" )
|
||||
.arg( path )
|
||||
.arg( mountPoint )
|
||||
.arg( fsType )
|
||||
@ -287,7 +293,7 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
QVariant bootloaderMap = createBootLoaderMap();
|
||||
if ( !m_bootLoaderPath.isEmpty() )
|
||||
{
|
||||
lines.append( tr( "Install boot loader on <strong>%1</strong>." ).arg( m_bootLoaderPath ) );
|
||||
lines.append( tr( "Install boot loader on <strong>%1</strong>…", "@info" ).arg( m_bootLoaderPath ) );
|
||||
}
|
||||
return lines.join( "<br/>" );
|
||||
}
|
||||
@ -296,7 +302,7 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
QString
|
||||
FillGlobalStorageJob::prettyStatusMessage() const
|
||||
{
|
||||
return tr( "Setting up mount points." );
|
||||
return tr( "Setting up mount points…", "@status" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@ FormatPartitionJob::FormatPartitionJob( Device* device, Partition* partition )
|
||||
QString
|
||||
FormatPartitionJob::prettyName() const
|
||||
{
|
||||
return tr( "Format partition %1 (file system: %2, size: %3 MiB) on %4." )
|
||||
return tr( "Format partition %1 (file system: %2, size: %3 MiB) on %4", "@title" )
|
||||
.arg( m_partition->partitionPath() )
|
||||
.arg( userVisibleFS( m_partition->fileSystem() ) )
|
||||
.arg( m_partition->capacity() / 1024 / 1024 )
|
||||
@ -47,7 +47,8 @@ QString
|
||||
FormatPartitionJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Format <strong>%3MiB</strong> partition <strong>%1</strong> with "
|
||||
"file system <strong>%2</strong>." )
|
||||
"file system <strong>%2</strong>",
|
||||
"@info" )
|
||||
.arg( m_partition->partitionPath() )
|
||||
.arg( userVisibleFS( m_partition->fileSystem() ) )
|
||||
.arg( m_partition->capacity() / 1024 / 1024 );
|
||||
@ -60,8 +61,7 @@ FormatPartitionJob::prettyStatusMessage() const
|
||||
? 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." )
|
||||
return tr( "Formatting partition %1 with file system %2…", "@status" )
|
||||
.arg( partitionLabel, userVisibleFS( m_partition->fileSystem() ) );
|
||||
}
|
||||
|
||||
|
@ -23,19 +23,19 @@ RemoveVolumeGroupJob::RemoveVolumeGroupJob( Device*, LvmDevice* device )
|
||||
QString
|
||||
RemoveVolumeGroupJob::prettyName() const
|
||||
{
|
||||
return tr( "Remove Volume Group named %1." ).arg( m_device->name() );
|
||||
return tr( "Removing Volume Group named %1…", "@status" ).arg( m_device->name() );
|
||||
}
|
||||
|
||||
QString
|
||||
RemoveVolumeGroupJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Remove Volume Group named <strong>%1</strong>." ).arg( m_device->name() );
|
||||
return tr( "Removing Volume Group named <strong>%1</strong>…", "@status" ).arg( m_device->name() );
|
||||
}
|
||||
|
||||
QString
|
||||
RemoveVolumeGroupJob::prettyStatusMessage() const
|
||||
{
|
||||
return tr( "Remove Volume Group named %1." ).arg( m_device->name() );
|
||||
return tr( "Removing Volume Group named %1…", "@status" ).arg( m_device->name() );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
@ -36,16 +36,13 @@ ResizePartitionJob::ResizePartitionJob( Device* device, Partition* partition, qi
|
||||
QString
|
||||
ResizePartitionJob::prettyName() const
|
||||
{
|
||||
// FIXME: Copy PM ResizeOperation code which generates a description of the
|
||||
// operation
|
||||
return tr( "Resize partition %1." ).arg( partition()->partitionPath() );
|
||||
return tr( "Resize partition %1", "@title" ).arg( partition()->partitionPath() );
|
||||
}
|
||||
|
||||
QString
|
||||
ResizePartitionJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Resize <strong>%2MiB</strong> partition <strong>%1</strong> to "
|
||||
"<strong>%3MiB</strong>." )
|
||||
return tr( "Resize <strong>%2MiB</strong> partition <strong>%1</strong> to <strong>%3MiB</strong>", "@info" )
|
||||
.arg( partition()->partitionPath() )
|
||||
.arg( ( BytesToMiB( m_oldLastSector - m_oldFirstSector + 1 ) * partition()->sectorSize() ) )
|
||||
.arg( ( BytesToMiB( m_newLastSector - m_newFirstSector + 1 ) * partition()->sectorSize() ) );
|
||||
@ -54,8 +51,7 @@ ResizePartitionJob::prettyDescription() const
|
||||
QString
|
||||
ResizePartitionJob::prettyStatusMessage() const
|
||||
{
|
||||
return tr( "Resizing %2MiB partition %1 to "
|
||||
"%3MiB." )
|
||||
return tr( "Resizing %2MiB partition %1 to %3MiB…", "@status" )
|
||||
.arg( partition()->partitionPath() )
|
||||
.arg( ( BytesToMiB( m_oldLastSector - m_oldFirstSector + 1 ) * partition()->sectorSize() ) )
|
||||
.arg( ( BytesToMiB( m_newLastSector - m_newFirstSector + 1 ) * partition()->sectorSize() ) );
|
||||
|
@ -25,7 +25,7 @@ ResizeVolumeGroupJob::ResizeVolumeGroupJob( Device*, LvmDevice* device, QVector<
|
||||
QString
|
||||
ResizeVolumeGroupJob::prettyName() const
|
||||
{
|
||||
return tr( "Resize volume group named %1 from %2 to %3." )
|
||||
return tr( "Resize volume group named %1 from %2 to %3", "@title" )
|
||||
.arg( m_device->name() )
|
||||
.arg( currentPartitions() )
|
||||
.arg( targetPartitions() );
|
||||
@ -34,7 +34,8 @@ ResizeVolumeGroupJob::prettyName() const
|
||||
QString
|
||||
ResizeVolumeGroupJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Resize volume group named <strong>%1</strong> from <strong>%2</strong> to <strong>%3</strong>." )
|
||||
return tr( "Resize volume group named <strong>%1</strong> from <strong>%2</strong> to <strong>%3</strong>",
|
||||
"@info" )
|
||||
.arg( m_device->name() )
|
||||
.arg( currentPartitions() )
|
||||
.arg( targetPartitions() );
|
||||
@ -43,7 +44,7 @@ ResizeVolumeGroupJob::prettyDescription() const
|
||||
QString
|
||||
ResizeVolumeGroupJob::prettyStatusMessage() const
|
||||
{
|
||||
return tr( "Resize volume group named %1 from %2 to %3." )
|
||||
return tr( "Resizing volume group named %1 from %2 to %3…", "@status" )
|
||||
.arg( m_device->name() )
|
||||
.arg( currentPartitions() )
|
||||
.arg( targetPartitions() );
|
||||
|
@ -41,17 +41,17 @@ SetPartFlagsJob::prettyName() const
|
||||
{
|
||||
if ( !partition()->partitionPath().isEmpty() )
|
||||
{
|
||||
return tr( "Set flags on partition %1." ).arg( partition()->partitionPath() );
|
||||
return tr( "Set flags on partition %1", "@title" ).arg( partition()->partitionPath() );
|
||||
}
|
||||
|
||||
QString fsNameForUser = userVisibleFS( partition()->fileSystem() );
|
||||
if ( !fsNameForUser.isEmpty() )
|
||||
{
|
||||
return tr( "Set flags on %1MiB %2 partition." )
|
||||
return tr( "Set flags on %1MiB %2 partition", "@title" )
|
||||
.arg( BytesToMiB( partition()->capacity() ) )
|
||||
.arg( fsNameForUser );
|
||||
}
|
||||
return tr( "Set flags on new partition." );
|
||||
return tr( "Set flags on new partition", "@title" );
|
||||
}
|
||||
|
||||
QString
|
||||
@ -62,23 +62,22 @@ SetPartFlagsJob::prettyDescription() const
|
||||
{
|
||||
if ( !partition()->partitionPath().isEmpty() )
|
||||
{
|
||||
return tr( "Clear flags on partition <strong>%1</strong>." ).arg( partition()->partitionPath() );
|
||||
return tr( "Clear flags on partition <strong>%1</strong>", "@info" ).arg( partition()->partitionPath() );
|
||||
}
|
||||
|
||||
QString fsNameForUser = userVisibleFS( partition()->fileSystem() );
|
||||
if ( !fsNameForUser.isEmpty() )
|
||||
{
|
||||
return tr( "Clear flags on %1MiB <strong>%2</strong> partition." )
|
||||
return tr( "Clear flags on %1MiB <strong>%2</strong> partition", "@info" )
|
||||
.arg( BytesToMiB( partition()->capacity() ) )
|
||||
.arg( fsNameForUser );
|
||||
}
|
||||
return tr( "Clear flags on new partition." );
|
||||
return tr( "Clear flags on new partition", "@info" );
|
||||
}
|
||||
|
||||
if ( !partition()->partitionPath().isEmpty() )
|
||||
{
|
||||
return tr( "Flag partition <strong>%1</strong> as "
|
||||
"<strong>%2</strong>." )
|
||||
return tr( "Set flags on partition <strong>%1</strong> to <strong>%2</strong>", "@info" )
|
||||
.arg( partition()->partitionPath() )
|
||||
.arg( flagsList.join( ", " ) );
|
||||
}
|
||||
@ -86,14 +85,13 @@ SetPartFlagsJob::prettyDescription() const
|
||||
QString fsNameForUser = userVisibleFS( partition()->fileSystem() );
|
||||
if ( !fsNameForUser.isEmpty() )
|
||||
{
|
||||
return tr( "Flag %1MiB <strong>%2</strong> partition as "
|
||||
"<strong>%3</strong>." )
|
||||
return tr( "Set flags on %1MiB <strong>%2</strong> partition to <strong>%3</strong>", "@info" )
|
||||
.arg( BytesToMiB( partition()->capacity() ) )
|
||||
.arg( fsNameForUser )
|
||||
.arg( flagsList.join( ", " ) );
|
||||
}
|
||||
|
||||
return tr( "Flag new partition as <strong>%1</strong>." ).arg( flagsList.join( ", " ) );
|
||||
return tr( "Set flags on new partition to <strong>%1</strong>", "@info" ).arg( flagsList.join( ", " ) );
|
||||
}
|
||||
|
||||
QString
|
||||
@ -104,24 +102,24 @@ SetPartFlagsJob::prettyStatusMessage() const
|
||||
{
|
||||
if ( !partition()->partitionPath().isEmpty() )
|
||||
{
|
||||
return tr( "Clearing flags on partition <strong>%1</strong>." ).arg( partition()->partitionPath() );
|
||||
return tr( "Clearing flags on partition <strong>%1</strong>…", "@status" )
|
||||
.arg( partition()->partitionPath() );
|
||||
}
|
||||
|
||||
QString fsNameForUser = userVisibleFS( partition()->fileSystem() );
|
||||
if ( !fsNameForUser.isEmpty() )
|
||||
{
|
||||
return tr( "Clearing flags on %1MiB <strong>%2</strong> partition." )
|
||||
return tr( "Clearing flags on %1MiB <strong>%2</strong> partition…", "@status" )
|
||||
.arg( BytesToMiB( partition()->capacity() ) )
|
||||
.arg( fsNameForUser );
|
||||
}
|
||||
|
||||
return tr( "Clearing flags on new partition." );
|
||||
return tr( "Clearing flags on new partition…", "@status" );
|
||||
}
|
||||
|
||||
if ( !partition()->partitionPath().isEmpty() )
|
||||
{
|
||||
return tr( "Setting flags <strong>%2</strong> on partition "
|
||||
"<strong>%1</strong>." )
|
||||
return tr( "Setting flags <strong>%2</strong> on partition <strong>%1</strong>…", "@status" )
|
||||
.arg( partition()->partitionPath() )
|
||||
.arg( flagsList.join( ", " ) );
|
||||
}
|
||||
@ -129,14 +127,13 @@ SetPartFlagsJob::prettyStatusMessage() const
|
||||
QString fsNameForUser = userVisibleFS( partition()->fileSystem() );
|
||||
if ( !fsNameForUser.isEmpty() )
|
||||
{
|
||||
return tr( "Setting flags <strong>%3</strong> on "
|
||||
"%1MiB <strong>%2</strong> partition." )
|
||||
return tr( "Setting flags <strong>%3</strong> on %1MiB <strong>%2</strong> partition…", "@status" )
|
||||
.arg( BytesToMiB( partition()->capacity() ) )
|
||||
.arg( fsNameForUser )
|
||||
.arg( flagsList.join( ", " ) );
|
||||
}
|
||||
|
||||
return tr( "Setting flags <strong>%1</strong> on new partition." ).arg( flagsList.join( ", " ) );
|
||||
return tr( "Setting flags <strong>%1</strong> on new partition…", "@status" ).arg( flagsList.join( ", " ) );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
@ -30,7 +30,7 @@ PlasmaLnfJob::~PlasmaLnfJob() {}
|
||||
QString
|
||||
PlasmaLnfJob::prettyName() const
|
||||
{
|
||||
return tr( "Plasma Look-and-Feel Job" );
|
||||
return tr( "Applying Plasma Look-and-Feel…", "@status" );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
@ -40,7 +40,7 @@ PlasmaLnfViewStep::~PlasmaLnfViewStep()
|
||||
QString
|
||||
PlasmaLnfViewStep::prettyName() const
|
||||
{
|
||||
return tr( "Look-and-Feel" );
|
||||
return tr( "Look-and-Feel", "@label" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,7 +53,7 @@ PreserveFiles::~PreserveFiles() {}
|
||||
QString
|
||||
PreserveFiles::prettyName() const
|
||||
{
|
||||
return tr( "Saving files for later ..." );
|
||||
return tr( "Saving files for later…", "@status" );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
@ -29,7 +29,7 @@ RemoveUserJob::~RemoveUserJob() {}
|
||||
QString
|
||||
RemoveUserJob::prettyName() const
|
||||
{
|
||||
return tr( "Remove live user from target system" );
|
||||
return tr( "Removing live user from the target system…", "@status" );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
@ -35,7 +35,7 @@ ShellProcessJob::prettyName() const
|
||||
{
|
||||
return m_name->get();
|
||||
}
|
||||
return tr( "Shell Processes Job" );
|
||||
return tr( "Running shell processes…", "@status" );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
@ -9,6 +9,7 @@ calamares_add_plugin(summary
|
||||
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
||||
SOURCES
|
||||
Config.cpp
|
||||
SummaryModel.cpp
|
||||
SummaryPage.cpp
|
||||
SummaryViewStep.cpp
|
||||
UI
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
#include "SummaryModel.h"
|
||||
|
||||
#include "Branding.h"
|
||||
#include "Settings.h"
|
||||
#include "ViewManager.h"
|
||||
@ -18,67 +20,6 @@
|
||||
#include "utils/Retranslator.h"
|
||||
#include "viewpages/ExecutionViewStep.h"
|
||||
|
||||
SummaryModel::SummaryModel( QObject* parent )
|
||||
: QAbstractListModel( parent )
|
||||
{
|
||||
}
|
||||
|
||||
QHash< int, QByteArray >
|
||||
SummaryModel::roleNames() const
|
||||
{
|
||||
// Not including WidgetRole here because that wouldn't make sense
|
||||
// in a QML context which is where the roleNames are important.
|
||||
return { { TitleRole, "title" }, { MessageRole, "message" } };
|
||||
}
|
||||
|
||||
QVariant
|
||||
SummaryModel::data( const QModelIndex& index, int role ) const
|
||||
{
|
||||
if ( !index.isValid() )
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
auto& item = m_summary.at( index.row() );
|
||||
switch ( role )
|
||||
{
|
||||
case TitleRole:
|
||||
return item.title;
|
||||
case MessageRole:
|
||||
return item.message;
|
||||
case WidgetRole:
|
||||
return item.widget ? QVariant::fromValue( item.widget ) : QVariant();
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
SummaryModel::rowCount( const QModelIndex& ) const
|
||||
{
|
||||
return m_summary.count();
|
||||
}
|
||||
|
||||
void
|
||||
SummaryModel::setSummaryList( const Calamares::ViewStepList& steps, bool withWidgets )
|
||||
{
|
||||
beginResetModel();
|
||||
m_summary.clear();
|
||||
|
||||
for ( Calamares::ViewStep* step : steps )
|
||||
{
|
||||
QString text = step->prettyStatus();
|
||||
QWidget* widget = withWidgets ? step->createSummaryWidget() : nullptr;
|
||||
|
||||
if ( text.isEmpty() && !widget )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
m_summary << StepSummary { step->prettyName(), text, widget };
|
||||
}
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
Config::Config( QObject* parent )
|
||||
: QObject( parent )
|
||||
, m_summary( new SummaryModel( this ) )
|
||||
@ -91,7 +32,7 @@ Config::Config( QObject* parent )
|
||||
void
|
||||
Config::retranslate()
|
||||
{
|
||||
m_title = tr( "Summary" );
|
||||
m_title = tr( "Summary", "@label" );
|
||||
|
||||
if ( Calamares::Settings::instance()->isSetupMode() )
|
||||
{
|
||||
|
@ -11,60 +11,10 @@
|
||||
#ifndef SUMMARY_CONFIG_H
|
||||
#define SUMMARY_CONFIG_H
|
||||
|
||||
#include "SummaryModel.h"
|
||||
|
||||
#include "viewpages/ViewStep.h"
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QObject>
|
||||
#include <QQmlParserStatus>
|
||||
|
||||
class Config;
|
||||
|
||||
/** @brief Data for one step
|
||||
*
|
||||
* A step generally has a text description, but **may** have a
|
||||
* QWidget. There is no ownership of the QWidget, that is assumed
|
||||
* to be handed off to some owning parent-widget.
|
||||
*/
|
||||
struct StepSummary
|
||||
{
|
||||
QString title;
|
||||
QString message;
|
||||
QWidget* widget = nullptr;
|
||||
};
|
||||
|
||||
class SummaryModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class Config;
|
||||
|
||||
public:
|
||||
enum Roles : int
|
||||
{
|
||||
TitleRole = Qt::DisplayRole, // Name of the step
|
||||
MessageRole = Qt::UserRole, // String saying what it will do
|
||||
WidgetRole, // Pointer to widget
|
||||
};
|
||||
|
||||
explicit SummaryModel( QObject* parent = nullptr );
|
||||
int rowCount( const QModelIndex& = QModelIndex() ) const override;
|
||||
QVariant data( const QModelIndex& index, int role ) const override;
|
||||
|
||||
protected:
|
||||
QHash< int, QByteArray > roleNames() const override;
|
||||
|
||||
private:
|
||||
/** @brief Sets the model data from @p steps
|
||||
*
|
||||
* Replaces the list of summaries with summaries given by
|
||||
* the jobs and ViewSteps objects in @p steps. If @p withWidgets
|
||||
* is @c true, then also queries for widget summaries alongside
|
||||
* the text summaries for each step.
|
||||
*/
|
||||
void setSummaryList( const Calamares::ViewStepList& steps, bool withWidgets = false );
|
||||
|
||||
QVector< StepSummary > m_summary;
|
||||
};
|
||||
|
||||
class Config : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
74
src/modules/summary/SummaryModel.cpp
Normal file
74
src/modules/summary/SummaryModel.cpp
Normal file
@ -0,0 +1,74 @@
|
||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2020, Camilo Higuita <milo.h@aol.com>
|
||||
* SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "SummaryModel.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
SummaryModel::SummaryModel( QObject* parent )
|
||||
: QAbstractListModel( parent )
|
||||
{
|
||||
}
|
||||
|
||||
QHash< int, QByteArray >
|
||||
SummaryModel::roleNames() const
|
||||
{
|
||||
// Not including WidgetRole here because that wouldn't make sense
|
||||
// in a QML context which is where the roleNames are important.
|
||||
return { { TitleRole, "title" }, { MessageRole, "message" } };
|
||||
}
|
||||
|
||||
QVariant
|
||||
SummaryModel::data( const QModelIndex& index, int role ) const
|
||||
{
|
||||
if ( !index.isValid() )
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
auto& item = m_summary.at( index.row() );
|
||||
switch ( role )
|
||||
{
|
||||
case TitleRole:
|
||||
return item.title;
|
||||
case MessageRole:
|
||||
return item.message;
|
||||
case WidgetRole:
|
||||
return item.widget ? QVariant::fromValue( item.widget ) : QVariant();
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
SummaryModel::rowCount( const QModelIndex& ) const
|
||||
{
|
||||
return m_summary.count();
|
||||
}
|
||||
|
||||
void
|
||||
SummaryModel::setSummaryList( const Calamares::ViewStepList& steps, bool withWidgets )
|
||||
{
|
||||
beginResetModel();
|
||||
m_summary.clear();
|
||||
|
||||
for ( Calamares::ViewStep* step : steps )
|
||||
{
|
||||
QString text = step->prettyStatus();
|
||||
QWidget* widget = withWidgets ? step->createSummaryWidget() : nullptr;
|
||||
|
||||
if ( text.isEmpty() && !widget )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
m_summary << StepSummary { step->prettyName(), text, widget };
|
||||
}
|
||||
endResetModel();
|
||||
}
|
67
src/modules/summary/SummaryModel.h
Normal file
67
src/modules/summary/SummaryModel.h
Normal file
@ -0,0 +1,67 @@
|
||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2019-2020, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2020, Camilo Higuita <milo.h@aol.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SUMMARY_SUMMARYMODEL_H
|
||||
#define SUMMARY_SUMMARYMODEL_H
|
||||
|
||||
#include "viewpages/ViewStep.h"
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QObject>
|
||||
|
||||
class Config;
|
||||
|
||||
/** @brief Data for one step
|
||||
*
|
||||
* A step generally has a text description, but **may** have a
|
||||
* QWidget. There is no ownership of the QWidget, that is assumed
|
||||
* to be handed off to some owning parent-widget.
|
||||
*/
|
||||
struct StepSummary
|
||||
{
|
||||
QString title;
|
||||
QString message;
|
||||
QWidget* widget = nullptr;
|
||||
};
|
||||
|
||||
class SummaryModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class Config;
|
||||
|
||||
public:
|
||||
enum Roles : int
|
||||
{
|
||||
TitleRole = Qt::DisplayRole, // Name of the step
|
||||
MessageRole = Qt::UserRole, // String saying what it will do
|
||||
WidgetRole, // Pointer to widget
|
||||
};
|
||||
|
||||
explicit SummaryModel( QObject* parent = nullptr );
|
||||
int rowCount( const QModelIndex& = QModelIndex() ) const override;
|
||||
QVariant data( const QModelIndex& index, int role ) const override;
|
||||
|
||||
protected:
|
||||
QHash< int, QByteArray > roleNames() const override;
|
||||
|
||||
private:
|
||||
/** @brief Sets the model data from @p steps
|
||||
*
|
||||
* Replaces the list of summaries with summaries given by
|
||||
* the jobs and ViewSteps objects in @p steps. If @p withWidgets
|
||||
* is @c true, then also queries for widget summaries alongside
|
||||
* the text summaries for each step.
|
||||
*/
|
||||
void setSummaryList( const Calamares::ViewStepList& steps, bool withWidgets = false );
|
||||
|
||||
QVector< StepSummary > m_summary;
|
||||
};
|
||||
|
||||
#endif
|
@ -17,6 +17,7 @@ calamares_add_plugin(summaryq
|
||||
SOURCES
|
||||
SummaryQmlViewStep.cpp
|
||||
${_summary}/Config.cpp
|
||||
${_summary}/SummaryModel.cpp
|
||||
UI
|
||||
RESOURCES
|
||||
summaryq${QT_VERSION_SUFFIX}.qrc
|
||||
|
@ -103,7 +103,7 @@ TrackingInstallJob::prettyName() const
|
||||
QString
|
||||
TrackingInstallJob::prettyStatusMessage() const
|
||||
{
|
||||
return QCoreApplication::translate( "TrackingInstallJob", "Sending installation feedback." );
|
||||
return QCoreApplication::translate( "TrackingInstallJob", "Sending installation feedback…", "@status" );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
@ -138,7 +138,7 @@ TrackingMachineUpdateManagerJob::prettyName() const
|
||||
QString
|
||||
TrackingMachineUpdateManagerJob::prettyStatusMessage() const
|
||||
{
|
||||
return QCoreApplication::translate( "TrackingMachineUpdateManagerJob", "Configuring machine feedback." );
|
||||
return QCoreApplication::translate( "TrackingMachineUpdateManagerJob", "Configuring machine feedback…", "@status" );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
@ -195,7 +195,7 @@ TrackingKUserFeedbackJob::prettyName() const
|
||||
QString
|
||||
TrackingKUserFeedbackJob::prettyStatusMessage() const
|
||||
{
|
||||
return QCoreApplication::translate( "TrackingKUserFeedbackJob", "Configuring KDE user feedback." );
|
||||
return QCoreApplication::translate( "TrackingKUserFeedbackJob", "Configuring KDE user feedback…", "@status" );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
@ -46,7 +46,7 @@ TrackingViewStep::~TrackingViewStep()
|
||||
QString
|
||||
TrackingViewStep::prettyName() const
|
||||
{
|
||||
return tr( "Feedback" );
|
||||
return tr( "Feedback", "@title" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@ UmountJob::~UmountJob() {}
|
||||
QString
|
||||
UmountJob::prettyName() const
|
||||
{
|
||||
return tr( "Unmount file systems." );
|
||||
return tr( "Unmounting file systems…", "@status" );
|
||||
}
|
||||
|
||||
static Calamares::JobResult
|
||||
|
@ -36,13 +36,13 @@ CreateUserJob::prettyName() const
|
||||
QString
|
||||
CreateUserJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Create user <strong>%1</strong>." ).arg( m_config->loginName() );
|
||||
return tr( "Create user <strong>%1</strong>" ).arg( m_config->loginName() );
|
||||
}
|
||||
|
||||
QString
|
||||
CreateUserJob::prettyStatusMessage() const
|
||||
{
|
||||
return m_status.isEmpty() ? tr( "Creating user %1" ).arg( m_config->loginName() ) : m_status;
|
||||
return m_status.isEmpty() ? tr( "Creating user %1…", "@status" ).arg( m_config->loginName() ) : m_status;
|
||||
}
|
||||
|
||||
static Calamares::JobResult
|
||||
@ -117,7 +117,7 @@ CreateUserJob::exec()
|
||||
// This GS setting comes from the **partitioning** module.
|
||||
if ( reuseHome )
|
||||
{
|
||||
m_status = tr( "Preserving home directory" );
|
||||
m_status = tr( "Preserving home directory…", "@status" );
|
||||
emit progress( 0.2 );
|
||||
QString shellFriendlyHome = "/home/" + m_config->loginName();
|
||||
QDir existingHome( destDir.absolutePath() + shellFriendlyHome );
|
||||
@ -134,7 +134,7 @@ CreateUserJob::exec()
|
||||
|
||||
cDebug() << "[CREATEUSER]: creating user";
|
||||
|
||||
m_status = tr( "Creating user %1" ).arg( m_config->loginName() );
|
||||
m_status = tr( "Creating user %1…", "@status" ).arg( m_config->loginName() );
|
||||
emit progress( 0.5 );
|
||||
auto useraddResult = createUser( m_config->loginName(), m_config->fullName(), m_config->userShell() );
|
||||
if ( !useraddResult )
|
||||
@ -142,7 +142,7 @@ CreateUserJob::exec()
|
||||
return useraddResult;
|
||||
}
|
||||
|
||||
m_status = tr( "Configuring user %1" ).arg( m_config->loginName() );
|
||||
m_status = tr( "Configuring user %1", "@status" ).arg( m_config->loginName() );
|
||||
emit progress( 0.8 );
|
||||
auto usergroupsResult = setUserGroups( m_config->loginName(), m_config->groupsForThisUser() );
|
||||
if ( !usergroupsResult )
|
||||
@ -150,7 +150,7 @@ CreateUserJob::exec()
|
||||
return usergroupsResult;
|
||||
}
|
||||
|
||||
m_status = tr( "Setting file permissions" );
|
||||
m_status = tr( "Setting file permissions…", "@status" );
|
||||
emit progress( 0.9 );
|
||||
QString userGroup = QString( "%1:%2" ).arg( m_config->loginName() ).arg( m_config->loginName() );
|
||||
QString homeDir = QString( "/home/%1" ).arg( m_config->loginName() );
|
||||
|
@ -31,7 +31,7 @@ SetupSudoJob::SetupSudoJob( const QString& group, Config::SudoStyle style )
|
||||
QString
|
||||
SetupSudoJob::prettyName() const
|
||||
{
|
||||
return tr( "Configure <pre>sudo</pre> users." );
|
||||
return tr( "Configuring <pre>sudo</pre> users…", "@status" );
|
||||
}
|
||||
|
||||
static QString
|
||||
@ -178,7 +178,7 @@ SetupGroupsJob::SetupGroupsJob( const Config* config )
|
||||
QString
|
||||
SetupGroupsJob::prettyName() const
|
||||
{
|
||||
return tr( "Preparing groups." );
|
||||
return tr( "Preparing groups…", "@status" );
|
||||
}
|
||||
|
||||
Calamares::JobResult
|
||||
|
@ -45,7 +45,7 @@ SetHostNameJob::prettyDescription() const
|
||||
QString
|
||||
SetHostNameJob::prettyStatusMessage() const
|
||||
{
|
||||
return tr( "Setting hostname %1." ).arg( m_config->hostname() );
|
||||
return tr( "Setting hostname %1…", "@status" ).arg( m_config->hostname() );
|
||||
}
|
||||
|
||||
STATICTEST bool
|
||||
|
@ -41,7 +41,7 @@ SetPasswordJob::prettyName() const
|
||||
QString
|
||||
SetPasswordJob::prettyStatusMessage() const
|
||||
{
|
||||
return tr( "Setting password for user %1." ).arg( m_userName );
|
||||
return tr( "Setting password for user %1…", "@status" ).arg( m_userName );
|
||||
}
|
||||
|
||||
#ifndef HAVE_CRYPT_GENSALT
|
||||
|
@ -59,7 +59,7 @@ Kirigami.ScrollablePage {
|
||||
id: _userNameField
|
||||
width: parent.width
|
||||
enabled: config.isEditable("fullName")
|
||||
placeholderText: qsTr("Your Full Name")
|
||||
placeholderText: qsTr("Your full name")
|
||||
text: config.fullName
|
||||
onTextChanged: config.setFullName(text)
|
||||
|
||||
@ -83,7 +83,7 @@ Kirigami.ScrollablePage {
|
||||
id: _userLoginField
|
||||
width: parent.width
|
||||
enabled: config.isEditable("loginName")
|
||||
placeholderText: qsTr("Login Name")
|
||||
placeholderText: qsTr("Login name")
|
||||
text: config.loginName
|
||||
validator: RegularExpressionValidator { regularExpression: /[a-z_][a-z0-9_-]*[$]?$/ }
|
||||
|
||||
@ -149,7 +149,7 @@ Kirigami.ScrollablePage {
|
||||
TextField {
|
||||
id: _hostName
|
||||
width: parent.width
|
||||
placeholderText: qsTr("Computer Name")
|
||||
placeholderText: qsTr("Computer name")
|
||||
text: config.hostname
|
||||
validator: RegularExpressionValidator { regularExpression: /[a-zA-Z0-9][-a-zA-Z0-9_]+/ }
|
||||
|
||||
@ -234,7 +234,7 @@ Kirigami.ScrollablePage {
|
||||
TextField {
|
||||
id: _verificationPasswordField
|
||||
width: parent.width / 2 - 10
|
||||
placeholderText: qsTr("Repeat Password")
|
||||
placeholderText: qsTr("Repeat password")
|
||||
text: config.userPasswordSecondary
|
||||
|
||||
onTextChanged: _passwordField.text === _verificationPasswordField.text
|
||||
@ -324,7 +324,7 @@ Kirigami.ScrollablePage {
|
||||
TextField {
|
||||
id: _rootPasswordField
|
||||
width: parent.width / 2 -10
|
||||
placeholderText: qsTr("Root Password")
|
||||
placeholderText: qsTr("Root password")
|
||||
text: config.rootPassword
|
||||
|
||||
onTextChanged: config.setRootPassword(text)
|
||||
@ -342,7 +342,7 @@ Kirigami.ScrollablePage {
|
||||
TextField {
|
||||
id: _verificationRootPasswordField
|
||||
width: parent.width / 2 -10
|
||||
placeholderText: qsTr("Repeat Root Password")
|
||||
placeholderText: qsTr("Repeat root password")
|
||||
text: config.rootPasswordSecondary
|
||||
|
||||
onTextChanged: _rootPasswordField.text === _verificationRootPasswordField.text
|
||||
|
@ -60,7 +60,7 @@ Kirigami.ScrollablePage {
|
||||
id: _userNameField
|
||||
width: parent.width
|
||||
enabled: config.isEditable("fullName")
|
||||
placeholderText: qsTr("Your Full Name")
|
||||
placeholderText: qsTr("Your full name")
|
||||
text: config.fullName
|
||||
onTextChanged: config.setFullName(text)
|
||||
|
||||
@ -84,7 +84,7 @@ Kirigami.ScrollablePage {
|
||||
id: _userLoginField
|
||||
width: parent.width
|
||||
enabled: config.isEditable("loginName")
|
||||
placeholderText: qsTr("Login Name")
|
||||
placeholderText: qsTr("Login name")
|
||||
text: config.loginName
|
||||
validator: RegularExpressionValidator { regularExpression: /[a-z_][a-z0-9_-]*[$]?$/ }
|
||||
|
||||
@ -150,7 +150,7 @@ Kirigami.ScrollablePage {
|
||||
TextField {
|
||||
id: _hostName
|
||||
width: parent.width
|
||||
placeholderText: qsTr("Computer Name")
|
||||
placeholderText: qsTr("Computer name")
|
||||
text: config.hostname
|
||||
validator: RegularExpressionValidator { regularExpression: /[a-zA-Z0-9][-a-zA-Z0-9_]+/ }
|
||||
|
||||
@ -235,7 +235,7 @@ Kirigami.ScrollablePage {
|
||||
TextField {
|
||||
id: _verificationPasswordField
|
||||
width: parent.width / 2 - 10
|
||||
placeholderText: qsTr("Repeat Password")
|
||||
placeholderText: qsTr("Repeat password")
|
||||
text: config.userPasswordSecondary
|
||||
|
||||
onTextChanged: _passwordField.text === _verificationPasswordField.text
|
||||
@ -325,7 +325,7 @@ Kirigami.ScrollablePage {
|
||||
TextField {
|
||||
id: _rootPasswordField
|
||||
width: parent.width / 2 -10
|
||||
placeholderText: qsTr("Root Password")
|
||||
placeholderText: qsTr("Root password")
|
||||
text: config.rootPassword
|
||||
|
||||
onTextChanged: config.setRootPassword(text)
|
||||
@ -343,7 +343,7 @@ Kirigami.ScrollablePage {
|
||||
TextField {
|
||||
id: _verificationRootPasswordField
|
||||
width: parent.width / 2 -10
|
||||
placeholderText: qsTr("Repeat Root Password")
|
||||
placeholderText: qsTr("Repeat root password")
|
||||
text: config.rootPasswordSecondary
|
||||
|
||||
onTextChanged: _rootPasswordField.text === _verificationRootPasswordField.text
|
||||
|
@ -209,7 +209,7 @@ WelcomePage::retranslate()
|
||||
|
||||
ui->mainText->setText( message.arg( Calamares::Branding::instance()->versionedName() ) );
|
||||
ui->retranslateUi( this );
|
||||
ui->supportButton->setText( tr( "%1 support" ).arg( Calamares::Branding::instance()->shortProductName() ) );
|
||||
ui->supportButton->setText( tr( "%1 Support", "@action" ).arg( Calamares::Branding::instance()->shortProductName() ) );
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -43,7 +43,7 @@ WelcomeViewStep::~WelcomeViewStep()
|
||||
QString
|
||||
WelcomeViewStep::prettyName() const
|
||||
{
|
||||
return tr( "Welcome" );
|
||||
return tr( "Welcome", "@title" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@ WelcomeQmlViewStep::WelcomeQmlViewStep( QObject* parent )
|
||||
QString
|
||||
WelcomeQmlViewStep::prettyName() const
|
||||
{
|
||||
return tr( "Welcome" );
|
||||
return tr( "Welcome", "@title" );
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -77,7 +77,7 @@ Page
|
||||
|
||||
Button {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Known issues")
|
||||
text: qsTr("Known Issues")
|
||||
icon.name: "tools-report-bug"
|
||||
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
|
||||
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
||||
@ -88,7 +88,7 @@ Page
|
||||
|
||||
Button {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Release notes")
|
||||
text: qsTr("Release Notes")
|
||||
icon.name: "folder-text"
|
||||
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
|
||||
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
||||
|
@ -77,7 +77,7 @@ Page
|
||||
|
||||
Button {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Known issues")
|
||||
text: qsTr("Known Issues")
|
||||
icon.name: "tools-report-bug"
|
||||
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
|
||||
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
||||
@ -88,7 +88,7 @@ Page
|
||||
|
||||
Button {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Release notes")
|
||||
text: qsTr("Release Notes")
|
||||
icon.name: "folder-text"
|
||||
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
|
||||
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
||||
|
@ -99,7 +99,7 @@ ZfsJob::~ZfsJob() {}
|
||||
QString
|
||||
ZfsJob::prettyName() const
|
||||
{
|
||||
return tr( "Create ZFS pools and datasets" );
|
||||
return tr( "Creating ZFS pools and datasets…", "@status" );
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user