Compare commits
29 Commits
packagecho
...
packages-c
| Author | SHA1 | Date | |
|---|---|---|---|
| 7aced05e8c | |||
|
|
f8245ebb6e | ||
|
|
1b655c26ef | ||
|
|
5583c15291 | ||
|
|
437a30fdcf | ||
| 78eeb963a3 | |||
|
|
db4730107d | ||
|
|
58117de3e3 | ||
|
|
d38a48e900 | ||
|
|
2798dee036 | ||
|
|
76a0b00550 | ||
|
|
062171a2f0 | ||
|
|
94bc244965 | ||
|
|
8a199aaaf9 | ||
|
|
02aa49d442 | ||
|
|
f847f90842 | ||
|
|
fa2b96e9cc | ||
|
|
7971bff2da | ||
|
|
6cbed0f458 | ||
|
|
e326758900 | ||
|
|
ee09fd6613 | ||
|
|
a48a16646b | ||
|
|
1401f4ff21 | ||
|
|
6ef7d23168 | ||
|
|
3be99a9ac7 | ||
|
|
040f424931 | ||
|
|
93ce2daff0 | ||
|
|
0ac170c3de | ||
|
|
7da1b1eb32 |
2
.github/workflows/nightly-debian.yml
vendored
2
.github/workflows/nightly-debian.yml
vendored
@@ -11,6 +11,8 @@ env:
|
|||||||
CMAKE_ARGS: |
|
CMAKE_ARGS: |
|
||||||
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||||
-DCMAKE_BUILD_TYPE=Debug
|
-DCMAKE_BUILD_TYPE=Debug
|
||||||
|
-DBUILD_APPSTREAM=ON
|
||||||
|
-DBUILD_APPDATA=ON
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
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
|
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||||
-DCMAKE_BUILD_TYPE=Debug
|
-DCMAKE_BUILD_TYPE=Debug
|
||||||
-DWITH_QT6=ON
|
-DWITH_QT6=ON
|
||||||
|
-DBUILD_APPSTREAM=ON
|
||||||
|
-DBUILD_APPDATA=ON
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
2
.github/workflows/nightly-opensuse.yml
vendored
2
.github/workflows/nightly-opensuse.yml
vendored
@@ -13,6 +13,8 @@ env:
|
|||||||
-DCMAKE_BUILD_TYPE=Debug
|
-DCMAKE_BUILD_TYPE=Debug
|
||||||
-DBUILD_SCHEMA_TESTING=ON
|
-DBUILD_SCHEMA_TESTING=ON
|
||||||
-DBUILD_TESTING=ON
|
-DBUILD_TESTING=ON
|
||||||
|
-DBUILD_APPSTREAM=ON
|
||||||
|
-DBUILD_APPDATA=ON
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
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
|
||||||
23
CHANGES-3.3
23
CHANGES-3.3
@@ -10,14 +10,31 @@ the history of the 3.2 series (2018-05 - 2022-08).
|
|||||||
|
|
||||||
# 3.3.1 (unreleased)
|
# 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):
|
This release contains contributions from (alphabetically by first name):
|
||||||
- Nobody yet!
|
- Adriaan de Groot
|
||||||
|
- Aleksey Samoilov
|
||||||
|
- Emir Sari
|
||||||
|
- Simon Quigley
|
||||||
|
|
||||||
## Core ##
|
## Core ##
|
||||||
- No changes of note.
|
- 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 ##
|
## Modules ##
|
||||||
- No changes of note.
|
- The *displaymanager* module configuration for `greetd` has some more
|
||||||
|
options now. (thanks Aleksey)
|
||||||
|
|
||||||
|
|
||||||
# 3.3.0 (2023-12-12)
|
# 3.3.0 (2023-12-12)
|
||||||
|
|||||||
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(
|
# calamares_add_plugin(
|
||||||
# module-name
|
# module-name
|
||||||
# TYPE <view|job>
|
# TYPE <viewmodule|job>
|
||||||
# EXPORT_MACRO macro-name
|
# EXPORT_MACRO macro-name
|
||||||
# SOURCES source-file...
|
# SOURCES source-file...
|
||||||
# UI ui-file...
|
# UI ui-file...
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
# [WEIGHT w]
|
# [WEIGHT w]
|
||||||
# )
|
# )
|
||||||
#
|
#
|
||||||
# Function parameters:
|
# Function optional parameters:
|
||||||
# - COMPILE_DEFINITIONS
|
# - COMPILE_DEFINITIONS
|
||||||
# Definitions are set on the resulting module with a suitable
|
# Definitions are set on the resulting module with a suitable
|
||||||
# flag (i.e. `-D`) so only state the name (optionally, also the value)
|
# 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
|
# SKIPPED_MODULES is set in the parent (i.e. caller's) scope with the
|
||||||
# reason why. This should rarely be a concern as AddModuleSubdirectory
|
# reason why. This should rarely be a concern as AddModuleSubdirectory
|
||||||
# already handles skip-reasons and collects them for reporting.
|
# 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 )
|
include( CMakeParseArguments )
|
||||||
|
|
||||||
@@ -126,7 +129,7 @@ function( calamares_add_plugin )
|
|||||||
set( target "calamares_${PLUGIN_TYPE}_${PLUGIN_NAME}" )
|
set( target "calamares_${PLUGIN_TYPE}_${PLUGIN_NAME}" )
|
||||||
|
|
||||||
# automatic library linkage
|
# 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)
|
list(APPEND PLUGIN_LINK_PRIVATE_LIBRARIES Calamares::calamaresui)
|
||||||
elseif(PLUGIN_TYPE STREQUAL "job")
|
elseif(PLUGIN_TYPE STREQUAL "job")
|
||||||
list(APPEND PLUGIN_LINK_PRIVATE_LIBRARIES Calamares::calamares)
|
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.
|
# 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
|
# The Gettext module is still old-fashioned, ALLCAPS variables
|
||||||
find_package( Gettext )
|
find_package( Gettext )
|
||||||
|
|||||||
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.
|
# those are done separately.
|
||||||
_srcdirs="src/calamares src/libcalamares src/libcalamaresui src/modules src/qml"
|
_srcdirs="src/calamares src/libcalamares src/libcalamaresui src/modules src/qml"
|
||||||
$LUPDATE -no-obsolete $_srcdirs -ts lang/calamares_en.ts
|
$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
|
# Non-Transifex special-cases
|
||||||
#
|
#
|
||||||
# - timezone names can be translated, but that's 700+ strings I don't want
|
# - 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 ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@@ -22,15 +22,15 @@ msgstr ""
|
|||||||
msgid "Install bootloader."
|
msgid "Install bootloader."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/modules/bootloader/main.py:644
|
#: src/modules/bootloader/main.py:666
|
||||||
msgid "Failed to install grub, no partitions defined in global storage"
|
msgid "Failed to install grub, no partitions defined in global storage"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/modules/bootloader/main.py:899
|
#: src/modules/bootloader/main.py:926
|
||||||
msgid "Bootloader installation error"
|
msgid "Bootloader installation error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/modules/bootloader/main.py:900
|
#: src/modules/bootloader/main.py:927
|
||||||
msgid ""
|
msgid ""
|
||||||
"The bootloader could not be installed. The installation command <pre>{!s}</"
|
"The bootloader could not be installed. The installation command <pre>{!s}</"
|
||||||
"pre> returned error code {!s}."
|
"pre> returned error code {!s}."
|
||||||
@@ -99,8 +99,8 @@ msgstr ""
|
|||||||
msgid "Dummy python job."
|
msgid "Dummy python job."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/modules/dummypython/main.py:37 src/modules/dummypython/main.py:93
|
#: src/modules/dummypython/main.py:37 src/modules/dummypython/main.py:104
|
||||||
#: src/modules/dummypython/main.py:94
|
#: src/modules/dummypython/main.py:105
|
||||||
msgid "Dummy python step {}"
|
msgid "Dummy python step {}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -112,20 +112,20 @@ msgstr ""
|
|||||||
#: src/modules/fstab/main.py:411 src/modules/initcpiocfg/main.py:256
|
#: 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/initcpiocfg/main.py:260 src/modules/initramfscfg/main.py:85
|
||||||
#: src/modules/initramfscfg/main.py:89 src/modules/localecfg/main.py:140
|
#: 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:72
|
||||||
#: src/modules/openrcdmcryptcfg/main.py:76 src/modules/rawfs/main.py:164
|
#: src/modules/openrcdmcryptcfg/main.py:76 src/modules/rawfs/main.py:164
|
||||||
msgid "Configuration Error"
|
msgid "Configuration Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/modules/fstab/main.py:378 src/modules/initramfscfg/main.py:86
|
#: 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
|
#: src/modules/rawfs/main.py:165
|
||||||
msgid "No partitions are defined for <pre>{!s}</pre> to use."
|
msgid "No partitions are defined for <pre>{!s}</pre> to use."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/modules/fstab/main.py:384 src/modules/initramfscfg/main.py:90
|
#: 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
|
#: src/modules/openrcdmcryptcfg/main.py:77
|
||||||
msgid "No root mount point is given for <pre>{!s}</pre> to use."
|
msgid "No root mount point is given for <pre>{!s}</pre> to use."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -134,7 +134,7 @@ msgstr ""
|
|||||||
msgid "No <pre>{!s}</pre> configuration is given for <pre>{!s}</pre> to use."
|
msgid "No <pre>{!s}</pre> configuration is given for <pre>{!s}</pre> to use."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/modules/grubcfg/main.py:29
|
#: src/modules/grubcfg/main.py:30
|
||||||
msgid "Configure GRUB."
|
msgid "Configure GRUB."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -194,11 +194,11 @@ msgstr ""
|
|||||||
msgid "Failed to set zfs mountpoint"
|
msgid "Failed to set zfs mountpoint"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/modules/mount/main.py:365
|
#: src/modules/mount/main.py:370
|
||||||
msgid "zfs mounting error"
|
msgid "zfs mounting error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/modules/networkcfg/main.py:29
|
#: src/modules/networkcfg/main.py:30
|
||||||
msgid "Saving network configuration."
|
msgid "Saving network configuration."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ install(
|
|||||||
DESTINATION include/libcalamares
|
DESTINATION include/libcalamares
|
||||||
)
|
)
|
||||||
# Install each subdir-worth of header files
|
# 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")
|
file(GLOB subdir_headers "${subdir}/*.h")
|
||||||
install(FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir})
|
install(FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|||||||
@@ -128,6 +128,14 @@ Calamares::Utils::Runner::run()
|
|||||||
{
|
{
|
||||||
auto env = QProcessEnvironment::systemEnvironment();
|
auto env = QProcessEnvironment::systemEnvironment();
|
||||||
env.insert( "LC_ALL", "C" );
|
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.setProcessEnvironment( env );
|
||||||
}
|
}
|
||||||
process.setProcessChannelMode( QProcess::MergedChannels );
|
process.setProcessChannelMode( QProcess::MergedChannels );
|
||||||
|
|||||||
@@ -65,11 +65,14 @@ sysconfigSetup: false
|
|||||||
# greetd has configurable user and group; the user and group is created if it
|
# 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.
|
# 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
|
# 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).
|
# they are installed (if not, picks the alphabetically first greeter that is installed).
|
||||||
#
|
#
|
||||||
greetd:
|
greetd:
|
||||||
greeter_user: "tom_bombadil"
|
greeter_user: "tom_bombadil"
|
||||||
greeter_group: "wheel"
|
greeter_group: "wheel"
|
||||||
|
greeter_css_location: "/etc/greetd/style.css"
|
||||||
lightdm:
|
lightdm:
|
||||||
preferred_greeters: ["lightdm-greeter.desktop", "slick-greeter.desktop"]
|
preferred_greeters: ["lightdm-greeter.desktop", "slick-greeter.desktop"]
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ properties:
|
|||||||
properties:
|
properties:
|
||||||
greeter_user: { type: string }
|
greeter_user: { type: string }
|
||||||
greeter_group: { type: string }
|
greeter_group: { type: string }
|
||||||
|
greeter_css_location: { type: string }
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
lightdm:
|
lightdm:
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
@@ -779,6 +779,7 @@ class DMgreetd(DisplayManager):
|
|||||||
executable = "greetd"
|
executable = "greetd"
|
||||||
greeter_user = "greeter"
|
greeter_user = "greeter"
|
||||||
greeter_group = "greetd"
|
greeter_group = "greetd"
|
||||||
|
greeter_css_location = None
|
||||||
config_data = {}
|
config_data = {}
|
||||||
|
|
||||||
def os_path(self, path):
|
def os_path(self, path):
|
||||||
@@ -846,6 +847,8 @@ class DMgreetd(DisplayManager):
|
|||||||
de_command = default_desktop_environment.executable
|
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")):
|
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"
|
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")):
|
elif os.path.exists(self.os_path("usr/bin/tuigreet")):
|
||||||
tuigreet_base_cmd = "tuigreet --remember --time --issue --asterisks --cmd "
|
tuigreet_base_cmd = "tuigreet --remember --time --issue --asterisks --cmd "
|
||||||
self.config_data['default_session']['command'] = tuigreet_base_cmd + de_command
|
self.config_data['default_session']['command'] = tuigreet_base_cmd + de_command
|
||||||
|
|||||||
@@ -407,15 +407,13 @@ localeLabel( const QString& s )
|
|||||||
QString
|
QString
|
||||||
Config::currentLanguageStatus() const
|
Config::currentLanguageStatus() const
|
||||||
{
|
{
|
||||||
return tr( "The system language will be set to %1", "@info" )
|
return tr( "The system language will be set to %1.", "@info" ).arg( localeLabel( m_selectedLocaleConfiguration.language() ) );
|
||||||
.arg( localeLabel( m_selectedLocaleConfiguration.language() ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
Config::currentLCStatus() const
|
Config::currentLCStatus() const
|
||||||
{
|
{
|
||||||
return tr( "The numbers and dates locale will be set to %1", "@info" )
|
return tr( "The numbers and dates locale will be set to %1.", "@info" ).arg( localeLabel( m_selectedLocaleConfiguration.lc_numeric ) );
|
||||||
.arg( localeLabel( m_selectedLocaleConfiguration.lc_numeric ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
|
||||||
const NamedEnumTable< MachineId::SystemdMachineIdStyle >&
|
const NamedEnumTable< SystemdMachineIdStyle >&
|
||||||
styleNames()
|
styleNames()
|
||||||
{
|
{
|
||||||
using T = MachineId::SystemdMachineIdStyle;
|
using T = SystemdMachineIdStyle;
|
||||||
// *INDENT-OFF*
|
// *INDENT-OFF*
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const NamedEnumTable< MachineId::SystemdMachineIdStyle > names {
|
static const NamedEnumTable< SystemdMachineIdStyle > names {
|
||||||
{ QStringLiteral( "none" ), T::Blank },
|
{ QStringLiteral( "none" ), T::Blank },
|
||||||
{ QStringLiteral( "blank" ), T::Blank },
|
{ QStringLiteral( "blank" ), T::Blank },
|
||||||
{ QStringLiteral( "uuid" ), T::Uuid },
|
{ QStringLiteral( "uuid" ), T::Uuid },
|
||||||
@@ -101,8 +101,8 @@ MachineIdJob::exec()
|
|||||||
QObject::tr( "Directory not found" ),
|
QObject::tr( "Directory not found" ),
|
||||||
QObject::tr( "Could not create new random file <pre>%1</pre>." ).arg( entropy_file ) );
|
QObject::tr( "Could not create new random file <pre>%1</pre>." ).arg( entropy_file ) );
|
||||||
}
|
}
|
||||||
auto r = MachineId::createEntropy( m_entropy_copy ? MachineId::EntropyGeneration::CopyFromHost
|
auto r = createEntropy( m_entropy_copy ? EntropyGeneration::CopyFromHost
|
||||||
: MachineId::EntropyGeneration::New,
|
: EntropyGeneration::New,
|
||||||
root,
|
root,
|
||||||
entropy_file );
|
entropy_file );
|
||||||
if ( !r )
|
if ( !r )
|
||||||
@@ -116,7 +116,7 @@ MachineIdJob::exec()
|
|||||||
{
|
{
|
||||||
cWarning() << "Could not create systemd data-directory.";
|
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 )
|
if ( !r )
|
||||||
{
|
{
|
||||||
return r;
|
return r;
|
||||||
@@ -130,7 +130,7 @@ MachineIdJob::exec()
|
|||||||
}
|
}
|
||||||
if ( m_dbus_symlink && QFile::exists( root + target_systemd_machineid_file ) )
|
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 )
|
if ( !r )
|
||||||
{
|
{
|
||||||
return r;
|
return r;
|
||||||
@@ -138,7 +138,7 @@ MachineIdJob::exec()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto r = MachineId::createDBusMachineId( root, target_dbus_machineid_file );
|
auto r = createDBusMachineId( root, target_dbus_machineid_file );
|
||||||
if ( !r )
|
if ( !r )
|
||||||
{
|
{
|
||||||
return r;
|
return r;
|
||||||
@@ -157,7 +157,7 @@ MachineIdJob::setConfigurationMap( const QVariantMap& map )
|
|||||||
const auto style = Calamares::getString( map, "systemd-style", QString() );
|
const auto style = Calamares::getString( map, "systemd-style", QString() );
|
||||||
if ( !style.isEmpty() )
|
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 );
|
m_dbus = Calamares::getBool( map, "dbus", false );
|
||||||
@@ -179,7 +179,7 @@ MachineIdJob::setConfigurationMap( const QVariantMap& map )
|
|||||||
m_entropy_files = Calamares::getStringList( map, "entropy-files" );
|
m_entropy_files = Calamares::getStringList( map, "entropy-files" );
|
||||||
if ( Calamares::getBool( map, "entropy", false ) )
|
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.append( QStringLiteral( "/var/lib/urandom/random-seed" ) );
|
||||||
}
|
}
|
||||||
m_entropy_files.removeDuplicates();
|
m_entropy_files.removeDuplicates();
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool m_systemd = false; ///< write systemd's files
|
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 = false; ///< write dbus files
|
||||||
bool m_dbus_symlink = false; ///< .. or just symlink to systemd
|
bool m_dbus_symlink = false; ///< .. or just symlink to systemd
|
||||||
|
|||||||
@@ -127,18 +127,18 @@ MachineIdTests::testCopyFile()
|
|||||||
QVERIFY( source.exists() );
|
QVERIFY( source.exists() );
|
||||||
|
|
||||||
// This should fail since "example" isn't standard in our test directory
|
// 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 );
|
QVERIFY( !r0 );
|
||||||
|
|
||||||
const QString sampleFile = QStringLiteral( "CMakeCache.txt" );
|
const QString sampleFile = QStringLiteral( "CMakeCache.txt" );
|
||||||
if ( QFile::exists( sampleFile ) )
|
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
|
// Also fail, because it's not an absolute path
|
||||||
QVERIFY( !r1 );
|
QVERIFY( !r1 );
|
||||||
|
|
||||||
QVERIFY( QFile::copy( sampleFile, tempISOdir.path() + '/' + sampleFile ) );
|
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 );
|
QVERIFY( r2 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
#include "Workers.h"
|
#include "Workers.h"
|
||||||
|
|
||||||
|
#include "MachineIdJob.h"
|
||||||
|
|
||||||
#include "utils/Entropy.h"
|
#include "utils/Entropy.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "utils/System.h"
|
#include "utils/System.h"
|
||||||
@@ -46,9 +48,6 @@ getUrandomPoolSize()
|
|||||||
return ( poolSize >= minimumPoolSize ) ? poolSize : minimumPoolSize;
|
return ( poolSize >= minimumPoolSize ) ? poolSize : minimumPoolSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace MachineId
|
|
||||||
{
|
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
isAbsolutePath( const QString& fileName )
|
isAbsolutePath( const QString& fileName )
|
||||||
{
|
{
|
||||||
@@ -61,19 +60,19 @@ copyFile( const QString& rootMountPoint, const QString& fileName )
|
|||||||
if ( !isAbsolutePath( fileName ) )
|
if ( !isAbsolutePath( fileName ) )
|
||||||
{
|
{
|
||||||
return Calamares::JobResult::internalError(
|
return Calamares::JobResult::internalError(
|
||||||
QObject::tr( "File not found" ),
|
MachineIdJob::tr( "File not found" ),
|
||||||
QObject::tr( "Path <pre>%1</pre> must be an absolute path." ).arg( fileName ),
|
MachineIdJob::tr( "Path <pre>%1</pre> must be an absolute path." ).arg( fileName ),
|
||||||
0 );
|
0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
QFile f( fileName );
|
QFile f( fileName );
|
||||||
if ( !f.exists() )
|
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 ) )
|
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();
|
return Calamares::JobResult::ok();
|
||||||
}
|
}
|
||||||
@@ -90,8 +89,8 @@ createNewEntropy( int poolSize, const QString& rootMountPoint, const QString& fi
|
|||||||
if ( !entropyFile.open( QIODevice::WriteOnly ) )
|
if ( !entropyFile.open( QIODevice::WriteOnly ) )
|
||||||
{
|
{
|
||||||
return Calamares::JobResult::error(
|
return Calamares::JobResult::error(
|
||||||
QObject::tr( "File not found" ),
|
MachineIdJob::tr( "File not found" ),
|
||||||
QObject::tr( "Could not create new random file <pre>%1</pre>." ).arg( fileName ) );
|
MachineIdJob::tr( "Could not create new random file <pre>%1</pre>." ).arg( fileName ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray data;
|
QByteArray data;
|
||||||
@@ -190,5 +189,3 @@ createDBusLink( const QString& rootMountPoint, const QString& fileName, const QS
|
|||||||
Q_UNUSED( rootMountPoint )
|
Q_UNUSED( rootMountPoint )
|
||||||
return runCmd( QStringList { QStringLiteral( "ln" ), QStringLiteral( "-sf" ), systemdFileName, fileName }, true );
|
return runCmd( QStringList { QStringLiteral( "ln" ), QStringLiteral( "-sf" ), systemdFileName, fileName }, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace MachineId
|
|
||||||
|
|||||||
@@ -7,14 +7,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef WORKERS_H
|
#ifndef MACHINEID_WORKERS_H
|
||||||
#define WORKERS_H
|
#define MACHINEID_WORKERS_H
|
||||||
|
|
||||||
#include "Job.h"
|
#include "Job.h"
|
||||||
|
|
||||||
/// @brief Utility functions for doing the random-data stuff for MachineId
|
|
||||||
namespace MachineId
|
|
||||||
{
|
|
||||||
/** @brief Utility functions
|
/** @brief Utility functions
|
||||||
*
|
*
|
||||||
* These probably belong in libcalamares, since they're general utilities
|
* These probably belong in libcalamares, since they're general utilities
|
||||||
@@ -70,7 +67,4 @@ enum class SystemdMachineIdStyle
|
|||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
createSystemdMachineId( SystemdMachineIdStyle style, const QString& rootMountPoint, const QString& fileName );
|
createSystemdMachineId( SystemdMachineIdStyle style, const QString& rootMountPoint, const QString& fileName );
|
||||||
|
|
||||||
|
|
||||||
} // namespace MachineId
|
|
||||||
|
|
||||||
#endif // WORKERS_H
|
#endif // WORKERS_H
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ set(_extra_src "")
|
|||||||
### OPTIONAL AppData XML support in PackageModel
|
### 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)
|
if(BUILD_APPDATA)
|
||||||
find_package(${qtname} COMPONENTS Xml)
|
find_package(${qtname} REQUIRED COMPONENTS Xml)
|
||||||
if(TARGET ${qtname}::Xml)
|
if(TARGET ${qtname}::Xml)
|
||||||
add_definitions(-DHAVE_APPDATA)
|
add_definitions(-DHAVE_APPDATA)
|
||||||
list(APPEND _extra_libraries ${qtname}::Xml)
|
list(APPEND _extra_libraries ${qtname}::Xml)
|
||||||
@@ -23,23 +23,7 @@ endif()
|
|||||||
### OPTIONAL AppStream support in PackageModel
|
### OPTIONAL AppStream support in PackageModel
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
|
include(AppStreamHelper)
|
||||||
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()
|
|
||||||
|
|
||||||
calamares_add_plugin(packagechooser
|
calamares_add_plugin(packagechooser
|
||||||
TYPE viewmodule
|
TYPE viewmodule
|
||||||
@@ -59,6 +43,11 @@ calamares_add_plugin(packagechooser
|
|||||||
SHARED_LIB
|
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(
|
calamares_add_test(
|
||||||
packagechoosertest
|
packagechoosertest
|
||||||
GUI
|
GUI
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
#ifdef HAVE_APPSTREAM_VERSION
|
#ifdef HAVE_APPSTREAM_VERSION
|
||||||
#include "ItemAppStream.h"
|
#include "ItemAppStream.h"
|
||||||
#include <AppStreamQt/pool.h>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#endif
|
#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 "locale/TranslationsModel.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "utils/Variant.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
|
/// @brief Return number of pixels in a size, for < ordering purposes
|
||||||
static inline quint64
|
static inline quint64
|
||||||
sizeOrder( const QSize& size )
|
sizeOrder( const QSize& size )
|
||||||
|
|||||||
@@ -12,10 +12,28 @@
|
|||||||
|
|
||||||
#include "PackageModel.h"
|
#include "PackageModel.h"
|
||||||
|
|
||||||
namespace AppStream
|
/*
|
||||||
{
|
* This weird include mechanism is because an #include line is allowed
|
||||||
class Pool;
|
* to consist of preprocessor-tokens, which are expanded, and then
|
||||||
} // namespace AppStream
|
* 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.
|
/** @brief Loads an item from AppStream data.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -10,9 +10,8 @@ if(NOT WITH_QML)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(${qtname} ${QT_VERSION} CONFIG REQUIRED Core)
|
find_package(${qtname} ${QT_VERSION} CONFIG REQUIRED Core)
|
||||||
|
set(_extra_libraries "")
|
||||||
# Add optional libraries here
|
set(_extra_src "")
|
||||||
set(USER_EXTRA_LIB)
|
|
||||||
|
|
||||||
# include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser )
|
# include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser )
|
||||||
set(_packagechooser ${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
|
### 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)
|
if(BUILD_APPDATA)
|
||||||
find_package(${qtname} COMPONENTS Xml)
|
find_package(${qtname} REQUIRED COMPONENTS Xml)
|
||||||
if(TARGET ${qtname}::Xml)
|
if(TARGET ${qtname}::Xml)
|
||||||
add_definitions(-DHAVE_APPDATA)
|
add_definitions(-DHAVE_APPDATA)
|
||||||
list(APPEND _extra_libraries ${qtname}::Xml)
|
list(APPEND _extra_libraries ${qtname}::Xml)
|
||||||
@@ -34,23 +33,7 @@ endif()
|
|||||||
### OPTIONAL AppStream support in PackageModel
|
### OPTIONAL AppStream support in PackageModel
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
|
include(AppStreamHelper)
|
||||||
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()
|
|
||||||
|
|
||||||
calamares_add_plugin(packagechooserq
|
calamares_add_plugin(packagechooserq
|
||||||
TYPE viewmodule
|
TYPE viewmodule
|
||||||
@@ -67,3 +50,8 @@ calamares_add_plugin(packagechooserq
|
|||||||
${_extra_libraries}
|
${_extra_libraries}
|
||||||
SHARED_LIB
|
SHARED_LIB
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(AppStreamQt_FOUND)
|
||||||
|
target_link_libraries(calamares_viewmodule_packagechooserq PRIVATE calamares::appstreamqt)
|
||||||
|
target_sources(calamares_viewmodule_packagechooserq PRIVATE ${_packagechooser}/ItemAppStream.cpp)
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
|
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
@@ -42,7 +42,7 @@ Item {
|
|||||||
width: 450
|
width: 450
|
||||||
height: 104
|
height: 104
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: qsTr("OpenRC base system.<br/>
|
text: qsTr("LibreOffice is a powerful and free office suite, used by millions of people around the world. It includes several applications that make it the most versatile Free and Open Source office suite on the market.<br/>
|
||||||
Default option.")
|
Default option.")
|
||||||
font.pointSize: 10
|
font.pointSize: 10
|
||||||
anchors.verticalCenterOffset: -10
|
anchors.verticalCenterOffset: -10
|
||||||
@@ -50,14 +50,76 @@ Item {
|
|||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Switch {
|
||||||
|
id: element2
|
||||||
|
x: 500
|
||||||
|
y: 110
|
||||||
|
width: 187
|
||||||
|
height: 14
|
||||||
|
text: qsTr("LibreOffice")
|
||||||
|
checked: true
|
||||||
|
hoverEnabled: true
|
||||||
|
ButtonGroup.group: switchGroup
|
||||||
|
|
||||||
|
indicator: Rectangle {
|
||||||
|
implicitWidth: 40
|
||||||
|
implicitHeight: 14
|
||||||
|
radius: 10
|
||||||
|
color: element2.checked ? "#3498db" : "#B9B9B9"
|
||||||
|
border.color: element2.checked ? "#3498db" : "#cccccc"
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
x: element2.checked ? parent.width - width : 0
|
||||||
|
y: (parent.height - height) / 2
|
||||||
|
width: 20
|
||||||
|
height: 20
|
||||||
|
radius: 10
|
||||||
|
color: element2.down ? "#cccccc" : "#ffffff"
|
||||||
|
border.color: element2.checked ? (element1.down ? "#3498db" : "#3498db") : "#999999"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onCheckedChanged: {
|
||||||
|
if ( checked ) {
|
||||||
|
config.packageChoice = "libreoffice"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: image2
|
||||||
|
x: 8
|
||||||
|
y: 25
|
||||||
|
height: 100
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
source: "images/libreoffice.jpg"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: 700
|
||||||
|
height: 150
|
||||||
|
radius: 10
|
||||||
|
border.width: 0
|
||||||
|
Text {
|
||||||
|
width: 450
|
||||||
|
height: 104
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: qsTr("If you don't want to install an office suite, just select No Office Suite. You can always add one (or more) later on your installed system as the need arrives.")
|
||||||
|
font.pointSize: 10
|
||||||
|
anchors.verticalCenterOffset: -10
|
||||||
|
anchors.horizontalCenterOffset: 100
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
|
|
||||||
Switch {
|
Switch {
|
||||||
id: element1
|
id: element1
|
||||||
x: 500
|
x: 500
|
||||||
y: 110
|
y: 110
|
||||||
width: 187
|
width: 187
|
||||||
height: 14
|
height: 14
|
||||||
text: qsTr("OpenRC")
|
text: qsTr("No Office Suite")
|
||||||
checked: true
|
checked: false
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
ButtonGroup.group: switchGroup
|
ButtonGroup.group: switchGroup
|
||||||
|
|
||||||
@@ -81,80 +143,18 @@ Item {
|
|||||||
|
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if ( checked ) {
|
if ( checked ) {
|
||||||
config.packageChoice = "elogind-openrc"
|
config.packageChoice = "no_office_suite"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: image1
|
id: image
|
||||||
x: 8
|
x: 8
|
||||||
y: 25
|
y: 25
|
||||||
height: 100
|
height: 100
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: "images/artix.png"
|
source: "images/no-selection.png"
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: 700
|
|
||||||
height: 150
|
|
||||||
radius: 10
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
width: 450
|
|
||||||
height: 104
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("Dinit base system.")
|
|
||||||
font.pointSize: 10
|
|
||||||
anchors.verticalCenterOffset: -10
|
|
||||||
anchors.horizontalCenterOffset: 100
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
|
|
||||||
Switch {
|
|
||||||
id: element2
|
|
||||||
x: 500
|
|
||||||
y: 110
|
|
||||||
width: 187
|
|
||||||
height: 14
|
|
||||||
text: qsTr("Dinit")
|
|
||||||
checked: false
|
|
||||||
hoverEnabled: true
|
|
||||||
ButtonGroup.group: switchGroup
|
|
||||||
|
|
||||||
indicator: Rectangle {
|
|
||||||
implicitWidth: 40
|
|
||||||
implicitHeight: 14
|
|
||||||
radius: 10
|
|
||||||
color: element2.checked ? "#3498db" : "#B9B9B9"
|
|
||||||
border.color: element2.checked ? "#3498db" : "#cccccc"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
x: element2.checked ? parent.width - width : 0
|
|
||||||
y: (parent.height - height) / 2
|
|
||||||
width: 20
|
|
||||||
height: 20
|
|
||||||
radius: 10
|
|
||||||
color: element2.down ? "#cccccc" : "#ffffff"
|
|
||||||
border.color: element2.checked ? (element2.down ? "#3498db" : "#3498db") : "#999999"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCheckedChanged: {
|
|
||||||
if ( checked ) {
|
|
||||||
config.packageChoice = "elogind-dinit"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: image2
|
|
||||||
x: 8
|
|
||||||
y: 25
|
|
||||||
height: 100
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "images/artix.png"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -169,7 +169,7 @@ Item {
|
|||||||
width: 450
|
width: 450
|
||||||
height: 104
|
height: 104
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: qsTr("Runit base system.")
|
text: qsTr("Create a minimal Desktop install, remove all extra applications and decide later on what you would like to add to your system. Examples of what won't be on such an install, there will be no Office Suite, no media players, no image viewer or print support. It will be just a desktop, file browser, package manager, text editor and simple web-browser.")
|
||||||
font.pointSize: 10
|
font.pointSize: 10
|
||||||
anchors.verticalCenterOffset: -10
|
anchors.verticalCenterOffset: -10
|
||||||
anchors.horizontalCenterOffset: 100
|
anchors.horizontalCenterOffset: 100
|
||||||
@@ -182,7 +182,7 @@ Item {
|
|||||||
y: 110
|
y: 110
|
||||||
width: 187
|
width: 187
|
||||||
height: 14
|
height: 14
|
||||||
text: qsTr("Runit")
|
text: qsTr("Minimal Install")
|
||||||
checked: false
|
checked: false
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
ButtonGroup.group: switchGroup
|
ButtonGroup.group: switchGroup
|
||||||
@@ -207,7 +207,7 @@ Item {
|
|||||||
|
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if ( checked ) {
|
if ( checked ) {
|
||||||
config.packageChoice = "elogind-runit"
|
config.packageChoice = "minimal_install"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -218,70 +218,7 @@ Item {
|
|||||||
y: 25
|
y: 25
|
||||||
height: 100
|
height: 100
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: "images/artix.png"
|
source: "images/plasma.png"
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: 700
|
|
||||||
height: 150
|
|
||||||
color: "#ffffff"
|
|
||||||
radius: 10
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
width: 450
|
|
||||||
height: 104
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("S6 base system.")
|
|
||||||
font.pointSize: 10
|
|
||||||
anchors.verticalCenterOffset: -10
|
|
||||||
anchors.horizontalCenterOffset: 100
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
|
|
||||||
Switch {
|
|
||||||
id: element4
|
|
||||||
x: 500
|
|
||||||
y: 110
|
|
||||||
width: 187
|
|
||||||
height: 14
|
|
||||||
text: qsTr("S6")
|
|
||||||
checked: false
|
|
||||||
hoverEnabled: true
|
|
||||||
ButtonGroup.group: switchGroup
|
|
||||||
|
|
||||||
indicator: Rectangle {
|
|
||||||
implicitWidth: 40
|
|
||||||
implicitHeight: 14
|
|
||||||
radius: 10
|
|
||||||
color: element4.checked ? "#3498db" : "#B9B9B9"
|
|
||||||
border.color: element4.checked ? "#3498db" : "#cccccc"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
x: element4.checked ? parent.width - width : 0
|
|
||||||
y: (parent.height - height) / 2
|
|
||||||
width: 20
|
|
||||||
height: 20
|
|
||||||
radius: 10
|
|
||||||
color: element4.down ? "#cccccc" : "#ffffff"
|
|
||||||
border.color: element4.checked ? (element4.down ? "#3498db" : "#3498db") : "#999999"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCheckedChanged: {
|
|
||||||
if ( checked ) {
|
|
||||||
config.packageChoice = "elogind-s6"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: image4
|
|
||||||
x: 8
|
|
||||||
y: 25
|
|
||||||
height: 100
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "images/artix.png"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,7 +230,7 @@ Item {
|
|||||||
Text {
|
Text {
|
||||||
height: 25
|
height: 25
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: qsTr("Please select an option for your install, or use the default: OpenRC.")
|
text: qsTr("Please select an option for your install, or use the default: LibreOffice included.")
|
||||||
font.pointSize: 10
|
font.pointSize: 10
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,5 @@
|
|||||||
<file>images/libreoffice.jpg</file>
|
<file>images/libreoffice.jpg</file>
|
||||||
<file>images/no-selection.png</file>
|
<file>images/no-selection.png</file>
|
||||||
<file>images/plasma.png</file>
|
<file>images/plasma.png</file>
|
||||||
<file>images/artix.png</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ Item {
|
|||||||
width: 450
|
width: 450
|
||||||
height: 104
|
height: 104
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: qsTr("OpenRC base system.<br/>
|
text: qsTr("LibreOffice is a powerful and free office suite, used by millions of people around the world. It includes several applications that make it the most versatile Free and Open Source office suite on the market.<br/>
|
||||||
Default option.")
|
Default option.")
|
||||||
font.pointSize: 10
|
font.pointSize: 10
|
||||||
anchors.verticalCenterOffset: -10
|
anchors.verticalCenterOffset: -10
|
||||||
@@ -50,14 +50,76 @@ Item {
|
|||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Switch {
|
||||||
|
id: element2
|
||||||
|
x: 500
|
||||||
|
y: 110
|
||||||
|
width: 187
|
||||||
|
height: 14
|
||||||
|
text: qsTr("LibreOffice")
|
||||||
|
checked: true
|
||||||
|
hoverEnabled: true
|
||||||
|
ButtonGroup.group: switchGroup
|
||||||
|
|
||||||
|
indicator: Rectangle {
|
||||||
|
implicitWidth: 40
|
||||||
|
implicitHeight: 14
|
||||||
|
radius: 10
|
||||||
|
color: element2.checked ? "#3498db" : "#B9B9B9"
|
||||||
|
border.color: element2.checked ? "#3498db" : "#cccccc"
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
x: element2.checked ? parent.width - width : 0
|
||||||
|
y: (parent.height - height) / 2
|
||||||
|
width: 20
|
||||||
|
height: 20
|
||||||
|
radius: 10
|
||||||
|
color: element2.down ? "#cccccc" : "#ffffff"
|
||||||
|
border.color: element2.checked ? (element1.down ? "#3498db" : "#3498db") : "#999999"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onCheckedChanged: {
|
||||||
|
if ( checked ) {
|
||||||
|
config.packageChoice = "libreoffice"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: image2
|
||||||
|
x: 8
|
||||||
|
y: 25
|
||||||
|
height: 100
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
source: "images/libreoffice.jpg"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: 700
|
||||||
|
height: 150
|
||||||
|
radius: 10
|
||||||
|
border.width: 0
|
||||||
|
Text {
|
||||||
|
width: 450
|
||||||
|
height: 104
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: qsTr("If you don't want to install an office suite, just select No Office Suite. You can always add one (or more) later on your installed system as the need arrives.")
|
||||||
|
font.pointSize: 10
|
||||||
|
anchors.verticalCenterOffset: -10
|
||||||
|
anchors.horizontalCenterOffset: 100
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
|
|
||||||
Switch {
|
Switch {
|
||||||
id: element1
|
id: element1
|
||||||
x: 500
|
x: 500
|
||||||
y: 110
|
y: 110
|
||||||
width: 187
|
width: 187
|
||||||
height: 14
|
height: 14
|
||||||
text: qsTr("OpenRC")
|
text: qsTr("No Office Suite")
|
||||||
checked: true
|
checked: false
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
ButtonGroup.group: switchGroup
|
ButtonGroup.group: switchGroup
|
||||||
|
|
||||||
@@ -81,80 +143,18 @@ Item {
|
|||||||
|
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if ( checked ) {
|
if ( checked ) {
|
||||||
config.packageChoice = "elogind-openrc"
|
config.packageChoice = "no_office_suite"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: image1
|
id: image
|
||||||
x: 8
|
x: 8
|
||||||
y: 25
|
y: 25
|
||||||
height: 100
|
height: 100
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: "images/artix.png"
|
source: "images/no-selection.png"
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: 700
|
|
||||||
height: 150
|
|
||||||
radius: 10
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
width: 450
|
|
||||||
height: 104
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("Dinit base system.")
|
|
||||||
font.pointSize: 10
|
|
||||||
anchors.verticalCenterOffset: -10
|
|
||||||
anchors.horizontalCenterOffset: 100
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
|
|
||||||
Switch {
|
|
||||||
id: element2
|
|
||||||
x: 500
|
|
||||||
y: 110
|
|
||||||
width: 187
|
|
||||||
height: 14
|
|
||||||
text: qsTr("Dinit")
|
|
||||||
checked: false
|
|
||||||
hoverEnabled: true
|
|
||||||
ButtonGroup.group: switchGroup
|
|
||||||
|
|
||||||
indicator: Rectangle {
|
|
||||||
implicitWidth: 40
|
|
||||||
implicitHeight: 14
|
|
||||||
radius: 10
|
|
||||||
color: element2.checked ? "#3498db" : "#B9B9B9"
|
|
||||||
border.color: element2.checked ? "#3498db" : "#cccccc"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
x: element2.checked ? parent.width - width : 0
|
|
||||||
y: (parent.height - height) / 2
|
|
||||||
width: 20
|
|
||||||
height: 20
|
|
||||||
radius: 10
|
|
||||||
color: element2.down ? "#cccccc" : "#ffffff"
|
|
||||||
border.color: element2.checked ? (element2.down ? "#3498db" : "#3498db") : "#999999"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCheckedChanged: {
|
|
||||||
if ( checked ) {
|
|
||||||
config.packageChoice = "elogind-dinit"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: image2
|
|
||||||
x: 8
|
|
||||||
y: 25
|
|
||||||
height: 100
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "images/artix.png"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -169,7 +169,7 @@ Item {
|
|||||||
width: 450
|
width: 450
|
||||||
height: 104
|
height: 104
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: qsTr("Runit base system.")
|
text: qsTr("Create a minimal Desktop install, remove all extra applications and decide later on what you would like to add to your system. Examples of what won't be on such an install, there will be no Office Suite, no media players, no image viewer or print support. It will be just a desktop, file browser, package manager, text editor and simple web-browser.")
|
||||||
font.pointSize: 10
|
font.pointSize: 10
|
||||||
anchors.verticalCenterOffset: -10
|
anchors.verticalCenterOffset: -10
|
||||||
anchors.horizontalCenterOffset: 100
|
anchors.horizontalCenterOffset: 100
|
||||||
@@ -182,7 +182,7 @@ Item {
|
|||||||
y: 110
|
y: 110
|
||||||
width: 187
|
width: 187
|
||||||
height: 14
|
height: 14
|
||||||
text: qsTr("Runit")
|
text: qsTr("Minimal Install")
|
||||||
checked: false
|
checked: false
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
ButtonGroup.group: switchGroup
|
ButtonGroup.group: switchGroup
|
||||||
@@ -207,7 +207,7 @@ Item {
|
|||||||
|
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if ( checked ) {
|
if ( checked ) {
|
||||||
config.packageChoice = "elogind-runit"
|
config.packageChoice = "minimal_install"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -218,70 +218,7 @@ Item {
|
|||||||
y: 25
|
y: 25
|
||||||
height: 100
|
height: 100
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: "images/artix.png"
|
source: "images/plasma.png"
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: 700
|
|
||||||
height: 150
|
|
||||||
color: "#ffffff"
|
|
||||||
radius: 10
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
width: 450
|
|
||||||
height: 104
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("S6 base system.")
|
|
||||||
font.pointSize: 10
|
|
||||||
anchors.verticalCenterOffset: -10
|
|
||||||
anchors.horizontalCenterOffset: 100
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
|
|
||||||
Switch {
|
|
||||||
id: element4
|
|
||||||
x: 500
|
|
||||||
y: 110
|
|
||||||
width: 187
|
|
||||||
height: 14
|
|
||||||
text: qsTr("S6")
|
|
||||||
checked: false
|
|
||||||
hoverEnabled: true
|
|
||||||
ButtonGroup.group: switchGroup
|
|
||||||
|
|
||||||
indicator: Rectangle {
|
|
||||||
implicitWidth: 40
|
|
||||||
implicitHeight: 14
|
|
||||||
radius: 10
|
|
||||||
color: element4.checked ? "#3498db" : "#B9B9B9"
|
|
||||||
border.color: element4.checked ? "#3498db" : "#cccccc"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
x: element4.checked ? parent.width - width : 0
|
|
||||||
y: (parent.height - height) / 2
|
|
||||||
width: 20
|
|
||||||
height: 20
|
|
||||||
radius: 10
|
|
||||||
color: element4.down ? "#cccccc" : "#ffffff"
|
|
||||||
border.color: element4.checked ? (element4.down ? "#3498db" : "#3498db") : "#999999"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCheckedChanged: {
|
|
||||||
if ( checked ) {
|
|
||||||
config.packageChoice = "elogind-s6"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: image4
|
|
||||||
x: 8
|
|
||||||
y: 25
|
|
||||||
height: 100
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "images/artix.png"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,7 +230,7 @@ Item {
|
|||||||
Text {
|
Text {
|
||||||
height: 25
|
height: 25
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: qsTr("Please select an option for your install, or use the default: OpenRC.")
|
text: qsTr("Please select an option for your install, or use the default: LibreOffice included.")
|
||||||
font.pointSize: 10
|
font.pointSize: 10
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,5 @@
|
|||||||
<file>images/libreoffice.jpg</file>
|
<file>images/libreoffice.jpg</file>
|
||||||
<file>images/no-selection.png</file>
|
<file>images/no-selection.png</file>
|
||||||
<file>images/plasma.png</file>
|
<file>images/plasma.png</file>
|
||||||
<file>images/artix.png</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -439,7 +439,7 @@ class PMPacman(PackageManager):
|
|||||||
while pacman_count <= self.pacman_num_retries:
|
while pacman_count <= self.pacman_num_retries:
|
||||||
pacman_count += 1
|
pacman_count += 1
|
||||||
try:
|
try:
|
||||||
if False: # callback:
|
if callback:
|
||||||
libcalamares.utils.target_env_process_output(command, self.line_cb)
|
libcalamares.utils.target_env_process_output(command, self.line_cb)
|
||||||
else:
|
else:
|
||||||
libcalamares.utils.target_env_process_output(command)
|
libcalamares.utils.target_env_process_output(command)
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ PartitionViewStep::PartitionViewStep( QObject* parent )
|
|||||||
m_waitingWidget = new WaitingWidget( QString() );
|
m_waitingWidget = new WaitingWidget( QString() );
|
||||||
m_widget->addWidget( m_waitingWidget );
|
m_widget->addWidget( m_waitingWidget );
|
||||||
CALAMARES_RETRANSLATE(
|
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!
|
m_core = new PartitionCoreModule( this ); // Unusable before init is complete!
|
||||||
// We're not done loading, but we need the configuration map first.
|
// We're not done loading, but we need the configuration map first.
|
||||||
@@ -104,7 +104,7 @@ PartitionViewStep::~PartitionViewStep()
|
|||||||
QString
|
QString
|
||||||
PartitionViewStep::prettyName() const
|
PartitionViewStep::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Partitions" );
|
return tr( "Partitions", "@label" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @brief Gather the pretty descriptions of all the partitioning jobs
|
/** @brief Gather the pretty descriptions of all the partitioning jobs
|
||||||
@@ -140,17 +140,17 @@ modeDescription( Config::InstallChoice choice )
|
|||||||
switch ( choice )
|
switch ( choice )
|
||||||
{
|
{
|
||||||
case Config::InstallChoice::Alongside:
|
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() );
|
.arg( branding->shortVersionedName() );
|
||||||
case Config::InstallChoice::Erase:
|
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() );
|
.arg( branding->shortVersionedName() );
|
||||||
case Config::InstallChoice::Replace:
|
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() );
|
.arg( branding->shortVersionedName() );
|
||||||
case Config::InstallChoice::NoChoice:
|
case Config::InstallChoice::NoChoice:
|
||||||
case Config::InstallChoice::Manual:
|
case Config::InstallChoice::Manual:
|
||||||
return QCoreApplication::translate( context, "<strong>Manual</strong> partitioning." );
|
return QCoreApplication::translate( context, "<strong>Manual</strong> partitioning", "@label" );
|
||||||
}
|
}
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
@@ -176,26 +176,26 @@ diskDescription( int listLength, const PartitionCoreModule::SummaryInfo& info, C
|
|||||||
return QCoreApplication::translate(
|
return QCoreApplication::translate(
|
||||||
context,
|
context,
|
||||||
"Install %1 <strong>alongside</strong> another operating system on disk "
|
"Install %1 <strong>alongside</strong> another operating system on disk "
|
||||||
"<strong>%2</strong> (%3)." )
|
"<strong>%2</strong> (%3)", "@info" )
|
||||||
.arg( branding->shortVersionedName() )
|
.arg( branding->shortVersionedName() )
|
||||||
.arg( info.deviceNode )
|
.arg( info.deviceNode )
|
||||||
.arg( info.deviceName );
|
.arg( info.deviceName );
|
||||||
case Config::Erase:
|
case Config::Erase:
|
||||||
return QCoreApplication::translate( context,
|
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( branding->shortVersionedName() )
|
||||||
.arg( info.deviceNode )
|
.arg( info.deviceNode )
|
||||||
.arg( info.deviceName );
|
.arg( info.deviceName );
|
||||||
case Config::Replace:
|
case Config::Replace:
|
||||||
return QCoreApplication::translate(
|
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( branding->shortVersionedName() )
|
||||||
.arg( info.deviceNode )
|
.arg( info.deviceNode )
|
||||||
.arg( info.deviceName );
|
.arg( info.deviceName );
|
||||||
case Config::NoChoice:
|
case Config::NoChoice:
|
||||||
case Config::Manual:
|
case Config::Manual:
|
||||||
return QCoreApplication::translate(
|
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.deviceNode )
|
||||||
.arg( info.deviceName );
|
.arg( info.deviceName );
|
||||||
}
|
}
|
||||||
@@ -203,7 +203,7 @@ diskDescription( int listLength, const PartitionCoreModule::SummaryInfo& info, C
|
|||||||
}
|
}
|
||||||
else // multiple disk previews!
|
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.deviceNode )
|
||||||
.arg( info.deviceName );
|
.arg( info.deviceName );
|
||||||
}
|
}
|
||||||
@@ -293,7 +293,7 @@ PartitionViewStep::createSummaryWidget() const
|
|||||||
field->setSpacing( 6 );
|
field->setSpacing( 6 );
|
||||||
field->addWidget( preview );
|
field->addWidget( preview );
|
||||||
field->addWidget( previewLabels );
|
field->addWidget( previewLabels );
|
||||||
formLayout->addRow( tr( "Current:" ), field );
|
formLayout->addRow( tr( "Current:", "@label" ), field );
|
||||||
|
|
||||||
preview = new PartitionBarsView;
|
preview = new PartitionBarsView;
|
||||||
preview->setNestedPartitionsMode( mode );
|
preview->setNestedPartitionsMode( mode );
|
||||||
@@ -311,7 +311,7 @@ PartitionViewStep::createSummaryWidget() const
|
|||||||
field->setSpacing( 6 );
|
field->setSpacing( 6 );
|
||||||
field->addWidget( preview );
|
field->addWidget( preview );
|
||||||
field->addWidget( previewLabels );
|
field->addWidget( previewLabels );
|
||||||
formLayout->addRow( tr( "After:" ), field );
|
formLayout->addRow( tr( "After:", "@label" ), field );
|
||||||
}
|
}
|
||||||
const QStringList jobsLines = jobDescriptions( jobs() );
|
const QStringList jobsLines = jobDescriptions( jobs() );
|
||||||
if ( !jobsLines.isEmpty() )
|
if ( !jobsLines.isEmpty() )
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ BootLoaderModel::createMbrItems()
|
|||||||
{
|
{
|
||||||
for ( auto device : m_devices )
|
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 ) );
|
appendRow( createBootLoaderItem( text, device->deviceNode(), false ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,14 +90,14 @@ BootLoaderModel::updateInternal()
|
|||||||
Partition* partition = KPMHelpers::findPartitionByMountPoint( m_devices, "/boot" );
|
Partition* partition = KPMHelpers::findPartitionByMountPoint( m_devices, "/boot" );
|
||||||
if ( partition )
|
if ( partition )
|
||||||
{
|
{
|
||||||
partitionText = tr( "Boot Partition" );
|
partitionText = tr( "Boot Partition", "@info" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
partition = KPMHelpers::findPartitionByMountPoint( m_devices, "/" );
|
partition = KPMHelpers::findPartitionByMountPoint( m_devices, "/" );
|
||||||
if ( partition )
|
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,
|
// Create "don't install bootloader" item. This is always available,
|
||||||
// also if there was no /boot or / partition found.
|
// 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 ) )
|
if ( isPartitionFreeSpace( partition ) )
|
||||||
{
|
{
|
||||||
return tr( "Free Space" );
|
return tr( "Free Space", "@title" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return isPartitionNew( partition ) ? tr( "New partition" ) : partition->partitionPath();
|
return isPartitionNew( partition ) ? tr( "New Partition", "@title" ) : partition->partitionPath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( col == FileSystemColumn )
|
if ( col == FileSystemColumn )
|
||||||
@@ -198,11 +198,11 @@ PartitionModel::data( const QModelIndex& index, int role ) const
|
|||||||
{
|
{
|
||||||
if ( isPartitionFreeSpace( partition ) )
|
if ( isPartitionFreeSpace( partition ) )
|
||||||
{
|
{
|
||||||
name = tr( "Free Space" );
|
name = tr( "Free Space", "@title" );
|
||||||
}
|
}
|
||||||
else
|
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() );
|
QString prettyFileSystem = Calamares::Partition::prettyNameForFileSystemType( partition->fileSystem().type() );
|
||||||
@@ -304,15 +304,15 @@ PartitionModel::headerData( int section, Qt::Orientation, int role ) const
|
|||||||
switch ( section )
|
switch ( section )
|
||||||
{
|
{
|
||||||
case NameColumn:
|
case NameColumn:
|
||||||
return tr( "Name" );
|
return tr( "Name", "@title" );
|
||||||
case FileSystemColumn:
|
case FileSystemColumn:
|
||||||
return tr( "File System" );
|
return tr( "File System", "@title" );
|
||||||
case FileSystemLabelColumn:
|
case FileSystemLabelColumn:
|
||||||
return tr( "File System Label" );
|
return tr( "File System Label", "@title" );
|
||||||
case MountPointColumn:
|
case MountPointColumn:
|
||||||
return tr( "Mount Point" );
|
return tr( "Mount Point", "@title" );
|
||||||
case SizeColumn:
|
case SizeColumn:
|
||||||
return tr( "Size" );
|
return tr( "Size", "@title" );
|
||||||
default:
|
default:
|
||||||
cDebug() << "Unknown column" << section;
|
cDebug() << "Unknown column" << section;
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|||||||
@@ -134,9 +134,9 @@ void
|
|||||||
ChoicePage::retranslate()
|
ChoicePage::retranslate()
|
||||||
{
|
{
|
||||||
retranslateUi( this );
|
retranslateUi( this );
|
||||||
m_drivesLabel->setText( tr( "Select storage de&vice:" ) );
|
m_drivesLabel->setText( tr( "Select storage de&vice:", "@label" ) );
|
||||||
m_previewBeforeLabel->setText( tr( "Current:" ) );
|
m_previewBeforeLabel->setText( tr( "Current:", "@label" ) );
|
||||||
m_previewAfterLabel->setText( tr( "After:" ) );
|
m_previewAfterLabel->setText( tr( "After:", "@label" ) );
|
||||||
|
|
||||||
updateSwapChoicesTr();
|
updateSwapChoicesTr();
|
||||||
updateChoiceButtonsTr();
|
updateChoiceButtonsTr();
|
||||||
@@ -893,7 +893,7 @@ ChoicePage::doReplaceSelectedPartition( const QModelIndex& current )
|
|||||||
m_reuseHomeCheckBox->setVisible( !homePartitionPath->isEmpty() );
|
m_reuseHomeCheckBox->setVisible( !homePartitionPath->isEmpty() );
|
||||||
if ( !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( *homePartitionPath )
|
||||||
.arg( Calamares::Branding::instance()->shortProductName() ) );
|
.arg( Calamares::Branding::instance()->shortProductName() ) );
|
||||||
}
|
}
|
||||||
@@ -1031,7 +1031,7 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
|||||||
{
|
{
|
||||||
m_encryptWidget->show();
|
m_encryptWidget->show();
|
||||||
}
|
}
|
||||||
m_previewBeforeLabel->setText( tr( "Current:" ) );
|
m_previewBeforeLabel->setText( tr( "Current:", "@label" ) );
|
||||||
m_selectLabel->setText( tr( "<strong>Select a partition to shrink, "
|
m_selectLabel->setText( tr( "<strong>Select a partition to shrink, "
|
||||||
"then drag the bottom bar to resize</strong>" ) );
|
"then drag the bottom bar to resize</strong>" ) );
|
||||||
m_selectLabel->show();
|
m_selectLabel->show();
|
||||||
@@ -1057,7 +1057,7 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
|||||||
Q_UNUSED( path )
|
Q_UNUSED( path )
|
||||||
sizeLabel->setText(
|
sizeLabel->setText(
|
||||||
tr( "%1 will be shrunk to %2MiB and a new "
|
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( m_beforePartitionBarsView->selectionModel()->currentIndex().data().toString() )
|
||||||
.arg( Calamares::BytesToMiB( size ) )
|
.arg( Calamares::BytesToMiB( size ) )
|
||||||
.arg( Calamares::BytesToMiB( sizeNext ) )
|
.arg( Calamares::BytesToMiB( sizeNext ) )
|
||||||
@@ -1082,7 +1082,7 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
|||||||
case InstallChoice::Replace:
|
case InstallChoice::Replace:
|
||||||
{
|
{
|
||||||
m_encryptWidget->setVisible( shouldShowEncryptWidget( choice ) );
|
m_encryptWidget->setVisible( shouldShowEncryptWidget( choice ) );
|
||||||
m_previewBeforeLabel->setText( tr( "Current:" ) );
|
m_previewBeforeLabel->setText( tr( "Current:", "@label" ) );
|
||||||
m_afterPartitionBarsView = new PartitionBarsView( m_previewAfterFrame );
|
m_afterPartitionBarsView = new PartitionBarsView( m_previewAfterFrame );
|
||||||
m_afterPartitionBarsView->setNestedPartitionsMode( mode );
|
m_afterPartitionBarsView->setNestedPartitionsMode( mode );
|
||||||
m_afterPartitionLabelsView = new PartitionLabelsView( m_previewAfterFrame );
|
m_afterPartitionLabelsView = new PartitionLabelsView( m_previewAfterFrame );
|
||||||
@@ -1126,7 +1126,7 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
|||||||
m_beforePartitionLabelsView->setSelectionFilter( filter );
|
m_beforePartitionLabelsView->setSelectionFilter( filter );
|
||||||
|
|
||||||
m_selectLabel->show();
|
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;
|
break;
|
||||||
@@ -1135,7 +1135,7 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
|||||||
case InstallChoice::Manual:
|
case InstallChoice::Manual:
|
||||||
m_selectLabel->hide();
|
m_selectLabel->hide();
|
||||||
m_previewAfterFrame->hide();
|
m_previewAfterFrame->hide();
|
||||||
m_previewBeforeLabel->setText( tr( "Current:" ) );
|
m_previewBeforeLabel->setText( tr( "Current:", "@label" ) );
|
||||||
m_previewAfterLabel->hide();
|
m_previewAfterLabel->hide();
|
||||||
m_encryptWidget->hide();
|
m_encryptWidget->hide();
|
||||||
break;
|
break;
|
||||||
@@ -1188,21 +1188,21 @@ ChoicePage::setupEfiSystemPartitionSelector()
|
|||||||
{
|
{
|
||||||
m_efiLabel->setText( tr( "An EFI system partition cannot be found anywhere "
|
m_efiLabel->setText( tr( "An EFI system partition cannot be found anywhere "
|
||||||
"on this system. Please go back and use manual "
|
"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() ) );
|
.arg( Calamares::Branding::instance()->shortProductName() ) );
|
||||||
updateNextEnabled();
|
updateNextEnabled();
|
||||||
}
|
}
|
||||||
else if ( efiSystemPartitions.count() == 1 ) //probably most usual situation
|
else if ( efiSystemPartitions.count() == 1 ) //probably most usual situation
|
||||||
{
|
{
|
||||||
m_efiLabel->setText( tr( "The EFI system partition at %1 will be used for "
|
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( efiSystemPartitions.first()->partitionPath() )
|
||||||
.arg( Calamares::Branding::instance()->shortProductName() ) );
|
.arg( Calamares::Branding::instance()->shortProductName() ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_efiComboBox->show();
|
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 )
|
for ( int i = 0; i < efiSystemPartitions.count(); ++i )
|
||||||
{
|
{
|
||||||
Partition* efiPartition = efiSystemPartitions.at( i );
|
Partition* efiPartition = efiSystemPartitions.at( i );
|
||||||
@@ -1505,12 +1505,12 @@ ChoicePage::setupActions()
|
|||||||
{
|
{
|
||||||
if ( atLeastOneIsMounted )
|
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
|
else
|
||||||
{
|
{
|
||||||
m_messageLabel->setText(
|
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();
|
m_messageLabel->show();
|
||||||
@@ -1625,7 +1625,7 @@ ChoicePage::updateSwapChoicesTr()
|
|||||||
// toInt() returns 0 on failure, so check for ok
|
// toInt() returns 0 on failure, so check for ok
|
||||||
if ( ok ) // It was explicitly set to 0
|
if ( ok ) // It was explicitly set to 0
|
||||||
{
|
{
|
||||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "No Swap" ) );
|
m_eraseSwapChoiceComboBox->setItemText( index, tr( "No swap", "@label" ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1634,16 +1634,16 @@ ChoicePage::updateSwapChoicesTr()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SwapChoice::ReuseSwap:
|
case SwapChoice::ReuseSwap:
|
||||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Reuse Swap" ) );
|
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Reuse swap", "@label" ) );
|
||||||
break;
|
break;
|
||||||
case SwapChoice::SmallSwap:
|
case SwapChoice::SmallSwap:
|
||||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Swap (no Hibernate)" ) );
|
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Swap (no Hibernate)", "@label" ) );
|
||||||
break;
|
break;
|
||||||
case SwapChoice::FullSwap:
|
case SwapChoice::FullSwap:
|
||||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Swap (with Hibernate)" ) );
|
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Swap (with Hibernate)", "@label" ) );
|
||||||
break;
|
break;
|
||||||
case SwapChoice::SwapFile:
|
case SwapChoice::SwapFile:
|
||||||
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Swap to file" ) );
|
m_eraseSwapChoiceComboBox->setItemText( index, tr( "Swap to file", "@label" ) );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
cWarning() << "Box item" << index << m_eraseSwapChoiceComboBox->itemText( index ) << "has role" << value;
|
cWarning() << "Box item" << index << m_eraseSwapChoiceComboBox->itemText( index ) << "has role" << value;
|
||||||
@@ -1684,7 +1684,7 @@ ChoicePage::createBootloaderPanel()
|
|||||||
mainLayout->setContentsMargins( 0, 0, 0, 0 );
|
mainLayout->setContentsMargins( 0, 0, 0, 0 );
|
||||||
QLabel* widgetLabel = new QLabel( panelWidget );
|
QLabel* widgetLabel = new QLabel( panelWidget );
|
||||||
mainLayout->addWidget( widgetLabel );
|
mainLayout->addWidget( widgetLabel );
|
||||||
widgetLabel->setText( tr( "Boot loader location:" ) );
|
widgetLabel->setText( tr( "Bootloader location:", "@label" ) );
|
||||||
|
|
||||||
QComboBox* comboForBootloader = new QComboBox( panelWidget );
|
QComboBox* comboForBootloader = new QComboBox( panelWidget );
|
||||||
comboForBootloader->setModel( m_core->bootLoaderModel() );
|
comboForBootloader->setModel( m_core->bootLoaderModel() );
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device,
|
|||||||
, m_usedMountPoints( usedMountPoints )
|
, m_usedMountPoints( usedMountPoints )
|
||||||
{
|
{
|
||||||
m_ui->setupUi( this );
|
m_ui->setupUi( this );
|
||||||
m_ui->encryptWidget->setText( tr( "En&crypt" ) );
|
m_ui->encryptWidget->setText( tr( "En&crypt", "@action" ) );
|
||||||
m_ui->encryptWidget->hide();
|
m_ui->encryptWidget->hide();
|
||||||
|
|
||||||
if ( m_device->type() != Device::Type::LVM_Device )
|
if ( m_device->type() != Device::Type::LVM_Device )
|
||||||
@@ -192,12 +192,12 @@ CreatePartitionDialog::initMbrPartitionTypeUi()
|
|||||||
if ( !parentIsPartitionTable )
|
if ( !parentIsPartitionTable )
|
||||||
{
|
{
|
||||||
m_role = PartitionRole( PartitionRole::Logical );
|
m_role = PartitionRole( PartitionRole::Logical );
|
||||||
fixedPartitionString = tr( "Logical" );
|
fixedPartitionString = tr( "Logical", "@label" );
|
||||||
}
|
}
|
||||||
else if ( m_device->partitionTable()->hasExtended() )
|
else if ( m_device->partitionTable()->hasExtended() )
|
||||||
{
|
{
|
||||||
m_role = PartitionRole( PartitionRole::Primary );
|
m_role = PartitionRole( PartitionRole::Primary );
|
||||||
fixedPartitionString = tr( "Primary" );
|
fixedPartitionString = tr( "Primary", "@label" );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( fixedPartitionString.isEmpty() )
|
if ( fixedPartitionString.isEmpty() )
|
||||||
@@ -216,7 +216,7 @@ void
|
|||||||
CreatePartitionDialog::initGptPartitionTypeUi()
|
CreatePartitionDialog::initGptPartitionTypeUi()
|
||||||
{
|
{
|
||||||
m_role = PartitionRole( PartitionRole::Primary );
|
m_role = PartitionRole( PartitionRole::Primary );
|
||||||
m_ui->fixedPartitionLabel->setText( tr( "GPT" ) );
|
m_ui->fixedPartitionLabel->setText( tr( "GPT", "@label" ) );
|
||||||
m_ui->primaryRadioButton->hide();
|
m_ui->primaryRadioButton->hide();
|
||||||
m_ui->extendedRadioButton->hide();
|
m_ui->extendedRadioButton->hide();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ CreateVolumeGroupDialog::CreateVolumeGroupDialog( QString& vgName,
|
|||||||
, m_selectedPVs( selectedPVs )
|
, m_selectedPVs( selectedPVs )
|
||||||
, m_peSize( pSize )
|
, m_peSize( pSize )
|
||||||
{
|
{
|
||||||
setWindowTitle( tr( "Create Volume Group" ) );
|
setWindowTitle( tr( "Create Volume Group", "@title" ) );
|
||||||
|
|
||||||
peSize()->setValue( pSize );
|
peSize()->setValue( pSize );
|
||||||
|
|
||||||
|
|||||||
@@ -150,12 +150,12 @@ EncryptWidget::updateState( const bool notify )
|
|||||||
if ( p1.isEmpty() && p2.isEmpty() )
|
if ( p1.isEmpty() && p2.isEmpty() )
|
||||||
{
|
{
|
||||||
applyPixmap( m_ui->m_iconLabel, Calamares::StatusWarning );
|
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 )
|
else if ( m_filesystem == FileSystem::Zfs && p1.length() < ZFS_MIN_LENGTH )
|
||||||
{
|
{
|
||||||
applyPixmap( m_ui->m_iconLabel, Calamares::StatusError );
|
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 )
|
else if ( p1 == p2 )
|
||||||
{
|
{
|
||||||
@@ -165,7 +165,7 @@ EncryptWidget::updateState( const bool notify )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
applyPixmap( m_ui->m_iconLabel, Calamares::StatusError );
|
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 ) )
|
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;
|
ok = false;
|
||||||
}
|
}
|
||||||
else if ( !mountPoint.isEmpty() && !mountPoint.startsWith( '/' ) )
|
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;
|
ok = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ static const int CORNER_RADIUS = 2;
|
|||||||
static QStringList
|
static QStringList
|
||||||
buildUnknownDisklabelTexts( Device* dev )
|
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() ) };
|
formatByteSize( dev->totalLogical() * dev->logicalSize() ) };
|
||||||
return texts;
|
return texts;
|
||||||
}
|
}
|
||||||
@@ -179,28 +179,28 @@ PartitionLabelsView::buildTexts( const QModelIndex& index ) const
|
|||||||
}
|
}
|
||||||
else if ( mountPoint == "/home" )
|
else if ( mountPoint == "/home" )
|
||||||
{
|
{
|
||||||
firstLine = tr( "Home" );
|
firstLine = tr( "Home", "@label" );
|
||||||
}
|
}
|
||||||
else if ( mountPoint == "/boot" )
|
else if ( mountPoint == "/boot" )
|
||||||
{
|
{
|
||||||
firstLine = tr( "Boot" );
|
firstLine = tr( "Boot", "@label" );
|
||||||
}
|
}
|
||||||
else if ( mountPoint.contains( "/efi" )
|
else if ( mountPoint.contains( "/efi" )
|
||||||
&& index.data( PartitionModel::FileSystemTypeRole ).toInt() == FileSystem::Fat32 )
|
&& 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 )
|
else if ( index.data( PartitionModel::FileSystemTypeRole ).toInt() == FileSystem::LinuxSwap )
|
||||||
{
|
{
|
||||||
firstLine = tr( "Swap" );
|
firstLine = tr( "Swap", "@label" );
|
||||||
}
|
}
|
||||||
else if ( !mountPoint.isEmpty() )
|
else if ( !mountPoint.isEmpty() )
|
||||||
{
|
{
|
||||||
firstLine = tr( "New partition for %1" ).arg( mountPoint );
|
firstLine = tr( "New partition for %1", "@label" ).arg( mountPoint );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
firstLine = tr( "New partition" );
|
firstLine = tr( "New partition", "@label" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ ResizeVolumeGroupDialog::ResizeVolumeGroupDialog( LvmDevice* device,
|
|||||||
: VolumeGroupBaseDialog( device->name(), device->physicalVolumes(), parent )
|
: VolumeGroupBaseDialog( device->name(), device->physicalVolumes(), parent )
|
||||||
, m_selectedPVs( selectedPVs )
|
, m_selectedPVs( selectedPVs )
|
||||||
{
|
{
|
||||||
setWindowTitle( tr( "Resize Volume Group" ) );
|
setWindowTitle( tr( "Resize Volume Group", "@title" ) );
|
||||||
|
|
||||||
for ( int i = 0; i < pvList()->count(); i++ )
|
for ( int i = 0; i < pvList()->count(); i++ )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ ScanningDialog::run( const QFuture< void >& future,
|
|||||||
void
|
void
|
||||||
ScanningDialog::run( const QFuture< void >& future, const std::function< void() >& callback, QWidget* parent )
|
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
|
void
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ AutoMountManagementJob::AutoMountManagementJob( bool disable )
|
|||||||
QString
|
QString
|
||||||
AutoMountManagementJob::prettyName() const
|
AutoMountManagementJob::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Manage auto-mount settings" );
|
return tr( "Managing auto-mount settings…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
|
|||||||
@@ -31,15 +31,14 @@ ChangeFilesystemLabelJob::ChangeFilesystemLabelJob( Device* device, Partition* p
|
|||||||
QString
|
QString
|
||||||
ChangeFilesystemLabelJob::prettyName() const
|
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
|
QString
|
||||||
ChangeFilesystemLabelJob::prettyDescription() const
|
ChangeFilesystemLabelJob::prettyDescription() const
|
||||||
{
|
{
|
||||||
return tr( "Set filesystem label <strong>%1</strong> to partition "
|
return tr( "Set filesystem label <strong>%1</strong> to partition <strong>%2</strong>", "@info" )
|
||||||
"<strong>%2</strong>." )
|
|
||||||
.arg( m_label )
|
.arg( m_label )
|
||||||
.arg( partition()->partitionPath() );
|
.arg( partition()->partitionPath() );
|
||||||
}
|
}
|
||||||
@@ -48,7 +47,9 @@ ChangeFilesystemLabelJob::prettyDescription() const
|
|||||||
QString
|
QString
|
||||||
ChangeFilesystemLabelJob::prettyStatusMessage() const
|
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::ok();
|
||||||
}
|
}
|
||||||
return Calamares::JobResult::error(
|
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 );
|
Report report( nullptr );
|
||||||
@@ -80,5 +81,6 @@ ChangeFilesystemLabelJob::exec()
|
|||||||
return Calamares::JobResult::ok();
|
return Calamares::JobResult::ok();
|
||||||
}
|
}
|
||||||
return Calamares::JobResult::error(
|
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
|
QString
|
||||||
ClearMountsJob::prettyName() const
|
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
|
QString
|
||||||
ClearMountsJob::prettyStatusMessage() const
|
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
|
Calamares::JobResult
|
||||||
|
|||||||
@@ -30,14 +30,14 @@ ClearTempMountsJob::ClearTempMountsJob()
|
|||||||
QString
|
QString
|
||||||
ClearTempMountsJob::prettyName() const
|
ClearTempMountsJob::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Clear all temporary mounts." );
|
return tr( "Clearing all temporary mounts…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString
|
QString
|
||||||
ClearTempMountsJob::prettyStatusMessage() const
|
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 );
|
QString entries = prettyGptEntries( m_partition );
|
||||||
if ( !entries.isEmpty() )
|
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( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||||
.arg( m_device->name() )
|
.arg( m_device->name() )
|
||||||
.arg( m_device->deviceNode() )
|
.arg( m_device->deviceNode() )
|
||||||
@@ -186,14 +186,14 @@ CreatePartitionJob::prettyName() const
|
|||||||
}
|
}
|
||||||
else
|
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( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||||
.arg( m_device->name() )
|
.arg( m_device->name() )
|
||||||
.arg( m_device->deviceNode() );
|
.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( userVisibleFS( m_partition->fileSystem() ) )
|
||||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||||
.arg( m_device->name() )
|
.arg( m_device->name() )
|
||||||
@@ -210,7 +210,8 @@ CreatePartitionJob::prettyDescription() const
|
|||||||
if ( !entries.isEmpty() )
|
if ( !entries.isEmpty() )
|
||||||
{
|
{
|
||||||
return tr( "Create new <strong>%1MiB</strong> partition on <strong>%3</strong> (%2) with entries "
|
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( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||||
.arg( m_device->name() )
|
.arg( m_device->name() )
|
||||||
.arg( m_device->deviceNode() )
|
.arg( m_device->deviceNode() )
|
||||||
@@ -218,7 +219,7 @@ CreatePartitionJob::prettyDescription() const
|
|||||||
}
|
}
|
||||||
else
|
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( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||||
.arg( m_device->name() )
|
.arg( m_device->name() )
|
||||||
.arg( m_device->deviceNode() );
|
.arg( m_device->deviceNode() );
|
||||||
@@ -226,7 +227,8 @@ CreatePartitionJob::prettyDescription() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
return tr( "Create new <strong>%2MiB</strong> partition on <strong>%4</strong> "
|
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( userVisibleFS( m_partition->fileSystem() ) )
|
||||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||||
.arg( m_device->name() )
|
.arg( m_device->name() )
|
||||||
@@ -249,10 +251,10 @@ CreatePartitionJob::prettyStatusMessage() const
|
|||||||
type = userVisibleFS( m_partition->fileSystem() );
|
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( userVisibleFS( m_partition->fileSystem() ) )
|
||||||
.arg( m_device->deviceNode() );
|
.arg( m_device->deviceNode() );
|
||||||
}
|
}
|
||||||
@@ -269,7 +271,7 @@ CreatePartitionJob::exec()
|
|||||||
|
|
||||||
return KPMHelpers::execute(
|
return KPMHelpers::execute(
|
||||||
NewOperation( *m_device, m_partition ),
|
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
|
void
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ CreatePartitionTableJob::CreatePartitionTableJob( Device* device, PartitionTable
|
|||||||
QString
|
QString
|
||||||
CreatePartitionTableJob::prettyName() const
|
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( PartitionTable::tableTypeToName( m_type ) )
|
||||||
.arg( m_device->deviceNode() );
|
.arg( m_device->deviceNode() );
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ CreatePartitionTableJob::prettyName() const
|
|||||||
QString
|
QString
|
||||||
CreatePartitionTableJob::prettyDescription() const
|
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( PartitionTable::tableTypeToName( m_type ).toUpper() )
|
||||||
.arg( m_device->deviceNode() )
|
.arg( m_device->deviceNode() )
|
||||||
.arg( m_device->name() );
|
.arg( m_device->name() );
|
||||||
@@ -55,7 +55,7 @@ CreatePartitionTableJob::prettyDescription() const
|
|||||||
QString
|
QString
|
||||||
CreatePartitionTableJob::prettyStatusMessage() const
|
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( PartitionTable::tableTypeToName( m_type ).toUpper() )
|
||||||
.arg( m_device->deviceNode() );
|
.arg( m_device->deviceNode() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,19 +29,19 @@ CreateVolumeGroupJob::CreateVolumeGroupJob( Device*,
|
|||||||
QString
|
QString
|
||||||
CreateVolumeGroupJob::prettyName() const
|
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
|
QString
|
||||||
CreateVolumeGroupJob::prettyDescription() const
|
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
|
QString
|
||||||
CreateVolumeGroupJob::prettyStatusMessage() const
|
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
|
Calamares::JobResult
|
||||||
|
|||||||
@@ -23,19 +23,19 @@ DeactivateVolumeGroupJob::DeactivateVolumeGroupJob( LvmDevice* device )
|
|||||||
QString
|
QString
|
||||||
DeactivateVolumeGroupJob::prettyName() const
|
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
|
QString
|
||||||
DeactivateVolumeGroupJob::prettyDescription() const
|
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
|
QString
|
||||||
DeactivateVolumeGroupJob::prettyStatusMessage() const
|
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
|
Calamares::JobResult
|
||||||
|
|||||||
@@ -70,19 +70,19 @@ DeletePartitionJob::DeletePartitionJob( Device* device, Partition* partition )
|
|||||||
QString
|
QString
|
||||||
DeletePartitionJob::prettyName() const
|
DeletePartitionJob::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Delete partition %1." ).arg( m_partition->partitionPath() );
|
return tr( "Deleting partition %1…", "@status" ).arg( m_partition->partitionPath() );
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
DeletePartitionJob::prettyDescription() const
|
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
|
QString
|
||||||
DeletePartitionJob::prettyStatusMessage() const
|
DeletePartitionJob::prettyStatusMessage() const
|
||||||
{
|
{
|
||||||
return tr( "Deleting partition %1." ).arg( m_partition->partitionPath() );
|
return tr( "Deleting partition %1…", "@status" ).arg( m_partition->partitionPath() );
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ FillGlobalStorageJob::FillGlobalStorageJob( const Config*, QList< Device* > devi
|
|||||||
QString
|
QString
|
||||||
FillGlobalStorageJob::prettyName() const
|
FillGlobalStorageJob::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Set partition information" );
|
return tr( "Set partition information", "@title" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -206,14 +206,15 @@ FillGlobalStorageJob::prettyDescription() const
|
|||||||
if ( !features.isEmpty() )
|
if ( !features.isEmpty() )
|
||||||
{
|
{
|
||||||
lines.append( tr( "Install %1 on <strong>new</strong> %2 system partition "
|
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( Calamares::Branding::instance()->shortProductName() )
|
||||||
.arg( fsType )
|
.arg( fsType )
|
||||||
.arg( features ) );
|
.arg( features ) );
|
||||||
}
|
}
|
||||||
else
|
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( Calamares::Branding::instance()->shortProductName() )
|
||||||
.arg( fsType ) );
|
.arg( fsType ) );
|
||||||
}
|
}
|
||||||
@@ -223,7 +224,8 @@ FillGlobalStorageJob::prettyDescription() const
|
|||||||
if ( !features.isEmpty() )
|
if ( !features.isEmpty() )
|
||||||
{
|
{
|
||||||
lines.append( tr( "Set up <strong>new</strong> %2 partition with mount point "
|
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( mountPoint )
|
||||||
.arg( fsType )
|
.arg( fsType )
|
||||||
.arg( features ) );
|
.arg( features ) );
|
||||||
@@ -231,7 +233,8 @@ FillGlobalStorageJob::prettyDescription() const
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
lines.append( tr( "Set up <strong>new</strong> %2 partition with mount point "
|
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( mountPoint )
|
||||||
.arg( fsType )
|
.arg( fsType )
|
||||||
.arg( features ) );
|
.arg( features ) );
|
||||||
@@ -245,7 +248,8 @@ FillGlobalStorageJob::prettyDescription() const
|
|||||||
if ( !features.isEmpty() )
|
if ( !features.isEmpty() )
|
||||||
{
|
{
|
||||||
lines.append( tr( "Install %2 on %3 system partition <strong>%1</strong>"
|
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( path )
|
||||||
.arg( Calamares::Branding::instance()->shortProductName() )
|
.arg( Calamares::Branding::instance()->shortProductName() )
|
||||||
.arg( fsType )
|
.arg( fsType )
|
||||||
@@ -253,7 +257,7 @@ FillGlobalStorageJob::prettyDescription() const
|
|||||||
}
|
}
|
||||||
else
|
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( path )
|
||||||
.arg( Calamares::Branding::instance()->shortProductName() )
|
.arg( Calamares::Branding::instance()->shortProductName() )
|
||||||
.arg( fsType ) );
|
.arg( fsType ) );
|
||||||
@@ -264,7 +268,8 @@ FillGlobalStorageJob::prettyDescription() const
|
|||||||
if ( !features.isEmpty() )
|
if ( !features.isEmpty() )
|
||||||
{
|
{
|
||||||
lines.append( tr( "Set up %3 partition <strong>%1</strong> with mount point "
|
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( path )
|
||||||
.arg( mountPoint )
|
.arg( mountPoint )
|
||||||
.arg( fsType )
|
.arg( fsType )
|
||||||
@@ -273,7 +278,8 @@ FillGlobalStorageJob::prettyDescription() const
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
lines.append( tr( "Set up %3 partition <strong>%1</strong> with mount point "
|
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( path )
|
||||||
.arg( mountPoint )
|
.arg( mountPoint )
|
||||||
.arg( fsType )
|
.arg( fsType )
|
||||||
@@ -287,7 +293,7 @@ FillGlobalStorageJob::prettyDescription() const
|
|||||||
QVariant bootloaderMap = createBootLoaderMap();
|
QVariant bootloaderMap = createBootLoaderMap();
|
||||||
if ( !m_bootLoaderPath.isEmpty() )
|
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/>" );
|
return lines.join( "<br/>" );
|
||||||
}
|
}
|
||||||
@@ -296,7 +302,7 @@ FillGlobalStorageJob::prettyDescription() const
|
|||||||
QString
|
QString
|
||||||
FillGlobalStorageJob::prettyStatusMessage() const
|
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
|
QString
|
||||||
FormatPartitionJob::prettyName() const
|
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( m_partition->partitionPath() )
|
||||||
.arg( userVisibleFS( m_partition->fileSystem() ) )
|
.arg( userVisibleFS( m_partition->fileSystem() ) )
|
||||||
.arg( m_partition->capacity() / 1024 / 1024 )
|
.arg( m_partition->capacity() / 1024 / 1024 )
|
||||||
@@ -47,7 +47,8 @@ QString
|
|||||||
FormatPartitionJob::prettyDescription() const
|
FormatPartitionJob::prettyDescription() const
|
||||||
{
|
{
|
||||||
return tr( "Format <strong>%3MiB</strong> partition <strong>%1</strong> with "
|
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( m_partition->partitionPath() )
|
||||||
.arg( userVisibleFS( m_partition->fileSystem() ) )
|
.arg( userVisibleFS( m_partition->fileSystem() ) )
|
||||||
.arg( m_partition->capacity() / 1024 / 1024 );
|
.arg( m_partition->capacity() / 1024 / 1024 );
|
||||||
@@ -60,8 +61,7 @@ FormatPartitionJob::prettyStatusMessage() const
|
|||||||
? m_partition->partitionPath()
|
? m_partition->partitionPath()
|
||||||
: tr( "%1 (%2)", "partition label %1 (device path %2)" )
|
: tr( "%1 (%2)", "partition label %1 (device path %2)" )
|
||||||
.arg( m_partition->label(), m_partition->partitionPath() );
|
.arg( m_partition->label(), m_partition->partitionPath() );
|
||||||
return tr( "Formatting partition %1 with "
|
return tr( "Formatting partition %1 with file system %2…", "@status" )
|
||||||
"file system %2." )
|
|
||||||
.arg( partitionLabel, userVisibleFS( m_partition->fileSystem() ) );
|
.arg( partitionLabel, userVisibleFS( m_partition->fileSystem() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,19 +23,19 @@ RemoveVolumeGroupJob::RemoveVolumeGroupJob( Device*, LvmDevice* device )
|
|||||||
QString
|
QString
|
||||||
RemoveVolumeGroupJob::prettyName() const
|
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
|
QString
|
||||||
RemoveVolumeGroupJob::prettyDescription() const
|
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
|
QString
|
||||||
RemoveVolumeGroupJob::prettyStatusMessage() const
|
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
|
Calamares::JobResult
|
||||||
|
|||||||
@@ -36,16 +36,13 @@ ResizePartitionJob::ResizePartitionJob( Device* device, Partition* partition, qi
|
|||||||
QString
|
QString
|
||||||
ResizePartitionJob::prettyName() const
|
ResizePartitionJob::prettyName() const
|
||||||
{
|
{
|
||||||
// FIXME: Copy PM ResizeOperation code which generates a description of the
|
return tr( "Resize partition %1", "@title" ).arg( partition()->partitionPath() );
|
||||||
// operation
|
|
||||||
return tr( "Resize partition %1." ).arg( partition()->partitionPath() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
ResizePartitionJob::prettyDescription() const
|
ResizePartitionJob::prettyDescription() const
|
||||||
{
|
{
|
||||||
return tr( "Resize <strong>%2MiB</strong> partition <strong>%1</strong> to "
|
return tr( "Resize <strong>%2MiB</strong> partition <strong>%1</strong> to <strong>%3MiB</strong>", "@info" )
|
||||||
"<strong>%3MiB</strong>." )
|
|
||||||
.arg( partition()->partitionPath() )
|
.arg( partition()->partitionPath() )
|
||||||
.arg( ( BytesToMiB( m_oldLastSector - m_oldFirstSector + 1 ) * partition()->sectorSize() ) )
|
.arg( ( BytesToMiB( m_oldLastSector - m_oldFirstSector + 1 ) * partition()->sectorSize() ) )
|
||||||
.arg( ( BytesToMiB( m_newLastSector - m_newFirstSector + 1 ) * partition()->sectorSize() ) );
|
.arg( ( BytesToMiB( m_newLastSector - m_newFirstSector + 1 ) * partition()->sectorSize() ) );
|
||||||
@@ -54,8 +51,7 @@ ResizePartitionJob::prettyDescription() const
|
|||||||
QString
|
QString
|
||||||
ResizePartitionJob::prettyStatusMessage() const
|
ResizePartitionJob::prettyStatusMessage() const
|
||||||
{
|
{
|
||||||
return tr( "Resizing %2MiB partition %1 to "
|
return tr( "Resizing %2MiB partition %1 to %3MiB…", "@status" )
|
||||||
"%3MiB." )
|
|
||||||
.arg( partition()->partitionPath() )
|
.arg( partition()->partitionPath() )
|
||||||
.arg( ( BytesToMiB( m_oldLastSector - m_oldFirstSector + 1 ) * partition()->sectorSize() ) )
|
.arg( ( BytesToMiB( m_oldLastSector - m_oldFirstSector + 1 ) * partition()->sectorSize() ) )
|
||||||
.arg( ( BytesToMiB( m_newLastSector - m_newFirstSector + 1 ) * partition()->sectorSize() ) );
|
.arg( ( BytesToMiB( m_newLastSector - m_newFirstSector + 1 ) * partition()->sectorSize() ) );
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ ResizeVolumeGroupJob::ResizeVolumeGroupJob( Device*, LvmDevice* device, QVector<
|
|||||||
QString
|
QString
|
||||||
ResizeVolumeGroupJob::prettyName() const
|
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( m_device->name() )
|
||||||
.arg( currentPartitions() )
|
.arg( currentPartitions() )
|
||||||
.arg( targetPartitions() );
|
.arg( targetPartitions() );
|
||||||
@@ -34,7 +34,8 @@ ResizeVolumeGroupJob::prettyName() const
|
|||||||
QString
|
QString
|
||||||
ResizeVolumeGroupJob::prettyDescription() const
|
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( m_device->name() )
|
||||||
.arg( currentPartitions() )
|
.arg( currentPartitions() )
|
||||||
.arg( targetPartitions() );
|
.arg( targetPartitions() );
|
||||||
@@ -43,7 +44,7 @@ ResizeVolumeGroupJob::prettyDescription() const
|
|||||||
QString
|
QString
|
||||||
ResizeVolumeGroupJob::prettyStatusMessage() const
|
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( m_device->name() )
|
||||||
.arg( currentPartitions() )
|
.arg( currentPartitions() )
|
||||||
.arg( targetPartitions() );
|
.arg( targetPartitions() );
|
||||||
|
|||||||
@@ -41,17 +41,17 @@ SetPartFlagsJob::prettyName() const
|
|||||||
{
|
{
|
||||||
if ( !partition()->partitionPath().isEmpty() )
|
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() );
|
QString fsNameForUser = userVisibleFS( partition()->fileSystem() );
|
||||||
if ( !fsNameForUser.isEmpty() )
|
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( BytesToMiB( partition()->capacity() ) )
|
||||||
.arg( fsNameForUser );
|
.arg( fsNameForUser );
|
||||||
}
|
}
|
||||||
return tr( "Set flags on new partition." );
|
return tr( "Set flags on new partition", "@title" );
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
@@ -62,23 +62,22 @@ SetPartFlagsJob::prettyDescription() const
|
|||||||
{
|
{
|
||||||
if ( !partition()->partitionPath().isEmpty() )
|
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() );
|
QString fsNameForUser = userVisibleFS( partition()->fileSystem() );
|
||||||
if ( !fsNameForUser.isEmpty() )
|
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( BytesToMiB( partition()->capacity() ) )
|
||||||
.arg( fsNameForUser );
|
.arg( fsNameForUser );
|
||||||
}
|
}
|
||||||
return tr( "Clear flags on new partition." );
|
return tr( "Clear flags on new partition", "@info" );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !partition()->partitionPath().isEmpty() )
|
if ( !partition()->partitionPath().isEmpty() )
|
||||||
{
|
{
|
||||||
return tr( "Flag partition <strong>%1</strong> as "
|
return tr( "Set flags on partition <strong>%1</strong> to <strong>%2</strong>", "@info" )
|
||||||
"<strong>%2</strong>." )
|
|
||||||
.arg( partition()->partitionPath() )
|
.arg( partition()->partitionPath() )
|
||||||
.arg( flagsList.join( ", " ) );
|
.arg( flagsList.join( ", " ) );
|
||||||
}
|
}
|
||||||
@@ -86,14 +85,13 @@ SetPartFlagsJob::prettyDescription() const
|
|||||||
QString fsNameForUser = userVisibleFS( partition()->fileSystem() );
|
QString fsNameForUser = userVisibleFS( partition()->fileSystem() );
|
||||||
if ( !fsNameForUser.isEmpty() )
|
if ( !fsNameForUser.isEmpty() )
|
||||||
{
|
{
|
||||||
return tr( "Flag %1MiB <strong>%2</strong> partition as "
|
return tr( "Set flags on %1MiB <strong>%2</strong> partition to <strong>%3</strong>", "@info" )
|
||||||
"<strong>%3</strong>." )
|
|
||||||
.arg( BytesToMiB( partition()->capacity() ) )
|
.arg( BytesToMiB( partition()->capacity() ) )
|
||||||
.arg( fsNameForUser )
|
.arg( fsNameForUser )
|
||||||
.arg( flagsList.join( ", " ) );
|
.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
|
QString
|
||||||
@@ -104,24 +102,24 @@ SetPartFlagsJob::prettyStatusMessage() const
|
|||||||
{
|
{
|
||||||
if ( !partition()->partitionPath().isEmpty() )
|
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() );
|
QString fsNameForUser = userVisibleFS( partition()->fileSystem() );
|
||||||
if ( !fsNameForUser.isEmpty() )
|
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( BytesToMiB( partition()->capacity() ) )
|
||||||
.arg( fsNameForUser );
|
.arg( fsNameForUser );
|
||||||
}
|
}
|
||||||
|
|
||||||
return tr( "Clearing flags on new partition." );
|
return tr( "Clearing flags on new partition…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !partition()->partitionPath().isEmpty() )
|
if ( !partition()->partitionPath().isEmpty() )
|
||||||
{
|
{
|
||||||
return tr( "Setting flags <strong>%2</strong> on partition "
|
return tr( "Setting flags <strong>%2</strong> on partition <strong>%1</strong>…", "@status" )
|
||||||
"<strong>%1</strong>." )
|
|
||||||
.arg( partition()->partitionPath() )
|
.arg( partition()->partitionPath() )
|
||||||
.arg( flagsList.join( ", " ) );
|
.arg( flagsList.join( ", " ) );
|
||||||
}
|
}
|
||||||
@@ -129,14 +127,13 @@ SetPartFlagsJob::prettyStatusMessage() const
|
|||||||
QString fsNameForUser = userVisibleFS( partition()->fileSystem() );
|
QString fsNameForUser = userVisibleFS( partition()->fileSystem() );
|
||||||
if ( !fsNameForUser.isEmpty() )
|
if ( !fsNameForUser.isEmpty() )
|
||||||
{
|
{
|
||||||
return tr( "Setting flags <strong>%3</strong> on "
|
return tr( "Setting flags <strong>%3</strong> on %1MiB <strong>%2</strong> partition…", "@status" )
|
||||||
"%1MiB <strong>%2</strong> partition." )
|
|
||||||
.arg( BytesToMiB( partition()->capacity() ) )
|
.arg( BytesToMiB( partition()->capacity() ) )
|
||||||
.arg( fsNameForUser )
|
.arg( fsNameForUser )
|
||||||
.arg( flagsList.join( ", " ) );
|
.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
|
Calamares::JobResult
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ PlasmaLnfJob::~PlasmaLnfJob() {}
|
|||||||
QString
|
QString
|
||||||
PlasmaLnfJob::prettyName() const
|
PlasmaLnfJob::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Plasma Look-and-Feel Job" );
|
return tr( "Applying Plasma Look-and-Feel…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ PlasmaLnfViewStep::~PlasmaLnfViewStep()
|
|||||||
QString
|
QString
|
||||||
PlasmaLnfViewStep::prettyName() const
|
PlasmaLnfViewStep::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Look-and-Feel" );
|
return tr( "Look-and-Feel", "@label" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ PreserveFiles::~PreserveFiles() {}
|
|||||||
QString
|
QString
|
||||||
PreserveFiles::prettyName() const
|
PreserveFiles::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Saving files for later ..." );
|
return tr( "Saving files for later…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ RemoveUserJob::~RemoveUserJob() {}
|
|||||||
QString
|
QString
|
||||||
RemoveUserJob::prettyName() const
|
RemoveUserJob::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Remove live user from target system" );
|
return tr( "Removing live user from the target system…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ ShellProcessJob::prettyName() const
|
|||||||
{
|
{
|
||||||
return m_name->get();
|
return m_name->get();
|
||||||
}
|
}
|
||||||
return tr( "Shell Processes Job" );
|
return tr( "Running shell processes…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ calamares_add_plugin(summary
|
|||||||
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
||||||
SOURCES
|
SOURCES
|
||||||
Config.cpp
|
Config.cpp
|
||||||
|
SummaryModel.cpp
|
||||||
SummaryPage.cpp
|
SummaryPage.cpp
|
||||||
SummaryViewStep.cpp
|
SummaryViewStep.cpp
|
||||||
UI
|
UI
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
|
|
||||||
|
#include "SummaryModel.h"
|
||||||
|
|
||||||
#include "Branding.h"
|
#include "Branding.h"
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
#include "ViewManager.h"
|
#include "ViewManager.h"
|
||||||
@@ -18,67 +20,6 @@
|
|||||||
#include "utils/Retranslator.h"
|
#include "utils/Retranslator.h"
|
||||||
#include "viewpages/ExecutionViewStep.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 )
|
Config::Config( QObject* parent )
|
||||||
: QObject( parent )
|
: QObject( parent )
|
||||||
, m_summary( new SummaryModel( this ) )
|
, m_summary( new SummaryModel( this ) )
|
||||||
@@ -91,7 +32,7 @@ Config::Config( QObject* parent )
|
|||||||
void
|
void
|
||||||
Config::retranslate()
|
Config::retranslate()
|
||||||
{
|
{
|
||||||
m_title = tr( "Summary" );
|
m_title = tr( "Summary", "@label" );
|
||||||
|
|
||||||
if ( Calamares::Settings::instance()->isSetupMode() )
|
if ( Calamares::Settings::instance()->isSetupMode() )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,60 +11,10 @@
|
|||||||
#ifndef SUMMARY_CONFIG_H
|
#ifndef SUMMARY_CONFIG_H
|
||||||
#define SUMMARY_CONFIG_H
|
#define SUMMARY_CONFIG_H
|
||||||
|
|
||||||
|
#include "SummaryModel.h"
|
||||||
|
|
||||||
#include "viewpages/ViewStep.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
|
class Config : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
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
|
SOURCES
|
||||||
SummaryQmlViewStep.cpp
|
SummaryQmlViewStep.cpp
|
||||||
${_summary}/Config.cpp
|
${_summary}/Config.cpp
|
||||||
|
${_summary}/SummaryModel.cpp
|
||||||
UI
|
UI
|
||||||
RESOURCES
|
RESOURCES
|
||||||
summaryq${QT_VERSION_SUFFIX}.qrc
|
summaryq${QT_VERSION_SUFFIX}.qrc
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ TrackingInstallJob::prettyName() const
|
|||||||
QString
|
QString
|
||||||
TrackingInstallJob::prettyStatusMessage() const
|
TrackingInstallJob::prettyStatusMessage() const
|
||||||
{
|
{
|
||||||
return QCoreApplication::translate( "TrackingInstallJob", "Sending installation feedback." );
|
return QCoreApplication::translate( "TrackingInstallJob", "Sending installation feedback…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
@@ -138,7 +138,7 @@ TrackingMachineUpdateManagerJob::prettyName() const
|
|||||||
QString
|
QString
|
||||||
TrackingMachineUpdateManagerJob::prettyStatusMessage() const
|
TrackingMachineUpdateManagerJob::prettyStatusMessage() const
|
||||||
{
|
{
|
||||||
return QCoreApplication::translate( "TrackingMachineUpdateManagerJob", "Configuring machine feedback." );
|
return QCoreApplication::translate( "TrackingMachineUpdateManagerJob", "Configuring machine feedback…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
@@ -195,7 +195,7 @@ TrackingKUserFeedbackJob::prettyName() const
|
|||||||
QString
|
QString
|
||||||
TrackingKUserFeedbackJob::prettyStatusMessage() const
|
TrackingKUserFeedbackJob::prettyStatusMessage() const
|
||||||
{
|
{
|
||||||
return QCoreApplication::translate( "TrackingKUserFeedbackJob", "Configuring KDE user feedback." );
|
return QCoreApplication::translate( "TrackingKUserFeedbackJob", "Configuring KDE user feedback…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ TrackingViewStep::~TrackingViewStep()
|
|||||||
QString
|
QString
|
||||||
TrackingViewStep::prettyName() const
|
TrackingViewStep::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Feedback" );
|
return tr( "Feedback", "@title" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ UmountJob::~UmountJob() {}
|
|||||||
QString
|
QString
|
||||||
UmountJob::prettyName() const
|
UmountJob::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Unmount file systems." );
|
return tr( "Unmounting file systems…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
static Calamares::JobResult
|
static Calamares::JobResult
|
||||||
|
|||||||
@@ -36,13 +36,13 @@ CreateUserJob::prettyName() const
|
|||||||
QString
|
QString
|
||||||
CreateUserJob::prettyDescription() const
|
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
|
QString
|
||||||
CreateUserJob::prettyStatusMessage() const
|
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
|
static Calamares::JobResult
|
||||||
@@ -117,7 +117,7 @@ CreateUserJob::exec()
|
|||||||
// This GS setting comes from the **partitioning** module.
|
// This GS setting comes from the **partitioning** module.
|
||||||
if ( reuseHome )
|
if ( reuseHome )
|
||||||
{
|
{
|
||||||
m_status = tr( "Preserving home directory" );
|
m_status = tr( "Preserving home directory…", "@status" );
|
||||||
emit progress( 0.2 );
|
emit progress( 0.2 );
|
||||||
QString shellFriendlyHome = "/home/" + m_config->loginName();
|
QString shellFriendlyHome = "/home/" + m_config->loginName();
|
||||||
QDir existingHome( destDir.absolutePath() + shellFriendlyHome );
|
QDir existingHome( destDir.absolutePath() + shellFriendlyHome );
|
||||||
@@ -134,7 +134,7 @@ CreateUserJob::exec()
|
|||||||
|
|
||||||
cDebug() << "[CREATEUSER]: creating user";
|
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 );
|
emit progress( 0.5 );
|
||||||
auto useraddResult = createUser( m_config->loginName(), m_config->fullName(), m_config->userShell() );
|
auto useraddResult = createUser( m_config->loginName(), m_config->fullName(), m_config->userShell() );
|
||||||
if ( !useraddResult )
|
if ( !useraddResult )
|
||||||
@@ -142,7 +142,7 @@ CreateUserJob::exec()
|
|||||||
return useraddResult;
|
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 );
|
emit progress( 0.8 );
|
||||||
auto usergroupsResult = setUserGroups( m_config->loginName(), m_config->groupsForThisUser() );
|
auto usergroupsResult = setUserGroups( m_config->loginName(), m_config->groupsForThisUser() );
|
||||||
if ( !usergroupsResult )
|
if ( !usergroupsResult )
|
||||||
@@ -150,7 +150,7 @@ CreateUserJob::exec()
|
|||||||
return usergroupsResult;
|
return usergroupsResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_status = tr( "Setting file permissions" );
|
m_status = tr( "Setting file permissions…", "@status" );
|
||||||
emit progress( 0.9 );
|
emit progress( 0.9 );
|
||||||
QString userGroup = QString( "%1:%2" ).arg( m_config->loginName() ).arg( m_config->loginName() );
|
QString userGroup = QString( "%1:%2" ).arg( m_config->loginName() ).arg( m_config->loginName() );
|
||||||
QString homeDir = QString( "/home/%1" ).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
|
QString
|
||||||
SetupSudoJob::prettyName() const
|
SetupSudoJob::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Configure <pre>sudo</pre> users." );
|
return tr( "Configuring <pre>sudo</pre> users…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString
|
static QString
|
||||||
@@ -178,7 +178,7 @@ SetupGroupsJob::SetupGroupsJob( const Config* config )
|
|||||||
QString
|
QString
|
||||||
SetupGroupsJob::prettyName() const
|
SetupGroupsJob::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Preparing groups." );
|
return tr( "Preparing groups…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ SetHostNameJob::prettyDescription() const
|
|||||||
QString
|
QString
|
||||||
SetHostNameJob::prettyStatusMessage() const
|
SetHostNameJob::prettyStatusMessage() const
|
||||||
{
|
{
|
||||||
return tr( "Setting hostname %1." ).arg( m_config->hostname() );
|
return tr( "Setting hostname %1…", "@status" ).arg( m_config->hostname() );
|
||||||
}
|
}
|
||||||
|
|
||||||
STATICTEST bool
|
STATICTEST bool
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ SetPasswordJob::prettyName() const
|
|||||||
QString
|
QString
|
||||||
SetPasswordJob::prettyStatusMessage() const
|
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
|
#ifndef HAVE_CRYPT_GENSALT
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ Kirigami.ScrollablePage {
|
|||||||
id: _userNameField
|
id: _userNameField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
enabled: config.isEditable("fullName")
|
enabled: config.isEditable("fullName")
|
||||||
placeholderText: qsTr("Your Full Name")
|
placeholderText: qsTr("Your full name")
|
||||||
text: config.fullName
|
text: config.fullName
|
||||||
onTextChanged: config.setFullName(text)
|
onTextChanged: config.setFullName(text)
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ Kirigami.ScrollablePage {
|
|||||||
id: _userLoginField
|
id: _userLoginField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
enabled: config.isEditable("loginName")
|
enabled: config.isEditable("loginName")
|
||||||
placeholderText: qsTr("Login Name")
|
placeholderText: qsTr("Login name")
|
||||||
text: config.loginName
|
text: config.loginName
|
||||||
validator: RegularExpressionValidator { regularExpression: /[a-z_][a-z0-9_-]*[$]?$/ }
|
validator: RegularExpressionValidator { regularExpression: /[a-z_][a-z0-9_-]*[$]?$/ }
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ Kirigami.ScrollablePage {
|
|||||||
TextField {
|
TextField {
|
||||||
id: _hostName
|
id: _hostName
|
||||||
width: parent.width
|
width: parent.width
|
||||||
placeholderText: qsTr("Computer Name")
|
placeholderText: qsTr("Computer name")
|
||||||
text: config.hostname
|
text: config.hostname
|
||||||
validator: RegularExpressionValidator { regularExpression: /[a-zA-Z0-9][-a-zA-Z0-9_]+/ }
|
validator: RegularExpressionValidator { regularExpression: /[a-zA-Z0-9][-a-zA-Z0-9_]+/ }
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ Kirigami.ScrollablePage {
|
|||||||
TextField {
|
TextField {
|
||||||
id: _verificationPasswordField
|
id: _verificationPasswordField
|
||||||
width: parent.width / 2 - 10
|
width: parent.width / 2 - 10
|
||||||
placeholderText: qsTr("Repeat Password")
|
placeholderText: qsTr("Repeat password")
|
||||||
text: config.userPasswordSecondary
|
text: config.userPasswordSecondary
|
||||||
|
|
||||||
onTextChanged: _passwordField.text === _verificationPasswordField.text
|
onTextChanged: _passwordField.text === _verificationPasswordField.text
|
||||||
@@ -324,7 +324,7 @@ Kirigami.ScrollablePage {
|
|||||||
TextField {
|
TextField {
|
||||||
id: _rootPasswordField
|
id: _rootPasswordField
|
||||||
width: parent.width / 2 -10
|
width: parent.width / 2 -10
|
||||||
placeholderText: qsTr("Root Password")
|
placeholderText: qsTr("Root password")
|
||||||
text: config.rootPassword
|
text: config.rootPassword
|
||||||
|
|
||||||
onTextChanged: config.setRootPassword(text)
|
onTextChanged: config.setRootPassword(text)
|
||||||
@@ -342,7 +342,7 @@ Kirigami.ScrollablePage {
|
|||||||
TextField {
|
TextField {
|
||||||
id: _verificationRootPasswordField
|
id: _verificationRootPasswordField
|
||||||
width: parent.width / 2 -10
|
width: parent.width / 2 -10
|
||||||
placeholderText: qsTr("Repeat Root Password")
|
placeholderText: qsTr("Repeat root password")
|
||||||
text: config.rootPasswordSecondary
|
text: config.rootPasswordSecondary
|
||||||
|
|
||||||
onTextChanged: _rootPasswordField.text === _verificationRootPasswordField.text
|
onTextChanged: _rootPasswordField.text === _verificationRootPasswordField.text
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ Kirigami.ScrollablePage {
|
|||||||
id: _userNameField
|
id: _userNameField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
enabled: config.isEditable("fullName")
|
enabled: config.isEditable("fullName")
|
||||||
placeholderText: qsTr("Your Full Name")
|
placeholderText: qsTr("Your full name")
|
||||||
text: config.fullName
|
text: config.fullName
|
||||||
onTextChanged: config.setFullName(text)
|
onTextChanged: config.setFullName(text)
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ Kirigami.ScrollablePage {
|
|||||||
id: _userLoginField
|
id: _userLoginField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
enabled: config.isEditable("loginName")
|
enabled: config.isEditable("loginName")
|
||||||
placeholderText: qsTr("Login Name")
|
placeholderText: qsTr("Login name")
|
||||||
text: config.loginName
|
text: config.loginName
|
||||||
validator: RegularExpressionValidator { regularExpression: /[a-z_][a-z0-9_-]*[$]?$/ }
|
validator: RegularExpressionValidator { regularExpression: /[a-z_][a-z0-9_-]*[$]?$/ }
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ Kirigami.ScrollablePage {
|
|||||||
TextField {
|
TextField {
|
||||||
id: _hostName
|
id: _hostName
|
||||||
width: parent.width
|
width: parent.width
|
||||||
placeholderText: qsTr("Computer Name")
|
placeholderText: qsTr("Computer name")
|
||||||
text: config.hostname
|
text: config.hostname
|
||||||
validator: RegularExpressionValidator { regularExpression: /[a-zA-Z0-9][-a-zA-Z0-9_]+/ }
|
validator: RegularExpressionValidator { regularExpression: /[a-zA-Z0-9][-a-zA-Z0-9_]+/ }
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ Kirigami.ScrollablePage {
|
|||||||
TextField {
|
TextField {
|
||||||
id: _verificationPasswordField
|
id: _verificationPasswordField
|
||||||
width: parent.width / 2 - 10
|
width: parent.width / 2 - 10
|
||||||
placeholderText: qsTr("Repeat Password")
|
placeholderText: qsTr("Repeat password")
|
||||||
text: config.userPasswordSecondary
|
text: config.userPasswordSecondary
|
||||||
|
|
||||||
onTextChanged: _passwordField.text === _verificationPasswordField.text
|
onTextChanged: _passwordField.text === _verificationPasswordField.text
|
||||||
@@ -325,7 +325,7 @@ Kirigami.ScrollablePage {
|
|||||||
TextField {
|
TextField {
|
||||||
id: _rootPasswordField
|
id: _rootPasswordField
|
||||||
width: parent.width / 2 -10
|
width: parent.width / 2 -10
|
||||||
placeholderText: qsTr("Root Password")
|
placeholderText: qsTr("Root password")
|
||||||
text: config.rootPassword
|
text: config.rootPassword
|
||||||
|
|
||||||
onTextChanged: config.setRootPassword(text)
|
onTextChanged: config.setRootPassword(text)
|
||||||
@@ -343,7 +343,7 @@ Kirigami.ScrollablePage {
|
|||||||
TextField {
|
TextField {
|
||||||
id: _verificationRootPasswordField
|
id: _verificationRootPasswordField
|
||||||
width: parent.width / 2 -10
|
width: parent.width / 2 -10
|
||||||
placeholderText: qsTr("Repeat Root Password")
|
placeholderText: qsTr("Repeat root password")
|
||||||
text: config.rootPasswordSecondary
|
text: config.rootPasswordSecondary
|
||||||
|
|
||||||
onTextChanged: _rootPasswordField.text === _verificationRootPasswordField.text
|
onTextChanged: _rootPasswordField.text === _verificationRootPasswordField.text
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ WelcomePage::retranslate()
|
|||||||
|
|
||||||
ui->mainText->setText( message.arg( Calamares::Branding::instance()->versionedName() ) );
|
ui->mainText->setText( message.arg( Calamares::Branding::instance()->versionedName() ) );
|
||||||
ui->retranslateUi( this );
|
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
|
void
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ WelcomeViewStep::~WelcomeViewStep()
|
|||||||
QString
|
QString
|
||||||
WelcomeViewStep::prettyName() const
|
WelcomeViewStep::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Welcome" );
|
return tr( "Welcome", "@title" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ WelcomeQmlViewStep::WelcomeQmlViewStep( QObject* parent )
|
|||||||
QString
|
QString
|
||||||
WelcomeQmlViewStep::prettyName() const
|
WelcomeQmlViewStep::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Welcome" );
|
return tr( "Welcome", "@title" );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ Page
|
|||||||
|
|
||||||
Button {
|
Button {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Known issues")
|
text: qsTr("Known Issues")
|
||||||
icon.name: "tools-report-bug"
|
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.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
|
||||||
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
||||||
@@ -88,7 +88,7 @@ Page
|
|||||||
|
|
||||||
Button {
|
Button {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Release notes")
|
text: qsTr("Release Notes")
|
||||||
icon.name: "folder-text"
|
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.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
|
||||||
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ Page
|
|||||||
|
|
||||||
Button {
|
Button {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Known issues")
|
text: qsTr("Known Issues")
|
||||||
icon.name: "tools-report-bug"
|
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.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
|
||||||
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
||||||
@@ -88,7 +88,7 @@ Page
|
|||||||
|
|
||||||
Button {
|
Button {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Release notes")
|
text: qsTr("Release Notes")
|
||||||
icon.name: "folder-text"
|
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.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
|
||||||
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ ZfsJob::~ZfsJob() {}
|
|||||||
QString
|
QString
|
||||||
ZfsJob::prettyName() const
|
ZfsJob::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Create ZFS pools and datasets" );
|
return tr( "Creating ZFS pools and datasets…", "@status" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user