Merge branch 'master' of https://github.com/calamares/calamares into development
This commit is contained in:
commit
b88e5589ed
22
CHANGES
22
CHANGES
@ -6,18 +6,38 @@ website will have to do for older versions.
|
||||
# 3.2.21 (unreleased) #
|
||||
|
||||
This release contains contributions from (alphabetically by first name):
|
||||
- No external contributors yet
|
||||
- Camilo Higuita
|
||||
- Gabriel Craciunescu
|
||||
- Gaël PORTAY
|
||||
|
||||
## Core ##
|
||||
- Python job modules (such as *unpackfs* or *packages*) can now provide
|
||||
a `pretty_status_message()` function, like the existing `pretty_name()`
|
||||
function, that is used to update the status during install. #1330
|
||||
- QML support-modules and objects are now registered into the io.calamares
|
||||
namespace. This affects modules using Calamares models inside their
|
||||
QML UI (at this point, very few). With this release, the necessary
|
||||
`import` for Calamares parts looks like
|
||||
> ```import io.calamares.ui 1.0```
|
||||
A complete list of objects available from Calamares van be found in the
|
||||
documentation in `Qml.h`.
|
||||
- The sidebar (which shows overall progress in the installation) is now
|
||||
more configurable: the branding key *sidebar* controls it. The sidebar
|
||||
can be shown as a widget (default, as it has been), hidden, or use a
|
||||
new QML view which is more easily customised.
|
||||
|
||||
## Modules ##
|
||||
- *packages* now reports more details in the installation progress-bar.
|
||||
- *netinstall* module supports and `expanded` key, which will pre-expand
|
||||
a group (as if the user had pressed the arrow-button in the tree-view).
|
||||
This only affects the UI.
|
||||
- Modules that use QML need a new import line. The QML file for the
|
||||
module is configured through new keys *qmlSearch* and *qmlFilename*
|
||||
(previously those were without the `qml` prefix, which invites name
|
||||
collisions). The full module identifier is also used as a filename,
|
||||
so that multiple instances of a module can use different QML files.
|
||||
- *partition* module has a number of new features and settings for
|
||||
type, UUID, and filesystem characteristics. Thanks to Gaël.
|
||||
|
||||
|
||||
# 3.2.20 (2020-02-27) #
|
||||
|
@ -135,10 +135,11 @@ set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules" )
|
||||
if( POLICY CMP0057 )
|
||||
cmake_policy( SET CMP0057 NEW )
|
||||
endif()
|
||||
# CMake 3.9, 3.10 compatibility
|
||||
# Let ``AUTOMOC`` and ``AUTOUIC`` process ``GENERATED`` files.
|
||||
if( POLICY CMP0071 )
|
||||
cmake_policy( SET CMP0071 NEW )
|
||||
endif()
|
||||
# Recognize more macros to trigger automoc
|
||||
if(NOT CMAKE_VERSION VERSION_LESS "3.10.0")
|
||||
list(APPEND CMAKE_AUTOMOC_MACRO_NAMES
|
||||
"K_PLUGIN_FACTORY_WITH_JSON"
|
||||
|
@ -212,17 +212,17 @@
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="108"/>
|
||||
<source>Loading ...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Indlæser ...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="129"/>
|
||||
<source>QML Step <i>%1</i>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>QML-trin <i>%1</i>.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="347"/>
|
||||
<source>Loading failed.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Indlæsning mislykkedes.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1632,7 +1632,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.</translation
|
||||
<message>
|
||||
<location filename="../src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp" line="208"/>
|
||||
<source>Could not configure LUKS key file on partition %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Kunne ikke konfigurere LUKS-nøglefil på partitionen %1.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1692,52 +1692,52 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.</translation
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="65"/>
|
||||
<source>Office software</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Kontorsoftware</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="66"/>
|
||||
<source>Office package</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Kontorpakke</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="67"/>
|
||||
<source>Browser software</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Browsersoftware</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="68"/>
|
||||
<source>Browser package</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Browserpakke</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="69"/>
|
||||
<source>Web browser</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Webbrowser</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="70"/>
|
||||
<source>Kernel</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Kerne</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="71"/>
|
||||
<source>Services</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Tjenester</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="72"/>
|
||||
<source>Login</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Log ind</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="73"/>
|
||||
<source>Desktop</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Skrivebord</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="74"/>
|
||||
<source>Applications</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Programmer</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1745,7 +1745,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.</translation
|
||||
<message>
|
||||
<location filename="../src/modules/notesqml/NotesQmlViewStep.cpp" line="34"/>
|
||||
<source>Notes</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Noter</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2445,7 +2445,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.</translation
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="651"/>
|
||||
<source>There are no partitions to install on.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Der er ikke nogen partitioner at installere på.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -3535,7 +3535,8 @@ Output:
|
||||
<location filename="../src/modules/notesqml/notesqml.qml" line="60"/>
|
||||
<source><h3>%1</h3>
|
||||
<p>These are example release notes.</p></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h3>%1</h3>
|
||||
<p>Dette er eksempler på udgivelsesnoter.</p></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -3543,32 +3544,32 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="42"/>
|
||||
<source><h3>%1 <quote>%2</quote></h3></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h3>%1 <quote>%2</quote></h3></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="75"/>
|
||||
<source>About</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Om</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="86"/>
|
||||
<source>Support</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Support</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="97"/>
|
||||
<source>Known issues</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Kendte problemer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="108"/>
|
||||
<source>Release notes</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Udgivelsesnoter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="119"/>
|
||||
<source>Donate</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Donér</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@ -392,7 +392,7 @@ Il programma d'installazione sarà terminato e tutte le modifiche andranno perse
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="330"/>
|
||||
<source>The %1 installer is about to make changes to your disk in order to install %2.<br/><strong>You will not be able to undo these changes.</strong></source>
|
||||
<translation>Il programma d'nstallazione %1 sta per eseguire delle modifiche al tuo disco per poter installare %2.<br/><strong> Non sarà possibile annullare tali modifiche.</strong></translation>
|
||||
<translation>Il programma d'installazione %1 sta per eseguire delle modifiche al tuo disco per poter installare %2.<br/><strong> Non sarà possibile annullare tali modifiche.</strong></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="333"/>
|
||||
@ -742,7 +742,7 @@ Il programma d'installazione sarà terminato e tutte le modifiche andranno perse
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/CreatePartitionDialog.ui" line="38"/>
|
||||
<source>Si&ze:</source>
|
||||
<translation>&Dimensione:</translation>
|
||||
<translation>Dimen&sione:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/CreatePartitionDialog.cpp" line="72"/>
|
||||
@ -3352,7 +3352,7 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/calamares/VariantModel.cpp" line="241"/>
|
||||
<source>Key</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Chiave</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/calamares/VariantModel.cpp" line="245"/>
|
||||
|
@ -3536,7 +3536,7 @@ Saída:
|
||||
<source><h3>%1</h3>
|
||||
<p>These are example release notes.</p></source>
|
||||
<translation><h3>%1</h3>
|
||||
<p>These are example release notes.</p></translation>
|
||||
<p>Estes são exemplos de notas.</p></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -106,7 +106,7 @@
|
||||
<message>
|
||||
<location filename="../src/calamares/DebugWindow.ui" line="113"/>
|
||||
<source>Widget Tree</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Strom miniaplikácií</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/calamares/DebugWindow.cpp" line="231"/>
|
||||
@ -212,7 +212,7 @@
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="108"/>
|
||||
<source>Loading ...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Načítava sa...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="129"/>
|
||||
@ -222,7 +222,7 @@
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="347"/>
|
||||
<source>Loading failed.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Načítavanie zlyhalo.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1302,7 +1302,7 @@ Inštalátor sa ukončí a všetky zmeny budú stratené.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="164"/>
|
||||
<source>is running the installer as an administrator (root)</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>má spustený inštalátor s právami správcu (root)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="167"/>
|
||||
@ -1317,7 +1317,7 @@ Inštalátor sa ukončí a všetky zmeny budú stratené.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="176"/>
|
||||
<source>has a screen large enough to show the whole installer</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>má obrazovku dostatočne veľkú na zobrazenie celého inštalátora</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="179"/>
|
||||
@ -1485,12 +1485,12 @@ Inštalátor sa ukončí a všetky zmeny budú stratené.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/license/LicensePage.cpp" line="164"/>
|
||||
<source>This setup procedure can install proprietary software that is subject to licensing terms in order to provide additional features and enhance the user experience.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Tento proces inštalácie môže nainštalovať uzavretý softvér, ktorý je predmetom licenčných podmienok v rámci poskytovania dodatočných funkcií a vylepšenia používateľských skúseností.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/license/LicensePage.cpp" line="169"/>
|
||||
<source>If you do not agree with the terms, proprietary software will not be installed, and open source alternatives will be used instead.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Ak nesúhlasíte s podmienkami, uzavretý softvér nebude nainštalovaný a namiesto neho budú použité alternatívy s otvoreným zdrojom.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1631,12 +1631,12 @@ Inštalátor sa ukončí a všetky zmeny budú stratené.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp" line="200"/>
|
||||
<source>Could not create LUKS key file for root partition %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Nepodarilo sa vytvoriť kľúčový súbor LUKS pre koreňový oddiel %1.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp" line="208"/>
|
||||
<source>Could not configure LUKS key file on partition %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Nepodarilo sa nastaviť kľúčový súbor LUKS na oddieli %1.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1696,52 +1696,52 @@ Inštalátor sa ukončí a všetky zmeny budú stratené.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="65"/>
|
||||
<source>Office software</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Kancelársky softvér</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="66"/>
|
||||
<source>Office package</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Kancelársky balík</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="67"/>
|
||||
<source>Browser software</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Prehliadač</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="68"/>
|
||||
<source>Browser package</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Balík prehliadača</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="69"/>
|
||||
<source>Web browser</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Webový prehliadač</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="70"/>
|
||||
<source>Kernel</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Jadro</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="71"/>
|
||||
<source>Services</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Služby</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="72"/>
|
||||
<source>Login</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Prihlásenie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="73"/>
|
||||
<source>Desktop</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Pracovné prostredie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="74"/>
|
||||
<source>Applications</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Aplikácie</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1749,7 +1749,7 @@ Inštalátor sa ukončí a všetky zmeny budú stratené.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/notesqml/NotesQmlViewStep.cpp" line="34"/>
|
||||
<source>Notes</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Poznámky</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2449,7 +2449,7 @@ Inštalátor sa ukončí a všetky zmeny budú stratené.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="651"/>
|
||||
<source>There are no partitions to install on.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Neexistujú žiadne oddiely, na ktoré je možné vykonať inštaláciu.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -3321,12 +3321,12 @@ Výstup:
|
||||
<message>
|
||||
<location filename="../src/modules/users/UsersPage.cpp" line="399"/>
|
||||
<source>Only lowercase letters, numbers, underscore and hyphen are allowed.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Sú povolené iba malé písmená, číslice, podtržníky a pomlčky.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/UsersPage.cpp" line="447"/>
|
||||
<source>Only letters, numbers, underscore and hyphen are allowed.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Sú povolené iba písmená, číslice, podtržníky a pomlčky.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/UsersPage.cpp" line="435"/>
|
||||
@ -3539,7 +3539,8 @@ Výstup:
|
||||
<location filename="../src/modules/notesqml/notesqml.qml" line="60"/>
|
||||
<source><h3>%1</h3>
|
||||
<p>These are example release notes.</p></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h3>%1</h3>
|
||||
<p>Toto sú vzorové poznámky k vydaniu.</p></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -3547,32 +3548,32 @@ Výstup:
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="42"/>
|
||||
<source><h3>%1 <quote>%2</quote></h3></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h3>%1 <quote>%2</quote></h3></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="75"/>
|
||||
<source>About</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>O inštalátore</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="86"/>
|
||||
<source>Support</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Podpora</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="97"/>
|
||||
<source>Known issues</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Známe problémy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="108"/>
|
||||
<source>Release notes</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Poznámky k vydaniu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="119"/>
|
||||
<source>Donate</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Prispieť</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@ -101,7 +101,7 @@
|
||||
<message>
|
||||
<location filename="../src/calamares/DebugWindow.ui" line="106"/>
|
||||
<source>Reload Stylesheet</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Ladda om stilmall</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/calamares/DebugWindow.ui" line="113"/>
|
||||
@ -1025,7 +1025,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/dummycpp/DummyCppJob.cpp" line="46"/>
|
||||
<source>Dummy C++ Job</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Exempel C++ jobb</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1129,7 +1129,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="169"/>
|
||||
<source>Set up <strong>new</strong> %2 partition with mount point <strong>%1</strong>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Skapa <strong> ny </strong> %2 partition med monteringspunkt <strong> %1</strong>.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="179"/>
|
||||
@ -1139,7 +1139,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="186"/>
|
||||
<source>Set up %3 partition <strong>%1</strong> with mount point <strong>%2</strong>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Skapa %3 partition <strong>%1</strong> med monteringspunkt <strong>%2</strong>.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="199"/>
|
||||
@ -1197,7 +1197,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/finished/FinishedPage.cpp" line="139"/>
|
||||
<source><h1>Installation Failed</h1><br/>%1 has not been installed on your computer.<br/>The error message was: %2.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h1>Installationen misslyckades</h1> <br/>%1 har inte blivit installerad på din dator. <br/>Felmeddelandet var: %2</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1384,7 +1384,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/interactiveterminal/InteractiveTerminalPage.cpp" line="54"/>
|
||||
<source>Please install KDE Konsole and try again!</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Installera KDE Konsole och försök igen!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/interactiveterminal/InteractiveTerminalPage.cpp" line="116"/>
|
||||
@ -1625,12 +1625,12 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp" line="200"/>
|
||||
<source>Could not create LUKS key file for root partition %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Kunde inte skapa LUKS nyckelfil för root partition %1.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp" line="208"/>
|
||||
<source>Could not configure LUKS key file on partition %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Kunde inte konfigurera LUKS nyckelfil på partition %1.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1676,7 +1676,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallPage.cpp" line="187"/>
|
||||
<source>Network Installation. (Disabled: Incorrect configuration)</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Nätverksinstallation. (Inaktiverad: inkorrekt konfiguration)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1827,7 +1827,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="172"/>
|
||||
<source>The password contains the user name in some form</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Lösenordet innehåller ditt användarnamn i någon form</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="174"/>
|
||||
@ -1837,7 +1837,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="177"/>
|
||||
<source>The password contains forbidden words in some form</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Lösenordet innehåller förbjudna ord i någon form</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="181"/>
|
||||
@ -1847,7 +1847,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="184"/>
|
||||
<source>The password contains too few digits</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Lösenordet innehåller för få siffror</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="188"/>
|
||||
@ -1857,7 +1857,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="191"/>
|
||||
<source>The password contains too few uppercase letters</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Lösenordet innehåller för få stora bokstäver</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="195"/>
|
||||
@ -1867,7 +1867,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="198"/>
|
||||
<source>The password contains too few lowercase letters</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Lösenordet innehåller för få små bokstäver</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="202"/>
|
||||
@ -1882,7 +1882,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="210"/>
|
||||
<source>The password is shorter than %1 characters</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Lösenordet är kortare än %1 tecken</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="213"/>
|
||||
@ -2007,7 +2007,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="302"/>
|
||||
<source>The configuration file is malformed</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Konfigurationsfilen är felaktig</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="304"/>
|
||||
@ -2022,7 +2022,7 @@ Alla ändringar kommer att gå förlorade.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/users/UsersPage.cpp" line="571"/>
|
||||
<source>Password is empty</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Lösenordet är blankt</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2534,7 +2534,7 @@ Utdata:
|
||||
<message>
|
||||
<location filename="../src/libcalamares/utils/CalamaresUtilsSystem.cpp" line="475"/>
|
||||
<source>External command failed to start.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Externt kommando misslyckades med att starta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libcalamares/utils/CalamaresUtilsSystem.cpp" line="476"/>
|
||||
@ -2559,7 +2559,7 @@ Utdata:
|
||||
<message>
|
||||
<location filename="../src/libcalamares/utils/CalamaresUtilsSystem.cpp" line="486"/>
|
||||
<source>Command <i>%1</i> failed to finish in %2 seconds.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Kommando <i>%1</i> misslyckades att slutföras på %2 sekunder.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libcalamares/utils/CalamaresUtilsSystem.cpp" line="493"/>
|
||||
@ -2770,7 +2770,7 @@ Utdata:
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="187"/>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="197"/>
|
||||
<source>KPMCore not Available</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>KPMCore inte tillgänglig</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="188"/>
|
||||
@ -2785,7 +2785,7 @@ Utdata:
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="237"/>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="254"/>
|
||||
<source>Resize Failed</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Storleksändringen misslyckades</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="207"/>
|
||||
@ -2981,7 +2981,7 @@ Utdata:
|
||||
<message>
|
||||
<location filename="../src/modules/keyboard/SetKeyboardLayoutJob.cpp" line="331"/>
|
||||
<source>Failed to write keyboard configuration to existing /etc/default directory.</source>
|
||||
<translation>Misslyckades med att skriva tangentbordskonfiguration till den existerande mappen /etc/default.</translation>
|
||||
<translation>Misslyckades med att skriva tangentbordskonfiguration till den existerande katalogen /etc/default.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -3044,22 +3044,22 @@ Utdata:
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="110"/>
|
||||
<source>Clearing flags on partition <strong>%1</strong>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Rensar flaggor på partition <strong>%1</strong>.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="119"/>
|
||||
<source>Clearing flags on new partition.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Rensar flaggor på ny partition.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="123"/>
|
||||
<source>Setting flags <strong>%2</strong> on partition <strong>%1</strong>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Sätter flaggor <strong>%2</strong> på partition <strong>%1</strong>.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="136"/>
|
||||
<source>Setting flags <strong>%1</strong> on new partition.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Sätter flaggor <strong>%1</strong> på ny partition</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="153"/>
|
||||
@ -3482,12 +3482,12 @@ Utdata:
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.cpp" line="247"/>
|
||||
<source><h1>Welcome to the Calamares setup program for %1.</h1></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h1>Välkommen till Calamares installationsprogrammet för %1.</h1></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.cpp" line="248"/>
|
||||
<source><h1>Welcome to %1 setup.</h1></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h1>Välkommen till %1 installation.</h1></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.cpp" line="266"/>
|
||||
|
@ -212,7 +212,7 @@
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="108"/>
|
||||
<source>Loading ...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>กำลังโหลด ...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="129"/>
|
||||
@ -496,12 +496,12 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="330"/>
|
||||
<source><strong>Manual partitioning</strong><br/>You can create or resize partitions yourself.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><strong>กำหนดพาร์ทิชันด้วยตนเอง</strong><br/>คุณสามารถสร้างหรือเปลี่ยนขนาดของพาร์ทิชันได้ด้วยตนเอง</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1024"/>
|
||||
<source>Boot loader location:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>ที่อยู่บูตโหลดเดอร์:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="152"/>
|
||||
@ -514,7 +514,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="996"/>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1082"/>
|
||||
<source>Current:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>ปัจจุบัน:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="827"/>
|
||||
@ -567,7 +567,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1297"/>
|
||||
<source>This storage device has %1 on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>อุปกรณ์จัดเก็บนี้มีระบบปฏิบัติการ %1 อยู่ คุณต้องการทำอย่างไร?<br/> คุณจะสามารถทบทวนและยืนยันตัวเลือกของคุณก่อนที่จะกระทำการเปลี่ยนแปลงไปยังอุปกรณ์จัดเก็บของคุณ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1501"/>
|
||||
@ -600,7 +600,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1326"/>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1352"/>
|
||||
<source><strong>Install alongside</strong><br/>The installer will shrink a partition to make room for %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><strong>ติดตั้งควบคู่กับระบบปฏิบัติการเดิม</strong><br/>ตัวติดตั้งจะลดเนื้อที่พาร์ทิชันเพื่อให้มีเนื้อที่สำหรับ %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1277"/>
|
||||
@ -608,12 +608,12 @@ The installer will quit and all changes will be lost.</source>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1334"/>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1360"/>
|
||||
<source><strong>Replace a partition</strong><br/>Replaces a partition with %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><strong>แทนที่พาร์ทิชัน</strong><br/>แทนที่พาร์ทิชันด้วย %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1321"/>
|
||||
<source>This storage device already has an operating system on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>อุปกรณ์จัดเก็บนี้มีระบบปฏิบัติการอยู่แล้ว คุณต้องการทำอย่างไร?<br/> คุณจะสามารถทบทวนและยืนยันตัวเลือกของคุณก่อนที่จะกระทำการเปลี่ยนแปลงไปยังอุปกรณ์จัดเก็บของคุณ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1347"/>
|
||||
@ -1160,7 +1160,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/finished/FinishedPage.ui" line="95"/>
|
||||
<source><Restart checkbox tooltip></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><Restart checkbox tooltip></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/finished/FinishedPage.ui" line="98"/>
|
||||
@ -1195,7 +1195,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/finished/FinishedPage.cpp" line="139"/>
|
||||
<source><h1>Installation Failed</h1><br/>%1 has not been installed on your computer.<br/>The error message was: %2.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h1>การติดตั้งไม่สำเร็จ</h1><br/>%1 ไม่ได้ถูกติดตั้งลงบนคอมพิวเตอร์ของคุณ<br/>ข้อความข้อผิดพลาดคือ: %2</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1213,7 +1213,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/finished/FinishedViewStep.cpp" line="133"/>
|
||||
<source>Installation Complete</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>การติดตั้งเสร็จสิ้น</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/finished/FinishedViewStep.cpp" line="135"/>
|
||||
@ -1223,7 +1223,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/finished/FinishedViewStep.cpp" line="136"/>
|
||||
<source>The installation of %1 is complete.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>การติดตั้ง %1 เสร็จสิ้น</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1284,12 +1284,12 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="156"/>
|
||||
<source>is connected to the Internet</source>
|
||||
<translation>เชื่อมต่อกับอินเตอร์เน็ต</translation>
|
||||
<translation>เชื่อมต่อกับอินเทอร์เน็ต</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="157"/>
|
||||
<source>The system is not connected to the Internet.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>ระบบไม่ได้เชื่อมต่อกับอินเทอร์เน็ต</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="164"/>
|
||||
@ -1558,7 +1558,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/locale/LocalePage.cpp" line="259"/>
|
||||
<source>The system language will be set to %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>ภาษาของระบบจะถูกตั้งค่าเป็น %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/locale/LocalePage.cpp" line="260"/>
|
||||
@ -1659,7 +1659,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/PackageModel.cpp" line="179"/>
|
||||
<source>Description</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>คำอธิบาย</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallPage.cpp" line="137"/>
|
||||
@ -1713,12 +1713,12 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="70"/>
|
||||
<source>Kernel</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>เคอร์เนล</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="71"/>
|
||||
<source>Services</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>บริการ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallViewStep.cpp" line="72"/>
|
||||
@ -1780,17 +1780,17 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="57"/>
|
||||
<source>Password is too short</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>รหัสผ่านสั้นเกินไป</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="73"/>
|
||||
<source>Password is too long</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>รหัสผ่านยาวเกินไป</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="149"/>
|
||||
<source>Password is too weak</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>รหัสผ่านอ่อนเกินไป</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="157"/>
|
||||
@ -1805,7 +1805,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="164"/>
|
||||
<source>The password is the same as the old one</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>รหัสผ่านเหมือนกับรหัสผ่านเก่า</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="166"/>
|
||||
@ -1820,7 +1820,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="170"/>
|
||||
<source>The password is too similar to the old one</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>รหัสผ่านคล้ายกับรหัสผ่านเก่าจนเกินไป</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="172"/>
|
||||
@ -1885,7 +1885,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="213"/>
|
||||
<source>The password is too short</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>รหัสผ่านสั้นเกินไป</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="215"/>
|
||||
@ -1935,7 +1935,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="250"/>
|
||||
<source>No password supplied</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>ไม่ได้กำหนดรหัสผ่าน</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="252"/>
|
||||
@ -2015,12 +2015,12 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/users/CheckPWQuality.cpp" line="306"/>
|
||||
<source>Unknown error</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>ข้อผิดพลาดที่ไม่รู้จัก</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/UsersPage.cpp" line="571"/>
|
||||
<source>Password is empty</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>รหัสผ่านว่าง</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2118,12 +2118,12 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/users/page_usersetup.ui" line="51"/>
|
||||
<source>Your Full Name</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>ชื่อเต็มของคุณ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/page_usersetup.ui" line="144"/>
|
||||
<source>login</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>เข้าสู่ระบบ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/page_usersetup.ui" line="243"/>
|
||||
@ -2133,19 +2133,19 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/users/page_usersetup.ui" line="246"/>
|
||||
<source>Computer Name</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>ชื่อคอมพิวเตอร์</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/page_usersetup.ui" line="351"/>
|
||||
<location filename="../src/modules/users/page_usersetup.ui" line="521"/>
|
||||
<source>Password</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>รหัสผ่าน</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/page_usersetup.ui" line="376"/>
|
||||
<location filename="../src/modules/users/page_usersetup.ui" line="546"/>
|
||||
<source>Repeat Password</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>กรอกรหัสผ่านซ้ำ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/page_usersetup.ui" line="451"/>
|
||||
@ -2351,7 +2351,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="167"/>
|
||||
<source>Install %1 <strong>alongside</strong> another operating system.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>ติดตั้ง %1 <strong>ควบคู่</strong>กับระบบปฏิบัติการเดิม</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="171"/>
|
||||
@ -2396,7 +2396,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="248"/>
|
||||
<source>Current:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>ปัจจุบัน:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="265"/>
|
||||
@ -2630,7 +2630,7 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/packagechooser/PackageModel.cpp" line="87"/>
|
||||
<source>No description provided.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>ไม่ได้ระบุคำอธิบาย</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/machineid/Workers.cpp" line="73"/>
|
||||
@ -2638,7 +2638,7 @@ Output:
|
||||
<location filename="../src/modules/machineid/Workers.cpp" line="85"/>
|
||||
<location filename="../src/modules/machineid/Workers.cpp" line="102"/>
|
||||
<source>File not found</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>ไม่พบไฟล์</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/machineid/Workers.cpp" line="74"/>
|
||||
@ -2899,7 +2899,7 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/ResultsListWidget.cpp" line="278"/>
|
||||
<source>This computer does not satisfy some of the recommended requirements for installing %1.<br/>Installation can continue, but some features might be disabled.</source>
|
||||
<translation>ขณะที่กำลังติดตั้ง ตัวติดตั้งฟ้องว่า คอมพิวเตอร์มีความต้องการไม่เพียงพอที่จะติดตั้ง %1<br/>ไม่สามารถทำการติดตั้งต่อไปได้ และฟีเจอร์บางอย่างจะถูกปิดไว้</translation>
|
||||
<translation>คอมพิวเตอร์มีความต้องการไม่เพียงพอที่จะติดตั้ง %1<br/>สามารถทำการติดตั้งต่อไปได้ แต่ฟีเจอร์บางอย่างจะถูกปิดไว้</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/ResultsListWidget.cpp" line="287"/>
|
||||
@ -2912,7 +2912,7 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ScanningDialog.cpp" line="84"/>
|
||||
<source>Scanning storage devices...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>กำลังสแกนอุปกรณ์จัดเก็บข้อมูล...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ScanningDialog.cpp" line="85"/>
|
||||
@ -3433,7 +3433,7 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.ui" line="153"/>
|
||||
<source>Open help and support website</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>เปิดเว็บไซต์ช่วยเหลือและสนับสนุน</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.ui" line="166"/>
|
||||
@ -3453,12 +3453,12 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.ui" line="169"/>
|
||||
<source>&Known issues</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>&K ปัญหาที่รู้จัก</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.ui" line="156"/>
|
||||
<source>&Support</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>&S ช่วยเหลือ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.ui" line="130"/>
|
||||
@ -3468,12 +3468,12 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.cpp" line="254"/>
|
||||
<source><h1>Welcome to the %1 installer.</h1></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h1>ยินดีต้อนรับสู่ตัวติดตั้ง %1</h1></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.cpp" line="253"/>
|
||||
<source><h1>Welcome to the Calamares installer for %1.</h1></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h1>ยินดีต้อนรับสู่ตัวติดตั้ง Calamares สำหรับ %1</h1></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.cpp" line="247"/>
|
||||
@ -3541,7 +3541,7 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="75"/>
|
||||
<source>About</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>เกี่ยวกับ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcomeq/welcomeq.qml" line="86"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/BootInfoWidget.cpp" line="81"/>
|
||||
<source>This system was started with an <strong>EFI</strong> boot environment.<br><br>To configure startup from an EFI environment, this installer must deploy a boot loader application, like <strong>GRUB</strong> or <strong>systemd-boot</strong> on an <strong>EFI System Partition</strong>. This is automatic, unless you choose manual partitioning, in which case you must choose it or create it on your own.</source>
|
||||
<translation>这个系统是从 <strong>EFI</strong> 引导环境启动的。<br><br>目前市面上大多数的民用设备都使用 EFI,并同时对硬盘使用 GPT 分区表分区。<br>您如果要从 EFI 环境引导这个系统的话,本安装程序必须安装一个引导器(如 <strong>GRUB</strong> 或 <strong>systemd-boot</strong>)到 <strong>EFI 分区</strong>。这个步骤将会由本安装程序自动执行,除非您选择自己创建分区——此时您必须选择让本安装程序自动创建EFI分区或您自己手动创建EFI分区。</translation>
|
||||
<translation>这个系统是从 <strong>EFI</strong> 引导环境启动的。<br><br>目前市面上大多数的民用设备都使用 EFI,并同时对硬盘使用 GPT 分区表分区。<br>您如果要从 EFI 环境引导这个系统的话,本安装程序必须安装一个引导程序(如 <strong>GRUB</strong> 或 <strong>systemd-boot</strong>)到 <strong>EFI 分区</strong>。这个步骤将会由本安装程序自动执行,除非您选择自己创建分区——此时您必须选择让本安装程序自动创建EFI分区或您自己手动创建EFI分区。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/BootInfoWidget.cpp" line="93"/>
|
||||
@ -301,12 +301,12 @@
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="257"/>
|
||||
<source>Calamares Initialization Failed</source>
|
||||
<translation>Calamares安装失败</translation>
|
||||
<translation>Calamares初始化失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="258"/>
|
||||
<source>%1 can not be installed. Calamares was unable to load all of the configured modules. This is a problem with the way Calamares is being used by the distribution.</source>
|
||||
<translation>%1无法安装。 Calamares无法加载所有已配置的模块。这是分配使用Calamares的方式的问题。</translation>
|
||||
<translation>%1无法安装。 Calamares无法加载所有已配置的模块。这个问题是发行版配置Calamares不当导致的。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="264"/>
|
||||
@ -522,7 +522,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="827"/>
|
||||
<source>Reuse %1 as home partition for %2.</source>
|
||||
<translation>将 %1 重用为 %2 的家分区。</translation>
|
||||
<translation>重复使用 %1 作为 %2 的 home 分区。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="952"/>
|
||||
@ -780,7 +780,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="60"/>
|
||||
<source>Create new <strong>%2MiB</strong> partition on <strong>%4</strong> (%3) with file system <strong>%1</strong>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>在<strong>%4</strong>(%3)上创建一个<strong>%2MiB</strong>的%1分区。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/CreatePartitionJob.cpp" line="72"/>
|
||||
@ -895,22 +895,22 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/CreateVolumeGroupJob.cpp" line="38"/>
|
||||
<source>Create new volume group named %1.</source>
|
||||
<translation>创建新存储组 %1.</translation>
|
||||
<translation>新建分卷组 %1.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/CreateVolumeGroupJob.cpp" line="45"/>
|
||||
<source>Create new volume group named <strong>%1</strong>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>新建名为 <strong>%1</strong>的分卷组。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/CreateVolumeGroupJob.cpp" line="52"/>
|
||||
<source>Creating new volume group named %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>新建名为 %1的分卷组。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/CreateVolumeGroupJob.cpp" line="65"/>
|
||||
<source>The installer failed to create a volume group named '%1'.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>安装器未能创建名为'%1'的分卷组</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -919,17 +919,17 @@ The installer will quit and all changes will be lost.</source>
|
||||
<location filename="../src/modules/partition/jobs/DeactivateVolumeGroupJob.cpp" line="34"/>
|
||||
<location filename="../src/modules/partition/jobs/DeactivateVolumeGroupJob.cpp" line="48"/>
|
||||
<source>Deactivate volume group named %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>停用分卷组 %1。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/DeactivateVolumeGroupJob.cpp" line="41"/>
|
||||
<source>Deactivate volume group named <strong>%1</strong>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>停用分卷组<strong>%1</strong>。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/DeactivateVolumeGroupJob.cpp" line="61"/>
|
||||
<source>The installer failed to deactivate a volume group named %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>安装器未能创建名为'%1'的分卷组</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1174,27 +1174,27 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/finished/FinishedPage.cpp" line="54"/>
|
||||
<source><h1>All done.</h1><br/>%1 has been set up on your computer.<br/>You may now start using your new system.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h1>安装成功!</h1><br/>%1 已安装在您的电脑上了。<br/>您现在可以重新启动到新系统。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/finished/FinishedPage.cpp" line="58"/>
|
||||
<source><html><head/><body><p>When this box is checked, your system will restart immediately when you click on <span style="font-style:italic;">Done</span> or close the setup program.</p></body></html></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><html><head/><body><p>当选中此项时,系统会在您关闭安装器或点击 <span style=" font-style:italic;">完成</span> 按钮时立即重启</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/finished/FinishedPage.cpp" line="66"/>
|
||||
<source><h1>All done.</h1><br/>%1 has been installed on your computer.<br/>You may now restart into your new system, or continue using the %2 Live environment.</source>
|
||||
<translation><h1>一切都结束了。</h1><br/>%1 已安装在您的电脑上了。<br/>您现在可能会想要重新启动到您的新系统中,或是继续使用 %2 Live 环境。</translation>
|
||||
<translation><h1>安装成功!</h1><br/>%1 已安装在您的电脑上了。<br/>您现在可以重新启动到新系统,或是继续使用 %2 Live 环境。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/finished/FinishedPage.cpp" line="71"/>
|
||||
<source><html><head/><body><p>When this box is checked, your system will restart immediately when you click on <span style="font-style:italic;">Done</span> or close the installer.</p></body></html></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><html><head/><body><p>当选中此项时,系统会在您关闭安装器或点击 <span style=" font-style:italic;">完成</span> 按钮时立即重启</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/finished/FinishedPage.cpp" line="133"/>
|
||||
<source><h1>Setup Failed</h1><br/>%1 has not been set up on your computer.<br/>The error message was: %2.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h1>安装失败</h1><br/>%1 未在你的电脑上安装。<br/>错误信息:%2。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/finished/FinishedPage.cpp" line="139"/>
|
||||
@ -1235,12 +1235,12 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/FormatPartitionJob.cpp" line="46"/>
|
||||
<source>Format partition %1 (file system: %2, size: %3 MiB) on %4.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>格式化在 %4 的分区 %1 (文件系统:%2,大小:%3 MB)。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/FormatPartitionJob.cpp" line="57"/>
|
||||
<source>Format <strong>%3MiB</strong> partition <strong>%1</strong> with file system <strong>%2</strong>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>以文件系统 <strong>%2</strong> 格式化 <strong>%3MB</strong> 的分区 <strong>%1</strong>。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/FormatPartitionJob.cpp" line="68"/>
|
||||
@ -1258,22 +1258,22 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="126"/>
|
||||
<source>has at least %1 GiB available drive space</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>有至少 %1 GB 可用磁盘空间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="128"/>
|
||||
<source>There is not enough drive space. At least %1 GiB is required.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>没有足够的磁盘空间。至少需要 %1 GB。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="137"/>
|
||||
<source>has at least %1 GiB working memory</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>至少 %1 GB 可用内存</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="139"/>
|
||||
<source>The system does not have enough working memory. At least %1 GiB is required.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>系统没有足够的内存。至少需要 %1 GB。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="148"/>
|
||||
@ -1298,12 +1298,12 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="164"/>
|
||||
<source>is running the installer as an administrator (root)</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>正以管理员(root)权限运行安装器</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="167"/>
|
||||
<source>The setup program is not running with administrator rights.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>安装器未以管理员权限运行</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="168"/>
|
||||
@ -1313,12 +1313,12 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="176"/>
|
||||
<source>has a screen large enough to show the whole installer</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>有一个足够大的屏幕来显示整个安装器</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="179"/>
|
||||
<source>The screen is too small to display the setup program.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>屏幕太小无法显示安装程序。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/GeneralRequirements.cpp" line="180"/>
|
||||
@ -1331,7 +1331,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/hostinfo/HostInfoJob.cpp" line="51"/>
|
||||
<source>Collecting information about your machine.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>正在收集此计算机的信息。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1342,22 +1342,22 @@ The installer will quit and all changes will be lost.</source>
|
||||
<location filename="../src/modules/oemid/IDJob.cpp" line="59"/>
|
||||
<location filename="../src/modules/oemid/IDJob.cpp" line="67"/>
|
||||
<source>OEM Batch Identifier</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>OEM批量标识</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/oemid/IDJob.cpp" line="48"/>
|
||||
<source>Could not create directories <code>%1</code>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>无法创建目录<code>%1</code>。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/oemid/IDJob.cpp" line="60"/>
|
||||
<source>Could not open file <code>%1</code>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>无法打开文件<code>%1</code>。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/oemid/IDJob.cpp" line="68"/>
|
||||
<source>Could not write to file <code>%1</code>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>无法写入文件<code>%1</code>。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1365,7 +1365,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/initcpio/InitcpioJob.cpp" line="40"/>
|
||||
<source>Creating initramfs with mkinitcpio.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>正在用mkinitcpio创建initramfs。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1373,7 +1373,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/initramfs/InitramfsJob.cpp" line="37"/>
|
||||
<source>Creating initramfs.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>正在创建initramfs。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1456,7 +1456,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/license/LicensePage.ui" line="22"/>
|
||||
<source><h1>License Agreement</h1></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h1>许可证</h1></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/license/LicensePage.cpp" line="149"/>
|
||||
@ -1466,27 +1466,27 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/license/LicensePage.cpp" line="151"/>
|
||||
<source>Please review the End User License Agreements (EULAs).</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>请查阅最终用户许可协议 (EULAs)。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/license/LicensePage.cpp" line="156"/>
|
||||
<source>This setup procedure will install proprietary software that is subject to licensing terms.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>此安装过程会安装受许可条款约束的专有软件。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/license/LicensePage.cpp" line="159"/>
|
||||
<source>If you do not agree with the terms, the setup procedure cannot continue.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>如果您不同意这些条款,安装过程将无法继续。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/license/LicensePage.cpp" line="164"/>
|
||||
<source>This setup procedure can install proprietary software that is subject to licensing terms in order to provide additional features and enhance the user experience.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>此安装过程会安装受许可条款约束的专有软件,用于提供额外功能和提升用户体验。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/license/LicensePage.cpp" line="169"/>
|
||||
<source>If you do not agree with the terms, proprietary software will not be installed, and open source alternatives will be used instead.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>如果您不同意这些条款,专有软件不会被安装,相应的开源软件替代品将被安装。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1617,22 +1617,22 @@ The installer will quit and all changes will be lost.</source>
|
||||
<location filename="../src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp" line="199"/>
|
||||
<location filename="../src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp" line="207"/>
|
||||
<source>Encrypted rootfs setup error</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>加密根文件系时配置错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp" line="193"/>
|
||||
<source>Root partition %1 is LUKS but no passphrase has been set.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>根分区%1为LUKS但没有设置密钥。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp" line="200"/>
|
||||
<source>Could not create LUKS key file for root partition %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>无法创建根分区%1的LUKS密钥文件。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp" line="208"/>
|
||||
<source>Could not configure LUKS key file on partition %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>无法配置根分区%1的LUKS密钥文件。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1650,7 +1650,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/machineid/MachineIdJob.cpp" line="63"/>
|
||||
<source>No root mount point is set for MachineId.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>MachineId未配置根挂载点/</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1678,7 +1678,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/netinstall/NetInstallPage.cpp" line="187"/>
|
||||
<source>Network Installation. (Disabled: Incorrect configuration)</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>网络安装。(禁用:错误的设置)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1758,12 +1758,12 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/oemid/OEMPage.ui" line="38"/>
|
||||
<source><html><head/><body><p>Enter a batch-identifier here. This will be stored in the target system.</p></body></html></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><html><head/><body><p>请输入批量标识。它会被保存到目标系统上。</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/oemid/OEMPage.ui" line="48"/>
|
||||
<source><html><head/><body><h1>OEM Configuration</h1><p>Calamares will use OEM settings while configuring the target system.</p></body></html></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><html><head/><body><h1>OEM 配置信息</h1><p>Calamares会使用OEM配置信息来配置目标系统。</p></body></html></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1776,7 +1776,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/oemid/OEMViewStep.cpp" line="126"/>
|
||||
<source>Set the OEM Batch Identifier to <code>%1</code>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>设置OEM批量标识为 <code>%1</code>.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2057,7 +2057,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/packagechooser/PackageChooserPage.cpp" line="35"/>
|
||||
<source>Please pick a product from the list. The selected product will be installed.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>请在列表中选一个产品。被选中的产品将会被安装。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2154,12 +2154,12 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/users/page_usersetup.ui" line="451"/>
|
||||
<source>When this box is checked, password-strength checking is done and you will not be able to use a weak password.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>若选中此项,密码强度检测会开启,你将不被允许使用弱密码。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/page_usersetup.ui" line="454"/>
|
||||
<source>Require strong passwords.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>要求使用强密码。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/page_usersetup.ui" line="461"/>
|
||||
@ -2302,27 +2302,27 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionPage.ui" line="132"/>
|
||||
<source>New Volume Group</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>新分卷组</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionPage.ui" line="139"/>
|
||||
<source>Resize Volume Group</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>调整分卷组大小</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionPage.ui" line="146"/>
|
||||
<source>Deactivate Volume Group</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>停用分卷组</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionPage.ui" line="153"/>
|
||||
<source>Remove Volume Group</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>移除分卷组</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionPage.ui" line="180"/>
|
||||
<source>I&nstall boot loader on:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>安装引导程序至:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionPage.cpp" line="209"/>
|
||||
@ -2440,12 +2440,12 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="650"/>
|
||||
<source>has at least one disk device available.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>有至少一个可用的磁盘设备。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="651"/>
|
||||
<source>There are no partitions to install on.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>无可用于安装的分区。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2472,7 +2472,7 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/plasmalnf/PlasmaLnfPage.cpp" line="70"/>
|
||||
<source>Please choose a look-and-feel for the KDE Plasma Desktop. You can also skip this step and configure the look-and-feel once the system is set up. Clicking on a look-and-feel selection will give you a live preview of that look-and-feel.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>请选择一个 KDE Plasma 桌面外观。你也可以忽略此步骤并在系统安装完成后配置外观。点击外观后可以实时预览效果。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/plasmalnf/PlasmaLnfPage.cpp" line="76"/>
|
||||
@ -2616,12 +2616,12 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/PartitionDialogHelpers.cpp" line="47"/>
|
||||
<source>(no mount point)</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>(无挂载点)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libcalamaresui/modulesystem/RequirementsChecker.cpp" line="65"/>
|
||||
<source>Requirements checking for module <i>%1</i> is complete.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>模块<i>%1</i>的需求检查已完成。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libcalamares/locale/Label.cpp" line="39"/>
|
||||
@ -2632,12 +2632,12 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/packagechooser/PackageModel.cpp" line="79"/>
|
||||
<source>No product</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>无产品</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/packagechooser/PackageModel.cpp" line="87"/>
|
||||
<source>No description provided.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>未提供描述信息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/machineid/Workers.cpp" line="73"/>
|
||||
@ -2645,17 +2645,17 @@ Output:
|
||||
<location filename="../src/modules/machineid/Workers.cpp" line="85"/>
|
||||
<location filename="../src/modules/machineid/Workers.cpp" line="102"/>
|
||||
<source>File not found</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>找不到文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/machineid/Workers.cpp" line="74"/>
|
||||
<source>Path <pre>%1</pre> must be an absolute path.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>路径 <pre>%1</pre> 必须是绝对路径。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/machineid/Workers.cpp" line="103"/>
|
||||
<source>Could not create new random file <pre>%1</pre>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>无法创建新的随机文件 <pre>%1</pre>.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2664,17 +2664,17 @@ Output:
|
||||
<location filename="../src/modules/partition/jobs/RemoveVolumeGroupJob.cpp" line="34"/>
|
||||
<location filename="../src/modules/partition/jobs/RemoveVolumeGroupJob.cpp" line="48"/>
|
||||
<source>Remove Volume Group named %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>移除分卷组 %1。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/RemoveVolumeGroupJob.cpp" line="41"/>
|
||||
<source>Remove Volume Group named <strong>%1</strong>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>移除分卷组 <strong>%1</strong>。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/RemoveVolumeGroupJob.cpp" line="61"/>
|
||||
<source>The installer failed to remove a volume group named '%1'.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>安装器无法移除分卷组 '%1'。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2757,29 +2757,29 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="59"/>
|
||||
<source>Resize Filesystem Job</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>调整文件系统大小的任务</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="172"/>
|
||||
<source>Invalid configuration</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>无效配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="173"/>
|
||||
<source>The file-system resize job has an invalid configuration and will not run.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>调整文件系统大小的任务 因为配置文件无效不会被执行。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="187"/>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="197"/>
|
||||
<source>KPMCore not Available</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>KPMCore不可用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="188"/>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="198"/>
|
||||
<source>Calamares cannot start KPMCore for the file-system resize job.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Calamares 无法启动 KPMCore来完成调整文件系统大小的任务。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="206"/>
|
||||
@ -2788,39 +2788,39 @@ Output:
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="237"/>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="254"/>
|
||||
<source>Resize Failed</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>调整大小失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="207"/>
|
||||
<source>The filesystem %1 could not be found in this system, and cannot be resized.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>文件系统 %1 未能在此系统上找到,因此无法调整大小。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="208"/>
|
||||
<source>The device %1 could not be found in this system, and cannot be resized.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>设备 %1 未能在此系统上找到,因此无法调整大小。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="216"/>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="229"/>
|
||||
<source>The filesystem %1 cannot be resized.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>文件系统 %1 无法被调整大小。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="217"/>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="230"/>
|
||||
<source>The device %1 cannot be resized.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>设备 %1 无法被调整大小。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="238"/>
|
||||
<source>The filesystem %1 must be resized, but cannot.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>文件系统 %1 必须调整大小,但无法做到。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/fsresizer/ResizeFSJob.cpp" line="239"/>
|
||||
<source>The device %1 must be resized, but cannot</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>设备 %1 必须调整大小,但无法做到。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2833,12 +2833,12 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/ResizePartitionJob.cpp" line="55"/>
|
||||
<source>Resize <strong>%2MiB</strong> partition <strong>%1</strong> to <strong>%3MiB</strong>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>将 <strong>%2MiB</strong> 分区的大小从<strong>%1</strong> 调整至<strong>%3MiB</strong>。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/ResizePartitionJob.cpp" line="66"/>
|
||||
<source>Resizing %2MiB partition %1 to %3MiB.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>正将 %2MB 的分区%1调整为 %3MB。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/ResizePartitionJob.cpp" line="85"/>
|
||||
@ -2851,7 +2851,7 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ResizeVolumeGroupDialog.cpp" line="39"/>
|
||||
<source>Resize Volume Group</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>调整分卷组大小</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2860,17 +2860,17 @@ Output:
|
||||
<location filename="../src/modules/partition/jobs/ResizeVolumeGroupJob.cpp" line="37"/>
|
||||
<location filename="../src/modules/partition/jobs/ResizeVolumeGroupJob.cpp" line="55"/>
|
||||
<source>Resize volume group named %1 from %2 to %3.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>将分卷组%1的大小从%2调整为%3。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/ResizeVolumeGroupJob.cpp" line="46"/>
|
||||
<source>Resize volume group named <strong>%1</strong> from <strong>%2</strong> to <strong>%3</strong>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>将分卷组<strong>%1</strong>的大小从<strong>%2</strong>调整为<strong>%3</strong>。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/ResizeVolumeGroupJob.cpp" line="70"/>
|
||||
<source>The installer failed to resize a volume group named '%1'.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>安装器未能调整分卷组'%1'的大小</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2891,7 +2891,8 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/ResultsListWidget.cpp" line="263"/>
|
||||
<source>This computer does not satisfy the minimum requirements for setting up %1.<br/>Setup cannot continue. <a href="#details">Details...</a></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>此计算机不满足安装 %1 的某些推荐配置。
|
||||
安装可以继续,但是一些特性可能被禁用。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/ResultsListWidget.cpp" line="267"/>
|
||||
@ -2901,7 +2902,8 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/ResultsListWidget.cpp" line="274"/>
|
||||
<source>This computer does not satisfy some of the recommended requirements for setting up %1.<br/>Setup can continue, but some features might be disabled.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>此计算机不满足安装 %1 的某些推荐配置。
|
||||
安装可以继续,但是一些特性可能被禁用。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/checker/ResultsListWidget.cpp" line="278"/>
|
||||
@ -2997,7 +2999,7 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="57"/>
|
||||
<source>Set flags on %1MiB %2 partition.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>设置 %1MB %2 分区的标记.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="61"/>
|
||||
@ -3012,22 +3014,22 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="77"/>
|
||||
<source>Clear flags on %1MiB <strong>%2</strong> partition.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>删除 %1MB <strong>%2</strong> 分区的标记.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="92"/>
|
||||
<source>Flag %1MiB <strong>%2</strong> partition as <strong>%3</strong>.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>将 %1MB <strong>%2</strong> 分区标记为 <strong>%3</strong>.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="115"/>
|
||||
<source>Clearing flags on %1MiB <strong>%2</strong> partition.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>正在删除 %1MB <strong>%2</strong> 分区的标记.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="130"/>
|
||||
<source>Setting flags <strong>%3</strong> on %1MiB <strong>%2</strong> partition.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>正在将 %1MB <strong>%2</strong> 分区标记为 <strong>%3</strong>.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="81"/>
|
||||
@ -3173,7 +3175,7 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/summary/SummaryPage.cpp" line="57"/>
|
||||
<source>This is an overview of what will happen once you start the setup procedure.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>预览——当你启动安装过程,以下行为将被执行</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/summary/SummaryPage.cpp" line="60"/>
|
||||
@ -3297,12 +3299,12 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/users/UsersPage.cpp" line="139"/>
|
||||
<source><small>If more than one person will use this computer, you can create multiple accounts after setup.</small></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><small>如果有多人要使用此计算机,您可以在安装后创建多个账户。</small></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/UsersPage.cpp" line="145"/>
|
||||
<source><small>If more than one person will use this computer, you can create multiple accounts after installation.</small></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><small>如果有多人要使用此计算机,您可以在安装后创建多个账户。</small></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/UsersPage.cpp" line="385"/>
|
||||
@ -3312,17 +3314,17 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/users/UsersPage.cpp" line="392"/>
|
||||
<source>Your username must start with a lowercase letter or underscore.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>用户名必须以小写字母或下划线"_"开头</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/UsersPage.cpp" line="399"/>
|
||||
<source>Only lowercase letters, numbers, underscore and hyphen are allowed.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>只允许小写字母、数组、下划线"_" 和 连字符"-"</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/UsersPage.cpp" line="447"/>
|
||||
<source>Only letters, numbers, underscore and hyphen are allowed.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>只允许字母、数组、下划线"_" 和 连字符"-"</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/users/UsersPage.cpp" line="435"/>
|
||||
@ -3353,7 +3355,7 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/calamares/VariantModel.cpp" line="241"/>
|
||||
<source>Key</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Key</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/calamares/VariantModel.cpp" line="245"/>
|
||||
@ -3371,22 +3373,22 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/VolumeGroupBaseDialog.ui" line="20"/>
|
||||
<source>List of Physical Volumes</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>物理分卷列表:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/VolumeGroupBaseDialog.ui" line="30"/>
|
||||
<source>Volume Group Name:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>分卷组名称:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/VolumeGroupBaseDialog.ui" line="43"/>
|
||||
<source>Volume Group Type:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>分卷组类型:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/VolumeGroupBaseDialog.ui" line="56"/>
|
||||
<source>Physical Extent Size:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>物理区域PE大小:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/VolumeGroupBaseDialog.ui" line="66"/>
|
||||
@ -3396,22 +3398,22 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/VolumeGroupBaseDialog.ui" line="82"/>
|
||||
<source>Total Size:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>大小:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/VolumeGroupBaseDialog.ui" line="102"/>
|
||||
<source>Used Size:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>已用空间:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/VolumeGroupBaseDialog.ui" line="122"/>
|
||||
<source>Total Sectors:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>总扇区数:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/VolumeGroupBaseDialog.ui" line="142"/>
|
||||
<source>Quantity of LVs:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>逻辑分卷数量:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -3425,12 +3427,12 @@ Output:
|
||||
<location filename="../src/modules/welcome/WelcomePage.ui" line="69"/>
|
||||
<location filename="../src/modules/welcome/WelcomePage.ui" line="82"/>
|
||||
<source>Select application and system language</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>选择应用程序和系统语言</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.ui" line="140"/>
|
||||
<source>Open donations website</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>打开捐赠信息网页</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.ui" line="143"/>
|
||||
@ -3450,7 +3452,7 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.ui" line="179"/>
|
||||
<source>Open release notes website</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>打开发布日志网页</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.ui" line="182"/>
|
||||
@ -3485,17 +3487,17 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.cpp" line="247"/>
|
||||
<source><h1>Welcome to the Calamares setup program for %1.</h1></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h1>欢迎使用 %1 的 Calamares 安装程序。</h1></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.cpp" line="248"/>
|
||||
<source><h1>Welcome to %1 setup.</h1></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h1>欢迎使用 %1 安装程序。</h1></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.cpp" line="266"/>
|
||||
<source>About %1 setup</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>关于 %1 安装程序</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.cpp" line="266"/>
|
||||
@ -3505,7 +3507,7 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.cpp" line="269"/>
|
||||
<source><h1>%1</h1><br/><strong>%2<br/>for %3</strong><br/><br/>Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Copyright 2017-2019 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Thanks to <a href="https://calamares.io/team/">the Calamares team</a> and the <a href="https://www.transifex.com/calamares/calamares/">Calamares translators team</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> development is sponsored by <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h1>%1</h1><br/><strong>%2<br/>for %3</strong><br/><br/>Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Copyright 2017-2019 Adriaan de Groot &lt;groot@kde.org&gt;<br/>致谢 <a href="https://calamares.io/team/">Calamares开发团队和<a href="https://www.transifex.com/calamares/calamares/">Calamares 翻译团队</a>。<br/><br/><a href="https://calamares.io/">Calamares</a> 开发赞助来自 <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/welcome/WelcomePage.cpp" line="259"/>
|
||||
@ -3535,7 +3537,8 @@ Output:
|
||||
<location filename="../src/modules/notesqml/notesqml.qml" line="60"/>
|
||||
<source><h3>%1</h3>
|
||||
<p>These are example release notes.</p></source>
|
||||
<translation type="unfinished"/>
|
||||
<translation><h3>%1</h3>
|
||||
<p>这些是发布日志样例</p></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
Binary file not shown.
@ -4,7 +4,7 @@
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
# Translators:
|
||||
# Zmicer Turok <nashtlumach@gmail.com>, 2019
|
||||
# Zmicer Turok <nashtlumach@gmail.com>, 2020
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
@ -13,7 +13,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-02-19 17:27+0100\n"
|
||||
"PO-Revision-Date: 2017-08-09 10:34+0000\n"
|
||||
"Last-Translator: Zmicer Turok <nashtlumach@gmail.com>, 2019\n"
|
||||
"Last-Translator: Zmicer Turok <nashtlumach@gmail.com>, 2020\n"
|
||||
"Language-Team: Belarusian (https://www.transifex.com/calamares/teams/20061/be/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -230,7 +230,7 @@ msgstr "Не атрымалася дадаць службу {name!s} на ўзр
|
||||
|
||||
#: src/modules/services-openrc/main.py:68
|
||||
msgid "Cannot remove service {name!s} from run-level {level!s}."
|
||||
msgstr "Не атрымалася выдаліць службу {name!s} з узроўня запуску {level!s}."
|
||||
msgstr "Не атрымалася выдаліць службу {name!s} з узроўню запуску {level!s}."
|
||||
|
||||
#: src/modules/services-openrc/main.py:70
|
||||
msgid ""
|
||||
|
Binary file not shown.
@ -5,7 +5,7 @@
|
||||
#
|
||||
# Translators:
|
||||
# 김지현 <potatogim@potatogim.net>, 2018
|
||||
# MarongHappy <daemul72@gmail.com>, 2019
|
||||
# 이정희 <daemul72@gmail.com>, 2019
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
@ -14,7 +14,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-02-19 17:27+0100\n"
|
||||
"PO-Revision-Date: 2017-08-09 10:34+0000\n"
|
||||
"Last-Translator: MarongHappy <daemul72@gmail.com>, 2019\n"
|
||||
"Last-Translator: 이정희 <daemul72@gmail.com>, 2019\n"
|
||||
"Language-Team: Korean (https://www.transifex.com/calamares/teams/20061/ko/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
Binary file not shown.
@ -4,7 +4,7 @@
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
# Translators:
|
||||
# Dušan Kazik <prescott66@gmail.com>, 2019
|
||||
# Dušan Kazik <prescott66@gmail.com>, 2020
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
@ -13,7 +13,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-02-19 17:27+0100\n"
|
||||
"PO-Revision-Date: 2017-08-09 10:34+0000\n"
|
||||
"Last-Translator: Dušan Kazik <prescott66@gmail.com>, 2019\n"
|
||||
"Last-Translator: Dušan Kazik <prescott66@gmail.com>, 2020\n"
|
||||
"Language-Team: Slovak (https://www.transifex.com/calamares/teams/20061/sk/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -23,11 +23,11 @@ msgstr ""
|
||||
|
||||
#: src/modules/grubcfg/main.py:37
|
||||
msgid "Configure GRUB."
|
||||
msgstr ""
|
||||
msgstr "Konfigurácia zavádzača GRUB."
|
||||
|
||||
#: src/modules/mount/main.py:38
|
||||
msgid "Mounting partitions."
|
||||
msgstr ""
|
||||
msgstr "Pripájanie oddielov."
|
||||
|
||||
#: src/modules/mount/main.py:145 src/modules/initcpiocfg/main.py:201
|
||||
#: src/modules/initcpiocfg/main.py:205
|
||||
@ -46,16 +46,16 @@ msgstr "Chyba konfigurácie"
|
||||
#: src/modules/initramfscfg/main.py:95 src/modules/openrcdmcryptcfg/main.py:79
|
||||
#: src/modules/fstab/main.py:323
|
||||
msgid "No partitions are defined for <pre>{!s}</pre> to use."
|
||||
msgstr ""
|
||||
msgstr "Nie sú určené žiadne oddiely na použitie pre <pre>{!s}</pre>."
|
||||
|
||||
#: src/modules/services-systemd/main.py:35
|
||||
msgid "Configure systemd services"
|
||||
msgstr ""
|
||||
msgstr "Konfigurácia služieb systemd"
|
||||
|
||||
#: src/modules/services-systemd/main.py:68
|
||||
#: src/modules/services-openrc/main.py:102
|
||||
msgid "Cannot modify service"
|
||||
msgstr ""
|
||||
msgstr "Nedá sa upraviť služba"
|
||||
|
||||
#: src/modules/services-systemd/main.py:69
|
||||
msgid ""
|
||||
@ -91,7 +91,7 @@ msgstr "Odpojenie súborových systémov."
|
||||
|
||||
#: src/modules/unpackfs/main.py:41
|
||||
msgid "Filling up filesystems."
|
||||
msgstr ""
|
||||
msgstr "Napĺňanie súborových systémov."
|
||||
|
||||
#: src/modules/unpackfs/main.py:184
|
||||
msgid "rsync failed with error code {}."
|
||||
@ -99,7 +99,7 @@ msgstr ""
|
||||
|
||||
#: src/modules/unpackfs/main.py:245 src/modules/unpackfs/main.py:268
|
||||
msgid "Failed to unpack image \"{}\""
|
||||
msgstr ""
|
||||
msgstr "Zlyhalo rozbalenie obrazu „{}“"
|
||||
|
||||
#: src/modules/unpackfs/main.py:246
|
||||
msgid ""
|
||||
@ -109,7 +109,7 @@ msgstr ""
|
||||
|
||||
#: src/modules/unpackfs/main.py:370
|
||||
msgid "No mount point for root partition"
|
||||
msgstr ""
|
||||
msgstr "Žiadny bod pripojenia pre koreňový oddiel"
|
||||
|
||||
#: src/modules/unpackfs/main.py:371
|
||||
msgid "globalstorage does not contain a \"rootMountPoint\" key, doing nothing"
|
||||
@ -117,7 +117,7 @@ msgstr ""
|
||||
|
||||
#: src/modules/unpackfs/main.py:376
|
||||
msgid "Bad mount point for root partition"
|
||||
msgstr ""
|
||||
msgstr "Zlý bod pripojenia pre koreňový oddiel"
|
||||
|
||||
#: src/modules/unpackfs/main.py:377
|
||||
msgid "rootMountPoint is \"{}\", which does not exist, doing nothing"
|
||||
@ -170,7 +170,7 @@ msgstr "Nedá s nakonfigurovať správca LightDM"
|
||||
|
||||
#: src/modules/displaymanager/main.py:737
|
||||
msgid "No LightDM greeter installed."
|
||||
msgstr ""
|
||||
msgstr "Nie je nainštalovaný žiadny vítací nástroj LightDM."
|
||||
|
||||
#: src/modules/displaymanager/main.py:768
|
||||
msgid "Cannot write SLIM configuration file"
|
||||
@ -196,7 +196,7 @@ msgstr "Konfigurácia správcu zobrazenia nebola úplná"
|
||||
|
||||
#: src/modules/initcpiocfg/main.py:37
|
||||
msgid "Configuring mkinitcpio."
|
||||
msgstr ""
|
||||
msgstr "Konfigurácia mkinitcpio."
|
||||
|
||||
#: src/modules/initcpiocfg/main.py:206
|
||||
#: src/modules/luksopenswaphookcfg/main.py:100
|
||||
@ -204,19 +204,19 @@ msgstr ""
|
||||
#: src/modules/fstab/main.py:329 src/modules/localecfg/main.py:145
|
||||
#: src/modules/networkcfg/main.py:49
|
||||
msgid "No root mount point is given for <pre>{!s}</pre> to use."
|
||||
msgstr ""
|
||||
msgstr "Nie je zadaný žiadny bod pripojenia na použitie pre <pre>{!s}</pre>."
|
||||
|
||||
#: src/modules/luksopenswaphookcfg/main.py:35
|
||||
msgid "Configuring encrypted swap."
|
||||
msgstr ""
|
||||
msgstr "Konfigurácia zašifrovaného odkladacieho priestoru."
|
||||
|
||||
#: src/modules/rawfs/main.py:35
|
||||
msgid "Installing data."
|
||||
msgstr ""
|
||||
msgstr "Inštalácia údajov."
|
||||
|
||||
#: src/modules/services-openrc/main.py:38
|
||||
msgid "Configure OpenRC services"
|
||||
msgstr ""
|
||||
msgstr "Konfigurácia služieb OpenRC"
|
||||
|
||||
#: src/modules/services-openrc/main.py:66
|
||||
msgid "Cannot add service {name!s} to run-level {level!s}."
|
||||
@ -249,17 +249,17 @@ msgstr ""
|
||||
|
||||
#: src/modules/services-openrc/main.py:119
|
||||
msgid "Target service does not exist"
|
||||
msgstr ""
|
||||
msgstr "Cieľová služba neexistuje"
|
||||
|
||||
#: src/modules/services-openrc/main.py:120
|
||||
msgid ""
|
||||
"The path for service {name!s} is <code>{path!s}</code>, which does not "
|
||||
"exist."
|
||||
msgstr ""
|
||||
msgstr "Cesta k službe {name!s} je <code>{path!s}</code>, ale neexistuje."
|
||||
|
||||
#: src/modules/plymouthcfg/main.py:36
|
||||
msgid "Configure Plymouth theme"
|
||||
msgstr ""
|
||||
msgstr "Konfigurácia motívu služby Plymouth"
|
||||
|
||||
#: src/modules/packages/main.py:62
|
||||
#, python-format
|
||||
@ -290,31 +290,31 @@ msgstr[3] "Odstraňuje sa %(num)d balíkov."
|
||||
|
||||
#: src/modules/bootloader/main.py:51
|
||||
msgid "Install bootloader."
|
||||
msgstr ""
|
||||
msgstr "Inštalácia zavádzača."
|
||||
|
||||
#: src/modules/removeuser/main.py:34
|
||||
msgid "Remove live user from target system"
|
||||
msgstr ""
|
||||
msgstr "Odstránenie live používateľa z cieľového systému"
|
||||
|
||||
#: src/modules/hwclock/main.py:35
|
||||
msgid "Setting hardware clock."
|
||||
msgstr ""
|
||||
msgstr "Nastavovanie hardvérových hodín."
|
||||
|
||||
#: src/modules/dracut/main.py:36
|
||||
msgid "Creating initramfs with dracut."
|
||||
msgstr ""
|
||||
msgstr "Vytváranie initramfs pomocou nástroja dracut."
|
||||
|
||||
#: src/modules/dracut/main.py:58
|
||||
msgid "Failed to run dracut on the target"
|
||||
msgstr ""
|
||||
msgstr "Zlyhalo spustenie nástroja dracut v cieli"
|
||||
|
||||
#: src/modules/dracut/main.py:59
|
||||
msgid "The exit code was {}"
|
||||
msgstr ""
|
||||
msgstr "Kód skončenia bol {}"
|
||||
|
||||
#: src/modules/initramfscfg/main.py:41
|
||||
msgid "Configuring initramfs."
|
||||
msgstr ""
|
||||
msgstr "Konfigurácia initramfs."
|
||||
|
||||
#: src/modules/openrcdmcryptcfg/main.py:34
|
||||
msgid "Configuring OpenRC dmcrypt service."
|
||||
@ -322,7 +322,7 @@ msgstr ""
|
||||
|
||||
#: src/modules/fstab/main.py:38
|
||||
msgid "Writing fstab."
|
||||
msgstr ""
|
||||
msgstr "Zapisovanie fstab."
|
||||
|
||||
#: src/modules/dummypython/main.py:44
|
||||
msgid "Dummy python job."
|
||||
@ -334,8 +334,8 @@ msgstr "Fiktívny krok {} jazyka python"
|
||||
|
||||
#: src/modules/localecfg/main.py:39
|
||||
msgid "Configuring locales."
|
||||
msgstr ""
|
||||
msgstr "Konfigurácia miestnych nastavení."
|
||||
|
||||
#: src/modules/networkcfg/main.py:37
|
||||
msgid "Saving network configuration."
|
||||
msgstr ""
|
||||
msgstr "Ukladanie sieťovej konfigurácie."
|
||||
|
Binary file not shown.
@ -4,7 +4,7 @@
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
# Translators:
|
||||
# Slobodan Simić <slsimic@gmail.com>, 2019
|
||||
# Slobodan Simić <slsimic@gmail.com>, 2020
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
@ -13,7 +13,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-02-19 17:27+0100\n"
|
||||
"PO-Revision-Date: 2017-08-09 10:34+0000\n"
|
||||
"Last-Translator: Slobodan Simić <slsimic@gmail.com>, 2019\n"
|
||||
"Last-Translator: Slobodan Simić <slsimic@gmail.com>, 2020\n"
|
||||
"Language-Team: Serbian (https://www.transifex.com/calamares/teams/20061/sr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -50,12 +50,12 @@ msgstr ""
|
||||
|
||||
#: src/modules/services-systemd/main.py:35
|
||||
msgid "Configure systemd services"
|
||||
msgstr ""
|
||||
msgstr "Подеси „systemd“ сервисе"
|
||||
|
||||
#: src/modules/services-systemd/main.py:68
|
||||
#: src/modules/services-openrc/main.py:102
|
||||
msgid "Cannot modify service"
|
||||
msgstr ""
|
||||
msgstr "Не могу да мењам сервис"
|
||||
|
||||
#: src/modules/services-systemd/main.py:69
|
||||
msgid ""
|
||||
@ -117,7 +117,7 @@ msgstr ""
|
||||
|
||||
#: src/modules/unpackfs/main.py:376
|
||||
msgid "Bad mount point for root partition"
|
||||
msgstr ""
|
||||
msgstr "Лоша тачка монтирања за корену партицију"
|
||||
|
||||
#: src/modules/unpackfs/main.py:377
|
||||
msgid "rootMountPoint is \"{}\", which does not exist, doing nothing"
|
||||
|
Binary file not shown.
@ -70,11 +70,11 @@ msgstr "Kunde inte aktivera systemd tjänst <code>{name!s}</code>."
|
||||
|
||||
#: src/modules/services-systemd/main.py:74
|
||||
msgid "Cannot enable systemd target <code>{name!s}</code>."
|
||||
msgstr ""
|
||||
msgstr "Kunde inte aktivera systemd målsystem <code>{name!s}</code>."
|
||||
|
||||
#: src/modules/services-systemd/main.py:78
|
||||
msgid "Cannot disable systemd target <code>{name!s}</code>."
|
||||
msgstr ""
|
||||
msgstr "Kunde inte inaktivera systemd målsystem <code>{name!s}</code>."
|
||||
|
||||
#: src/modules/services-systemd/main.py:80
|
||||
msgid "Cannot mask systemd unit <code>{name!s}</code>."
|
||||
@ -85,6 +85,8 @@ msgid ""
|
||||
"Unknown systemd commands <code>{command!s}</code> and "
|
||||
"<code>{suffix!s}</code> for unit {name!s}."
|
||||
msgstr ""
|
||||
"Okända systemd kommandon <code>{command!s}</code> och {suffix!s}<code> för "
|
||||
"enhet {name!s}."
|
||||
|
||||
#: src/modules/umount/main.py:40
|
||||
msgid "Unmount file systems."
|
||||
@ -100,7 +102,7 @@ msgstr "rsync misslyckades med felkod {}."
|
||||
|
||||
#: src/modules/unpackfs/main.py:245 src/modules/unpackfs/main.py:268
|
||||
msgid "Failed to unpack image \"{}\""
|
||||
msgstr ""
|
||||
msgstr "Misslyckades att packa upp avbild \"{}\""
|
||||
|
||||
#: src/modules/unpackfs/main.py:246
|
||||
msgid ""
|
||||
@ -139,7 +141,7 @@ msgstr ""
|
||||
|
||||
#: src/modules/unpackfs/main.py:408
|
||||
msgid "The destination \"{}\" in the target system is not a directory"
|
||||
msgstr ""
|
||||
msgstr "Destinationen \"{}\" på målsystemet är inte en katalog"
|
||||
|
||||
#: src/modules/displaymanager/main.py:515
|
||||
msgid "Cannot write KDM configuration file"
|
||||
@ -183,13 +185,15 @@ msgstr "SLIM konfigurationsfil {!s} existerar inte"
|
||||
|
||||
#: src/modules/displaymanager/main.py:895
|
||||
msgid "No display managers selected for the displaymanager module."
|
||||
msgstr ""
|
||||
msgstr "Ingen skärmhanterare vald för displaymanager modulen."
|
||||
|
||||
#: src/modules/displaymanager/main.py:896
|
||||
msgid ""
|
||||
"The displaymanagers list is empty or undefined in bothglobalstorage and "
|
||||
"displaymanager.conf."
|
||||
msgstr ""
|
||||
"Skärmhanterar listan är tom eller odefinierad i bothglobalstorage och "
|
||||
"displaymanager.conf."
|
||||
|
||||
#: src/modules/displaymanager/main.py:978
|
||||
msgid "Display manager configuration was incomplete"
|
||||
@ -265,7 +269,7 @@ msgstr "Konfigurera Plymouth tema"
|
||||
#: src/modules/packages/main.py:62
|
||||
#, python-format
|
||||
msgid "Processing packages (%(count)d / %(total)d)"
|
||||
msgstr ""
|
||||
msgstr "Bearbetar paket (%(count)d / %(total)d)"
|
||||
|
||||
#: src/modules/packages/main.py:64 src/modules/packages/main.py:74
|
||||
msgid "Install packages."
|
||||
@ -291,7 +295,7 @@ msgstr "Installera starthanterare."
|
||||
|
||||
#: src/modules/removeuser/main.py:34
|
||||
msgid "Remove live user from target system"
|
||||
msgstr ""
|
||||
msgstr "Tar bort live användare från målsystemet"
|
||||
|
||||
#: src/modules/hwclock/main.py:35
|
||||
msgid "Setting hardware clock."
|
||||
@ -303,11 +307,11 @@ msgstr "Skapar initramfs med dracut."
|
||||
|
||||
#: src/modules/dracut/main.py:58
|
||||
msgid "Failed to run dracut on the target"
|
||||
msgstr ""
|
||||
msgstr "Misslyckades att köra dracut på målet "
|
||||
|
||||
#: src/modules/dracut/main.py:59
|
||||
msgid "The exit code was {}"
|
||||
msgstr ""
|
||||
msgstr "Felkoden var {}"
|
||||
|
||||
#: src/modules/initramfscfg/main.py:41
|
||||
msgid "Configuring initramfs."
|
||||
@ -323,11 +327,11 @@ msgstr "Skriver fstab."
|
||||
|
||||
#: src/modules/dummypython/main.py:44
|
||||
msgid "Dummy python job."
|
||||
msgstr ""
|
||||
msgstr "Exempel python jobb"
|
||||
|
||||
#: src/modules/dummypython/main.py:97
|
||||
msgid "Dummy python step {}"
|
||||
msgstr ""
|
||||
msgstr "Exempel python steg {}"
|
||||
|
||||
#: src/modules/localecfg/main.py:39
|
||||
msgid "Configuring locales."
|
||||
|
@ -41,6 +41,12 @@ windowSize: 800px,520px
|
||||
# *windowExpanding* set to "fullscreen").
|
||||
windowPlacement: center
|
||||
|
||||
# Kind of sidebar (panel on the left, showing progress).
|
||||
# - "widget" or unset, use traditional sidebar (logo, items)
|
||||
# - "none", hide it entirely
|
||||
# - "qml", use sidebar.qml from branding folder
|
||||
sidebar: widget
|
||||
|
||||
# These are strings shown to the user in the user interface.
|
||||
# There is no provision for translating them -- since they
|
||||
# are names, the string is included as-is.
|
||||
|
@ -7,29 +7,23 @@ set( calamaresSources
|
||||
VariantModel.cpp
|
||||
|
||||
progresstree/ProgressTreeDelegate.cpp
|
||||
progresstree/ProgressTreeItem.cpp
|
||||
progresstree/ProgressTreeModel.cpp
|
||||
progresstree/ProgressTreeView.cpp
|
||||
progresstree/ViewStepItem.cpp
|
||||
)
|
||||
|
||||
include_directories(
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../libcalamares
|
||||
|
||||
${CMAKE_SOURCE_DIR}/src/libcalamares
|
||||
${CMAKE_SOURCE_DIR}/src//libcalamaresui
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src/libcalamaresui
|
||||
${CMAKE_BINARY_DIR}/src/libcalamares
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
# Translations
|
||||
include( CalamaresAddTranslations )
|
||||
add_calamares_translations( ${CALAMARES_TRANSLATION_LANGUAGES} )
|
||||
qt5_add_resources( calamaresRc calamares.qrc )
|
||||
|
||||
set( final_src ${calamaresSources} ${calamaresRc} ${trans_outfile} )
|
||||
|
||||
add_executable( calamares_bin ${final_src} )
|
||||
add_executable( calamares_bin ${calamaresSources} ${calamaresRc} ${trans_outfile} )
|
||||
target_include_directories( calamares_bin PRIVATE ${CMAKE_SOURCE_DIR} )
|
||||
set_target_properties(calamares_bin
|
||||
PROPERTIES
|
||||
ENABLE_EXPORTS TRUE
|
||||
@ -40,7 +34,7 @@ calamares_autouic( calamares_bin )
|
||||
|
||||
target_link_libraries( calamares_bin
|
||||
PRIVATE
|
||||
${CALAMARES_LIBRARIES}
|
||||
calamares
|
||||
calamaresui
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
@ -66,6 +60,6 @@ install( FILES ${CMAKE_SOURCE_DIR}/data/images/squid.svg
|
||||
|
||||
if( BUILD_TESTING )
|
||||
add_executable( loadmodule testmain.cpp )
|
||||
target_link_libraries( loadmodule ${CALAMARES_LIBRARIES} Qt5::Core Qt5::Widgets calamaresui )
|
||||
target_link_libraries( loadmodule PRIVATE Qt5::Core Qt5::Widgets calamares calamaresui )
|
||||
# Don't install, it's just for enable_testing
|
||||
endif()
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "CalamaresConfig.h"
|
||||
#include "CalamaresVersion.h"
|
||||
#include "CalamaresWindow.h"
|
||||
#include "progresstree/ProgressTreeModel.h"
|
||||
#include "progresstree/ProgressTreeView.h"
|
||||
|
||||
#include "Branding.h"
|
||||
@ -339,8 +338,8 @@ CalamaresApplication::initViewSteps()
|
||||
m_mainwindow->show();
|
||||
}
|
||||
|
||||
ProgressTreeModel* m = new ProgressTreeModel( nullptr );
|
||||
ProgressTreeView::instance()->setModel( m );
|
||||
// ProgressTreeModel* m = new ProgressTreeModel( nullptr );
|
||||
// ProgressTreeView::instance()->setModel( m );
|
||||
cDebug() << "STARTUP: Window now visible and ProgressTreeView populated";
|
||||
|
||||
const auto steps = Calamares::ViewManager::instance()->viewSteps();
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "progresstree/ProgressTreeView.h"
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Qml.h"
|
||||
#include "utils/Retranslator.h"
|
||||
|
||||
#include <QApplication>
|
||||
@ -37,6 +38,7 @@
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QLabel>
|
||||
#include <QQuickWidget>
|
||||
#include <QTreeView>
|
||||
|
||||
static inline int
|
||||
@ -57,6 +59,90 @@ windowDimensionToPixels( const Calamares::Branding::WindowDimension& u )
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
QWidget*
|
||||
CalamaresWindow::getWidgetSidebar( int desiredWidth )
|
||||
{
|
||||
const Calamares::Branding* const branding = Calamares::Branding::instance();
|
||||
|
||||
QWidget* sideBox = new QWidget( this );
|
||||
sideBox->setObjectName( "sidebarApp" );
|
||||
|
||||
QBoxLayout* sideLayout = new QVBoxLayout;
|
||||
sideBox->setLayout( sideLayout );
|
||||
// Set this attribute into qss file
|
||||
sideBox->setFixedWidth( desiredWidth );
|
||||
sideBox->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||
|
||||
QHBoxLayout* logoLayout = new QHBoxLayout;
|
||||
sideLayout->addLayout( logoLayout );
|
||||
logoLayout->addStretch();
|
||||
QLabel* logoLabel = new QLabel( sideBox );
|
||||
logoLabel->setObjectName( "logoApp" );
|
||||
//Define all values into qss file
|
||||
{
|
||||
QPalette plt = sideBox->palette();
|
||||
sideBox->setAutoFillBackground( true );
|
||||
plt.setColor( sideBox->backgroundRole(), branding->styleString( Calamares::Branding::SidebarBackground ) );
|
||||
plt.setColor( sideBox->foregroundRole(), branding->styleString( Calamares::Branding::SidebarText ) );
|
||||
sideBox->setPalette( plt );
|
||||
logoLabel->setPalette( plt );
|
||||
}
|
||||
logoLabel->setAlignment( Qt::AlignCenter );
|
||||
logoLabel->setFixedSize( 80, 80 );
|
||||
logoLabel->setPixmap( branding->image( Calamares::Branding::ProductLogo, logoLabel->size() ) );
|
||||
logoLayout->addWidget( logoLabel );
|
||||
logoLayout->addStretch();
|
||||
|
||||
ProgressTreeView* tv = new ProgressTreeView( sideBox );
|
||||
tv->setModel( Calamares::ViewManager::instance() );
|
||||
tv->setFocusPolicy( Qt::NoFocus );
|
||||
sideLayout->addWidget( tv );
|
||||
|
||||
if ( Calamares::Settings::instance()->debugMode() || ( Logger::logLevel() >= Logger::LOGVERBOSE ) )
|
||||
{
|
||||
QPushButton* debugWindowBtn = new QPushButton;
|
||||
debugWindowBtn->setObjectName( "debugButton" );
|
||||
CALAMARES_RETRANSLATE( debugWindowBtn->setText( tr( "Show debug information" ) ); )
|
||||
sideLayout->addWidget( debugWindowBtn );
|
||||
debugWindowBtn->setFlat( true );
|
||||
debugWindowBtn->setCheckable( true );
|
||||
connect( debugWindowBtn, &QPushButton::clicked, this, [=]( bool checked ) {
|
||||
if ( checked )
|
||||
{
|
||||
m_debugWindow = new Calamares::DebugWindow();
|
||||
m_debugWindow->show();
|
||||
connect( m_debugWindow.data(), &Calamares::DebugWindow::closed, this, [=]() {
|
||||
m_debugWindow->deleteLater();
|
||||
debugWindowBtn->setChecked( false );
|
||||
} );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_debugWindow )
|
||||
{
|
||||
m_debugWindow->deleteLater();
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
CalamaresUtils::unmarginLayout( sideLayout );
|
||||
return sideBox;
|
||||
}
|
||||
|
||||
QWidget*
|
||||
CalamaresWindow::getQmlSidebar( int desiredWidth )
|
||||
{
|
||||
CalamaresUtils::registerCalamaresModels();
|
||||
QQuickWidget* w = new QQuickWidget( this );
|
||||
w->setFixedWidth( desiredWidth );
|
||||
w->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||
w->setSource( QUrl(
|
||||
CalamaresUtils::searchQmlFile( CalamaresUtils::QmlSearch::Both, QStringLiteral( "calamares-sidebar" ) ) ) );
|
||||
return w;
|
||||
}
|
||||
|
||||
CalamaresWindow::CalamaresWindow( QWidget* parent )
|
||||
: QWidget( parent )
|
||||
, m_debugWindow( nullptr )
|
||||
@ -97,76 +183,30 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
|
||||
cDebug() << Logger::SubEntry << "Proposed window size:" << w << h;
|
||||
resize( w, h );
|
||||
|
||||
m_viewManager = Calamares::ViewManager::instance( this );
|
||||
|
||||
QBoxLayout* mainLayout = new QHBoxLayout;
|
||||
setLayout( mainLayout );
|
||||
|
||||
QWidget* sideBox = new QWidget( this );
|
||||
sideBox->setObjectName( "sidebarApp" );
|
||||
mainLayout->addWidget( sideBox );
|
||||
|
||||
QBoxLayout* sideLayout = new QVBoxLayout;
|
||||
sideBox->setLayout( sideLayout );
|
||||
// Set this attribute into qss file
|
||||
sideBox->setFixedWidth(
|
||||
qBound( 100, CalamaresUtils::defaultFontHeight() * 12, w < windowPreferredWidth ? 100 : 190 ) );
|
||||
sideBox->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||
|
||||
QHBoxLayout* logoLayout = new QHBoxLayout;
|
||||
sideLayout->addLayout( logoLayout );
|
||||
logoLayout->addStretch();
|
||||
QLabel* logoLabel = new QLabel( sideBox );
|
||||
logoLabel->setObjectName( "logoApp" );
|
||||
//Define all values into qss file
|
||||
QWidget* sideBox = nullptr;
|
||||
switch ( branding->sidebarFlavor() )
|
||||
{
|
||||
QPalette plt = sideBox->palette();
|
||||
sideBox->setAutoFillBackground( true );
|
||||
plt.setColor( sideBox->backgroundRole(), branding->styleString( Calamares::Branding::SidebarBackground ) );
|
||||
plt.setColor( sideBox->foregroundRole(), branding->styleString( Calamares::Branding::SidebarText ) );
|
||||
sideBox->setPalette( plt );
|
||||
logoLabel->setPalette( plt );
|
||||
case Calamares::Branding::SidebarFlavor::Widget:
|
||||
sideBox = getWidgetSidebar(
|
||||
qBound( 100, CalamaresUtils::defaultFontHeight() * 12, w < windowPreferredWidth ? 100 : 190 ) );
|
||||
break;
|
||||
case Calamares::Branding::SidebarFlavor::Qml:
|
||||
sideBox = getQmlSidebar(
|
||||
qBound( 100, CalamaresUtils::defaultFontHeight() * 12, w < windowPreferredWidth ? 100 : 190 ) );
|
||||
break;
|
||||
case Calamares::Branding::SidebarFlavor::None:
|
||||
sideBox = nullptr;
|
||||
}
|
||||
logoLabel->setAlignment( Qt::AlignCenter );
|
||||
logoLabel->setFixedSize( 80, 80 );
|
||||
logoLabel->setPixmap( branding->image( Calamares::Branding::ProductLogo, logoLabel->size() ) );
|
||||
logoLayout->addWidget( logoLabel );
|
||||
logoLayout->addStretch();
|
||||
|
||||
ProgressTreeView* tv = new ProgressTreeView( sideBox );
|
||||
sideLayout->addWidget( tv );
|
||||
tv->setFocusPolicy( Qt::NoFocus );
|
||||
|
||||
if ( Calamares::Settings::instance()->debugMode() || ( Logger::logLevel() >= Logger::LOGVERBOSE ) )
|
||||
if ( sideBox )
|
||||
{
|
||||
QPushButton* debugWindowBtn = new QPushButton;
|
||||
debugWindowBtn->setObjectName( "debugButton" );
|
||||
CALAMARES_RETRANSLATE( debugWindowBtn->setText( tr( "Show debug information" ) ); )
|
||||
sideLayout->addWidget( debugWindowBtn );
|
||||
debugWindowBtn->setFlat( true );
|
||||
debugWindowBtn->setCheckable( true );
|
||||
connect( debugWindowBtn, &QPushButton::clicked, this, [=]( bool checked ) {
|
||||
if ( checked )
|
||||
{
|
||||
m_debugWindow = new Calamares::DebugWindow();
|
||||
m_debugWindow->show();
|
||||
connect( m_debugWindow.data(), &Calamares::DebugWindow::closed, this, [=]() {
|
||||
m_debugWindow->deleteLater();
|
||||
debugWindowBtn->setChecked( false );
|
||||
} );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_debugWindow )
|
||||
{
|
||||
m_debugWindow->deleteLater();
|
||||
}
|
||||
}
|
||||
} );
|
||||
mainLayout->addWidget( sideBox );
|
||||
}
|
||||
|
||||
CalamaresUtils::unmarginLayout( sideLayout );
|
||||
CalamaresUtils::unmarginLayout( mainLayout );
|
||||
|
||||
m_viewManager = Calamares::ViewManager::instance( this );
|
||||
if ( branding->windowExpands() )
|
||||
{
|
||||
connect( m_viewManager, &Calamares::ViewManager::enlarge, this, &CalamaresWindow::enlarge );
|
||||
@ -181,6 +221,7 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
|
||||
// event, which is also the ViewManager's responsibility.
|
||||
|
||||
mainLayout->addWidget( m_viewManager->centralWidget() );
|
||||
CalamaresUtils::unmarginLayout( mainLayout );
|
||||
setStyleSheet( Calamares::Branding::instance()->stylesheet() );
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,9 @@ protected:
|
||||
virtual void closeEvent( QCloseEvent* e ) override;
|
||||
|
||||
private:
|
||||
QWidget* getWidgetSidebar( int desiredWidth );
|
||||
QWidget* getQmlSidebar( int desiredWidth );
|
||||
|
||||
QPointer< Calamares::DebugWindow > m_debugWindow; // Managed by self
|
||||
Calamares::ViewManager* m_viewManager;
|
||||
};
|
||||
|
35
src/calamares/calamares-sidebar.qml
Normal file
35
src/calamares/calamares-sidebar.qml
Normal file
@ -0,0 +1,35 @@
|
||||
import QtQuick 2.3
|
||||
import io.calamares.ui 1.0
|
||||
import io.calamares.core 1.0
|
||||
|
||||
Column {
|
||||
|
||||
Rectangle {
|
||||
id: hello
|
||||
width: 200
|
||||
height: 100
|
||||
color: "red"
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: Branding.string(Branding.VersionedName)
|
||||
}
|
||||
}
|
||||
|
||||
/* perhaps we could show a branding image here */
|
||||
|
||||
Repeater {
|
||||
model: ViewManager
|
||||
Rectangle {
|
||||
width: 200
|
||||
height: 75
|
||||
color: "black"
|
||||
|
||||
Text {
|
||||
color: completed ? "green" : "yellow"
|
||||
text: display
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
5
src/calamares/calamares.qrc
Normal file
5
src/calamares/calamares.qrc
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file alias="calamares-sidebar.qml">calamares-sidebar.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -18,11 +18,10 @@
|
||||
*/
|
||||
|
||||
#include "ProgressTreeDelegate.h"
|
||||
#include "ProgressTreeModel.h"
|
||||
|
||||
#include "CalamaresApplication.h"
|
||||
#include "CalamaresWindow.h"
|
||||
|
||||
#include "ViewManager.h"
|
||||
#include "Branding.h"
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
|
||||
@ -87,7 +86,7 @@ ProgressTreeDelegate::paintViewStep( QPainter* painter,
|
||||
painter->setFont( font );
|
||||
|
||||
bool isCurrent = false;
|
||||
isCurrent = index.data( ProgressTreeModel::ProgressTreeItemCurrentRole ).toBool();
|
||||
isCurrent = index.data( Calamares::ViewManager::ProgressTreeItemCurrentRole ).toBool();
|
||||
|
||||
if ( isCurrent )
|
||||
{
|
||||
|
@ -1,92 +0,0 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ProgressTreeItem.h"
|
||||
|
||||
#include "ProgressTreeModel.h"
|
||||
|
||||
|
||||
ProgressTreeItem::ProgressTreeItem( ProgressTreeItem* parent )
|
||||
{
|
||||
m_parentItem = parent;
|
||||
}
|
||||
|
||||
|
||||
ProgressTreeItem::~ProgressTreeItem()
|
||||
{
|
||||
qDeleteAll( m_childItems );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ProgressTreeItem::appendChild( ProgressTreeItem* item )
|
||||
{
|
||||
m_childItems.append( item );
|
||||
}
|
||||
|
||||
|
||||
ProgressTreeItem*
|
||||
ProgressTreeItem::child( int row )
|
||||
{
|
||||
return m_childItems.value( row );
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ProgressTreeItem::childCount() const
|
||||
{
|
||||
return m_childItems.count();
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ProgressTreeItem::columnCount() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ProgressTreeItem::row() const
|
||||
{
|
||||
if ( m_parentItem )
|
||||
{
|
||||
return m_parentItem->m_childItems.indexOf( const_cast< ProgressTreeItem* >( this ) );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
ProgressTreeItem*
|
||||
ProgressTreeItem::parent()
|
||||
{
|
||||
return m_parentItem;
|
||||
}
|
||||
|
||||
|
||||
ProgressTreeRoot::ProgressTreeRoot()
|
||||
: ProgressTreeItem()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
ProgressTreeRoot::data( int ) const
|
||||
{
|
||||
return QVariant();
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PROGRESSTREEITEM_H
|
||||
#define PROGRESSTREEITEM_H
|
||||
|
||||
#include <QList>
|
||||
#include <QVariant>
|
||||
|
||||
|
||||
/**
|
||||
* @brief The ProgressTreeItem class represents an item in the
|
||||
* ProgressTreeModel/ProgressTreeView.
|
||||
* Each item generally represents a ViewStep.
|
||||
*/
|
||||
class ProgressTreeItem
|
||||
{
|
||||
public:
|
||||
explicit ProgressTreeItem( ProgressTreeItem* parent = nullptr );
|
||||
|
||||
virtual ~ProgressTreeItem();
|
||||
|
||||
virtual void appendChild( ProgressTreeItem* item );
|
||||
|
||||
virtual ProgressTreeItem* child( int row );
|
||||
virtual int childCount() const;
|
||||
virtual int columnCount() const;
|
||||
virtual QVariant data( int role ) const = 0;
|
||||
virtual int row() const;
|
||||
virtual ProgressTreeItem* parent();
|
||||
|
||||
private:
|
||||
QList< ProgressTreeItem* > m_childItems;
|
||||
ProgressTreeItem* m_parentItem;
|
||||
};
|
||||
|
||||
class ProgressTreeRoot : public ProgressTreeItem
|
||||
{
|
||||
public:
|
||||
explicit ProgressTreeRoot();
|
||||
|
||||
virtual QVariant data( int role ) const;
|
||||
};
|
||||
|
||||
#endif // PROGRESSTREEITEM_H
|
@ -1,227 +0,0 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ProgressTreeModel.h"
|
||||
|
||||
#include "ViewStepItem.h"
|
||||
|
||||
#include "ViewManager.h"
|
||||
|
||||
ProgressTreeModel::ProgressTreeModel( QObject* parent )
|
||||
: QAbstractItemModel( parent )
|
||||
, m_rootItem( nullptr )
|
||||
{
|
||||
setupModelData();
|
||||
}
|
||||
|
||||
|
||||
ProgressTreeModel::~ProgressTreeModel()
|
||||
{
|
||||
delete m_rootItem;
|
||||
}
|
||||
|
||||
|
||||
Qt::ItemFlags
|
||||
ProgressTreeModel::flags( const QModelIndex& index ) const
|
||||
{
|
||||
if ( !index.isValid() )
|
||||
{
|
||||
return Qt::ItemFlags();
|
||||
}
|
||||
|
||||
return Qt::ItemIsEnabled;
|
||||
}
|
||||
|
||||
|
||||
QModelIndex
|
||||
ProgressTreeModel::index( int row, int column, const QModelIndex& parent ) const
|
||||
{
|
||||
if ( !hasIndex( row, column, parent ) )
|
||||
{
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
ProgressTreeItem* parentItem;
|
||||
|
||||
if ( !parent.isValid() )
|
||||
{
|
||||
parentItem = m_rootItem;
|
||||
}
|
||||
else
|
||||
{
|
||||
parentItem = static_cast< ProgressTreeItem* >( parent.internalPointer() );
|
||||
}
|
||||
|
||||
ProgressTreeItem* childItem = parentItem->child( row );
|
||||
if ( childItem )
|
||||
{
|
||||
return createIndex( row, column, childItem );
|
||||
}
|
||||
else
|
||||
{
|
||||
return QModelIndex();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QModelIndex
|
||||
ProgressTreeModel::parent( const QModelIndex& index ) const
|
||||
{
|
||||
if ( !index.isValid() )
|
||||
{
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
ProgressTreeItem* childItem = static_cast< ProgressTreeItem* >( index.internalPointer() );
|
||||
ProgressTreeItem* parentItem = childItem->parent();
|
||||
|
||||
if ( parentItem == m_rootItem )
|
||||
{
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
return createIndex( parentItem->row(), 0, parentItem );
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
ProgressTreeModel::data( const QModelIndex& index, int role ) const
|
||||
{
|
||||
if ( !index.isValid() )
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
ProgressTreeItem* item = static_cast< ProgressTreeItem* >( index.internalPointer() );
|
||||
|
||||
return item->data( role );
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
ProgressTreeModel::headerData( int section, Qt::Orientation orientation, int role ) const
|
||||
{
|
||||
Q_UNUSED( section )
|
||||
Q_UNUSED( orientation )
|
||||
Q_UNUSED( role )
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ProgressTreeModel::rowCount( const QModelIndex& parent ) const
|
||||
{
|
||||
ProgressTreeItem* parentItem;
|
||||
if ( parent.column() > 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( !parent.isValid() )
|
||||
{
|
||||
parentItem = m_rootItem;
|
||||
}
|
||||
else
|
||||
{
|
||||
parentItem = static_cast< ProgressTreeItem* >( parent.internalPointer() );
|
||||
}
|
||||
|
||||
return parentItem->childCount();
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ProgressTreeModel::columnCount( const QModelIndex& parent ) const
|
||||
{
|
||||
if ( parent.isValid() )
|
||||
{
|
||||
return static_cast< ProgressTreeItem* >( parent.internalPointer() )->columnCount();
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_rootItem->columnCount();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ProgressTreeModel::setupModelData()
|
||||
{
|
||||
delete m_rootItem;
|
||||
|
||||
m_rootItem = new ProgressTreeRoot();
|
||||
const Calamares::ViewManager* vm = Calamares::ViewManager::instance();
|
||||
|
||||
const auto steps = vm->viewSteps();
|
||||
for ( const Calamares::ViewStep* step : steps )
|
||||
{
|
||||
m_rootItem->appendChild( new ViewStepItem( step, m_rootItem ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QModelIndex
|
||||
ProgressTreeModel::indexFromItem( ProgressTreeItem* item )
|
||||
{
|
||||
if ( !item || !item->parent() )
|
||||
{
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
// Reconstructs a QModelIndex from a ProgressTreeItem that is somewhere in the tree.
|
||||
// Traverses the item to the root node, then rebuilds the qmodelindices from there
|
||||
// back down; each int is the row of that item in the parent.
|
||||
/**
|
||||
* In this diagram, if the item is G, childIndexList will contain [0, 2, 0]
|
||||
*
|
||||
* A
|
||||
* D
|
||||
* E
|
||||
* F
|
||||
* G
|
||||
* H
|
||||
* B
|
||||
* C
|
||||
*
|
||||
**/
|
||||
QList< int > childIndexList;
|
||||
ProgressTreeItem* curItem = item;
|
||||
while ( curItem != m_rootItem )
|
||||
{
|
||||
int row = curItem->row(); //relative to its parent
|
||||
if ( row < 0 ) // something went wrong, bail
|
||||
{
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
childIndexList << row;
|
||||
|
||||
curItem = curItem->parent();
|
||||
}
|
||||
|
||||
// Now we rebuild the QModelIndex we need
|
||||
QModelIndex idx;
|
||||
for ( int i = childIndexList.size() - 1; i >= 0; i-- )
|
||||
{
|
||||
idx = index( childIndexList[ i ], 0, idx );
|
||||
}
|
||||
|
||||
return idx;
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PROGRESSTREEMODEL_H
|
||||
#define PROGRESSTREEMODEL_H
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
|
||||
class ProgressTreeRoot;
|
||||
class ProgressTreeItem;
|
||||
|
||||
|
||||
/**
|
||||
* @brief The ProgressTreeModel class implements a model for the ProgressTreeView.
|
||||
*/
|
||||
class ProgressTreeModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum Role
|
||||
{
|
||||
ProgressTreeItemCurrentRole = Qt::UserRole + 11
|
||||
};
|
||||
|
||||
explicit ProgressTreeModel( QObject* parent = nullptr );
|
||||
virtual ~ProgressTreeModel() override;
|
||||
|
||||
// Reimplemented from QAbstractItemModel
|
||||
Qt::ItemFlags flags( const QModelIndex& index ) const override;
|
||||
QModelIndex index( int row, int column, const QModelIndex& parent = QModelIndex() ) const override;
|
||||
QModelIndex parent( const QModelIndex& index ) const override;
|
||||
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
|
||||
QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;
|
||||
int rowCount( const QModelIndex& parent = QModelIndex() ) const override;
|
||||
int columnCount( const QModelIndex& parent = QModelIndex() ) const override;
|
||||
|
||||
private:
|
||||
void setupModelData();
|
||||
QModelIndex indexFromItem( ProgressTreeItem* item );
|
||||
|
||||
ProgressTreeRoot* m_rootItem;
|
||||
};
|
||||
|
||||
#endif // PROGRESSTREEMODEL_H
|
@ -23,37 +23,18 @@
|
||||
#include "Branding.h"
|
||||
#include "ViewManager.h"
|
||||
|
||||
ProgressTreeView* ProgressTreeView::s_instance = nullptr;
|
||||
|
||||
ProgressTreeView*
|
||||
ProgressTreeView::instance()
|
||||
{
|
||||
return s_instance;
|
||||
}
|
||||
|
||||
ProgressTreeView::ProgressTreeView( QWidget* parent )
|
||||
: QTreeView( parent )
|
||||
: QListView( parent )
|
||||
{
|
||||
s_instance = this; //FIXME: should assert when s_instance gets written and it wasn't nullptr
|
||||
|
||||
this->setObjectName( "sidebarMenuApp" );
|
||||
setFrameShape( QFrame::NoFrame );
|
||||
setContentsMargins( 0, 0, 0, 0 );
|
||||
|
||||
setHeaderHidden( true );
|
||||
setRootIsDecorated( true );
|
||||
setExpandsOnDoubleClick( true );
|
||||
|
||||
setSelectionMode( QAbstractItemView::NoSelection );
|
||||
setDragDropMode( QAbstractItemView::NoDragDrop );
|
||||
setAcceptDrops( false );
|
||||
setUniformRowHeights( false );
|
||||
|
||||
setIndentation( 0 );
|
||||
setSortingEnabled( false );
|
||||
|
||||
m_delegate = new ProgressTreeDelegate( this );
|
||||
setItemDelegate( m_delegate );
|
||||
setItemDelegate( new ProgressTreeDelegate( this ) );
|
||||
|
||||
QPalette plt = palette();
|
||||
plt.setColor( QPalette::Base,
|
||||
@ -73,8 +54,7 @@ ProgressTreeView::setModel( QAbstractItemModel* model )
|
||||
return;
|
||||
}
|
||||
|
||||
QTreeView::setModel( model );
|
||||
expandAll();
|
||||
QListView::setModel( model );
|
||||
|
||||
connect(
|
||||
Calamares::ViewManager::instance(),
|
||||
|
@ -20,21 +20,16 @@
|
||||
#ifndef PROGRESSTREEVIEW_H
|
||||
#define PROGRESSTREEVIEW_H
|
||||
|
||||
#include <QTreeView>
|
||||
|
||||
class ProgressTreeDelegate;
|
||||
#include <QListView>
|
||||
|
||||
/**
|
||||
* @brief The ProgressTreeView class is a modified QTreeView which displays the
|
||||
* available view steps and the user's progress through them.
|
||||
* @note singleton, only access through ProgressTreeView::instance().
|
||||
*/
|
||||
class ProgressTreeView : public QTreeView
|
||||
class ProgressTreeView : public QListView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static ProgressTreeView* instance();
|
||||
|
||||
explicit ProgressTreeView( QWidget* parent = nullptr );
|
||||
virtual ~ProgressTreeView() override;
|
||||
|
||||
@ -42,10 +37,6 @@ public:
|
||||
* @brief setModel assigns a model to this view.
|
||||
*/
|
||||
void setModel( QAbstractItemModel* model ) override;
|
||||
|
||||
private:
|
||||
static ProgressTreeView* s_instance;
|
||||
ProgressTreeDelegate* m_delegate;
|
||||
};
|
||||
|
||||
#endif // PROGRESSTREEVIEW_H
|
||||
|
@ -1,85 +0,0 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ViewStepItem.h"
|
||||
|
||||
#include "ProgressTreeModel.h"
|
||||
|
||||
#include "Settings.h"
|
||||
#include "ViewManager.h"
|
||||
#include "viewpages/ViewStep.h"
|
||||
|
||||
|
||||
ViewStepItem::ViewStepItem( std::function< QString() > prettyName,
|
||||
std::function< const Calamares::ViewStep*() > accessor,
|
||||
ProgressTreeItem* parent )
|
||||
: ProgressTreeItem( parent )
|
||||
, m_accessor( accessor )
|
||||
, m_prettyName( prettyName )
|
||||
, m_step( nullptr )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ViewStepItem::ViewStepItem( const Calamares::ViewStep* step, ProgressTreeItem* parent )
|
||||
: ProgressTreeItem( parent )
|
||||
, m_step( step )
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ViewStepItem::appendChild( ProgressTreeItem* item )
|
||||
{
|
||||
Q_ASSERT( false );
|
||||
Q_UNUSED( item )
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
ViewStepItem::data( int role ) const
|
||||
{
|
||||
if ( role == Qt::DisplayRole )
|
||||
{
|
||||
return m_step ? m_step->prettyName() : m_prettyName();
|
||||
}
|
||||
if ( Calamares::Settings::instance()->debugMode() && role == Qt::ToolTipRole )
|
||||
{
|
||||
QString toolTip( "<b>Debug information</b>" );
|
||||
if ( m_step )
|
||||
{
|
||||
toolTip.append( "<br/>Type:\tViewStep" );
|
||||
toolTip.append( QString( "<br/>Pretty:\t%1" ).arg( m_step->prettyName() ) );
|
||||
toolTip.append( QString( "<br/>Status:\t%1" ).arg( m_step->prettyStatus() ) );
|
||||
toolTip.append( QString( "<br/>Source:\t%1" )
|
||||
.arg( m_step->moduleInstanceKey().isValid() ? m_step->moduleInstanceKey().toString()
|
||||
: QStringLiteral( "built-in" ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
toolTip.append( "<br/>Type:\tDelegate" );
|
||||
toolTip.append( QString( "<br/>Pretty:\t%1" ).arg( m_prettyName() ) );
|
||||
}
|
||||
return toolTip;
|
||||
}
|
||||
if ( role == ProgressTreeModel::ProgressTreeItemCurrentRole )
|
||||
{
|
||||
return m_step ? ( Calamares::ViewManager::instance()->currentStep() == m_step )
|
||||
: ( Calamares::ViewManager::instance()->currentStep() == m_accessor() );
|
||||
}
|
||||
return QVariant();
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef VIEWSTEPITEM_H
|
||||
#define VIEWSTEPITEM_H
|
||||
|
||||
#include "ProgressTreeItem.h"
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace Calamares
|
||||
{
|
||||
class ViewStep;
|
||||
}
|
||||
|
||||
class ViewStepItem : public ProgressTreeItem
|
||||
{
|
||||
public:
|
||||
// We take a std::function< QString() > instead of a QString because the view asks for
|
||||
// new strings on LanguageChange, and tr needs to be called again in that case.
|
||||
explicit ViewStepItem( std::function< QString() > prettyName,
|
||||
std::function< const Calamares::ViewStep*() > accessor,
|
||||
ProgressTreeItem* parent = nullptr );
|
||||
|
||||
explicit ViewStepItem( const Calamares::ViewStep* step, ProgressTreeItem* parent = nullptr );
|
||||
|
||||
void appendChild( ProgressTreeItem* item ) override;
|
||||
|
||||
QVariant data( int role ) const override;
|
||||
|
||||
private:
|
||||
const std::function< const Calamares::ViewStep*() > m_accessor;
|
||||
const std::function< QString() > m_prettyName;
|
||||
const Calamares::ViewStep* const m_step;
|
||||
};
|
||||
|
||||
|
||||
#endif // VIEWSTEPITEM_H
|
@ -128,7 +128,12 @@ if ( KPMcore_FOUND )
|
||||
find_package( Qt5 REQUIRED DBus ) # Needed for KPMCore
|
||||
find_package( KF5 REQUIRED I18n WidgetsAddons ) # Needed for KPMCore
|
||||
|
||||
if( KPMcore_VERSION VERSION_GREATER_EQUAL "4.0" )
|
||||
if( KPMcore_VERSION VERSION_GREATER_EQUAL "4.2" )
|
||||
add_definitions(
|
||||
-DWITH_KPMCORE42API
|
||||
-DWITH_KPMCORE4API
|
||||
) # kpmcore 4.2 with new API
|
||||
elseif( KPMcore_VERSION VERSION_GREATER_EQUAL "4.0" )
|
||||
add_definitions( -DWITH_KPMCORE4API ) # kpmcore 4 with new API
|
||||
elseif( KPMcore_VERSION VERSION_GREATER "3.3.70" )
|
||||
message( FATAL_ERROR "KPMCore beta versions ${KPMcore_VERSION} not supported" )
|
||||
|
@ -73,7 +73,8 @@ public:
|
||||
}
|
||||
|
||||
emitProgress();
|
||||
cDebug() << "Starting" << ( anyFailed ? "EMERGENCY JOB" : "job" ) << job->prettyName() << " (there are" << m_jobs.count() << " left)";
|
||||
cDebug() << "Starting" << ( anyFailed ? "EMERGENCY JOB" : "job" ) << job->prettyName() << " (there are"
|
||||
<< m_jobs.count() << " left)";
|
||||
connect( job.data(), &Job::progress, this, &JobThread::emitProgress );
|
||||
JobResult result = job->exec();
|
||||
if ( !anyFailed && !result )
|
||||
@ -113,22 +114,22 @@ private:
|
||||
int jobCount = m_jobs.size();
|
||||
QString message = m_jobIndex < jobCount ? m_jobs.at( m_jobIndex )->prettyStatusMessage() : tr( "Done" );
|
||||
|
||||
qreal cumulativeProgress = 0.0;
|
||||
for ( auto jobWeight : m_jobWeights.mid( 0, m_jobIndex ) )
|
||||
{
|
||||
cumulativeProgress += jobWeight;
|
||||
}
|
||||
qreal percent
|
||||
= m_jobIndex < jobCount ? cumulativeProgress + ( ( m_jobWeights.at( m_jobIndex ) ) * jobPercent ) : 1.0;
|
||||
|
||||
qreal percent = 1.0; // Pretend we're done, since the if will reset it
|
||||
if ( m_jobIndex < jobCount )
|
||||
{
|
||||
Logger::CDebug( Logger::LOGVERBOSE ) << "[JOBQUEUE]: Progress for Job[" << m_jobIndex
|
||||
<< "]: " << ( jobPercent * 100 ) << "% completed";
|
||||
Logger::CDebug( Logger::LOGVERBOSE ) << "[JOBQUEUE]: Progress Overall: " << ( cumulativeProgress * 100 )
|
||||
<< "% (accumulated) + "
|
||||
<< ( ( ( m_jobWeights.at( m_jobIndex ) ) * jobPercent ) * 100 )
|
||||
<< "% (this job) = " << ( percent * 100 ) << "% (total)";
|
||||
qreal cumulativeProgress = 0.0;
|
||||
for ( auto jobWeight : m_jobWeights.mid( 0, m_jobIndex ) )
|
||||
{
|
||||
cumulativeProgress += jobWeight;
|
||||
}
|
||||
percent = cumulativeProgress + ( ( m_jobWeights.at( m_jobIndex ) ) * jobPercent );
|
||||
|
||||
Logger::CDebug( Logger::LOGVERBOSE )
|
||||
<< "[JOBQUEUE]: Progress for Job[" << m_jobIndex << "]: " << ( jobPercent * 100 ) << "% completed";
|
||||
Logger::CDebug( Logger::LOGVERBOSE )
|
||||
<< "[JOBQUEUE]: Progress Overall: " << ( cumulativeProgress * 100 ) << "% (accumulated) + "
|
||||
<< ( ( ( m_jobWeights.at( m_jobIndex ) ) * jobPercent ) * 100 )
|
||||
<< "% (this job) = " << ( percent * 100 ) << "% (total)";
|
||||
}
|
||||
QMetaObject::invokeMethod(
|
||||
m_queue, "progress", Qt::QueuedConnection, Q_ARG( qreal, percent ), Q_ARG( QString, message ) );
|
||||
|
@ -21,11 +21,12 @@
|
||||
#define CALAMARES_PYTHONJOB_H
|
||||
|
||||
#include "Job.h"
|
||||
|
||||
#include "modulesystem/InstanceKey.h"
|
||||
|
||||
#include <QVariantMap>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace CalamaresPython
|
||||
{
|
||||
class PythonJobInterface;
|
||||
|
@ -71,6 +71,24 @@ requireBool( const YAML::Node& config, const char* key, bool d )
|
||||
namespace Calamares
|
||||
{
|
||||
|
||||
InstanceDescription::InstanceDescription( const QVariantMap& m )
|
||||
: module( m.value( "module" ).toString() )
|
||||
, id( m.value( "id" ).toString() )
|
||||
, config( m.value( "config" ).toString() )
|
||||
, weight( m.value( "weight" ).toInt() )
|
||||
{
|
||||
if ( id.isEmpty() )
|
||||
{
|
||||
id = module;
|
||||
}
|
||||
if ( config.isEmpty() )
|
||||
{
|
||||
config = module + QStringLiteral( ".conf" );
|
||||
}
|
||||
|
||||
weight = qBound( 1, weight, 100 );
|
||||
}
|
||||
|
||||
Settings* Settings::s_instance = nullptr;
|
||||
|
||||
Settings*
|
||||
@ -134,17 +152,7 @@ interpretInstances( const YAML::Node& node, Settings::InstanceDescriptionList& c
|
||||
{
|
||||
continue;
|
||||
}
|
||||
QVariantMap instancesVListItemMap = instancesVListItem.toMap();
|
||||
Settings::InstanceDescription instanceMap;
|
||||
for ( auto it = instancesVListItemMap.constBegin(); it != instancesVListItemMap.constEnd(); ++it )
|
||||
{
|
||||
if ( it.value().type() != QVariant::String )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
instanceMap.insert( it.key(), it.value().toString() );
|
||||
}
|
||||
customInstances.append( instanceMap );
|
||||
customInstances.append( InstanceDescription( instancesVListItem.toMap() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,10 +32,21 @@
|
||||
namespace Calamares
|
||||
{
|
||||
|
||||
struct DLLEXPORT InstanceDescription
|
||||
{
|
||||
InstanceDescription( const QVariantMap& );
|
||||
|
||||
QString module; ///< Module name (e.g. "welcome")
|
||||
QString id; ///< Id, to distinguish multiple instances (e.g. "one", for "welcome@one")
|
||||
QString config; ///< Config-file name (for multiple instances)
|
||||
int weight;
|
||||
};
|
||||
|
||||
class DLLEXPORT Settings : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
explicit Settings( const QString& settingsFilePath, bool debugMode );
|
||||
|
||||
public:
|
||||
static Settings* instance();
|
||||
/// @brief Find a settings.conf, following @p debugMode
|
||||
@ -45,7 +56,6 @@ public:
|
||||
|
||||
QStringList modulesSearchPaths() const;
|
||||
|
||||
using InstanceDescription = QMap< QString, QString >;
|
||||
using InstanceDescriptionList = QList< InstanceDescription >;
|
||||
InstanceDescriptionList customModuleInstances() const;
|
||||
|
||||
|
@ -89,7 +89,7 @@ yamlScalarToVariant( const YAML::Node& scalarNode )
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
QVariantList
|
||||
yamlSequenceToVariant( const YAML::Node& sequenceNode )
|
||||
{
|
||||
QVariantList vl;
|
||||
@ -101,7 +101,7 @@ yamlSequenceToVariant( const YAML::Node& sequenceNode )
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
QVariantMap
|
||||
yamlMapToVariant( const YAML::Node& mapNode )
|
||||
{
|
||||
QVariantMap vm;
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#include <QStringList>
|
||||
#include <QVariant>
|
||||
#include <QVariantList>
|
||||
#include <QVariantMap>
|
||||
|
||||
class QByteArray;
|
||||
class QFileInfo;
|
||||
@ -60,8 +62,8 @@ QVariantMap loadYaml( const QFileInfo&, bool* ok = nullptr );
|
||||
|
||||
QVariant yamlToVariant( const YAML::Node& node );
|
||||
QVariant yamlScalarToVariant( const YAML::Node& scalarNode );
|
||||
QVariant yamlSequenceToVariant( const YAML::Node& sequenceNode );
|
||||
QVariant yamlMapToVariant( const YAML::Node& mapNode );
|
||||
QVariantList yamlSequenceToVariant( const YAML::Node& sequenceNode );
|
||||
QVariantMap yamlMapToVariant( const YAML::Node& mapNode );
|
||||
|
||||
/// @brief Returns all the elements of @p listNode in a StringList
|
||||
QStringList yamlToStringList( const YAML::Node& listNode );
|
||||
|
@ -89,6 +89,7 @@ const QStringList Branding::s_styleEntryStrings =
|
||||
// clang-format on
|
||||
// *INDENT-ON*
|
||||
|
||||
|
||||
const NamedEnumTable< Branding::WindowDimensionUnit >&
|
||||
Branding::WindowDimension::suffixes()
|
||||
{
|
||||
@ -122,7 +123,7 @@ loadStrings( QMap< QString, QString >& map,
|
||||
throw YAML::Exception( YAML::Mark(), std::string( "Branding configuration is not a map: " ) + key );
|
||||
}
|
||||
|
||||
const auto& config = CalamaresUtils::yamlMapToVariant( doc[ key ] ).toMap();
|
||||
const auto& config = CalamaresUtils::yamlMapToVariant( doc[ key ] );
|
||||
|
||||
map.clear();
|
||||
for ( auto it = config.constBegin(); it != config.constEnd(); ++it )
|
||||
@ -407,14 +408,24 @@ getString( const YAML::Node& doc, const char* key )
|
||||
void
|
||||
Branding::initSimpleSettings( const YAML::Node& doc )
|
||||
{
|
||||
// *INDENT-OFF*
|
||||
// clang-format off
|
||||
static const NamedEnumTable< WindowExpansion > expansionNames {
|
||||
{ QStringLiteral( "normal" ), WindowExpansion::Normal },
|
||||
{ QStringLiteral( "fullscreen" ), WindowExpansion::Fullscreen },
|
||||
{ QStringLiteral( "noexpand" ), WindowExpansion::Fixed }
|
||||
};
|
||||
static const NamedEnumTable< WindowPlacement > placementNames {
|
||||
{ QStringLiteral( "free" ), WindowPlacement::Free }, { QStringLiteral( "center" ), WindowPlacement::Center }
|
||||
{ QStringLiteral( "free" ), WindowPlacement::Free },
|
||||
{ QStringLiteral( "center" ), WindowPlacement::Center }
|
||||
};
|
||||
static const NamedEnumTable< SidebarFlavor > sidebarFlavorNames {
|
||||
{ QStringLiteral( "widget" ), SidebarFlavor::Widget },
|
||||
{ QStringLiteral( "none" ), SidebarFlavor::None },
|
||||
{ QStringLiteral( "qml" ), SidebarFlavor::Qml }
|
||||
};
|
||||
// clang-format on
|
||||
// *INDENT-ON*
|
||||
bool ok = false;
|
||||
|
||||
m_welcomeStyleCalamares = doc[ "welcomeStyleCalamares" ].as< bool >( false );
|
||||
@ -431,6 +442,12 @@ Branding::initSimpleSettings( const YAML::Node& doc )
|
||||
cWarning() << "Branding module-setting *windowPlacement* interpreted as"
|
||||
<< placementNames.find( m_windowPlacement, ok );
|
||||
}
|
||||
m_sidebarFlavor = sidebarFlavorNames.find( getString( doc, "sidebar" ), ok );
|
||||
if ( !ok )
|
||||
{
|
||||
cWarning() << "Branding module-setting *sidebar* interpreted as"
|
||||
<< sidebarFlavorNames.find( m_sidebarFlavor, ok );
|
||||
}
|
||||
|
||||
QString windowSize = getString( doc, "windowSize" );
|
||||
if ( !windowSize.isEmpty() )
|
||||
|
@ -122,6 +122,15 @@ public:
|
||||
Center,
|
||||
Free
|
||||
};
|
||||
Q_ENUM( WindowPlacement )
|
||||
///@brief What kind of sidebar to use in the main window
|
||||
enum class SidebarFlavor
|
||||
{
|
||||
None,
|
||||
Widget,
|
||||
Qml
|
||||
};
|
||||
Q_ENUM( SidebarFlavor )
|
||||
|
||||
static Branding* instance();
|
||||
|
||||
@ -175,6 +184,9 @@ public:
|
||||
}
|
||||
bool windowPlacementCentered() const { return m_windowPlacement == WindowPlacement::Center; }
|
||||
|
||||
///@brief Which sidebar flavor is configured
|
||||
SidebarFlavor sidebarFlavor() const { return m_sidebarFlavor; }
|
||||
|
||||
/**
|
||||
* Creates a map called "branding" in the global storage, and inserts an
|
||||
* entry for each of the branding strings. This makes the branding
|
||||
@ -214,6 +226,8 @@ private:
|
||||
WindowExpansion m_windowExpansion;
|
||||
WindowDimension m_windowHeight, m_windowWidth;
|
||||
WindowPlacement m_windowPlacement;
|
||||
|
||||
SidebarFlavor m_sidebarFlavor = SidebarFlavor::Widget;
|
||||
};
|
||||
|
||||
template < typename U >
|
||||
|
@ -75,7 +75,7 @@ setButtonIcon( QPushButton* button, const QString& name )
|
||||
}
|
||||
|
||||
ViewManager::ViewManager( QObject* parent )
|
||||
: QObject( parent )
|
||||
: QAbstractListModel( parent )
|
||||
, m_currentStep( 0 )
|
||||
, m_widget( new QWidget() )
|
||||
{
|
||||
@ -157,6 +157,7 @@ ViewManager::addViewStep( ViewStep* step )
|
||||
void
|
||||
ViewManager::insertViewStep( int before, ViewStep* step )
|
||||
{
|
||||
emit beginInsertRows( QModelIndex(), before, before );
|
||||
m_steps.insert( before, step );
|
||||
connect( step, &ViewStep::enlarge, this, &ViewManager::enlarge );
|
||||
connect( step, &ViewStep::nextStatusChanged, this, [this]( bool status ) {
|
||||
@ -183,6 +184,7 @@ ViewManager::insertViewStep( int before, ViewStep* step )
|
||||
m_stack->insertWidget( before, step->widget() );
|
||||
m_stack->setCurrentIndex( 0 );
|
||||
step->widget()->setFocus();
|
||||
emit endInsertRows();
|
||||
}
|
||||
|
||||
|
||||
@ -507,4 +509,85 @@ ViewManager::updateCancelEnabled( bool enabled )
|
||||
emit cancelEnabled( enabled );
|
||||
}
|
||||
|
||||
QVariant
|
||||
ViewManager::data( const QModelIndex& index, int role ) const
|
||||
{
|
||||
if ( !index.isValid() )
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
if ( ( index.row() < 0 ) || ( index.row() >= m_steps.length() ) )
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
const auto* step = m_steps.at( index.row() );
|
||||
if ( !step )
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
switch ( role )
|
||||
{
|
||||
case Qt::DisplayRole:
|
||||
return step->prettyName();
|
||||
case Qt::ToolTipRole:
|
||||
if ( Calamares::Settings::instance()->debugMode() )
|
||||
{
|
||||
auto key = step->moduleInstanceKey();
|
||||
QString toolTip( "<b>Debug information</b>" );
|
||||
toolTip.append( "<br/>Type:\tViewStep" );
|
||||
toolTip.append( QString( "<br/>Pretty:\t%1" ).arg( step->prettyName() ) );
|
||||
toolTip.append( QString( "<br/>Status:\t%1" ).arg( step->prettyStatus() ) );
|
||||
toolTip.append(
|
||||
QString( "<br/>Source:\t%1" ).arg( key.isValid() ? key.toString() : QStringLiteral( "built-in" ) ) );
|
||||
return toolTip;
|
||||
}
|
||||
else
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
case ProgressTreeItemCurrentRole:
|
||||
return currentStep() == step;
|
||||
case ProgressTreeItemCompletedRole:
|
||||
// Every step *before* the current step is considered "complete"
|
||||
for ( const auto* otherstep : m_steps )
|
||||
{
|
||||
if ( otherstep == currentStep() )
|
||||
{
|
||||
break;
|
||||
}
|
||||
if ( otherstep == step )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// .. and the others (including current) are not.
|
||||
return false;
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ViewManager::rowCount( const QModelIndex& parent ) const
|
||||
{
|
||||
if ( parent.column() > 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return m_steps.length();
|
||||
}
|
||||
|
||||
QHash< int, QByteArray >
|
||||
ViewManager::roleNames() const
|
||||
{
|
||||
auto h = QAbstractListModel::roleNames();
|
||||
h.insert( ProgressTreeItemCurrentRole, "current" );
|
||||
h.insert( ProgressTreeItemCompletedRole, "completed" );
|
||||
return h;
|
||||
}
|
||||
|
||||
} // namespace Calamares
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "DllMacro.h"
|
||||
#include "viewpages/ViewStep.h"
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QList>
|
||||
#include <QPushButton>
|
||||
#include <QStackedWidget>
|
||||
@ -33,7 +34,7 @@ namespace Calamares
|
||||
* @brief The ViewManager class handles progression through view pages.
|
||||
* @note Singleton object, only use through ViewManager::instance().
|
||||
*/
|
||||
class UIDLLEXPORT ViewManager : public QObject
|
||||
class UIDLLEXPORT ViewManager : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -147,6 +148,23 @@ private:
|
||||
QPushButton* m_back;
|
||||
QPushButton* m_next;
|
||||
QPushButton* m_quit;
|
||||
|
||||
public:
|
||||
/** @section Model
|
||||
*
|
||||
* These are the methods and enums used for the as-a-model part
|
||||
* of the ViewManager.
|
||||
*/
|
||||
enum Role
|
||||
{
|
||||
ProgressTreeItemCurrentRole = Qt::UserRole + 11, ///< Is this the *current* step?
|
||||
ProgressTreeItemCompletedRole = Qt::UserRole + 12 ///< Are we past this one?
|
||||
};
|
||||
|
||||
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
|
||||
int rowCount( const QModelIndex& parent = QModelIndex() ) const override;
|
||||
|
||||
QHash< int, QByteArray > roleNames() const override;
|
||||
};
|
||||
|
||||
} // namespace Calamares
|
||||
|
@ -237,7 +237,7 @@ void Module::loadConfigurationFile( const QString& configFileName ) //throws YA
|
||||
}
|
||||
|
||||
cDebug() << "Loaded module configuration" << path;
|
||||
m_configurationMap = CalamaresUtils::yamlMapToVariant( doc ).toMap();
|
||||
m_configurationMap = CalamaresUtils::yamlMapToVariant( doc );
|
||||
m_emergency = m_maybe_emergency && m_configurationMap.contains( EMERGENCY )
|
||||
&& m_configurationMap[ EMERGENCY ].toBool();
|
||||
return;
|
||||
|
@ -129,9 +129,8 @@ ModuleManager::doInit()
|
||||
}
|
||||
// At this point m_availableDescriptorsByModuleName is filled with
|
||||
// the modules that were found in the search paths.
|
||||
cDebug() << "Found"
|
||||
<< m_availableDescriptorsByModuleName.count() << "modules"
|
||||
<< m_moduleDirectoriesByModuleName.count() << "names";
|
||||
cDebug() << "Found" << m_availableDescriptorsByModuleName.count() << "modules"
|
||||
<< m_moduleDirectoriesByModuleName.count() << "names";
|
||||
emit initDone();
|
||||
}
|
||||
|
||||
@ -167,7 +166,7 @@ findCustomInstance( const Settings::InstanceDescriptionList& customInstances, co
|
||||
for ( int i = 0; i < customInstances.count(); ++i )
|
||||
{
|
||||
const auto& thisInstance = customInstances[ i ];
|
||||
if ( thisInstance.value( "module" ) == m.module() && thisInstance.value( "id" ) == m.id() )
|
||||
if ( thisInstance.module == m.module() && thisInstance.id == m.id() )
|
||||
{
|
||||
return i;
|
||||
}
|
||||
@ -196,7 +195,7 @@ getConfigFileName( const Settings::InstanceDescriptionList& customInstances,
|
||||
return QString();
|
||||
}
|
||||
|
||||
return customInstances[ found ].value( "config" );
|
||||
return customInstances[ found ].config;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -18,11 +18,14 @@
|
||||
|
||||
#include "Qml.h"
|
||||
|
||||
#include "Branding.h"
|
||||
#include "ViewManager.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QObject>
|
||||
#include <QQuickItem>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
|
||||
namespace CalamaresUtils
|
||||
@ -49,4 +52,119 @@ callQMLFunction( QQuickItem* qmlObject, const char* method )
|
||||
}
|
||||
}
|
||||
|
||||
/** @brief Appends to @p candidates suitable expansions of @p names
|
||||
*
|
||||
* Depending on @p method, adds search expansions for branding, or QRC,
|
||||
* or both (with branding having precedence).
|
||||
*/
|
||||
static void
|
||||
addExpansions( QmlSearch method, QStringList& candidates, const QStringList& names )
|
||||
{
|
||||
QString bPath( QStringLiteral( "%1/%2.qml" ) );
|
||||
QString qrPath( QStringLiteral( ":/%1.qml" ) );
|
||||
|
||||
if ( ( method == QmlSearch::Both ) || ( method == QmlSearch::BrandingOnly ) )
|
||||
{
|
||||
QString brandDir = Calamares::Branding::instance()->componentDirectory();
|
||||
std::transform( names.constBegin(),
|
||||
names.constEnd(),
|
||||
std::back_inserter( candidates ),
|
||||
[&]( const QString& s ) { return s.isEmpty() ? QString() : bPath.arg( brandDir, s ); } );
|
||||
}
|
||||
if ( ( method == QmlSearch::Both ) || ( method == QmlSearch::QrcOnly ) )
|
||||
{
|
||||
std::transform( names.constBegin(),
|
||||
names.constEnd(),
|
||||
std::back_inserter( candidates ),
|
||||
[&]( const QString& s ) { return s.isEmpty() ? QString() : qrPath.arg( s ); } );
|
||||
}
|
||||
}
|
||||
|
||||
/** @brief Does actual search and returns result.
|
||||
*
|
||||
* Empty items in @p candidates are ignored.
|
||||
*/
|
||||
static QString
|
||||
searchQmlFile( QmlSearch method, const QString& configuredName, const QStringList& hints )
|
||||
{
|
||||
QStringList candidates;
|
||||
if ( configuredName.startsWith( '/' ) )
|
||||
{
|
||||
candidates << configuredName;
|
||||
}
|
||||
addExpansions( method, candidates, hints );
|
||||
|
||||
for ( const QString& candidate : candidates )
|
||||
{
|
||||
if ( candidate.isEmpty() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
cDebug() << Logger::SubEntry << "Looking at QML file" << candidate;
|
||||
if ( QFile::exists( candidate ) )
|
||||
{
|
||||
if ( candidate.startsWith( ':' ) )
|
||||
{
|
||||
// Inconsistency: QFile only sees the file with :,
|
||||
// but QML needs an explicit scheme (of qrc:)
|
||||
return QStringLiteral( "qrc" ) + candidate;
|
||||
}
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
cDebug() << Logger::SubEntry << "None found.";
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString
|
||||
searchQmlFile( QmlSearch method, const QString& configuredName, const Calamares::ModuleSystem::InstanceKey& i )
|
||||
{
|
||||
cDebug() << "Looking for QML for" << i.toString();
|
||||
return searchQmlFile( method, configuredName, { configuredName, i.toString(), i.module() } );
|
||||
}
|
||||
|
||||
QString
|
||||
searchQmlFile( QmlSearch method, const QString& configuredName )
|
||||
{
|
||||
cDebug() << "Looking for QML for" << configuredName;
|
||||
return searchQmlFile( method, configuredName, { configuredName } );
|
||||
}
|
||||
|
||||
const NamedEnumTable< QmlSearch >&
|
||||
qmlSearchNames()
|
||||
{
|
||||
// *INDENT-OFF*
|
||||
// clang-format off
|
||||
static NamedEnumTable< QmlSearch > names {
|
||||
{ QStringLiteral( "both" ), QmlSearch::Both },
|
||||
{ QStringLiteral( "qrc" ), QmlSearch::QrcOnly },
|
||||
{ QStringLiteral( "branding" ), QmlSearch::BrandingOnly }
|
||||
};
|
||||
// *INDENT-ON*
|
||||
// clang-format on
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
void
|
||||
registerCalamaresModels()
|
||||
{
|
||||
static bool done = false;
|
||||
if ( !done )
|
||||
{
|
||||
done = true;
|
||||
// Because branding and viewmanager have a parent (CalamaresApplication
|
||||
// and CalamaresWindow), they will not be deleted by QmlEngine.
|
||||
// https://doc.qt.io/qt-5/qtqml-cppintegration-data.html#data-ownership
|
||||
qmlRegisterSingletonType< Calamares::Branding >(
|
||||
"io.calamares.ui", 1, 0, "Branding", []( QQmlEngine*, QJSEngine* ) -> QObject* {
|
||||
return Calamares::Branding::instance();
|
||||
} );
|
||||
qmlRegisterSingletonType< Calamares::Branding >(
|
||||
"io.calamares.core", 1, 0, "ViewManager", []( QQmlEngine*, QJSEngine* ) -> QObject* {
|
||||
return Calamares::ViewManager::instance();
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace CalamaresUtils
|
||||
|
@ -21,10 +21,25 @@
|
||||
|
||||
#include "DllMacro.h"
|
||||
|
||||
#include "modulesystem/InstanceKey.h"
|
||||
#include "utils/NamedEnum.h"
|
||||
|
||||
class QQuickItem;
|
||||
|
||||
namespace CalamaresUtils
|
||||
{
|
||||
/** @brief Sets up global Calamares models for QML
|
||||
*
|
||||
* This needs to be called at least once to make the global Calamares
|
||||
* models (Branding, ViewManager, ...) available to QML.
|
||||
*
|
||||
* The following objects are made available globally:
|
||||
* - `io.calamares.ui.Branding` (an object, see Branding.h)
|
||||
* - `io.calamares.core.ViewManager` (a model, see ViewManager.h)
|
||||
* Additionally, modules based on QmlViewStep have a context
|
||||
* property `config` referring to that module's configuration (if any).
|
||||
*/
|
||||
UIDLLEXPORT void registerCalamaresModels();
|
||||
|
||||
/** @brief Calls the QML method @p method on @p qmlObject
|
||||
*
|
||||
@ -34,8 +49,34 @@ namespace CalamaresUtils
|
||||
*
|
||||
* If there is a return value from the QML method, it is logged (but not otherwise used).
|
||||
*/
|
||||
UIDLLEXPORT void
|
||||
callQMLFunction( QQuickItem* qmlObject, const char* method );
|
||||
UIDLLEXPORT void callQMLFunction( QQuickItem* qmlObject, const char* method );
|
||||
|
||||
/** @brief Search modes for loading Qml files.
|
||||
*
|
||||
* A QML file could be compiled into QRC, or it could live
|
||||
* in the branding directory (and, in debug-runs, in
|
||||
* the current-directory). Modules have some control
|
||||
* over where the search is done.
|
||||
*/
|
||||
enum class QmlSearch
|
||||
{
|
||||
QrcOnly,
|
||||
BrandingOnly,
|
||||
Both
|
||||
};
|
||||
|
||||
///@brief Names for the search terms (in config files)
|
||||
UIDLLEXPORT const NamedEnumTable< QmlSearch >& qmlSearchNames();
|
||||
|
||||
/** @brief Find a suitable QML file, given the search method and name hints
|
||||
*
|
||||
* Returns QString() if nothing is found (which would mean the module
|
||||
* is badly configured).
|
||||
*/
|
||||
UIDLLEXPORT QString searchQmlFile( QmlSearch method,
|
||||
const QString& configuredName,
|
||||
const Calamares::ModuleSystem::InstanceKey& i );
|
||||
UIDLLEXPORT QString searchQmlFile( QmlSearch method, const QString& fileNameNoSuffix );
|
||||
|
||||
} // namespace CalamaresUtils
|
||||
|
||||
|
@ -37,23 +37,6 @@
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
static const NamedEnumTable< Calamares::QmlViewStep::QmlSearch >&
|
||||
searchNames()
|
||||
{
|
||||
using Search = Calamares::QmlViewStep::QmlSearch;
|
||||
// *INDENT-OFF*
|
||||
// clang-format off
|
||||
static NamedEnumTable< Search > names {
|
||||
{ QStringLiteral( "both" ), Search::Both },
|
||||
{ QStringLiteral( "qrc" ), Search::QrcOnly },
|
||||
{ QStringLiteral( "branding" ), Search::BrandingOnly }
|
||||
};
|
||||
// *INDENT-ON*
|
||||
// clang-format on
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
/// @brief State-change of the QML, for changeQMLState()
|
||||
enum class QMLAction
|
||||
{
|
||||
@ -84,31 +67,16 @@ changeQMLState( QMLAction action, QQuickItem* item )
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
registerCalamaresModels()
|
||||
{
|
||||
static bool done = false;
|
||||
if ( !done )
|
||||
{
|
||||
done = true;
|
||||
qmlRegisterSingletonType< Calamares::Branding >(
|
||||
"calamares.ui", 1, 0, "Branding", []( QQmlEngine*, QJSEngine* ) -> QObject* {
|
||||
return Calamares::Branding::instance();
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
namespace Calamares
|
||||
{
|
||||
|
||||
QmlViewStep::QmlViewStep( const QString& name, QObject* parent )
|
||||
QmlViewStep::QmlViewStep( QObject* parent )
|
||||
: ViewStep( parent )
|
||||
, m_name( name )
|
||||
, m_widget( new QWidget )
|
||||
, m_spinner( new WaitingWidget( tr( "Loading ..." ) ) )
|
||||
, m_qmlWidget( new QQuickWidget )
|
||||
{
|
||||
registerCalamaresModels();
|
||||
CalamaresUtils::registerCalamaresModels();
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout( m_widget );
|
||||
layout->addWidget( m_spinner );
|
||||
@ -126,7 +94,7 @@ QString
|
||||
QmlViewStep::prettyName() const
|
||||
{
|
||||
// TODO: query the QML itself
|
||||
return tr( "QML Step <i>%1</i>." ).arg( m_name );
|
||||
return tr( "QML Step <i>%1</i>." ).arg( moduleInstanceKey().module() );
|
||||
}
|
||||
|
||||
|
||||
@ -245,80 +213,26 @@ QmlViewStep::showQml()
|
||||
}
|
||||
|
||||
|
||||
/** @brief Find a suitable QML file, given the search method and name hints
|
||||
*
|
||||
* Returns QString() if nothing is found (which would mean the module
|
||||
* is badly configured).
|
||||
*/
|
||||
QString
|
||||
searchQmlFile( QmlViewStep::QmlSearch method, const QString& configuredName, const QString& moduleName )
|
||||
{
|
||||
using QmlSearch = Calamares::QmlViewStep::QmlSearch;
|
||||
|
||||
cDebug() << "Looking for QML for" << moduleName;
|
||||
QStringList candidates;
|
||||
if ( configuredName.startsWith( '/' ) )
|
||||
{
|
||||
candidates << configuredName;
|
||||
}
|
||||
if ( ( method == QmlSearch::Both ) || ( method == QmlSearch::BrandingOnly ) )
|
||||
{
|
||||
QString brandDir = Calamares::Branding::instance()->componentDirectory();
|
||||
candidates << ( configuredName.isEmpty() ? QString()
|
||||
: QStringLiteral( "%1/%2.qml" ).arg( brandDir, configuredName ) )
|
||||
<< ( moduleName.isEmpty() ? QString() : QStringLiteral( "%1/%2.qml" ).arg( brandDir, moduleName ) );
|
||||
}
|
||||
if ( ( method == QmlSearch::Both ) || ( method == QmlSearch::QrcOnly ) )
|
||||
{
|
||||
candidates << ( configuredName.isEmpty() ? QString() : QStringLiteral( ":/%1.qml" ).arg( configuredName ) )
|
||||
<< ( moduleName.isEmpty() ? QString() : QStringLiteral( ":/%1.qml" ).arg( moduleName ) );
|
||||
}
|
||||
for ( const QString& candidate : candidates )
|
||||
{
|
||||
if ( candidate.isEmpty() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
cDebug() << Logger::SubEntry << "Looking at QML file" << candidate;
|
||||
if ( QFile::exists( candidate ) )
|
||||
{
|
||||
if ( candidate.startsWith( ':' ) )
|
||||
{
|
||||
// Inconsistency: QFile only sees the file with :,
|
||||
// but QML needs an explicit scheme (of qrc:)
|
||||
return QStringLiteral( "qrc" ) + candidate;
|
||||
}
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
cDebug() << Logger::SubEntry << "None found.";
|
||||
return QString();
|
||||
}
|
||||
|
||||
void
|
||||
QmlViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
{
|
||||
bool ok = false;
|
||||
m_searchMethod = searchNames().find( CalamaresUtils::getString( configurationMap, "search" ), ok );
|
||||
m_searchMethod
|
||||
= CalamaresUtils::qmlSearchNames().find( CalamaresUtils::getString( configurationMap, "qmlSearch" ), ok );
|
||||
if ( !ok )
|
||||
{
|
||||
cDebug() << "Bad QML search mode.";
|
||||
}
|
||||
|
||||
QString qmlFile = CalamaresUtils::getString( configurationMap, "filename" );
|
||||
if ( qmlFile.isEmpty() )
|
||||
{
|
||||
// TODO use the module instance
|
||||
}
|
||||
|
||||
QString qmlFile = CalamaresUtils::getString( configurationMap, "qmlFilename" );
|
||||
if ( !m_qmlComponent )
|
||||
{
|
||||
m_qmlFileName = searchQmlFile( m_searchMethod, qmlFile, m_name );
|
||||
m_qmlFileName = searchQmlFile( m_searchMethod, qmlFile, moduleInstanceKey() );
|
||||
|
||||
QObject* config = this->getConfig();
|
||||
if ( config )
|
||||
{
|
||||
m_qmlWidget->engine()->rootContext()->setContextProperty( "config", config );
|
||||
setContextProperty( "config", config );
|
||||
}
|
||||
|
||||
cDebug() << "QmlViewStep" << moduleInstanceKey() << "loading" << m_qmlFileName;
|
||||
@ -353,4 +267,10 @@ QmlViewStep::getConfig()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
QmlViewStep::setContextProperty( const char* name, QObject* property )
|
||||
{
|
||||
m_qmlWidget->engine()->rootContext()->setContextProperty( name, property );
|
||||
}
|
||||
|
||||
} // namespace Calamares
|
||||
|
@ -19,6 +19,7 @@
|
||||
#ifndef QMLVIEWSTEP_H
|
||||
#define QMLVIEWSTEP_H
|
||||
|
||||
#include "utils/Qml.h"
|
||||
#include "viewpages/ViewStep.h"
|
||||
|
||||
class QQmlComponent;
|
||||
@ -38,23 +39,17 @@ namespace Calamares
|
||||
class QmlViewStep : public Calamares::ViewStep
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum class QmlSearch
|
||||
{
|
||||
QrcOnly,
|
||||
BrandingOnly,
|
||||
Both
|
||||
};
|
||||
|
||||
/** @brief Creates a QML view step
|
||||
*
|
||||
* The name should not have an extension or schema or anything;
|
||||
* just the plain name, which will be searched as "/<name>.qml" in
|
||||
* QRC files, or "<name>.qml" in suitable branding paths.
|
||||
* The search behavior depends on a QmlSearch value.
|
||||
* The search behavior for the actial QML depends on a QmlSearch value.
|
||||
* This is set through common configuration key *qmlSearch*.
|
||||
* The filename used comes from the module identifier, or can be
|
||||
* set in the configuration file through *qmlFilename*.
|
||||
*
|
||||
* @see Qml.h for available Calamares internals.
|
||||
*/
|
||||
QmlViewStep( const QString& name, QObject* parent = nullptr );
|
||||
QmlViewStep( QObject* parent = nullptr );
|
||||
virtual ~QmlViewStep() override;
|
||||
|
||||
virtual QString prettyName() const override;
|
||||
@ -85,9 +80,17 @@ protected:
|
||||
*
|
||||
* Ownership of the config object remains with the ViewStep; it is possible
|
||||
* to return a pointer to a member variable.
|
||||
*
|
||||
* This object is made available as a context-property *config* in QML.
|
||||
*/
|
||||
virtual QObject* getConfig();
|
||||
|
||||
/** @brief Adds a context property for this QML file
|
||||
*
|
||||
* Does not take ownership.
|
||||
*/
|
||||
void setContextProperty( const char* name, QObject* property );
|
||||
|
||||
private Q_SLOTS:
|
||||
void loadComplete();
|
||||
|
||||
@ -98,7 +101,7 @@ private:
|
||||
void showFailedQml();
|
||||
|
||||
/// @brief Controls where m_name is searched
|
||||
QmlSearch m_searchMethod;
|
||||
CalamaresUtils::QmlSearch m_searchMethod;
|
||||
|
||||
QString m_name;
|
||||
QString m_qmlFileName;
|
||||
|
@ -117,6 +117,7 @@ def create_systemd_boot_conf(install_path, efi_dir, uuid, entry, entry_name, ker
|
||||
|
||||
partitions = libcalamares.globalstorage.value("partitions")
|
||||
swap_uuid = ""
|
||||
swap_outer_mappername = None
|
||||
|
||||
cryptdevice_params = []
|
||||
|
||||
@ -124,18 +125,21 @@ def create_systemd_boot_conf(install_path, efi_dir, uuid, entry, entry_name, ker
|
||||
# - unencrypted swap partition sets swap_uuid
|
||||
# - encrypted root sets cryptdevice_params
|
||||
for partition in partitions:
|
||||
if partition["fs"] == "linuxswap" and not partition.get("claimed", None):
|
||||
continue
|
||||
has_luks = "luksMapperName" in partition
|
||||
if partition["fs"] == "linuxswap" and not has_luks:
|
||||
swap_uuid = partition["uuid"]
|
||||
|
||||
if (partition["fs"] == "linuxswap" and has_luks):
|
||||
swap_outer_mappername = partition["luksMapperName"]
|
||||
|
||||
if partition["mountPoint"] == "/" and has_luks:
|
||||
cryptdevice_params = ["cryptdevice=UUID="
|
||||
+ partition["luksUuid"]
|
||||
+ ":"
|
||||
+ partition["luksMapperName"],
|
||||
"root=/dev/mapper/"
|
||||
+ partition["luksMapperName"],
|
||||
"resume=/dev/mapper/"
|
||||
+ partition["luksMapperName"]]
|
||||
|
||||
if cryptdevice_params:
|
||||
@ -146,6 +150,10 @@ def create_systemd_boot_conf(install_path, efi_dir, uuid, entry, entry_name, ker
|
||||
if swap_uuid:
|
||||
kernel_params.append("resume=UUID={!s}".format(swap_uuid))
|
||||
|
||||
if swap_outer_mappername:
|
||||
kernel_params.append("resume=/dev/mapper/{!s}".format(
|
||||
swap_outer_mappername))
|
||||
|
||||
kernel_line = get_kernel_line(kernel_type)
|
||||
libcalamares.utils.debug("Configure: \"{!s}\"".format(kernel_line))
|
||||
|
||||
|
@ -79,14 +79,15 @@ ContextualProcessTests::testProcessListSampleConfig()
|
||||
}
|
||||
|
||||
ContextualProcessJob job;
|
||||
job.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc ).toMap() );
|
||||
job.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc ) );
|
||||
|
||||
QCOMPARE( job.count(), 2 ); // Only "firmwareType" and "branding.shortVersion"
|
||||
QCOMPARE( job.count( "firmwareType" ), 4 );
|
||||
QCOMPARE( job.count( "branding.shortVersion" ), 2 ); // in the example config
|
||||
}
|
||||
|
||||
void ContextualProcessTests::testFetch()
|
||||
void
|
||||
ContextualProcessTests::testFetch()
|
||||
{
|
||||
Logger::setupLogLevel( Logger::LOGVERBOSE );
|
||||
|
||||
@ -187,5 +188,4 @@ void ContextualProcessTests::testFetch()
|
||||
QCOMPARE( s, QString() );
|
||||
QVERIFY( s.isEmpty() );
|
||||
}
|
||||
|
||||
}
|
||||
|
Binary file not shown.
@ -3,13 +3,17 @@
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
# Translators:
|
||||
# Luna Jernberg <bittin@cafe8bitar.se>, 2020
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-10-05 11:34-0400\n"
|
||||
"POT-Creation-Date: 2020-02-19 17:27+0100\n"
|
||||
"PO-Revision-Date: 2016-12-16 12:18+0000\n"
|
||||
"Last-Translator: Luna Jernberg <bittin@cafe8bitar.se>, 2020\n"
|
||||
"Language-Team: Swedish (https://www.transifex.com/calamares/teams/20061/sv/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -19,15 +23,15 @@ msgstr ""
|
||||
|
||||
#: src/modules/dummypythonqt/main.py:84
|
||||
msgid "Click me!"
|
||||
msgstr ""
|
||||
msgstr "Klicka på mig!"
|
||||
|
||||
#: src/modules/dummypythonqt/main.py:94
|
||||
msgid "A new QLabel."
|
||||
msgstr ""
|
||||
msgstr "En ny QLabel."
|
||||
|
||||
#: src/modules/dummypythonqt/main.py:97
|
||||
msgid "Dummy PythonQt ViewStep"
|
||||
msgstr ""
|
||||
msgstr "Exempel PythonQt ViewStep"
|
||||
|
||||
#: src/modules/dummypythonqt/main.py:183
|
||||
msgid "The Dummy PythonQt Job"
|
||||
@ -35,8 +39,8 @@ msgstr ""
|
||||
|
||||
#: src/modules/dummypythonqt/main.py:186
|
||||
msgid "This is the Dummy PythonQt Job. The dummy job says: {}"
|
||||
msgstr ""
|
||||
msgstr "Detta är ett exempel PythonQt jobb. Exempel jobbet säger: {}"
|
||||
|
||||
#: src/modules/dummypythonqt/main.py:190
|
||||
msgid "A status message for Dummy PythonQt Job."
|
||||
msgstr ""
|
||||
msgstr "Ett statusmeddelande för exempel PythonQt jobb."
|
||||
|
@ -8,7 +8,9 @@ set( _partition_defs "" )
|
||||
if ( KPMcore_FOUND AND Qt5DBus_FOUND AND KF5CoreAddons_FOUND AND KF5Config_FOUND )
|
||||
include_directories( ${KPMCORE_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/src/modules/partition )
|
||||
|
||||
if( KPMcore_VERSION VERSION_GREATER_EQUAL "4.0" )
|
||||
if( KPMcore_VERSION VERSION_GREATER_EQUAL "4.2" )
|
||||
list( APPEND _partition_defs WITH_KPMCORE42API WITH_KPMCORE4API ) # kpmcore 4.2 with new API
|
||||
elseif( KPMcore_VERSION VERSION_GREATER_EQUAL "4.0" )
|
||||
list( APPEND _partition_defs WITH_KPMCORE4API ) # kpmcore 4 with new API
|
||||
elseif( KPMcore_VERSION VERSION_GREATER "3.3.70" )
|
||||
message( FATAL_ERROR "KPMCore beta versions ${KPMcore_VERSION} are not supported" )
|
||||
|
@ -64,7 +64,7 @@ void FSResizerTests::testConfigurationRobust()
|
||||
size: 100%
|
||||
atleast: 600MiB
|
||||
)" );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ).toMap() );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) );
|
||||
QVERIFY( j.name().isEmpty() );
|
||||
QCOMPARE( j.size().unit(), SizeUnit::None );
|
||||
QCOMPARE( j.minimumSize().unit(), SizeUnit::None );
|
||||
@ -82,7 +82,7 @@ fs: /
|
||||
size: 100%
|
||||
atleast: 600MiB
|
||||
)" );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ).toMap() );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) );
|
||||
QVERIFY( !j.name().isEmpty() );
|
||||
QCOMPARE( j.name(), QString("/") );
|
||||
QCOMPARE( j.size().unit(), SizeUnit::Percent );
|
||||
@ -97,7 +97,7 @@ dev: /dev/m00
|
||||
size: 72 MiB
|
||||
atleast: 127 %
|
||||
)" );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ).toMap() );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) );
|
||||
QVERIFY( !j.name().isEmpty() );
|
||||
QCOMPARE( j.name(), QString("/") );
|
||||
QCOMPARE( j.size().unit(), SizeUnit::MiB );
|
||||
@ -111,7 +111,7 @@ dev: /dev/m00
|
||||
size: 72 MiB
|
||||
atleast: 127 %
|
||||
)" );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ).toMap() );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) );
|
||||
QVERIFY( !j.name().isEmpty() );
|
||||
QCOMPARE( j.name(), QString("/dev/m00") );
|
||||
QCOMPARE( j.size().unit(), SizeUnit::MiB );
|
||||
@ -126,7 +126,7 @@ fs: /
|
||||
size: 71MiB
|
||||
# atleast: 127%
|
||||
)" );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ).toMap() );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) );
|
||||
QVERIFY( !j.name().isEmpty() );
|
||||
QCOMPARE( j.name(), QString("/") );
|
||||
QCOMPARE( j.size().unit(), SizeUnit::MiB );
|
||||
|
@ -112,15 +112,15 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
||||
if partition["fs"] == "linuxswap" and not has_luks:
|
||||
swap_uuid = partition["uuid"]
|
||||
|
||||
if (partition["fs"] == "linuxswap" and has_luks):
|
||||
swap_outer_mappername = partition["luksMapperName"]
|
||||
|
||||
if (partition["mountPoint"] == "/" and has_luks):
|
||||
cryptdevice_params = [
|
||||
"cryptdevice=UUID={!s}:{!s}".format(
|
||||
partition["luksUuid"], partition["luksMapperName"]
|
||||
),
|
||||
"root=/dev/mapper/{!s}".format(
|
||||
partition["luksMapperName"]
|
||||
),
|
||||
"resume=/dev/mapper/{!s}".format(
|
||||
partition["luksMapperName"]
|
||||
)
|
||||
]
|
||||
@ -143,7 +143,7 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
||||
|
||||
if have_dracut and swap_outer_uuid:
|
||||
kernel_params.append("rd.luks.uuid={!s}".format(swap_outer_uuid))
|
||||
if have_dracut and swap_outer_mappername:
|
||||
if swap_outer_mappername:
|
||||
kernel_params.append("resume=/dev/mapper/{!s}".format(
|
||||
swap_outer_mappername))
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <QVariant>
|
||||
|
||||
NotesQmlViewStep::NotesQmlViewStep( QObject* parent )
|
||||
: Calamares::QmlViewStep( "notesqml", parent )
|
||||
: Calamares::QmlViewStep( parent )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -24,13 +24,13 @@
|
||||
# directory look for the full notesqml@instanceid name as well.
|
||||
---
|
||||
# Search mode. Valid values are "both", "qrc" and "branding"
|
||||
search: both
|
||||
qmlSearch: both
|
||||
|
||||
# Name of the QML file. If not set, uses the name of the instance
|
||||
# of the module (e.g. if you list this module in `settings.conf`
|
||||
# in the *instances* section, you get *id*, otherwise it would
|
||||
# normally be "notesqml").
|
||||
#filename: notesqml
|
||||
# qmlFilename: notesqml
|
||||
|
||||
# This is the name of the module in the progress-tree / sidebar
|
||||
# in Calamares. To support multiple instances of the QML module,
|
||||
|
@ -18,12 +18,13 @@
|
||||
*/
|
||||
|
||||
/* Some Calamares internals are available to all QML modules.
|
||||
* They live in the calamares.ui namespace (filled programmatically
|
||||
* by Calamares). One of the internals that is exposed is the
|
||||
* Branding object, which can be used to retrieve strings and paths
|
||||
* and colors.
|
||||
* They live in the io.calamares namespace (filled programmatically
|
||||
* by Calamares). One of the internals that is exposed in the sub-
|
||||
* namespace io.calamares.ui is the Branding object, which can be used
|
||||
* to retrieve strings and paths and colors. For a full list, see
|
||||
* the documentation in `Qml.h`.
|
||||
*/
|
||||
import calamares.ui 1.0
|
||||
import io.calamares.ui 1.0
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.2
|
||||
|
@ -33,6 +33,9 @@ if ( KPMcore_FOUND AND Qt5DBus_FOUND AND KF5CoreAddons_FOUND AND KF5Config_FOUND
|
||||
if ( KPMcore_VERSION VERSION_GREATER "3.90")
|
||||
list( APPEND _partition_defs WITH_KPMCORE4API) # kpmcore 4 with new API
|
||||
endif()
|
||||
if( KPMcore_VERSION VERSION_GREATER_EQUAL "4.2" )
|
||||
list( APPEND _partition_defs WITH_KPMCORE42API) # kpmcore 4.2 with new API
|
||||
endif()
|
||||
|
||||
include_directories( ${KPMCORE_INCLUDE_DIR} )
|
||||
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
|
||||
|
@ -834,6 +834,7 @@ PartitionCoreModule::initLayout()
|
||||
void
|
||||
PartitionCoreModule::initLayout( const QVariantList& config )
|
||||
{
|
||||
bool ok;
|
||||
QString sizeString;
|
||||
QString minSizeString;
|
||||
QString maxSizeString;
|
||||
@ -882,8 +883,10 @@ PartitionCoreModule::initLayout( const QVariantList& config )
|
||||
}
|
||||
|
||||
if ( !m_partLayout->addEntry( CalamaresUtils::getString( pentry, "name" ),
|
||||
CalamaresUtils::getString( pentry, "type" ),
|
||||
CalamaresUtils::getString( pentry, "mountPoint" ),
|
||||
CalamaresUtils::getString( pentry, "filesystem" ),
|
||||
CalamaresUtils::getSubMap( pentry, "features", ok ),
|
||||
sizeString,
|
||||
minSizeString,
|
||||
maxSizeString ) )
|
||||
|
@ -118,8 +118,10 @@ PartitionLayout::addEntry( const QString& mountPoint, const QString& size, const
|
||||
|
||||
bool
|
||||
PartitionLayout::addEntry( const QString& label,
|
||||
const QString& type,
|
||||
const QString& mountPoint,
|
||||
const QString& fs,
|
||||
const QVariantMap& features,
|
||||
const QString& size,
|
||||
const QString& min,
|
||||
const QString& max )
|
||||
@ -138,12 +140,14 @@ PartitionLayout::addEntry( const QString& label,
|
||||
}
|
||||
|
||||
entry.partLabel = label;
|
||||
entry.partType = type;
|
||||
entry.partMountPoint = mountPoint;
|
||||
PartUtils::findFS( fs, &entry.partFileSystem );
|
||||
if ( entry.partFileSystem == FileSystem::Unknown )
|
||||
{
|
||||
entry.partFileSystem = m_defaultFsType;
|
||||
}
|
||||
entry.partFeatures = features;
|
||||
|
||||
m_partLayout.append( entry );
|
||||
|
||||
@ -237,8 +241,28 @@ PartitionLayout::execute( Device* dev,
|
||||
PartitionInfo::setMountPoint( currentPartition, part.partMountPoint );
|
||||
if ( !part.partLabel.isEmpty() )
|
||||
{
|
||||
currentPartition->setLabel( part.partLabel );
|
||||
currentPartition->fileSystem().setLabel( part.partLabel );
|
||||
}
|
||||
if ( !part.partType.isEmpty() )
|
||||
{
|
||||
#if defined( WITH_KPMCORE42API )
|
||||
currentPartition->setType( part.partType );
|
||||
#else
|
||||
cWarning() << "Ignoring type; requires KPMcore >= 4.2.0.";
|
||||
#endif
|
||||
}
|
||||
if ( !part.partFeatures.isEmpty() )
|
||||
{
|
||||
#if defined( WITH_KPMCORE42API )
|
||||
for ( const auto& k : part.partFeatures.keys() )
|
||||
{
|
||||
currentPartition->fileSystem().addFeature( k, part.partFeatures.value(k) );
|
||||
}
|
||||
#else
|
||||
cWarning() << "Ignoring features; requires KPMcore >= 4.2.0.";
|
||||
#endif
|
||||
}
|
||||
// Some buggy (legacy) BIOSes test if the bootflag of at least one partition is set.
|
||||
// Otherwise they ignore the device in boot-order, so add it here.
|
||||
partList.append( currentPartition );
|
||||
|
@ -31,6 +31,7 @@
|
||||
// Qt
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QVariantMap>
|
||||
|
||||
class Partition;
|
||||
|
||||
@ -40,8 +41,10 @@ public:
|
||||
struct PartitionEntry
|
||||
{
|
||||
QString partLabel;
|
||||
QString partType;
|
||||
QString partMountPoint;
|
||||
FileSystem::Type partFileSystem = FileSystem::Unknown;
|
||||
QVariantMap partFeatures;
|
||||
CalamaresUtils::Partition::PartitionSize partSize;
|
||||
CalamaresUtils::Partition::PartitionSize partMinSize;
|
||||
CalamaresUtils::Partition::PartitionSize partMaxSize;
|
||||
@ -73,8 +76,10 @@ public:
|
||||
const QString& min = QString(),
|
||||
const QString& max = QString() );
|
||||
bool addEntry( const QString& label,
|
||||
const QString& type,
|
||||
const QString& mountPoint,
|
||||
const QString& fs,
|
||||
const QVariantMap& features,
|
||||
const QString& size,
|
||||
const QString& min = QString(),
|
||||
const QString& max = QString() );
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
class CreateVolumeGroupDialog : public VolumeGroupBaseDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CreateVolumeGroupDialog( QString& vgName,
|
||||
QVector< const Partition* >& selectedPVs,
|
||||
|
@ -26,6 +26,7 @@ class LvmDevice;
|
||||
|
||||
class ResizeVolumeGroupDialog : public VolumeGroupBaseDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
using PartitionVector = QVector< const Partition* >;
|
||||
|
||||
|
@ -96,23 +96,34 @@ defaultFileSystemType: "ext4"
|
||||
#
|
||||
# partitionLayout:
|
||||
# - name: "rootfs"
|
||||
# type: "4f68bce3-e8cd-4db1-96e7-fbcaf984b709"
|
||||
# filesystem: "ext4"
|
||||
# mountPoint: "/"
|
||||
# size: 20%
|
||||
# minSize: 500M
|
||||
# maxSize: 10G
|
||||
# - name: "home"
|
||||
# type = "933ac7e1-2eb4-4f13-b844-0e14e2aef915"
|
||||
# filesystem: "ext4"
|
||||
# mountPoint: "/home"
|
||||
# size: 3G
|
||||
# minSize: 1.5G
|
||||
# features:
|
||||
# 64bit: false
|
||||
# casefold: true
|
||||
# - name: "data"
|
||||
# filesystem: "fat32"
|
||||
# mountPoint: "/data"
|
||||
# features:
|
||||
# sector-size: 4096
|
||||
# sectors-per-cluster: 128
|
||||
# size: 100%
|
||||
#
|
||||
# There can be any number of partitions, each entry having the following attributes:
|
||||
# - name: partition label
|
||||
# - name: filesystem label
|
||||
# and
|
||||
# partition name (gpt only; since KPMCore 4.2.0)
|
||||
# - type: partition type (optional parameter; gpt only; requires KPMCore >= 4.2.0)
|
||||
# - filesystem: filesystem type
|
||||
# - mountPoint: partition mount point
|
||||
# - size: partition size in bytes (append 'K', 'M' or 'G' for KiB, MiB or GiB)
|
||||
@ -120,6 +131,8 @@ defaultFileSystemType: "ext4"
|
||||
# % of the available drive space if a '%' is appended to the value
|
||||
# - minSize: minimum partition size (optional parameter)
|
||||
# - maxSize: maximum partition size (optional parameter)
|
||||
# - features: filesystem features (optional parameter; requires KPMCore >= 4.2.0)
|
||||
# name: boolean or integer or string
|
||||
|
||||
# Checking for available storage
|
||||
#
|
||||
|
@ -62,7 +62,7 @@ ShellProcessTests::testProcessListSampleConfig()
|
||||
}
|
||||
}
|
||||
|
||||
CommandList cl( CalamaresUtils::yamlMapToVariant( doc ).toMap().value( "script" ) );
|
||||
CommandList cl( CalamaresUtils::yamlMapToVariant( doc ).value( "script" ) );
|
||||
QVERIFY( !cl.isEmpty() );
|
||||
QCOMPARE( cl.count(), 3 );
|
||||
|
||||
@ -79,7 +79,7 @@ script:
|
||||
- "ls /nonexistent"
|
||||
- "/bin/false"
|
||||
)" );
|
||||
CommandList cl( CalamaresUtils::yamlMapToVariant( doc ).toMap().value( "script" ) );
|
||||
CommandList cl( CalamaresUtils::yamlMapToVariant( doc ).value( "script" ) );
|
||||
QVERIFY( !cl.isEmpty() );
|
||||
QCOMPARE( cl.count(), 3 );
|
||||
|
||||
@ -90,7 +90,7 @@ script:
|
||||
- false
|
||||
- "ls /nonexistent"
|
||||
)" );
|
||||
CommandList cl1( CalamaresUtils::yamlMapToVariant( doc ).toMap().value( "script" ) );
|
||||
CommandList cl1( CalamaresUtils::yamlMapToVariant( doc ).value( "script" ) );
|
||||
QVERIFY( !cl1.isEmpty() );
|
||||
QCOMPARE( cl1.count(), 2 ); // One element ignored
|
||||
}
|
||||
@ -101,7 +101,7 @@ ShellProcessTests::testProcessListFromString()
|
||||
YAML::Node doc = YAML::Load( R"(---
|
||||
script: "ls /tmp"
|
||||
)" );
|
||||
CommandList cl( CalamaresUtils::yamlMapToVariant( doc ).toMap().value( "script" ) );
|
||||
CommandList cl( CalamaresUtils::yamlMapToVariant( doc ).value( "script" ) );
|
||||
|
||||
QVERIFY( !cl.isEmpty() );
|
||||
QCOMPARE( cl.count(), 1 );
|
||||
@ -112,7 +112,7 @@ script: "ls /tmp"
|
||||
doc = YAML::Load( R"(---
|
||||
script: false
|
||||
)" );
|
||||
CommandList cl1( CalamaresUtils::yamlMapToVariant( doc ).toMap().value( "script" ) );
|
||||
CommandList cl1( CalamaresUtils::yamlMapToVariant( doc ).value( "script" ) );
|
||||
QVERIFY( cl1.isEmpty() );
|
||||
QCOMPARE( cl1.count(), 0 );
|
||||
}
|
||||
@ -125,7 +125,7 @@ script:
|
||||
command: "ls /tmp"
|
||||
timeout: 20
|
||||
)" );
|
||||
CommandList cl( CalamaresUtils::yamlMapToVariant( doc ).toMap().value( "script" ) );
|
||||
CommandList cl( CalamaresUtils::yamlMapToVariant( doc ).value( "script" ) );
|
||||
|
||||
QVERIFY( !cl.isEmpty() );
|
||||
QCOMPARE( cl.count(), 1 );
|
||||
@ -142,7 +142,7 @@ script:
|
||||
timeout: 12
|
||||
- "-/bin/false"
|
||||
)" );
|
||||
CommandList cl( CalamaresUtils::yamlMapToVariant( doc ).toMap().value( "script" ) );
|
||||
CommandList cl( CalamaresUtils::yamlMapToVariant( doc ).value( "script" ) );
|
||||
QVERIFY( !cl.isEmpty() );
|
||||
QCOMPARE( cl.count(), 2 );
|
||||
QCOMPARE( cl.at( 0 ).timeout(), 12s );
|
||||
@ -157,12 +157,11 @@ ShellProcessTests::testRootSubstitution()
|
||||
script:
|
||||
- "ls /tmp"
|
||||
)" );
|
||||
QVariant plainScript = CalamaresUtils::yamlMapToVariant( doc ).toMap().value( "script" );
|
||||
QVariant plainScript = CalamaresUtils::yamlMapToVariant( doc ).value( "script" );
|
||||
QVariant rootScript = CalamaresUtils::yamlMapToVariant( YAML::Load( R"(---
|
||||
script:
|
||||
- "ls @@ROOT@@"
|
||||
)" ) )
|
||||
.toMap()
|
||||
.value( "script" );
|
||||
QVariant userScript = CalamaresUtils::yamlMapToVariant( YAML::Load( R"(---
|
||||
script:
|
||||
@ -170,7 +169,6 @@ script:
|
||||
- "chown @@USER@@ @@ROOT@@/calatest*"
|
||||
- rm -rf @@ROOT@@/calatest*
|
||||
)" ) )
|
||||
.toMap()
|
||||
.value( "script" );
|
||||
|
||||
if ( !Calamares::JobQueue::instance() )
|
||||
|
@ -25,6 +25,7 @@ class QSemaphore;
|
||||
|
||||
class TrackingInstallJob : public Calamares::Job
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
TrackingInstallJob( const QString& url );
|
||||
~TrackingInstallJob() override;
|
||||
|
@ -28,6 +28,8 @@ calamares_add_plugin( welcome
|
||||
SOURCES
|
||||
${CHECKER_SOURCES}
|
||||
WelcomeViewStep.cpp
|
||||
Config.cpp
|
||||
Config.h
|
||||
WelcomePage.cpp
|
||||
UI
|
||||
WelcomePage.ui
|
||||
|
273
src/modules/welcome/Config.cpp
Normal file
273
src/modules/welcome/Config.cpp
Normal file
@ -0,0 +1,273 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Config.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Retranslator.h"
|
||||
#include "Branding.h"
|
||||
#include "Settings.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
void
|
||||
RequirementsModel::setRequirementsList( const Calamares::RequirementsList& requirements )
|
||||
{
|
||||
emit beginResetModel();
|
||||
m_requierements = requirements;
|
||||
m_satisfiedRequirements = true;
|
||||
|
||||
auto isUnSatisfied = []( const Calamares::RequirementEntry& e ) { return !e.satisfied; };
|
||||
auto isMandatoryAndUnSatisfied = []( const Calamares::RequirementEntry& e ) { return e.mandatory && !e.satisfied; };
|
||||
|
||||
m_satisfiedRequirements = std::none_of( m_requierements.begin(), m_requierements.end(), isUnSatisfied );
|
||||
m_satisfiedMandatory = std::none_of( m_requierements.begin(), m_requierements.end(), isMandatoryAndUnSatisfied );
|
||||
|
||||
emit satisfiedRequirementsChanged(m_satisfiedRequirements);
|
||||
emit satisfiedMandatoryChanged();
|
||||
emit endResetModel();
|
||||
}
|
||||
|
||||
int
|
||||
RequirementsModel::rowCount( const QModelIndex& ) const
|
||||
{
|
||||
return m_requierements.count();
|
||||
}
|
||||
|
||||
QVariant
|
||||
RequirementsModel::data( const QModelIndex& index, int role ) const
|
||||
{
|
||||
const auto requirement = m_requierements.at( index.row() );
|
||||
|
||||
switch ( role )
|
||||
{
|
||||
case Roles::Name:
|
||||
return requirement.name;
|
||||
case Roles::Details:
|
||||
return requirement.enumerationText();
|
||||
case Roles::NegatedText:
|
||||
return requirement.negatedText();
|
||||
case Roles::Satisfied:
|
||||
return requirement.satisfied;
|
||||
case Roles::Mandatory:
|
||||
return requirement.mandatory;
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
}
|
||||
|
||||
QHash<int, QByteArray>
|
||||
RequirementsModel::roleNames() const
|
||||
{
|
||||
static QHash<int, QByteArray> roles;
|
||||
roles[Roles::Name] = "name";
|
||||
roles[Roles::Details] = "details";
|
||||
roles[Roles::NegatedText] = "negatedText";
|
||||
roles[Roles::Satisfied] = "satisfied";
|
||||
roles[Roles::Mandatory] = "mandatory";
|
||||
return roles;
|
||||
}
|
||||
|
||||
Config::Config( QObject* parent ) : QObject( parent )
|
||||
, m_requirementsModel( new RequirementsModel( this ))
|
||||
, m_languages( CalamaresUtils::Locale::availableTranslations() )
|
||||
{
|
||||
connect(m_requirementsModel, &RequirementsModel::satisfiedRequirementsChanged, this, &Config::setIsNextEnabled);
|
||||
|
||||
initLanguages();
|
||||
|
||||
CALAMARES_RETRANSLATE_SLOT( &Config::retranslate )
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
Config::retranslate()
|
||||
{
|
||||
QString message;
|
||||
|
||||
if ( Calamares::Settings::instance()->isSetupMode() )
|
||||
{
|
||||
message = Calamares::Branding::instance()->welcomeStyleCalamares()
|
||||
? tr( "<h1>Welcome to the Calamares setup program for %1.</h1>" )
|
||||
: tr( "<h1>Welcome to %1 setup.</h1>" );
|
||||
}
|
||||
else
|
||||
{
|
||||
message = Calamares::Branding::instance()->welcomeStyleCalamares()
|
||||
? tr( "<h1>Welcome to the Calamares installer for %1.</h1>" )
|
||||
: tr( "<h1>Welcome to the %1 installer.</h1>" );
|
||||
}
|
||||
|
||||
m_genericWelcomeMessage = message.arg( *Calamares::Branding::VersionedName );
|
||||
emit genericWelcomeMessageChanged();
|
||||
|
||||
// ui->supportButton->setText( tr( "%1 support" ).arg( *Calamares::Branding::ShortProductName ) );
|
||||
}
|
||||
|
||||
CalamaresUtils::Locale::LabelModel*
|
||||
Config::languagesModel() const
|
||||
{
|
||||
return m_languages;
|
||||
}
|
||||
|
||||
QString
|
||||
Config::languageIcon() const
|
||||
{
|
||||
return m_languageIcon;
|
||||
}
|
||||
|
||||
void
|
||||
Config::initLanguages()
|
||||
{
|
||||
// Find the best initial translation
|
||||
QLocale defaultLocale = QLocale( QLocale::system().name() );
|
||||
|
||||
cDebug() << "Matching locale" << defaultLocale;
|
||||
int matchedLocaleIndex = m_languages->find( [&]( const QLocale& x ) {
|
||||
return x.language() == defaultLocale.language() && x.country() == defaultLocale.country();
|
||||
} );
|
||||
|
||||
if ( matchedLocaleIndex < 0 )
|
||||
{
|
||||
cDebug() << Logger::SubEntry << "Matching approximate locale" << defaultLocale.language();
|
||||
|
||||
matchedLocaleIndex
|
||||
= m_languages->find( [&]( const QLocale& x ) { return x.language() == defaultLocale.language(); } );
|
||||
}
|
||||
|
||||
if ( matchedLocaleIndex < 0 )
|
||||
{
|
||||
QLocale en_us( QLocale::English, QLocale::UnitedStates );
|
||||
|
||||
cDebug() << Logger::SubEntry << "Matching English (US)";
|
||||
matchedLocaleIndex = m_languages->find( en_us );
|
||||
|
||||
// Now, if it matched, because we didn't match the system locale, switch to the one found
|
||||
if ( matchedLocaleIndex >= 0 )
|
||||
{
|
||||
QLocale::setDefault( m_languages->locale( matchedLocaleIndex ).locale() );
|
||||
}
|
||||
}
|
||||
|
||||
if ( matchedLocaleIndex >= 0 )
|
||||
{
|
||||
QString name = m_languages->locale( matchedLocaleIndex ).name();
|
||||
cDebug() << Logger::SubEntry << "Matched with index" << matchedLocaleIndex << name;
|
||||
|
||||
CalamaresUtils::installTranslator( name, Calamares::Branding::instance()->translationsDirectory(), qApp );
|
||||
setLocaleIndex( matchedLocaleIndex );
|
||||
}
|
||||
else
|
||||
{
|
||||
cWarning() << "No available translation matched" << defaultLocale;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Config::setCountryCode( const QString& countryCode )
|
||||
{
|
||||
m_countryCode = countryCode;
|
||||
setLocaleIndex(CalamaresUtils::Locale::availableTranslations()->find( m_countryCode ));
|
||||
|
||||
emit countryCodeChanged( m_countryCode );
|
||||
}
|
||||
|
||||
void
|
||||
Config::setLanguageIcon(const QString &languageIcon )
|
||||
{
|
||||
m_languageIcon = languageIcon;
|
||||
}
|
||||
|
||||
void
|
||||
Config::setLocaleIndex(const int& index)
|
||||
{
|
||||
if(index == m_localeIndex || index > CalamaresUtils::Locale::availableTranslations()->rowCount(QModelIndex()) || index < 0)
|
||||
return;
|
||||
|
||||
m_localeIndex = index;
|
||||
|
||||
const auto& selectedLocale = m_languages->locale( m_localeIndex ).locale();
|
||||
cDebug() << "Selected locale" << selectedLocale;
|
||||
|
||||
QLocale::setDefault( selectedLocale );
|
||||
CalamaresUtils::installTranslator(
|
||||
selectedLocale, Calamares::Branding::instance()->translationsDirectory(), qApp );
|
||||
|
||||
emit localeIndexChanged( m_localeIndex );
|
||||
}
|
||||
|
||||
RequirementsModel&
|
||||
Config::requirementsModel() const
|
||||
{
|
||||
return *m_requirementsModel;
|
||||
}
|
||||
|
||||
void
|
||||
Config::setIsNextEnabled( const bool& isNextEnabled )
|
||||
{
|
||||
m_isNextEnabled = isNextEnabled;
|
||||
emit isNextEnabledChanged( m_isNextEnabled );
|
||||
}
|
||||
|
||||
QString Config::donateUrl() const
|
||||
{
|
||||
return m_donateUrl;
|
||||
}
|
||||
|
||||
void Config::setDonateUrl(const QString& url)
|
||||
{
|
||||
m_donateUrl = url;
|
||||
}
|
||||
|
||||
QString Config::knownIssuesUrl() const
|
||||
{
|
||||
return m_knownIssuesUrl;
|
||||
}
|
||||
|
||||
void Config::setKnownIssuesUrl(const QString& url)
|
||||
{
|
||||
m_knownIssuesUrl = url;
|
||||
}
|
||||
|
||||
void Config::setReleaseNotesUrl(const QString& url)
|
||||
{
|
||||
m_releaseNotesUrl = url;
|
||||
}
|
||||
|
||||
QString Config::releaseNotesUrl() const
|
||||
{
|
||||
return m_releaseNotesUrl;
|
||||
}
|
||||
|
||||
QString Config::supportUrl() const
|
||||
{
|
||||
return m_supportUrl;
|
||||
}
|
||||
|
||||
void Config::setSupportUrl(const QString& url)
|
||||
{
|
||||
m_supportUrl = url;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
163
src/modules/welcome/Config.h
Normal file
163
src/modules/welcome/Config.h
Normal file
@ -0,0 +1,163 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef WELCOME_CONFIG_H
|
||||
#define WELCOME_CONFIG_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QUrl>
|
||||
#include "modulesystem/Requirement.h"
|
||||
|
||||
#include "locale/LabelModel.h"
|
||||
|
||||
class RequirementsModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
using QAbstractListModel::QAbstractListModel;
|
||||
Q_PROPERTY(bool satisfiedRequirements READ satisfiedRequirements NOTIFY satisfiedRequirementsChanged FINAL)
|
||||
|
||||
Q_PROPERTY(bool satisfiedMandatory READ satisfiedMandatory NOTIFY satisfiedMandatoryChanged FINAL)
|
||||
|
||||
public:
|
||||
enum Roles : short
|
||||
{
|
||||
Name,
|
||||
Satisfied,
|
||||
Mandatory,
|
||||
Details,
|
||||
NegatedText,
|
||||
HasDetails
|
||||
};
|
||||
|
||||
bool satisfiedRequirements() const
|
||||
{
|
||||
return m_satisfiedRequirements;
|
||||
}
|
||||
|
||||
bool satisfiedMandatory() const
|
||||
{
|
||||
return m_satisfiedMandatory;
|
||||
}
|
||||
|
||||
const Calamares::RequirementEntry& getEntry(const int& index) const
|
||||
{
|
||||
|
||||
if(index > count() || index < 0)
|
||||
return *(new Calamares::RequirementEntry());
|
||||
|
||||
return m_requierements.at(index);
|
||||
|
||||
}
|
||||
|
||||
void setRequirementsList( const Calamares::RequirementsList& requirements );
|
||||
int rowCount(const QModelIndex&) const override;
|
||||
int count() const
|
||||
{
|
||||
return m_requierements.count();
|
||||
}
|
||||
|
||||
QVariant data(const QModelIndex& index, int role) const override;
|
||||
|
||||
protected:
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
private:
|
||||
Calamares::RequirementsList m_requierements;
|
||||
bool m_satisfiedRequirements = false;
|
||||
bool m_satisfiedMandatory = false;
|
||||
|
||||
signals:
|
||||
void satisfiedRequirementsChanged(bool value);
|
||||
void satisfiedMandatoryChanged();
|
||||
};
|
||||
|
||||
|
||||
class Config : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY( CalamaresUtils::Locale::LabelModel* languagesModel READ languagesModel CONSTANT FINAL)
|
||||
Q_PROPERTY( RequirementsModel* requirementsModel MEMBER m_requirementsModel CONSTANT FINAL )
|
||||
|
||||
Q_PROPERTY( QString languageIcon READ languageIcon CONSTANT FINAL )
|
||||
|
||||
Q_PROPERTY( QString countryCode MEMBER m_countryCode NOTIFY countryCodeChanged FINAL )
|
||||
Q_PROPERTY (int localeIndex READ localeIndex WRITE setLocaleIndex NOTIFY localeIndexChanged)
|
||||
|
||||
Q_PROPERTY( QString genericWelcomeMessage MEMBER m_genericWelcomeMessage NOTIFY genericWelcomeMessageChanged FINAL )
|
||||
Q_PROPERTY( QString warningMessage MEMBER m_warningMessage CONSTANT FINAL )
|
||||
|
||||
Q_PROPERTY(QString supportUrl MEMBER m_supportUrl CONSTANT FINAL)
|
||||
Q_PROPERTY(QString knownIssuesUrl MEMBER m_knownIssuesUrl CONSTANT FINAL)
|
||||
Q_PROPERTY(QString releaseNotesUrl MEMBER m_releaseNotesUrl CONSTANT FINAL)
|
||||
Q_PROPERTY(QString donateUrl MEMBER m_donateUrl CONSTANT FINAL)
|
||||
|
||||
public:
|
||||
Config( QObject* parent = nullptr );
|
||||
void setCountryCode( const QString &countryCode );
|
||||
void setLanguageIcon( const QString &languageIcon );
|
||||
RequirementsModel& requirementsModel () const;
|
||||
|
||||
void setIsNextEnabled( const bool& isNextEnabled );
|
||||
|
||||
void setLocaleIndex(const int &index);
|
||||
int localeIndex() const { return m_localeIndex; }
|
||||
|
||||
QString supportUrl() const;
|
||||
void setSupportUrl(const QString &url);
|
||||
|
||||
QString knownIssuesUrl() const;
|
||||
void setKnownIssuesUrl(const QString &url);
|
||||
|
||||
QString releaseNotesUrl() const;
|
||||
void setReleaseNotesUrl(const QString &url);
|
||||
|
||||
QString donateUrl() const;
|
||||
void setDonateUrl(const QString &url);
|
||||
|
||||
public slots:
|
||||
CalamaresUtils::Locale::LabelModel* languagesModel() const;
|
||||
void retranslate();
|
||||
QString languageIcon() const;
|
||||
|
||||
private:
|
||||
void initLanguages();
|
||||
QVariantMap m_configurationMap;
|
||||
RequirementsModel* m_requirementsModel;
|
||||
QString m_languageIcon;
|
||||
QString m_countryCode;
|
||||
int m_localeIndex = 0;
|
||||
bool m_isNextEnabled = false;
|
||||
CalamaresUtils::Locale::LabelModel* m_languages;
|
||||
|
||||
QString m_genericWelcomeMessage = tr("This program will ask you some questions and set up your installation");
|
||||
|
||||
QString m_warningMessage = tr("This program does not satisfy the minimum requirements for installing.\nInstallation can not continue");
|
||||
|
||||
QString m_supportUrl;
|
||||
QString m_knownIssuesUrl;
|
||||
QString m_releaseNotesUrl;
|
||||
QString m_donateUrl;
|
||||
|
||||
signals:
|
||||
void countryCodeChanged( QString countryCode );
|
||||
void localeIndexChanged( int localeIndex );
|
||||
void isNextEnabledChanged( bool isNextEnabled );
|
||||
void genericWelcomeMessageChanged();
|
||||
};
|
||||
|
||||
#endif
|
@ -27,6 +27,7 @@
|
||||
#include "CalamaresVersion.h"
|
||||
#include "Settings.h"
|
||||
#include "ViewManager.h"
|
||||
#include "Config.h"
|
||||
|
||||
#include "locale/LabelModel.h"
|
||||
#include "modulesystem/ModuleManager.h"
|
||||
@ -43,16 +44,14 @@
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
|
||||
WelcomePage::WelcomePage( QWidget* parent )
|
||||
WelcomePage::WelcomePage( Config *conf, QWidget* parent )
|
||||
: QWidget( parent )
|
||||
, ui( new Ui::WelcomePage )
|
||||
, m_checkingWidget( new CheckerContainer( this ) )
|
||||
, m_checkingWidget( new CheckerContainer( conf->requirementsModel(), this ) )
|
||||
, m_languages( nullptr )
|
||||
, m_conf( conf )
|
||||
{
|
||||
connect( Calamares::ModuleManager::instance(),
|
||||
&Calamares::ModuleManager::requirementsResult,
|
||||
m_checkingWidget,
|
||||
&CheckerContainer::requirementsChecked );
|
||||
|
||||
connect( Calamares::ModuleManager::instance(),
|
||||
&Calamares::ModuleManager::requirementsComplete,
|
||||
m_checkingWidget,
|
||||
@ -85,6 +84,21 @@ WelcomePage::WelcomePage( QWidget* parent )
|
||||
ui->verticalLayout->insertWidget( welcome_text_idx + 1, m_checkingWidget );
|
||||
}
|
||||
|
||||
void WelcomePage::init()
|
||||
{
|
||||
//setup the url buttons
|
||||
setupButton( WelcomePage::Button::Support, m_conf->supportUrl());
|
||||
setupButton( WelcomePage::Button::KnownIssues, m_conf->knownIssuesUrl() );
|
||||
setupButton( WelcomePage::Button::ReleaseNotes, m_conf->releaseNotesUrl() );
|
||||
setupButton( WelcomePage::Button::Donate, m_conf->donateUrl());
|
||||
|
||||
//language icon
|
||||
auto icon = Calamares::Branding::instance()->image( m_conf->languageIcon(), QSize( 48, 48 ) );
|
||||
if ( !icon.isNull() )
|
||||
{
|
||||
setLanguageIcon( icon );
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
WelcomePage::initLanguages()
|
||||
@ -93,67 +107,15 @@ WelcomePage::initLanguages()
|
||||
ui->languageWidget->clear();
|
||||
ui->languageWidget->setInsertPolicy( QComboBox::InsertAtBottom );
|
||||
|
||||
m_languages = CalamaresUtils::Locale::availableTranslations();
|
||||
ui->languageWidget->setModel( m_languages );
|
||||
ui->languageWidget->setModel( m_conf->languagesModel() );
|
||||
ui->languageWidget->setItemDelegate( new LocaleTwoColumnDelegate( ui->languageWidget ) );
|
||||
|
||||
// Find the best initial translation
|
||||
QLocale defaultLocale = QLocale( QLocale::system().name() );
|
||||
|
||||
cDebug() << "Matching locale" << defaultLocale;
|
||||
int matchedLocaleIndex = m_languages->find( [&]( const QLocale& x ) {
|
||||
return x.language() == defaultLocale.language() && x.country() == defaultLocale.country();
|
||||
} );
|
||||
|
||||
if ( matchedLocaleIndex < 0 )
|
||||
{
|
||||
cDebug() << Logger::SubEntry << "Matching approximate locale" << defaultLocale.language();
|
||||
|
||||
matchedLocaleIndex
|
||||
= m_languages->find( [&]( const QLocale& x ) { return x.language() == defaultLocale.language(); } );
|
||||
}
|
||||
|
||||
if ( matchedLocaleIndex < 0 )
|
||||
{
|
||||
QLocale en_us( QLocale::English, QLocale::UnitedStates );
|
||||
|
||||
cDebug() << Logger::SubEntry << "Matching English (US)";
|
||||
matchedLocaleIndex = m_languages->find( en_us );
|
||||
|
||||
// Now, if it matched, because we didn't match the system locale, switch to the one found
|
||||
if ( matchedLocaleIndex >= 0 )
|
||||
{
|
||||
QLocale::setDefault( m_languages->locale( matchedLocaleIndex ).locale() );
|
||||
}
|
||||
}
|
||||
|
||||
if ( matchedLocaleIndex >= 0 )
|
||||
{
|
||||
QString name = m_languages->locale( matchedLocaleIndex ).name();
|
||||
cDebug() << Logger::SubEntry << "Matched with index" << matchedLocaleIndex << name;
|
||||
|
||||
CalamaresUtils::installTranslator( name, Calamares::Branding::instance()->translationsDirectory(), qApp );
|
||||
ui->languageWidget->setCurrentIndex( matchedLocaleIndex );
|
||||
}
|
||||
else
|
||||
{
|
||||
cWarning() << "No available translation matched" << defaultLocale;
|
||||
}
|
||||
ui->languageWidget->setCurrentIndex( m_conf->localeIndex() );
|
||||
|
||||
connect( ui->languageWidget,
|
||||
static_cast< void ( QComboBox::* )( int ) >( &QComboBox::currentIndexChanged ),
|
||||
this,
|
||||
[&]( int newIndex ) {
|
||||
const auto& selectedLocale = m_languages->locale( newIndex ).locale();
|
||||
cDebug() << "Selected locale" << selectedLocale;
|
||||
|
||||
QLocale::setDefault( selectedLocale );
|
||||
CalamaresUtils::installTranslator(
|
||||
selectedLocale, Calamares::Branding::instance()->translationsDirectory(), qApp );
|
||||
} );
|
||||
static_cast< void ( QComboBox::* )( int ) >( &QComboBox::currentIndexChanged ), m_conf, &Config::setLocaleIndex );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WelcomePage::setupButton( Button role, const QString& url )
|
||||
{
|
||||
|
@ -31,12 +31,12 @@ class WelcomePage;
|
||||
}
|
||||
|
||||
class CheckerContainer;
|
||||
|
||||
class Config;
|
||||
class WelcomePage : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit WelcomePage( QWidget* parent = nullptr );
|
||||
explicit WelcomePage( Config *conf, QWidget* parent = nullptr );
|
||||
|
||||
enum class Button
|
||||
{
|
||||
@ -58,6 +58,8 @@ public:
|
||||
/// @brief Change the language from an external source.
|
||||
void externallySelectedLanguage( int row );
|
||||
|
||||
void init();
|
||||
|
||||
public slots:
|
||||
void retranslate();
|
||||
void showAboutBox();
|
||||
@ -72,6 +74,8 @@ private:
|
||||
Ui::WelcomePage* ui;
|
||||
CheckerContainer* m_checkingWidget;
|
||||
CalamaresUtils::Locale::LabelModel* m_languages;
|
||||
|
||||
Config *m_conf;
|
||||
};
|
||||
|
||||
/** @brief Delegate to display language information in two columns.
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "WelcomeViewStep.h"
|
||||
#include "Config.h"
|
||||
|
||||
#include "WelcomePage.h"
|
||||
#include "checker/GeneralRequirements.h"
|
||||
@ -36,72 +37,73 @@
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( WelcomeViewStepFactory, registerPlugin< WelcomeViewStep >(); )
|
||||
|
||||
WelcomeViewStep::WelcomeViewStep( QObject* parent )
|
||||
: Calamares::ViewStep( parent )
|
||||
, m_requirementsChecker( new GeneralRequirements( this ) )
|
||||
: Calamares::ViewStep( parent )
|
||||
, m_requirementsChecker( new GeneralRequirements( this ) )
|
||||
, m_conf( new Config(this) )
|
||||
{
|
||||
connect( Calamares::ModuleManager::instance(),
|
||||
&Calamares::ModuleManager::requirementsComplete,
|
||||
this,
|
||||
&WelcomeViewStep::nextStatusChanged );
|
||||
m_widget = new WelcomePage();
|
||||
}
|
||||
connect( Calamares::ModuleManager::instance(),
|
||||
&Calamares::ModuleManager::requirementsComplete,
|
||||
this,
|
||||
&WelcomeViewStep::nextStatusChanged );
|
||||
|
||||
// the instance of the qqc2 or qwidgets page
|
||||
m_widget = new WelcomePage(m_conf);
|
||||
}
|
||||
|
||||
WelcomeViewStep::~WelcomeViewStep()
|
||||
{
|
||||
if ( m_widget && m_widget->parent() == nullptr )
|
||||
{
|
||||
m_widget->deleteLater();
|
||||
}
|
||||
if ( m_widget && m_widget->parent() == nullptr )
|
||||
{
|
||||
m_widget->deleteLater();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
WelcomeViewStep::prettyName() const
|
||||
{
|
||||
return tr( "Welcome" );
|
||||
return tr( "Welcome" );
|
||||
}
|
||||
|
||||
|
||||
QWidget*
|
||||
WelcomeViewStep::widget()
|
||||
{
|
||||
return m_widget;
|
||||
return m_widget;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
WelcomeViewStep::isNextEnabled() const
|
||||
{
|
||||
return m_widget->verdict();
|
||||
return m_widget->verdict();
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
WelcomeViewStep::isBackEnabled() const
|
||||
{
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
WelcomeViewStep::isAtBeginning() const
|
||||
{
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
WelcomeViewStep::isAtEnd() const
|
||||
{
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Calamares::JobList
|
||||
WelcomeViewStep::jobs() const
|
||||
{
|
||||
return Calamares::JobList();
|
||||
return Calamares::JobList();
|
||||
}
|
||||
|
||||
|
||||
@ -120,129 +122,125 @@ WelcomeViewStep::jobs() const
|
||||
static QString
|
||||
jobOrBrandingSetting( Calamares::Branding::StringEntry e, const QVariantMap& map, const QString& key )
|
||||
{
|
||||
if ( !map.contains( key ) )
|
||||
{
|
||||
return QString();
|
||||
}
|
||||
auto v = map.value( key );
|
||||
if ( v.type() == QVariant::Bool )
|
||||
{
|
||||
return v.toBool() ? ( *e ) : QString();
|
||||
}
|
||||
if ( v.type() == QVariant::String )
|
||||
{
|
||||
return v.toString();
|
||||
}
|
||||
if ( !map.contains( key ) )
|
||||
{
|
||||
return QString();
|
||||
}
|
||||
auto v = map.value( key );
|
||||
if ( v.type() == QVariant::Bool )
|
||||
{
|
||||
return v.toBool() ? ( *e ) : QString();
|
||||
}
|
||||
if ( v.type() == QVariant::String )
|
||||
{
|
||||
return v.toString();
|
||||
}
|
||||
|
||||
return QString();
|
||||
return QString();
|
||||
}
|
||||
|
||||
void
|
||||
WelcomeViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
{
|
||||
using Calamares::Branding;
|
||||
using Calamares::Branding;
|
||||
|
||||
m_widget->setupButton( WelcomePage::Button::Support,
|
||||
jobOrBrandingSetting( Branding::SupportUrl, configurationMap, "showSupportUrl" ) );
|
||||
m_widget->setupButton( WelcomePage::Button::KnownIssues,
|
||||
jobOrBrandingSetting( Branding::KnownIssuesUrl, configurationMap, "showKnownIssuesUrl" ) );
|
||||
m_widget->setupButton( WelcomePage::Button::ReleaseNotes,
|
||||
jobOrBrandingSetting( Branding::ReleaseNotesUrl, configurationMap, "showReleaseNotesUrl" ) );
|
||||
m_widget->setupButton( WelcomePage::Button::Donate,
|
||||
CalamaresUtils::getString( configurationMap, "showDonateUrl" ) );
|
||||
m_conf->setSupportUrl( jobOrBrandingSetting( Branding::SupportUrl, configurationMap, "showSupportUrl" ) );
|
||||
m_conf->setKnownIssuesUrl( jobOrBrandingSetting( Branding::KnownIssuesUrl, configurationMap, "showKnownIssuesUrl" ) );
|
||||
m_conf->setReleaseNotesUrl( jobOrBrandingSetting( Branding::ReleaseNotesUrl, configurationMap, "showReleaseNotesUrl" ) );
|
||||
m_conf->setDonateUrl( CalamaresUtils::getString( configurationMap, "showDonateUrl" ) );
|
||||
|
||||
if ( configurationMap.contains( "requirements" )
|
||||
&& configurationMap.value( "requirements" ).type() == QVariant::Map )
|
||||
{
|
||||
m_requirementsChecker->setConfigurationMap( configurationMap.value( "requirements" ).toMap() );
|
||||
}
|
||||
else
|
||||
cWarning() << "no valid requirements map found in welcome "
|
||||
"module configuration.";
|
||||
if ( configurationMap.contains( "requirements" )
|
||||
&& configurationMap.value( "requirements" ).type() == QVariant::Map )
|
||||
{
|
||||
m_requirementsChecker->setConfigurationMap( configurationMap.value( "requirements" ).toMap() );
|
||||
|
||||
bool ok = false;
|
||||
QVariantMap geoip = CalamaresUtils::getSubMap( configurationMap, "geoip", ok );
|
||||
if ( ok )
|
||||
{
|
||||
using FWString = QFutureWatcher< QString >;
|
||||
m_conf->requirementsModel().setRequirementsList( checkRequirements() );
|
||||
}
|
||||
else
|
||||
cWarning() << "no valid requirements map found in welcome "
|
||||
"module configuration.";
|
||||
|
||||
auto* handler = new CalamaresUtils::GeoIP::Handler( CalamaresUtils::getString( geoip, "style" ),
|
||||
CalamaresUtils::getString( geoip, "url" ),
|
||||
CalamaresUtils::getString( geoip, "selector" ) );
|
||||
if ( handler->type() != CalamaresUtils::GeoIP::Handler::Type::None )
|
||||
{
|
||||
auto* future = new FWString();
|
||||
connect( future, &FWString::finished, [view = this, f = future, h = handler]() {
|
||||
QString countryResult = f->future().result();
|
||||
cDebug() << "GeoIP result for welcome=" << countryResult;
|
||||
view->setCountry( countryResult, h );
|
||||
f->deleteLater();
|
||||
delete h;
|
||||
} );
|
||||
future->setFuture( handler->queryRaw() );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Would not produce useful country code anyway.
|
||||
delete handler;
|
||||
}
|
||||
}
|
||||
bool ok = false;
|
||||
QVariantMap geoip = CalamaresUtils::getSubMap( configurationMap, "geoip", ok );
|
||||
if ( ok )
|
||||
{
|
||||
using FWString = QFutureWatcher< QString >;
|
||||
|
||||
auto* handler = new CalamaresUtils::GeoIP::Handler( CalamaresUtils::getString( geoip, "style" ),
|
||||
CalamaresUtils::getString( geoip, "url" ),
|
||||
CalamaresUtils::getString( geoip, "selector" ) );
|
||||
if ( handler->type() != CalamaresUtils::GeoIP::Handler::Type::None )
|
||||
{
|
||||
auto* future = new FWString();
|
||||
connect( future, &FWString::finished, [view = this, f = future, h = handler]() {
|
||||
QString countryResult = f->future().result();
|
||||
cDebug() << "GeoIP result for welcome=" << countryResult;
|
||||
view->setCountry( countryResult, h );
|
||||
f->deleteLater();
|
||||
delete h;
|
||||
} );
|
||||
future->setFuture( handler->queryRaw() );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Would not produce useful country code anyway.
|
||||
delete handler;
|
||||
}
|
||||
}
|
||||
|
||||
QString language = CalamaresUtils::getString( configurationMap, "languageIcon" );
|
||||
if ( !language.isEmpty() )
|
||||
{
|
||||
auto icon = Calamares::Branding::instance()->image( language, QSize( 48, 48 ) );
|
||||
if ( !icon.isNull() )
|
||||
{
|
||||
m_widget->setLanguageIcon( icon );
|
||||
}
|
||||
}
|
||||
QString language = CalamaresUtils::getString( configurationMap, "languageIcon" );
|
||||
if ( !language.isEmpty() )
|
||||
{
|
||||
m_conf->setLanguageIcon( language );
|
||||
}
|
||||
|
||||
//here init the qml or qwidgets needed bits
|
||||
m_widget->init();
|
||||
}
|
||||
|
||||
Calamares::RequirementsList
|
||||
WelcomeViewStep::checkRequirements()
|
||||
{
|
||||
return m_requirementsChecker->checkRequirements();
|
||||
return m_requirementsChecker->checkRequirements();
|
||||
}
|
||||
|
||||
static inline void
|
||||
logGeoIPHandler( CalamaresUtils::GeoIP::Handler* handler )
|
||||
{
|
||||
if ( handler )
|
||||
{
|
||||
cDebug() << Logger::SubEntry << "Obtained from" << handler->url() << " ("
|
||||
<< static_cast< int >( handler->type() ) << handler->selector() << ')';
|
||||
}
|
||||
if ( handler )
|
||||
{
|
||||
cDebug() << Logger::SubEntry << "Obtained from" << handler->url() << " ("
|
||||
<< static_cast< int >( handler->type() ) << handler->selector() << ')';
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
WelcomeViewStep::setCountry( const QString& countryCode, CalamaresUtils::GeoIP::Handler* handler )
|
||||
{
|
||||
if ( countryCode.length() != 2 )
|
||||
{
|
||||
cDebug() << "Unusable country code" << countryCode;
|
||||
logGeoIPHandler( handler );
|
||||
return;
|
||||
}
|
||||
if ( countryCode.length() != 2 )
|
||||
{
|
||||
cDebug() << "Unusable country code" << countryCode;
|
||||
logGeoIPHandler( handler );
|
||||
return;
|
||||
}
|
||||
|
||||
auto c_l = CalamaresUtils::Locale::countryData( countryCode );
|
||||
if ( c_l.first == QLocale::Country::AnyCountry )
|
||||
{
|
||||
cDebug() << "Unusable country code" << countryCode;
|
||||
logGeoIPHandler( handler );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
int r = CalamaresUtils::Locale::availableTranslations()->find( countryCode );
|
||||
if ( r < 0 )
|
||||
{
|
||||
cDebug() << "Unusable country code" << countryCode << "(no suitable translation)";
|
||||
auto c_l = CalamaresUtils::Locale::countryData( countryCode );
|
||||
if ( c_l.first == QLocale::Country::AnyCountry )
|
||||
{
|
||||
cDebug() << "Unusable country code" << countryCode;
|
||||
logGeoIPHandler( handler );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
int r = CalamaresUtils::Locale::availableTranslations()->find( countryCode );
|
||||
if ( r < 0 )
|
||||
{
|
||||
cDebug() << "Unusable country code" << countryCode << "(no suitable translation)";
|
||||
}
|
||||
if ( ( r >= 0 ) && m_conf )
|
||||
{
|
||||
m_conf->setCountryCode( countryCode );
|
||||
}
|
||||
if ( ( r >= 0 ) && m_widget )
|
||||
{
|
||||
m_widget->externallySelectedLanguage( r );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,16 +19,19 @@
|
||||
#ifndef WELCOMEPAGEPLUGIN_H
|
||||
#define WELCOMEPAGEPLUGIN_H
|
||||
|
||||
#include "DllMacro.h"
|
||||
#include "utils/PluginFactory.h"
|
||||
#include "viewpages/ViewStep.h"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include <modulesystem/Requirement.h>
|
||||
#include <utils/PluginFactory.h>
|
||||
#include <viewpages/ViewStep.h>
|
||||
|
||||
#include <DllMacro.h>
|
||||
|
||||
#include <QVariantMap>
|
||||
|
||||
class WelcomePage;
|
||||
class GeneralRequirements;
|
||||
|
||||
class Config;
|
||||
namespace CalamaresUtils
|
||||
{
|
||||
namespace GeoIP
|
||||
@ -72,6 +75,7 @@ public:
|
||||
private:
|
||||
WelcomePage* m_widget;
|
||||
GeneralRequirements* m_requirementsChecker;
|
||||
Config *m_conf;
|
||||
};
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DECLARATION( WelcomeViewStepFactory )
|
||||
|
@ -31,11 +31,12 @@
|
||||
|
||||
#include <QHBoxLayout>
|
||||
|
||||
CheckerContainer::CheckerContainer( QWidget* parent )
|
||||
CheckerContainer::CheckerContainer( const RequirementsModel &model, QWidget* parent )
|
||||
: QWidget( parent )
|
||||
, m_waitingWidget( new WaitingWidget( QString(), this ) )
|
||||
, m_checkerWidget( nullptr )
|
||||
, m_verdict( false )
|
||||
, m_model( model )
|
||||
{
|
||||
QBoxLayout* mainLayout = new QHBoxLayout;
|
||||
setLayout( mainLayout );
|
||||
@ -59,18 +60,12 @@ CheckerContainer::requirementsComplete( bool ok )
|
||||
m_waitingWidget->deleteLater();
|
||||
m_waitingWidget = nullptr; // Don't delete in destructor
|
||||
|
||||
m_checkerWidget = new ResultsListWidget( this, m_requirements );
|
||||
m_checkerWidget = new ResultsListWidget( m_model, this);
|
||||
layout()->addWidget( m_checkerWidget );
|
||||
|
||||
m_verdict = ok;
|
||||
}
|
||||
|
||||
void
|
||||
CheckerContainer::requirementsChecked( const Calamares::RequirementsList& l )
|
||||
{
|
||||
m_requirements.append( l );
|
||||
}
|
||||
|
||||
void
|
||||
CheckerContainer::requirementsProgress( const QString& message )
|
||||
{
|
||||
|
@ -24,8 +24,7 @@
|
||||
#define CHECKERCONTAINER_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "modulesystem/Requirement.h"
|
||||
#include "Config.h"
|
||||
|
||||
class ResultsListWidget;
|
||||
class WaitingWidget;
|
||||
@ -36,18 +35,17 @@ class WaitingWidget;
|
||||
* a (list) diplay of the results, plus some explanation of the
|
||||
* overall state of the entire list of results.
|
||||
*/
|
||||
|
||||
class CheckerContainer : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CheckerContainer( QWidget* parent = nullptr );
|
||||
explicit CheckerContainer(const RequirementsModel &model, QWidget* parent = nullptr );
|
||||
virtual ~CheckerContainer();
|
||||
|
||||
bool verdict() const;
|
||||
|
||||
public slots:
|
||||
void requirementsChecked( const Calamares::RequirementsList& );
|
||||
|
||||
/** @brief All the requirements are complete, switch to list view */
|
||||
void requirementsComplete( bool );
|
||||
|
||||
@ -57,8 +55,10 @@ protected:
|
||||
WaitingWidget *m_waitingWidget;
|
||||
ResultsListWidget *m_checkerWidget;
|
||||
|
||||
Calamares::RequirementsList m_requirements;
|
||||
bool m_verdict;
|
||||
|
||||
private:
|
||||
const RequirementsModel &m_model;
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
@ -47,14 +47,16 @@
|
||||
static void
|
||||
createResultWidgets( QLayout* layout,
|
||||
QList< ResultWidget* >& resultWidgets,
|
||||
const Calamares::RequirementsList& checkEntries,
|
||||
std::function< bool( const Calamares::RequirementEntry& ) > predicate )
|
||||
const RequirementsModel &model,
|
||||
std::function< bool( const Calamares::RequirementEntry& ) > predicate
|
||||
)
|
||||
{
|
||||
resultWidgets.clear();
|
||||
resultWidgets.reserve( checkEntries.count() );
|
||||
for ( const auto& entry : checkEntries )
|
||||
resultWidgets.reserve( model.count() );
|
||||
for ( auto i = 0; i < model.count(); i++ )
|
||||
{
|
||||
if ( !predicate( entry ) )
|
||||
const auto &entry = model.getEntry(i);
|
||||
if ( !predicate(entry))
|
||||
{
|
||||
resultWidgets.append( nullptr );
|
||||
continue;
|
||||
@ -85,33 +87,34 @@ createResultWidgets( QLayout* layout,
|
||||
*/
|
||||
class ResultsListDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/** @brief Create a dialog for the given @p checkEntries list of requirements.
|
||||
*
|
||||
* The list must continue to exist for the lifetime of the dialog,
|
||||
* or UB happens.
|
||||
*/
|
||||
ResultsListDialog( QWidget* parent, const Calamares::RequirementsList& checkEntries );
|
||||
ResultsListDialog( const RequirementsModel& model, QWidget* parent );
|
||||
virtual ~ResultsListDialog();
|
||||
|
||||
private:
|
||||
QLabel* m_title;
|
||||
QList< ResultWidget* > m_resultWidgets; ///< One widget for each entry with details available
|
||||
const Calamares::RequirementsList& m_entries;
|
||||
const RequirementsModel& m_model;
|
||||
|
||||
void retranslate();
|
||||
};
|
||||
|
||||
ResultsListDialog::ResultsListDialog( QWidget* parent, const Calamares::RequirementsList& checkEntries )
|
||||
ResultsListDialog::ResultsListDialog( const RequirementsModel& model, QWidget* parent)
|
||||
: QDialog( parent )
|
||||
, m_entries( checkEntries )
|
||||
, m_model( model )
|
||||
{
|
||||
auto* mainLayout = new QVBoxLayout;
|
||||
auto* entriesLayout = new QVBoxLayout;
|
||||
|
||||
m_title = new QLabel( this );
|
||||
|
||||
createResultWidgets( entriesLayout, m_resultWidgets, checkEntries, []( const Calamares::RequirementEntry& e ) {
|
||||
createResultWidgets( entriesLayout, m_resultWidgets, model, []( const Calamares::RequirementEntry& e ) {
|
||||
return e.hasDetails();
|
||||
} );
|
||||
|
||||
@ -137,21 +140,20 @@ ResultsListDialog::retranslate()
|
||||
m_title->setText( tr( "For best results, please ensure that this computer:" ) );
|
||||
setWindowTitle( tr( "System requirements" ) );
|
||||
|
||||
int i = 0;
|
||||
for ( const auto& entry : m_entries )
|
||||
for ( auto i = 0; i < m_model.count(); i++ )
|
||||
{
|
||||
const auto &entry = m_model.getEntry(i);
|
||||
if ( m_resultWidgets[ i ] )
|
||||
{
|
||||
m_resultWidgets[ i ]->setText( entry.enumerationText() );
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ResultsListWidget::ResultsListWidget( QWidget* parent, const Calamares::RequirementsList& checkEntries )
|
||||
ResultsListWidget::ResultsListWidget( const RequirementsModel &model, QWidget* parent )
|
||||
: QWidget( parent )
|
||||
, m_entries( checkEntries )
|
||||
, m_model( model )
|
||||
{
|
||||
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||
|
||||
@ -178,10 +180,11 @@ ResultsListWidget::ResultsListWidget( QWidget* parent, const Calamares::Requirem
|
||||
|
||||
// Check that all are satisfied (gives warnings if not) and
|
||||
// all *mandatory* entries are satisfied (gives errors if not).
|
||||
auto isUnSatisfied = []( const Calamares::RequirementEntry& e ) { return !e.satisfied; };
|
||||
const bool requirementsSatisfied = std::none_of( checkEntries.begin(), checkEntries.end(), isUnSatisfied );
|
||||
|
||||
createResultWidgets( entriesLayout, m_resultWidgets, checkEntries, isUnSatisfied );
|
||||
const bool requirementsSatisfied = m_model.satisfiedRequirements();
|
||||
auto isUnSatisfied = []( const Calamares::RequirementEntry& e ) { return !e.satisfied; };
|
||||
|
||||
createResultWidgets( entriesLayout, m_resultWidgets, model, isUnSatisfied );
|
||||
|
||||
if ( !requirementsSatisfied )
|
||||
{
|
||||
@ -228,7 +231,7 @@ ResultsListWidget::linkClicked( const QString& link )
|
||||
{
|
||||
if ( link == "#details" )
|
||||
{
|
||||
auto* dialog = new ResultsListDialog( this, m_entries );
|
||||
auto* dialog = new ResultsListDialog( m_model, this );
|
||||
dialog->exec();
|
||||
dialog->deleteLater();
|
||||
}
|
||||
@ -237,28 +240,23 @@ ResultsListWidget::linkClicked( const QString& link )
|
||||
void
|
||||
ResultsListWidget::retranslate()
|
||||
{
|
||||
int i = 0;
|
||||
for ( const auto& entry : m_entries )
|
||||
for ( auto i = 0; i < m_model.count(); i++ )
|
||||
{
|
||||
const auto &entry = m_model.getEntry(i);
|
||||
if ( m_resultWidgets[ i ] )
|
||||
{
|
||||
m_resultWidgets[ i ]->setText( entry.negatedText() );
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
// Check that all are satisfied (gives warnings if not) and
|
||||
// all *mandatory* entries are satisfied (gives errors if not).
|
||||
auto isUnSatisfied = []( const Calamares::RequirementEntry& e ) { return !e.satisfied; };
|
||||
auto isMandatoryAndUnSatisfied = []( const Calamares::RequirementEntry& e ) { return e.mandatory && !e.satisfied; };
|
||||
const bool requirementsSatisfied = std::none_of( m_entries.begin(), m_entries.end(), isUnSatisfied );
|
||||
const bool mandatorySatisfied = std::none_of( m_entries.begin(), m_entries.end(), isMandatoryAndUnSatisfied );
|
||||
|
||||
if ( !requirementsSatisfied )
|
||||
if ( !m_model.satisfiedRequirements() )
|
||||
{
|
||||
QString message;
|
||||
const bool setup = Calamares::Settings::instance()->isSetupMode();
|
||||
if ( !mandatorySatisfied )
|
||||
if ( !m_model.satisfiedMandatory() )
|
||||
{
|
||||
message = setup ? tr( "This computer does not satisfy the minimum "
|
||||
"requirements for setting up %1.<br/>"
|
||||
@ -289,3 +287,5 @@ ResultsListWidget::retranslate()
|
||||
.arg( *Calamares::Branding::ProductName ) );
|
||||
}
|
||||
}
|
||||
|
||||
#include "ResultsListWidget.moc"
|
||||
|
@ -22,17 +22,15 @@
|
||||
|
||||
#include "ResultWidget.h"
|
||||
|
||||
#include "modulesystem/Requirement.h"
|
||||
|
||||
#include "Config.h"
|
||||
#include <QWidget>
|
||||
|
||||
class QLabel;
|
||||
|
||||
class ResultsListWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ResultsListWidget( QWidget* parent, const Calamares::RequirementsList& checkEntries );
|
||||
explicit ResultsListWidget(const RequirementsModel &model, QWidget* parent);
|
||||
|
||||
private:
|
||||
/// @brief A link in the explanatory text has been clicked
|
||||
@ -40,7 +38,7 @@ private:
|
||||
void retranslate();
|
||||
|
||||
QLabel* m_explanation = nullptr; ///< Explanatory text above the list, with link
|
||||
const Calamares::RequirementsList& m_entries;
|
||||
const RequirementsModel &m_model;
|
||||
QList< ResultWidget* > m_resultWidgets; ///< One widget for each unsatisfied entry
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="welcome">
|
||||
<file>language-icon-128px.png</file>
|
||||
<file>language-icon-48px.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="welcome">
|
||||
<file>language-icon-128px.png</file>
|
||||
<file>language-icon-48px.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
set( _welcome ${CMAKE_CURRENT_SOURCE_DIR}/../welcome )
|
||||
|
||||
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ${_welcome} )
|
||||
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ${CMAKE_CURRENT_SOURCE_DIR}/../../libcalamares ${_welcome} )
|
||||
|
||||
# DUPLICATED WITH WELCOME MODULE
|
||||
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED DBus Network )
|
||||
@ -19,10 +19,7 @@ else()
|
||||
endif()
|
||||
|
||||
set( CHECKER_SOURCES
|
||||
${_welcome}/checker/CheckerContainer.cpp
|
||||
${_welcome}/checker/GeneralRequirements.cpp
|
||||
${_welcome}/checker/ResultWidget.cpp
|
||||
${_welcome}/checker/ResultsListWidget.cpp
|
||||
${PARTMAN_SRC}
|
||||
)
|
||||
|
||||
@ -32,7 +29,7 @@ calamares_add_plugin( welcomeq
|
||||
SOURCES
|
||||
${CHECKER_SOURCES}
|
||||
WelcomeQmlViewStep.cpp
|
||||
Config.cpp
|
||||
${_welcome}/Config.cpp
|
||||
RESOURCES
|
||||
welcomeq.qrc
|
||||
LINK_PRIVATE_LIBRARIES
|
||||
@ -42,3 +39,13 @@ calamares_add_plugin( welcomeq
|
||||
Qt5::Network
|
||||
SHARED_LIB
|
||||
)
|
||||
|
||||
# add_executable( welcomeqmltest qmlmain.cpp Config.cpp WelcomeQmlViewStep.cpp ${CHECKER_SOURCES} )
|
||||
# target_link_libraries( welcomeqmltest PRIVATE calamaresui Qt5::Core Qt5::Network Qt5::DBus ${CHECKER_LINK_LIBRARIES})
|
||||
# set_target_properties( welcomeqmltest
|
||||
# PROPERTIES
|
||||
# ENABLE_EXPORTS TRUE
|
||||
# RUNTIME_OUTPUT_NAME welcomeqmltest
|
||||
# )
|
||||
# calamares_automoc( welcomeqmltest )
|
||||
# calamares_autouic( welcomeqmltest )
|
||||
|
@ -1,23 +0,0 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
Config::Config() {}
|
||||
|
||||
Config::~Config() {}
|
@ -1,51 +0,0 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef WELCOMEQ_CONFIG_H
|
||||
#define WELCOMEQ_CONFIG_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QUrl>
|
||||
|
||||
class Config : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY( QUrl helpUrl READ helpUrl CONSTANT FINAL )
|
||||
Q_PROPERTY( QUrl issuesUrl READ issuesUrl CONSTANT FINAL )
|
||||
Q_PROPERTY( QUrl notesUrl READ notesUrl CONSTANT FINAL )
|
||||
Q_PROPERTY( QUrl donateUrl READ donateUrl CONSTANT FINAL )
|
||||
public:
|
||||
Config();
|
||||
virtual ~Config();
|
||||
|
||||
void setHelpUrl( const QUrl& url ) { m_helpUrl = url; }
|
||||
void setIssuesUrl( const QUrl& url ) { m_issuesUrl = url; }
|
||||
void setNotesUrl( const QUrl& url ) { m_notesUrl = url; }
|
||||
void setDonateUrl( const QUrl& url ) { m_donateUrl = url; }
|
||||
|
||||
public slots:
|
||||
QUrl helpUrl() const { return m_helpUrl; }
|
||||
QUrl issuesUrl() const { return m_issuesUrl; }
|
||||
QUrl notesUrl() const { return m_notesUrl; }
|
||||
QUrl donateUrl() const { return m_donateUrl; }
|
||||
|
||||
private:
|
||||
QUrl m_helpUrl, m_issuesUrl, m_notesUrl, m_donateUrl;
|
||||
};
|
||||
|
||||
#endif
|
@ -26,9 +26,12 @@
|
||||
#include "locale/Lookup.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Variant.h"
|
||||
#include "utils/Dirs.h"
|
||||
|
||||
#include "Branding.h"
|
||||
#include "modulesystem/ModuleManager.h"
|
||||
#include <QQmlEngine>
|
||||
#include "utils/Yaml.h"
|
||||
|
||||
#include <QFutureWatcher>
|
||||
#include <QPixmap>
|
||||
@ -37,167 +40,176 @@
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( WelcomeQmlViewStepFactory, registerPlugin< WelcomeQmlViewStep >(); )
|
||||
|
||||
WelcomeQmlViewStep::WelcomeQmlViewStep( QObject* parent )
|
||||
: Calamares::QmlViewStep( QStringLiteral( "welcomeq" ), parent )
|
||||
: Calamares::QmlViewStep(parent )
|
||||
, m_config( new Config( ) ) // the qml singleton takes ownership and deletes it
|
||||
// , m_nextEnabled( false )
|
||||
, m_requirementsChecker( new GeneralRequirements( this ) )
|
||||
|
||||
{
|
||||
connect( Calamares::ModuleManager::instance(),
|
||||
&Calamares::ModuleManager::requirementsComplete,
|
||||
this,
|
||||
&WelcomeQmlViewStep::nextStatusChanged );
|
||||
// connect( m_config,
|
||||
// &Config::isNextEnabledChanged,
|
||||
// this,
|
||||
// &WelcomeQmlViewStep::nextStatusChanged );
|
||||
// emit nextStatusChanged(true);
|
||||
}
|
||||
|
||||
|
||||
WelcomeQmlViewStep::~WelcomeQmlViewStep() {}
|
||||
|
||||
QString
|
||||
WelcomeQmlViewStep::prettyName() const
|
||||
{
|
||||
return tr( "Welcome" );
|
||||
return tr( "Welcome" );
|
||||
}
|
||||
|
||||
/** @brief Look up a URL for a button
|
||||
*
|
||||
* Looks up @p key in @p map; if it is a *boolean* value, then
|
||||
* assume an old-style configuration, and fetch the string from
|
||||
* the branding settings @p e. If it is a string, not a boolean,
|
||||
* use it as-is. If not found, or a weird type, returns empty.
|
||||
*
|
||||
* This allows switching the showKnownIssuesUrl and similar settings
|
||||
* in welcome.conf from a boolean (deferring to branding) to an
|
||||
* actual string for immediate use. Empty strings, as well as
|
||||
* "false" as a setting, will hide the buttons as before.
|
||||
*/
|
||||
static QString
|
||||
jobOrBrandingSetting( Calamares::Branding::StringEntry e, const QVariantMap& map, const QString& key )
|
||||
bool
|
||||
WelcomeQmlViewStep::isNextEnabled() const
|
||||
{
|
||||
if ( !map.contains( key ) )
|
||||
{
|
||||
return QString();
|
||||
}
|
||||
auto v = map.value( key );
|
||||
if ( v.type() == QVariant::Bool )
|
||||
{
|
||||
return v.toBool() ? ( *e ) : QString();
|
||||
}
|
||||
if ( v.type() == QVariant::String )
|
||||
{
|
||||
return v.toString();
|
||||
}
|
||||
// TODO: should return true
|
||||
// return m_config->property("isNextEnabled").toBool();
|
||||
return true;
|
||||
}
|
||||
|
||||
return QString();
|
||||
bool
|
||||
WelcomeQmlViewStep::isBackEnabled() const
|
||||
{
|
||||
// TODO: should return true (it's weird that you are not allowed to have welcome *after* anything
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
WelcomeQmlViewStep::isAtBeginning() const
|
||||
{
|
||||
// TODO: adjust to "pages" in the QML
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
WelcomeQmlViewStep::isAtEnd() const
|
||||
{
|
||||
// TODO: adjust to "pages" in the QML
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Calamares::JobList
|
||||
WelcomeQmlViewStep::jobs() const
|
||||
{
|
||||
return Calamares::JobList();
|
||||
}
|
||||
|
||||
void
|
||||
WelcomeQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
{
|
||||
using Calamares::Branding;
|
||||
using Calamares::Branding;
|
||||
|
||||
m_config.setHelpUrl( jobOrBrandingSetting( Branding::SupportUrl, configurationMap, "showSupportUrl" ) );
|
||||
m_config.setIssuesUrl( jobOrBrandingSetting( Branding::KnownIssuesUrl, configurationMap, "showKnownIssuesUrl" ) );
|
||||
m_config.setNotesUrl( jobOrBrandingSetting( Branding::ReleaseNotesUrl, configurationMap, "showReleaseNotesUrl" ) );
|
||||
m_config.setDonateUrl( CalamaresUtils::getString( configurationMap, "showDonateUrl" ) );
|
||||
// TODO: expand Config class and set the remaining fields // with the configurationMap all those properties can be accesed withouth having to declare a property, get and setter for each
|
||||
|
||||
// TODO: figure out how the requirements (held by ModuleManager) should be accessible
|
||||
// to QML as a odel.
|
||||
if ( configurationMap.contains( "requirements" )
|
||||
&& configurationMap.value( "requirements" ).type() == QVariant::Map )
|
||||
{
|
||||
m_requirementsChecker->setConfigurationMap( configurationMap.value( "requirements" ).toMap() );
|
||||
}
|
||||
else
|
||||
cWarning() << "no valid requirements map found in welcome "
|
||||
"module configuration.";
|
||||
// TODO: figure out how the requirements (held by ModuleManager) should be accessible
|
||||
// to QML as a odel. //will be model as a qvariantmap containing a alert level and the message string
|
||||
if ( configurationMap.contains( "requirements" )
|
||||
&& configurationMap.value( "requirements" ).type() == QVariant::Map )
|
||||
{
|
||||
m_requirementsChecker->setConfigurationMap( configurationMap.value( "requirements" ).toMap() );
|
||||
|
||||
bool ok = false;
|
||||
QVariantMap geoip = CalamaresUtils::getSubMap( configurationMap, "geoip", ok );
|
||||
if ( ok )
|
||||
{
|
||||
using FWString = QFutureWatcher< QString >;
|
||||
m_config->requirementsModel().setRequirementsList( checkRequirements() );
|
||||
}
|
||||
else
|
||||
cWarning() << "no valid requirements map found in welcome "
|
||||
"module configuration.";
|
||||
|
||||
auto* handler = new CalamaresUtils::GeoIP::Handler( CalamaresUtils::getString( geoip, "style" ),
|
||||
CalamaresUtils::getString( geoip, "url" ),
|
||||
CalamaresUtils::getString( geoip, "selector" ) );
|
||||
if ( handler->type() != CalamaresUtils::GeoIP::Handler::Type::None )
|
||||
{
|
||||
auto* future = new FWString();
|
||||
connect( future, &FWString::finished, [view = this, f = future, h = handler]() {
|
||||
QString countryResult = f->future().result();
|
||||
cDebug() << "GeoIP result for welcome=" << countryResult;
|
||||
view->setCountry( countryResult, h );
|
||||
f->deleteLater();
|
||||
delete h;
|
||||
} );
|
||||
future->setFuture( handler->queryRaw() );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Would not produce useful country code anyway.
|
||||
delete handler;
|
||||
}
|
||||
}
|
||||
bool ok = false;
|
||||
QVariantMap geoip = CalamaresUtils::getSubMap( configurationMap, "geoip", ok );
|
||||
if ( ok )
|
||||
{
|
||||
using FWString = QFutureWatcher< QString >;
|
||||
|
||||
QString language = CalamaresUtils::getString( configurationMap, "languageIcon" );
|
||||
if ( !language.isEmpty() )
|
||||
{
|
||||
auto icon = Calamares::Branding::instance()->image( language, QSize( 48, 48 ) );
|
||||
if ( !icon.isNull() )
|
||||
{
|
||||
// TODO: figure out where to set this: Config?
|
||||
}
|
||||
}
|
||||
auto* handler = new CalamaresUtils::GeoIP::Handler( CalamaresUtils::getString( geoip, "style" ),
|
||||
CalamaresUtils::getString( geoip, "url" ),
|
||||
CalamaresUtils::getString( geoip, "selector" ) );
|
||||
if ( handler->type() != CalamaresUtils::GeoIP::Handler::Type::None )
|
||||
{
|
||||
auto* future = new FWString();
|
||||
connect( future, &FWString::finished, [view = this, f = future, h = handler]() {
|
||||
QString countryResult = f->future().result();
|
||||
cDebug() << "GeoIP result for welcome=" << countryResult;
|
||||
view->setCountry( countryResult, h );
|
||||
f->deleteLater();
|
||||
delete h;
|
||||
} );
|
||||
future->setFuture( handler->queryRaw() );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Would not produce useful country code anyway.
|
||||
delete handler;
|
||||
}
|
||||
}
|
||||
|
||||
QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last
|
||||
QString language = CalamaresUtils::getString( configurationMap, "languageIcon" );
|
||||
if ( !language.isEmpty() )
|
||||
{
|
||||
auto icon = Calamares::Branding::instance()->image( language, QSize( 48, 48 ) );
|
||||
if ( !icon.isNull() )
|
||||
{
|
||||
m_config->setLanguageIcon(language);
|
||||
}
|
||||
}
|
||||
|
||||
Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last
|
||||
setContextProperty( "Welcome", m_config );
|
||||
}
|
||||
|
||||
Calamares::RequirementsList
|
||||
WelcomeQmlViewStep::checkRequirements()
|
||||
{
|
||||
return m_requirementsChecker->checkRequirements();
|
||||
}
|
||||
|
||||
static inline void
|
||||
logGeoIPHandler( CalamaresUtils::GeoIP::Handler* handler )
|
||||
{
|
||||
if ( handler )
|
||||
{
|
||||
cDebug() << Logger::SubEntry << "Obtained from" << handler->url() << " ("
|
||||
<< static_cast< int >( handler->type() ) << handler->selector() << ')';
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
WelcomeQmlViewStep::setCountry( const QString& countryCode, CalamaresUtils::GeoIP::Handler* handler )
|
||||
{
|
||||
if ( countryCode.length() != 2 )
|
||||
{
|
||||
cDebug() << "Unusable country code" << countryCode;
|
||||
logGeoIPHandler( handler );
|
||||
return;
|
||||
}
|
||||
|
||||
auto c_l = CalamaresUtils::Locale::countryData( countryCode );
|
||||
if ( c_l.first == QLocale::Country::AnyCountry )
|
||||
{
|
||||
cDebug() << "Unusable country code" << countryCode;
|
||||
logGeoIPHandler( handler );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
int r = CalamaresUtils::Locale::availableTranslations()->find( countryCode );
|
||||
if ( r < 0 )
|
||||
{
|
||||
cDebug() << "Unusable country code" << countryCode << "(no suitable translation)";
|
||||
}
|
||||
if ( ( r >= 0 ) )
|
||||
{
|
||||
// TODO: update Config to point to selected language
|
||||
}
|
||||
}
|
||||
return m_requirementsChecker->checkRequirements();
|
||||
}
|
||||
|
||||
QObject*
|
||||
WelcomeQmlViewStep::getConfig()
|
||||
{
|
||||
return &m_config;
|
||||
return m_config;
|
||||
}
|
||||
|
||||
static inline void
|
||||
logGeoIPHandler( CalamaresUtils::GeoIP::Handler* handler )
|
||||
{
|
||||
if ( handler )
|
||||
{
|
||||
cDebug() << Logger::SubEntry << "Obtained from" << handler->url() << " ("
|
||||
<< static_cast< int >( handler->type() ) << handler->selector() << ')';
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
WelcomeQmlViewStep::setCountry( const QString& countryCode, CalamaresUtils::GeoIP::Handler* handler )
|
||||
{
|
||||
if ( countryCode.length() != 2 )
|
||||
{
|
||||
cDebug() << "Unusable country code" << countryCode;
|
||||
logGeoIPHandler( handler );
|
||||
return;
|
||||
}
|
||||
|
||||
auto c_l = CalamaresUtils::Locale::countryData( countryCode );
|
||||
if ( c_l.first == QLocale::Country::AnyCountry )
|
||||
{
|
||||
cDebug() << "Unusable country code" << countryCode;
|
||||
logGeoIPHandler( handler );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
int r = CalamaresUtils::Locale::availableTranslations()->find( countryCode );
|
||||
if ( r < 0 )
|
||||
{
|
||||
cDebug() << "Unusable country code" << countryCode << "(no suitable translation)";
|
||||
}
|
||||
if ( ( r >= 0 ) )
|
||||
{
|
||||
// TODO: update Config to point to selected language
|
||||
m_config->setCountryCode( countryCode );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,11 +21,12 @@
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
#include "DllMacro.h"
|
||||
#include "modulesystem/Requirement.h"
|
||||
#include "utils/PluginFactory.h"
|
||||
#include "viewpages/QmlViewStep.h"
|
||||
|
||||
#include <DllMacro.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QVariantMap>
|
||||
|
||||
@ -39,16 +40,26 @@ class Handler;
|
||||
|
||||
class GeneralRequirements;
|
||||
|
||||
// TODO: Needs a generic Calamares::QmlViewStep as base class
|
||||
// TODO: refactor and move what makes sense to base class
|
||||
class PLUGINDLLEXPORT WelcomeQmlViewStep : public Calamares::QmlViewStep
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
explicit WelcomeQmlViewStep( QObject* parent = nullptr );
|
||||
virtual ~WelcomeQmlViewStep() override;
|
||||
|
||||
QString prettyName() const override;
|
||||
|
||||
bool isNextEnabled() const override;
|
||||
bool isBackEnabled() const override;
|
||||
|
||||
bool isAtBeginning() const override;
|
||||
bool isAtEnd() const override;
|
||||
|
||||
Calamares::JobList jobs() const override;
|
||||
|
||||
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
||||
|
||||
/** @brief Sets the country that Calamares is running in.
|
||||
@ -60,13 +71,11 @@ public:
|
||||
void setCountry( const QString&, CalamaresUtils::GeoIP::Handler* handler );
|
||||
|
||||
Calamares::RequirementsList checkRequirements() override;
|
||||
|
||||
protected:
|
||||
QObject* getConfig() override;
|
||||
|
||||
private:
|
||||
// TODO: a generic QML viewstep should return a config object from a method
|
||||
Config m_config;
|
||||
Config *m_config;
|
||||
GeneralRequirements* m_requirementsChecker;
|
||||
};
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
# In addition to displaying the welcome page, this module
|
||||
# can check requirements for installation.
|
||||
---
|
||||
# Setting for QML loading
|
||||
qmlSearch: both
|
||||
# Display settings for various buttons on the welcome page.
|
||||
# The URLs themselves come from branding.desc is the setting
|
||||
# here is "true". If the setting is false, the button is hidden.
|
||||
|
@ -15,7 +15,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import calamares.ui 1.0
|
||||
import io.calamares.ui 1.0
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
Loading…
Reference in New Issue
Block a user