diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5f8c96777..d74148978 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -185,6 +185,22 @@ if( NOT PYTHONLIBS_FOUND OR NOT PYTHONQT_FOUND )
set( WITH_PYTHONQT OFF )
endif()
+### Transifex Translation status
+#
+# complete = 100% translated,
+# good = nearly complete (use own judgement, right now < 100 untranslated strings),
+# ok = incomplete (100 or more untranslated),
+# bad = 0% translated, placeholder in tx; these are not included.
+#
+# Language en (source language) is added later. It isn't listed in
+# Transifex either. Get the list of languages and their status
+# from https://transifex.com/calamares/calamares/ .
+set( _tx_complete ca zh_CN zh_TW hr cs_CZ da fr lt pt_BR pt_PT es tr_TR)
+set( _tx_good sq ja pl sk ro it_IT hu he ru id de nl )
+set( _tx_ok bg uk ast is ar sv el es_MX gl en_GB es_ES th fi_FI hi pl_PL
+ eu nb sr sl sr@latin mr es_PR kn kk et )
+set( _tx_bad fr_CH gu lo fa ur uz )
+
###
### Calamares application info
###
@@ -192,13 +208,14 @@ set( CALAMARES_ORGANIZATION_NAME "Calamares" )
set( CALAMARES_ORGANIZATION_DOMAIN "github.com/calamares" )
set( CALAMARES_APPLICATION_NAME "Calamares" )
set( CALAMARES_DESCRIPTION_SUMMARY "The distribution-independent installer framework" )
-set( CALAMARES_TRANSLATION_LANGUAGES ar ast bg ca cs_CZ da de el en en_GB es_MX es eu fr he hi hr hu id is it_IT ja lt mr nl pl pt_BR pt_PT ro ru sk sq sv th tr_TR zh_CN zh_TW )
+set( CALAMARES_TRANSLATION_LANGUAGES en ${_tx_complete} ${_tx_good} ${_tx_ok} )
+list( SORT CALAMARES_TRANSLATION_LANGUAGES )
### Bump version here
set( CALAMARES_VERSION_MAJOR 3 )
set( CALAMARES_VERSION_MINOR 2 )
set( CALAMARES_VERSION_PATCH 0 )
-set( CALAMARES_VERSION_RC 3 )
+set( CALAMARES_VERSION_RC 4 )
set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} )
set( CALAMARES_VERSION_SHORT "${CALAMARES_VERSION}" )
diff --git a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake
index 40c153ef7..f4eb349f2 100644
--- a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake
+++ b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake
@@ -54,8 +54,11 @@ include( CMakeColors )
# If SUBDIRECTORIES are given, then those are copied (each one level deep)
# to the installation location as well, preserving the subdirectory name.
function( calamares_add_branding NAME )
- set( _CABT_DIRECTORY "." )
cmake_parse_arguments( _CABT "" "DIRECTORY" "SUBDIRECTORIES" ${ARGN} )
+ if (NOT _CABT_DIRECTORY)
+ set(_CABT_DIRECTORY ".")
+ endif()
+
set( SUBDIRECTORY ${_CABT_DIRECTORY} )
set( _brand_dir ${_CABT_DIRECTORY} )
@@ -64,7 +67,6 @@ function( calamares_add_branding NAME )
foreach( _subdir "" ${_CABT_SUBDIRECTORIES} )
file( GLOB BRANDING_COMPONENT_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${_brand_dir} "${_brand_dir}/${_subdir}/*" )
- message(STATUS "${BRANDING_COMPONENT_FILES}")
foreach( BRANDING_COMPONENT_FILE ${BRANDING_COMPONENT_FILES} )
set( _subpath ${_brand_dir}/${BRANDING_COMPONENT_FILE} )
if( NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_subpath} )
@@ -93,8 +95,11 @@ endfunction()
# the lang/ dir is found in the given
instead of the current source
# directory.
function( calamares_add_branding_translations NAME )
- set( _CABT_DIRECTORY "." )
cmake_parse_arguments( _CABT "" "DIRECTORY" "" ${ARGN} )
+ if (NOT _CABT_DIRECTORY)
+ set(_CABT_DIRECTORY ".")
+ endif()
+
set( SUBDIRECTORY ${_CABT_DIRECTORY} )
set( _brand_dir ${_CABT_DIRECTORY} )
@@ -111,23 +116,33 @@ function( calamares_add_branding_translations NAME )
endif()
endfunction()
-# Usage calamares_add_branding_subdirectory( [SUBDIRECTORIES ...])
+# Usage calamares_add_branding_subdirectory( [NAME ] [SUBDIRECTORIES ...])
#
# Adds a branding component from a subdirectory:
-# - if there is a CMakeLists.txt, use that
-# - otherwise assume a "standard" setup with top-level files and a lang/ dir for translations
+# - if there is a CMakeLists.txt, use that (that CMakeLists.txt should
+# call suitable calamares_add_branding() and other macros to install
+# the branding component).
+# - otherwise assume a "standard" setup with top-level files and a lang/
+# subdirectory for translations.
+#
+# If NAME is given, this is used instead of as the name of
+# the branding component. This is needed if is more than
+# one level deep, or to rename a component as it gets installed.
#
# If SUBDIRECTORIES are given, they are relative to , and are
# copied (one level deep) to the install location as well.
function( calamares_add_branding_subdirectory SUBDIRECTORY )
- cmake_parse_arguments( _CABS "" "" "SUBDIRECTORIES" ${ARGN} )
+ cmake_parse_arguments( _CABS "" "NAME" "SUBDIRECTORIES" ${ARGN} )
+ if (NOT _CABS_NAME)
+ set(_CABS_NAME "${SUBDIRECTORY}")
+ endif()
if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/CMakeLists.txt" )
add_subdirectory( ${SUBDIRECTORY} )
elseif( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/branding.desc" )
- calamares_add_branding( ${SUBDIRECTORY} DIRECTORY ${SUBDIRECTORY} SUBDIRECTORIES ${_CABS_SUBDIRECTORIES} )
+ calamares_add_branding( ${_CABS_NAME} DIRECTORY ${SUBDIRECTORY} SUBDIRECTORIES ${_CABS_SUBDIRECTORIES} )
if( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/lang" )
- calamares_add_branding_translations( ${SUBDIRECTORY} DIRECTORY ${SUBDIRECTORY} )
+ calamares_add_branding_translations( ${_CABS_NAME} DIRECTORY ${SUBDIRECTORY} )
endif()
else()
message( "-- ${BoldYellow}Warning:${ColorReset} tried to add branding component subdirectory ${BoldRed}${SUBDIRECTORY}${ColorReset} which has no branding.desc." )
diff --git a/CMakeModules/CalamaresAddTranslations.cmake b/CMakeModules/CalamaresAddTranslations.cmake
index 63bf63189..f5dd8c50c 100644
--- a/CMakeModules/CalamaresAddTranslations.cmake
+++ b/CMakeModules/CalamaresAddTranslations.cmake
@@ -61,7 +61,7 @@ macro(add_calamares_translations language)
add_custom_command(
OUTPUT ${trans_outfile}
COMMAND "${Qt5Core_RCC_EXECUTABLE}"
- ARGS ${rcc_options} -name ${trans_file} -o ${trans_outfile} ${trans_infile}
+ ARGS ${rcc_options} --format-version 1 -name ${trans_file} -o ${trans_outfile} ${trans_infile}
MAIN_DEPENDENCY ${trans_infile}
DEPENDS ${QM_FILES}
)
diff --git a/calamares.desktop b/calamares.desktop
index fb7647a47..1bb0c0168 100644
--- a/calamares.desktop
+++ b/calamares.desktop
@@ -23,6 +23,10 @@ Categories=Qt;System;
+Name[bg]=Calamares
+Icon[bg]=calamares
+GenericName[bg]=Системен Инсталатор
+Comment[bg]=Calamares — Системен Инсталатор
Name[ca]=Calamares
Icon[ca]=calamares
GenericName[ca]=Instal·lador de sistema
diff --git a/lang/calamares_bg.ts b/lang/calamares_bg.ts
index 18fe9de6c..f9aceecf9 100644
--- a/lang/calamares_bg.ts
+++ b/lang/calamares_bg.ts
@@ -178,7 +178,7 @@
- Отказ от инсталацията без промяна на системата
+ Отказ от инсталацията без промяна на системата.
@@ -525,7 +525,7 @@ The installer will quit and all changes will be lost.
-
+ LVM LV име
@@ -565,7 +565,7 @@ The installer will quit and all changes will be lost.
- Точкака на монтиране вече се използва. Моля изберете друга.
+ Точката за монтиране вече се използва. Моля изберете друга.
@@ -692,7 +692,7 @@ The installer will quit and all changes will be lost.
- Не може да бъе добавен потребител %1 към групи: %2.
+ Не може да се добави потребител %1 към групи: %2.
@@ -789,7 +789,7 @@ The installer will quit and all changes will be lost.
-
+ Неуспешно отваряне на %1
@@ -797,7 +797,7 @@ The installer will quit and all changes will be lost.
-
+ Фиктивна С++ задача
@@ -855,7 +855,7 @@ The installer will quit and all changes will be lost.
- Точкака на монтиране вече се използва. Моля изберете друга.
+ Точката за монтиране вече се използва. Моля изберете друга.
@@ -883,7 +883,7 @@ The installer will quit and all changes will be lost.
-
+ Моля, въведете еднаква парола в двете полета.
@@ -1003,7 +1003,7 @@ The installer will quit and all changes will be lost.
-
+ Моля, инсталирайте KDE Konsole и опитайте отново!
@@ -1060,7 +1060,7 @@ The installer will quit and all changes will be lost.
-
+ &ОК
@@ -1146,7 +1146,7 @@ The installer will quit and all changes will be lost.
-
+ Системният език ще бъде %1.
@@ -1204,7 +1204,7 @@ The installer will quit and all changes will be lost.
-
+ Описание
@@ -1222,7 +1222,7 @@ The installer will quit and all changes will be lost.
-
+ Избор на пакети
@@ -1230,17 +1230,17 @@ The installer will quit and all changes will be lost.
-
+ Паролата е твърде кратка
-
+ Паролата е твърде дълга
-
+ Паролата е твърде слаба
@@ -1255,12 +1255,12 @@ The installer will quit and all changes will be lost.
-
+ Паролата съвпада с предишната
-
+ Паролата е палиндром
@@ -1270,7 +1270,7 @@ The installer will quit and all changes will be lost.
-
+ Паролата е твърде сходна с предишната
@@ -1335,7 +1335,7 @@ The installer will quit and all changes will be lost.
-
+ Паролата е твърде кратка
@@ -1385,7 +1385,7 @@ The installer will quit and all changes will be lost.
-
+ Липсва парола
@@ -1465,7 +1465,7 @@ The installer will quit and all changes will be lost.
-
+ Неизвестна грешка
@@ -2151,7 +2151,7 @@ Output:
-
+ Неуспешно записване на клавиатурна конфигурация в съществуващата директория /etc/default.
@@ -2164,12 +2164,12 @@ Output:
-
+ Задай флагове на дял %1MB %2.
-
+ Задай флагове на нов дял.
@@ -2179,12 +2179,12 @@ Output:
-
+ Изчисти флагове на дял %1MB <strong>%2</strong>.
-
+ Изчисти флагове на нов дял.
@@ -2194,12 +2194,12 @@ Output:
-
+ Сложи флаг на дял %1MB <strong>%2</strong> като <strong>%3</strong>.
-
+ Сложи флаг на новия дял като <strong>%1</strong>.
@@ -2209,12 +2209,12 @@ Output:
-
+ Изчистване флаговете на дял %1MB <strong>%2</strong>.
-
+ Изчистване на флаговете на новия дял.
@@ -2224,12 +2224,12 @@ Output:
-
+ Задаване на флагове <strong>%3</strong> на дял %1MB <strong>%2</strong>.
-
+ Задаване на флагове <strong>%1</strong> на новия дял.
@@ -2423,7 +2423,7 @@ Output:
-
+ ...
diff --git a/lang/calamares_ca.ts b/lang/calamares_ca.ts
index c9f76e58e..84243b5ec 100644
--- a/lang/calamares_ca.ts
+++ b/lang/calamares_ca.ts
@@ -9,12 +9,12 @@
- Aquest sistema s'ha iniciat amb un entorn d'arrencada <strong>EFI</strong>. <br><br> Per configurar una arrencada des d'un entorn EFI, aquest instal·lador ha de desplegar una aplicació de càrrega d'arrencada, com ara el <strong>GRUB</strong> o el <strong>systemd-boot</strong> en una <strong>partició EFI del sistema</strong>. Això és automàtic, llevat que trieu un partiment manual, en què caldrà que ho configureu vosaltres mateixos.
+ Aquest sistema s'ha iniciat amb un entorn d'arrencada <strong>EFI</strong>. <br><br> Per configurar una arrencada des d'un entorn EFI, aquest instal·lador ha de desplegar una aplicació de càrrega d'arrencada, com ara el <strong>GRUB</strong> o el <strong>systemd-boot</strong> en una <strong>partició EFI del sistema</strong>. Això és automàtic, llevat que trieu fer les particions manualment, en què caldrà que ho configureu vosaltres mateixos.
- Aquest sistema s'ha iniciat amb un entorn d'arrencada <strong>BIOS </strong>. Per configurar una arrencada des d'un entorn BIOS, aquest instal·lador ha d'instal·lar un carregador d'arrencada, com ara el <strong>GRUB</strong>, ja sigui al començament d'una partició o al <strong>Registre d'Arrencada Mestre</strong>, a prop del començament de la taula de particions (millor). Això és automàtic, llevat que trieu un partiment manual, en què caldrà que ho configureu pel vostre compte.
+ Aquest sistema s'ha iniciat amb un entorn d'arrencada <strong>BIOS </strong>. Per configurar una arrencada des d'un entorn BIOS, aquest instal·lador ha d'instal·lar un carregador d'arrencada, com ara el <strong>GRUB</strong>, ja sigui al començament d'una partició o al <strong>Registre d'Arrencada Mestre</strong>, a prop del començament de la taula de particions (millor). Això és automàtic, llevat que trieu fer les particions manualment, en què caldrà que ho configureu pel vostre compte.
@@ -327,7 +327,7 @@ L'instal·lador es tancarà i tots els canvis es perdran.
- <strong>Partiment manual</strong><br/>Podeu crear o redimensionar les particions vosaltres mateixos.
+ <strong>Particions manuals</strong><br/>Podeu crear o redimensionar les particions vosaltres mateixos.
@@ -370,7 +370,7 @@ L'instal·lador es tancarà i tots els canvis es perdran.
- No s'ha pogut trobar enlloc una partició EFI en aquest sistema. Si us plau, torneu enrere i useu el partiment manual per configurar %1.
+ No s'ha pogut trobar enlloc una partició EFI en aquest sistema. Si us plau, torneu enrere i use les particions manuals per configurar %1.
@@ -1711,7 +1711,7 @@ L'instal·lador es tancarà i tots els canvis es perdran.
- Partiment <strong>manual</strong>.
+ Particions <strong>manuals</strong>.
@@ -1731,7 +1731,7 @@ L'instal·lador es tancarà i tots els canvis es perdran.
- Partiment <strong>manual</strong> del disc <strong>%1</strong> (%2).
+ Particions <strong>manuals</strong> del disc <strong>%1</strong> (%2).
@@ -1982,7 +1982,7 @@ Sortida:
- <strong>%2</strong><br/><br/>No es pot trobar cap partició EFI enlloc del sistema. Si us plau, torneu enrere i useu el partiment manual per establir %1.
+ <strong>%2</strong><br/><br/>No es pot trobar cap partició EFI enlloc del sistema. Si us plau, torneu enrere i useu les particions manuals per establir %1.
diff --git a/lang/calamares_da.ts b/lang/calamares_da.ts
index c1122d135..38eed0dd4 100644
--- a/lang/calamares_da.ts
+++ b/lang/calamares_da.ts
@@ -1274,7 +1274,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.
- Adgangskoden indeholde i nogen form brugernavnet
+ Adgangskoden indeholder i nogen form brugernavnet
@@ -1289,12 +1289,12 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.
- Adgangskoden indeholder færre end %1 tal
+ Adgangskoden indeholder færre end %1 cifre
- Adgangskoden indeholder for få tal
+ Adgangskoden indeholder for få cifre
@@ -1419,7 +1419,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.
- Dårlig heltalsværdi til indstilling - %1
+ Ugyldig heltalsværdi til indstilling - %1
@@ -1845,7 +1845,7 @@ Output:
- Kommandoen <i>%1</i> holdet op med at virke.
+ Kommandoen <i>%1</i> holdte op med at virke.
@@ -1860,7 +1860,7 @@ Output:
- Intern kommando ved start af kommando.
+ Intern fejl ved start af kommando.
diff --git a/lang/calamares_nb.ts b/lang/calamares_nb.ts
index 1f4c25f0d..ec19dfe68 100644
--- a/lang/calamares_nb.ts
+++ b/lang/calamares_nb.ts
@@ -42,7 +42,7 @@
-
+ %1 (%2)
@@ -120,7 +120,7 @@
-
+ Kjører kommando %1 %2
@@ -195,17 +195,17 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ &Ja
-
+ &Nei
-
+ &Lukk
@@ -230,12 +230,12 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ &Ferdig
-
+ Installasjonen er fullført. Lukk installeringsprogrammet.
@@ -289,7 +289,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Denne datamaskinen oppfyller ikke minimumskravene for installering %1.<br/> Installeringen kan ikke fortsette. <a href="#details">Detaljer..</a>
@@ -309,7 +309,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Systemkrav
@@ -327,7 +327,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ <strong>Manuell partisjonering</strong><br/>Du kan opprette eller endre størrelse på partisjoner selv.
@@ -460,7 +460,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
- Klarer ikke å få tak i listen over midlertidige monterte disker.
+ Klarte ikke å få tak i listen over midlertidige monterte disker.
@@ -656,7 +656,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Oppretter bruker %1.
@@ -681,7 +681,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
- Klarte ikke å opprette bruker %1
+ Klarte ikke opprette bruker %1
@@ -938,7 +938,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ &Start på nytt nå
@@ -948,7 +948,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ <h1>Innnstallasjonen mislyktes</h1><br/>%1 har ikke blitt installert på datamaskinen din.<br/>Feilmeldingen var: %2.
@@ -961,12 +961,12 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Installasjon fullført
-
+ Installasjonen av %1 er fullført.
@@ -984,7 +984,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Formaterer partisjon %1 med filsystem %2.
@@ -1023,12 +1023,12 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Sett tastaturmodell til %1.<br/>
-
+ Sett tastaturoppsett til %1/%2.
@@ -1059,7 +1059,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ &OK
@@ -1098,18 +1098,18 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
%1 is an untranslatable product name, example: Creative Audigy driver
-
+ <strong>%1 driver</strong><br/>fra %2%1 is usually a vendor name, example: Nvidia graphics driver
-
+ <strong>%1 grafikkdriver</strong><br/><font color="Grey">fra %2</font>
-
+ <strong>%1 nettlesertillegg</strong><br/><font color="Grey">fra %2</font>
@@ -1124,7 +1124,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ <strong>%1</strong><br/><font color="Grey">fra %2</font>
@@ -1137,7 +1137,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Lisens
@@ -1166,7 +1166,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ &Endre...
@@ -1177,7 +1177,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
Language (Country)
-
+ %1 (%2)
@@ -1229,17 +1229,17 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Passordet er for kort
-
+ Passordet er for langt
-
+ Passordet er for svakt
@@ -1254,7 +1254,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Passordet er det samme som det gamle
@@ -1269,7 +1269,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Passordet likner for mye på det gamle
@@ -1299,22 +1299,22 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Passordet inneholder mindre enn %1 store bokstaver
-
+ Passordet inneholder for få store bokstaver
-
+ Passordet inneholder mindre enn %1 små bokstaver
-
+ Passordet inneholder for få små bokstaver
@@ -1334,7 +1334,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Passordet er for kort
@@ -1359,7 +1359,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Passordet inneholder for mange like tegn etter hverandre
@@ -1444,7 +1444,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Innstillingen er ikke av type streng
@@ -1464,7 +1464,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Ukjent feil
@@ -1477,12 +1477,12 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Tastaturmodell:
-
+ Skriv her for å teste tastaturet ditt
@@ -1495,12 +1495,12 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt.
-
+ Hva heter du?
-
+ Hvilket navn vil du bruke for å logge inn?
@@ -1890,13 +1890,13 @@ Output:
-
+ Standard tastaturmodell
-
+ Standard
@@ -1954,7 +1954,7 @@ Output:
-
+ %1 kan ikke bli installert på denne partisjonen.
@@ -2029,22 +2029,22 @@ Output:
-
+ er koblet til en strømkilde
-
+ Systemet er ikke koblet til en strømkilde.
-
+ er tilkoblet Internett
-
+ Systemet er ikke tilkoblet Internett.
@@ -2114,7 +2114,7 @@ Output:
-
+ Intern feil
@@ -2314,7 +2314,7 @@ Output:
-
+ Klarte ikke åpne /etc/timezone for skriving
@@ -2463,7 +2463,7 @@ Output:
-
+ Brukernavnet ditt er for langt.
@@ -2497,7 +2497,7 @@ Output:
-
+ Brukere
@@ -2510,7 +2510,7 @@ Output:
-
+ &Språk:
@@ -2530,7 +2530,7 @@ Output:
-
+ &Om
@@ -2563,7 +2563,7 @@ Output:
-
+ Velkommen
\ No newline at end of file
diff --git a/lang/calamares_pt_BR.ts b/lang/calamares_pt_BR.ts
index 1caabe62b..ea326e6a6 100644
--- a/lang/calamares_pt_BR.ts
+++ b/lang/calamares_pt_BR.ts
@@ -9,12 +9,12 @@
- Este sistema foi iniciado com um ambiente de inicialização <strong>EFI</strong>.<br><br>Para configurar o início a partir de um ambiente EFI, este instalador deverá instalar um gerenciador de inicialização, como o <strong>GRUB</strong> ou <strong>systemd-boot</strong> em uma <strong>Partição de Sistema EFI</strong>. Este processo é automático, a não ser que escolha o particionamento manual, que no caso permite-lhe escolher ou criá-lo manualmente.
+ Este sistema foi iniciado com um ambiente de inicialização <strong>EFI</strong>.<br><br>Para configurar o início a partir de um ambiente EFI, este instalador deverá instalar um gerenciador de inicialização, como o <strong>GRUB</strong> ou <strong>systemd-boot</strong> em uma <strong>Partição de Sistema EFI</strong>. Esse processo é automático, a não ser que escolha o particionamento manual, que no caso fará você escolher ou criar o gerenciador de inicialização por conta própria.
- Este sistema foi iniciado utilizando o <strong>BIOS</strong> como ambiente de inicialização.<br><br>Para configurar a inicialização em um ambiente BIOS, este instalador deve instalar um gerenciador de boot, como o <strong>GRUB</strong>, no começo de uma partição ou no <strong>Master Boot Record</strong>, perto do começo da tabela de partições (recomendado). Este processo é automático, a não ser que você escolha o particionamento manual, onde você deverá configurá-lo manualmente.
+ Este sistema foi iniciado utilizando o <strong>BIOS</strong> como ambiente de inicialização.<br><br>Para configurar a inicialização em um ambiente BIOS, este instalador deve instalar um gerenciador de boot, como o <strong>GRUB</strong>, no começo de uma partição ou no <strong>Master Boot Record</strong>, perto do começo da tabela de partições (recomendado). Esse processo é automático, a não ser que você escolha o particionamento manual, onde você deverá configurá-lo manualmente.
@@ -387,7 +387,7 @@ A instalação pode continuar, mas alguns recursos podem ser desativados.
- Parece que não há um sistema operacional neste dispositivo. O que você gostaria de fazer?<br/>Você poderá revisar e confirmar suas opções antes que as alterações sejam feitas no dispositivo de armazenamento.
+ Parece que não há um sistema operacional neste dispositivo de armazenamento. O que você gostaria de fazer?<br/>Você poderá revisar e confirmar suas opções antes que as alterações sejam feitas no dispositivo de armazenamento.
@@ -1514,7 +1514,7 @@ A instalação pode continuar, mas alguns recursos podem ser desativados.
- <small>Se mais de uma pessoa usará este computador, você pode definir múltiplas contas após a instalação.</small>
+ <small>Se mais de uma pessoa utilizará este computador, você pode definir múltiplas contas após a instalação.</small>
@@ -1534,7 +1534,7 @@ A instalação pode continuar, mas alguns recursos podem ser desativados.
- <small>Este nome será usado caso você deixe o computador visível a outros na rede.</small>
+ <small>Esse nome será usado caso você deixe o computador visível a outros na rede.</small>
diff --git a/lang/calamares_tr_TR.ts b/lang/calamares_tr_TR.ts
index 5c4afeb74..1e028db31 100644
--- a/lang/calamares_tr_TR.ts
+++ b/lang/calamares_tr_TR.ts
@@ -1242,232 +1242,232 @@ Kuruluma devam edebilirsiniz fakat bazı özellikler devre dışı kalabilir.
-
+ Şifre çok zayıf
-
+ '%1' ayarlanırken bellek ayırma hatası
-
+ Bellek ayırma hatası
-
+ Şifre eski şifreyle aynı
-
+ Parola eskilerden birinin ters okunuşu olabilir
-
+ Parola sadece vaka değişiklikleri ile farklılık gösterir
-
+ Parola eski parolaya çok benzer
-
+ Parola kullanıcı adını bir biçimde içeriyor
-
+ Şifre, kullanıcının gerçek adına ait kelimeleri bazı biçimde içerir
-
+ Şifre, bazı biçimde yasak kelimeler içeriyor
-
+ Şifre %1 den az hane içeriyor
-
+ Parola çok az basamak içeriyor
-
+ Parola %1 den az büyük harf içeriyor
-
+ Parola çok az harf içermektedir
-
+ Parola %1 den daha küçük harf içermektedir
-
+ Parola çok az küçük harf içeriyor
-
+ Şifre %1 den az alfasayısal olmayan karakter içeriyor
-
+ Parola çok az sayıda alfasayısal olmayan karakter içeriyor
-
+ Parola %1 karakterden kısa
-
+ Parola çok kısa
-
+ Şifre önceden kullanıldı
-
+ Parola %1 den az karakter sınıfı içeriyor
-
+ Parola yeterli sayıda karakter sınıfı içermiyor
-
+ Şifre, %1 den fazla aynı karakteri ardışık olarak içeriyor
-
+ Parola ardışık olarak aynı sayıda çok karakter içeriyor
-
+ Parola, aynı sınıftan %1 den fazla karakter ardışık olarak içeriyor
-
+ Parola aynı sınıfta çok fazla karakter içeriyor
-
+ Şifre, %1 karakterden daha uzun monoton dizilim içeriyor
-
+ Parola çok uzun monoton karakter dizisi içeriyor
-
+ Parola sağlanmadı
-
+ RNG cihazından rastgele sayılar elde edemiyor
-
+ Şifre üretimi başarısız oldu - ayarlar için entropi çok düşük gerekli
-
+ Parola, sözlüğü kontrolü başarısız - %1
-
+ Parola, sözlük onayı başarısız
-
+ Bilinmeyen ayar - %1
-
+ Bilinmeyen ayar
-
+ Ayarın bozuk tam sayı değeri - %1
-
+ Yanlış tamsayı değeri
-
+ %1 ayarı tamsayı tipi değil
-
+ Ayar tamsayı tipi değil
-
+ Ayar %1, dize tipi değil
-
+ Ayar, dize tipi değil
-
+ Yapılandırma dosyasını açma başarısız oldu
-
+ Yapılandırma dosyası hatalı biçimlendirildi
-
+ Ölümcül arıza
-
+ Bilinmeyen hata
@@ -1829,7 +1829,8 @@ Kuruluma devam edebilirsiniz fakat bazı özellikler devre dışı kalabilir.
-
+
+Komut çıktısı yok.
diff --git a/lang/python/bg/LC_MESSAGES/python.mo b/lang/python/bg/LC_MESSAGES/python.mo
index 98846ddf8..20ac27ce5 100644
Binary files a/lang/python/bg/LC_MESSAGES/python.mo and b/lang/python/bg/LC_MESSAGES/python.mo differ
diff --git a/lang/python/bg/LC_MESSAGES/python.po b/lang/python/bg/LC_MESSAGES/python.po
index c64d4dc1c..a86edb07c 100644
--- a/lang/python/bg/LC_MESSAGES/python.po
+++ b/lang/python/bg/LC_MESSAGES/python.po
@@ -10,6 +10,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-07 18:58+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Georgi Georgiev , 2018\n"
"Language-Team: Bulgarian (https://www.transifex.com/calamares/teams/20061/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -36,18 +37,18 @@ msgstr ""
#: src/modules/packages/main.py:62 src/modules/packages/main.py:72
msgid "Install packages."
-msgstr ""
+msgstr "Инсталирай пакетите."
#: src/modules/packages/main.py:65
#, python-format
msgid "Installing one package."
msgid_plural "Installing %(num)d packages."
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "Инсталиране на един пакет."
+msgstr[1] "Инсталиране на %(num)d пакети."
#: src/modules/packages/main.py:68
#, python-format
msgid "Removing one package."
msgid_plural "Removing %(num)d packages."
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "Премахване на един пакет."
+msgstr[1] "Премахване на %(num)d пакети."
diff --git a/lang/python/ru/LC_MESSAGES/python.mo b/lang/python/ru/LC_MESSAGES/python.mo
index ffbafcfcc..493a6c00b 100644
Binary files a/lang/python/ru/LC_MESSAGES/python.mo and b/lang/python/ru/LC_MESSAGES/python.mo differ
diff --git a/lang/python/ru/LC_MESSAGES/python.po b/lang/python/ru/LC_MESSAGES/python.po
index 4a0bbf4d8..374ec2773 100644
--- a/lang/python/ru/LC_MESSAGES/python.po
+++ b/lang/python/ru/LC_MESSAGES/python.po
@@ -10,6 +10,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-07 18:58+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Aleksey Kabanov , 2018\n"
"Language-Team: Russian (https://www.transifex.com/calamares/teams/20061/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -32,7 +33,7 @@ msgstr ""
#: src/modules/packages/main.py:60
#, python-format
msgid "Processing packages (%(count)d / %(total)d)"
-msgstr ""
+msgstr "Обработка пакетов (%(count)d / %(total)d)"
#: src/modules/packages/main.py:62 src/modules/packages/main.py:72
msgid "Install packages."
diff --git a/lang/python/tr_TR/LC_MESSAGES/python.mo b/lang/python/tr_TR/LC_MESSAGES/python.mo
index a95ca03ad..fa297fff9 100644
Binary files a/lang/python/tr_TR/LC_MESSAGES/python.mo and b/lang/python/tr_TR/LC_MESSAGES/python.mo differ
diff --git a/lang/python/tr_TR/LC_MESSAGES/python.po b/lang/python/tr_TR/LC_MESSAGES/python.po
index 9c7d98b8f..2acfdf7f9 100644
--- a/lang/python/tr_TR/LC_MESSAGES/python.po
+++ b/lang/python/tr_TR/LC_MESSAGES/python.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: tr_TR\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: src/modules/dummypython/main.py:44
msgid "Dummy python job."
@@ -44,9 +44,11 @@ msgstr "Paketleri yükle"
msgid "Installing one package."
msgid_plural "Installing %(num)d packages."
msgstr[0] "%(num)d paket yükleniyor"
+msgstr[1] "%(num)d paket yükleniyor"
#: src/modules/packages/main.py:68
#, python-format
msgid "Removing one package."
msgid_plural "Removing %(num)d packages."
msgstr[0] "%(num)d paket kaldırılıyor."
+msgstr[1] "%(num)d paket kaldırılıyor."
diff --git a/src/calamares/CalamaresApplication.cpp b/src/calamares/CalamaresApplication.cpp
index f606bb78b..2bb0af8df 100644
--- a/src/calamares/CalamaresApplication.cpp
+++ b/src/calamares/CalamaresApplication.cpp
@@ -44,7 +44,12 @@ CalamaresApplication::CalamaresApplication( int& argc, char* argv[] )
, m_moduleManager( nullptr )
, m_debugMode( false )
{
- setOrganizationName( QLatin1String( CALAMARES_ORGANIZATION_NAME ) );
+ // Setting the organization name makes the default cache
+ // directory -- where Calamares stores logs, for instance --
+ // //, so we end up with ~/.cache/Calamares/calamares/
+ // which is excessively squidly.
+ //
+ // setOrganizationName( QLatin1String( CALAMARES_ORGANIZATION_NAME ) );
setOrganizationDomain( QLatin1String( CALAMARES_ORGANIZATION_DOMAIN ) );
setApplicationName( QLatin1String( CALAMARES_APPLICATION_NAME ) );
setApplicationVersion( QLatin1String( CALAMARES_VERSION ) );
@@ -65,9 +70,6 @@ CalamaresApplication::CalamaresApplication( int& argc, char* argv[] )
void
CalamaresApplication::init()
{
- cDebug() << "CalamaresApplication thread:" << thread();
-
- //TODO: Icon loader
Logger::setupLogfile();
setQuitOnLastWindowClosed( false );
diff --git a/src/libcalamares/CMakeLists.txt b/src/libcalamares/CMakeLists.txt
index 2a1cfeb20..cbc049ac6 100644
--- a/src/libcalamares/CMakeLists.txt
+++ b/src/libcalamares/CMakeLists.txt
@@ -18,6 +18,7 @@ set( libSources
Job.cpp
JobQueue.cpp
ProcessJob.cpp
+ Settings.cpp
)
set( utilsSources
utils/CalamaresUtils.cpp
@@ -26,6 +27,7 @@ set( utilsSources
utils/Logger.cpp
utils/PluginFactory.cpp
utils/Retranslator.cpp
+ utils/YamlUtils.cpp
)
set( kdsagSources
kdsingleapplicationguard/kdsingleapplicationguard.cpp
@@ -88,8 +90,11 @@ set_target_properties( calamares
)
target_link_libraries( calamares
- LINK_PRIVATE ${OPTIONAL_PRIVATE_LIBRARIES}
- LINK_PUBLIC Qt5::Core
+ LINK_PRIVATE
+ ${OPTIONAL_PRIVATE_LIBRARIES}
+ LINK_PUBLIC
+ ${YAMLCPP_LIBRARY}
+ Qt5::Core
)
install( TARGETS calamares
diff --git a/src/libcalamares/JobQueue.cpp b/src/libcalamares/JobQueue.cpp
index b5bdf0543..339fd8457 100644
--- a/src/libcalamares/JobQueue.cpp
+++ b/src/libcalamares/JobQueue.cpp
@@ -54,7 +54,7 @@ public:
for( auto job : m_jobs )
{
emitProgress();
- cLog() << "Starting job" << job->prettyName();
+ cDebug() << "Starting job" << job->prettyName();
connect( job.data(), &Job::progress, this, &JobThread::emitProgress );
JobResult result = job->exec();
if ( !result )
diff --git a/src/libcalamaresui/Settings.cpp b/src/libcalamares/Settings.cpp
similarity index 100%
rename from src/libcalamaresui/Settings.cpp
rename to src/libcalamares/Settings.cpp
diff --git a/src/libcalamaresui/Settings.h b/src/libcalamares/Settings.h
similarity index 100%
rename from src/libcalamaresui/Settings.h
rename to src/libcalamares/Settings.h
diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp
index 54243553a..cb4bbd66a 100644
--- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp
+++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp
@@ -20,8 +20,9 @@
#include "CalamaresUtilsSystem.h"
#include "utils/Logger.h"
-#include "JobQueue.h"
#include "GlobalStorage.h"
+#include "JobQueue.h"
+#include "Settings.h"
#include
#include
@@ -173,7 +174,7 @@ System::runCommand(
if ( !process.waitForFinished( timeoutSec ? ( timeoutSec * 1000 ) : -1 ) )
{
- cWarning() << "Timed out. output so far:\n" <<
+ cWarning().noquote().nospace() << "Timed out. Output so far:\n" <<
process.readAllStandardOutput();
return -4;
}
@@ -182,16 +183,16 @@ System::runCommand(
if ( process.exitStatus() == QProcess::CrashExit )
{
- cWarning() << "Process crashed";
+ cWarning().noquote().nospace() << "Process crashed. Output so far:\n" << output;
return -1;
}
auto r = process.exitCode();
cDebug() << "Finished. Exit code:" << r;
- if ( r != 0 )
+ if ( ( r != 0 ) || Calamares::Settings::instance()->debugMode() )
{
cDebug() << "Target cmd:" << args;
- cDebug().noquote() << "Target output:\n" << output;
+ cDebug().noquote().nospace() << "Target output:\n" << output;
}
return ProcessResult(r, output);
}
diff --git a/src/libcalamares/utils/Logger.cpp b/src/libcalamares/utils/Logger.cpp
index fe95ad36b..0a13881d3 100644
--- a/src/libcalamares/utils/Logger.cpp
+++ b/src/libcalamares/utils/Logger.cpp
@@ -31,6 +31,7 @@
#include
#include "utils/CalamaresUtils.h"
+#include "CalamaresVersion.h"
#define LOGFILE_SIZE 1024 * 256
@@ -85,7 +86,7 @@ log( const char* msg, unsigned int debugLevel, bool toDisk = true )
}
-void
+static void
CalamaresLogHandler( QtMsgType type, const QMessageLogContext& context, const QString& msg )
{
static QMutex s_mutex;
@@ -115,10 +116,10 @@ CalamaresLogHandler( QtMsgType type, const QMessageLogContext& context, const QS
}
-QString
+static QString
logFile()
{
- return CalamaresUtils::appLogDir().filePath( "Calamares.log" );
+ return CalamaresUtils::appLogDir().filePath( "session.log" );
}
@@ -145,9 +146,18 @@ setupLogfile()
}
}
+ // Since the log isn't open yet, this probably only goes to stdout
cDebug() << "Using log file:" << logFile();
+ // Lock while (re-)opening the logfile
+ {
+ QMutexLocker lock( &s_mutex );
logfile.open( logFile().toLocal8Bit(), std::ios::app );
+ if ( logfile.tellp() )
+ logfile << "\n\n" << std::endl;
+ logfile << "=== START CALAMARES " << CALAMARES_VERSION << std::endl;
+ }
+
qInstallMessageHandler( CalamaresLogHandler );
}
@@ -167,4 +177,22 @@ CDebug::~CDebug()
{
}
+const char* continuation = "\n ";
+
+QString toString( const QVariant& v )
+{
+ auto t = v.type();
+
+ if ( t == QVariant::List )
+ {
+ QStringList s;
+ auto l = v.toList();
+ for ( auto lit = l.constBegin(); lit != l.constEnd(); ++lit )
+ s << lit->toString();
+ return s.join(", ");
+ }
+ else
+ return v.toString();
+}
+
} // namespace
diff --git a/src/libcalamares/utils/Logger.h b/src/libcalamares/utils/Logger.h
index b6211c4fe..f7488b553 100644
--- a/src/libcalamares/utils/Logger.h
+++ b/src/libcalamares/utils/Logger.h
@@ -2,7 +2,7 @@
*
* Copyright 2010-2011, Christian Muehlhaeuser
* Copyright 2014, Teo Mrnjavac
- * Copyright 2017, Adriaan de Groot
+ * Copyright 2017-2018, Adriaan de Groot
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,6 +27,8 @@
namespace Logger
{
+ extern const char* continuation;
+
enum
{
LOG_DISABLE = 0,
@@ -41,7 +43,7 @@ namespace Logger
class DLLEXPORT CLog : public QDebug
{
public:
- CLog( unsigned int debugLevel = 0 );
+ explicit CLog( unsigned int debugLevel );
virtual ~CLog();
private:
@@ -54,13 +56,22 @@ namespace Logger
public:
CDebug( unsigned int debugLevel = LOGDEBUG ) : CLog( debugLevel )
{
+ if ( debugLevel <= LOGERROR )
+ *this << "ERROR:";
+ else if ( debugLevel <= LOGWARNING )
+ *this << "WARNING:";
}
virtual ~CDebug();
};
- DLLEXPORT void CalamaresLogHandler( QtMsgType type, const QMessageLogContext& context, const QString& msg );
+ /**
+ * @brief Start logging to the log file.
+ *
+ * Call this (once) to start logging to the log file (usually
+ * ~/.cache/calamares/session.log ). An existing log file is
+ * rolled over if it is too large.
+ */
DLLEXPORT void setupLogfile();
- DLLEXPORT QString logFile();
/**
* @brief Set a log level for future logging.
@@ -72,11 +83,101 @@ namespace Logger
* Practical values are 0, 1, 2, and 6.
*/
DLLEXPORT void setupLogLevel( unsigned int level );
+
+ /**
+ * @brief Row-oriented formatted logging.
+ *
+ * Use DebugRow to produce multiple rows of 2-column output
+ * in a debugging statement. For instance,
+ * cDebug() << DebugRow(1,12)
+ * << DebugRow(2,24)
+ * will produce a single timestamped debug line with continuations.
+ * Each DebugRow produces one line of output, with the two values.
+ */
+ template
+ struct DebugRow
+ {
+ public:
+ explicit DebugRow(const T& t, const U& u)
+ : first(t)
+ , second(u)
+ {}
+
+ const T& first;
+ const U& second;
+ } ;
+
+ /**
+ * @brief List-oriented formatted logging.
+ *
+ * Use DebugList to produce multiple rows of output in a debugging
+ * statement. For instance,
+ * cDebug() << DebugList( QStringList() << "foo" << "bar" )
+ * will produce a single timestamped debug line with continuations.
+ * Each element of the list of strings will be logged on a separate line.
+ */
+ struct DebugList
+ {
+ explicit DebugList( const QStringList& l )
+ : list(l)
+ {}
+
+ const QStringList& list;
+ } ;
+
+ /**
+ * @brief Map-oriented formatted logging.
+ *
+ * Use DebugMap to produce multiple rows of output in a debugging
+ * statement from a map. The output is intentionally a bit-yaml-ish.
+ * cDebug() << DebugMap( map )
+ * will produce a single timestamped debug line with continuations.
+ * The continued lines will have a key (from the map) and a value
+ * on each line.
+ */
+ struct DebugMap
+ {
+ public:
+ explicit DebugMap(const QVariantMap& m)
+ : map( m )
+ {}
+
+ const QVariantMap& map;
+ } ;
+
+ /** @brief output operator for DebugRow */
+ template
+ inline QDebug&
+ operator <<( QDebug& s, const DebugRow& t )
+ {
+ s << continuation << t.first << ':' << ' ' << t.second;
+ return s;
+ }
+
+ /** @brief output operator for DebugList */
+ inline QDebug&
+ operator <<( QDebug& s, const DebugList& c )
+ {
+ for( const auto& i : c.list )
+ s << continuation << i;
+ return s;
+ }
+
+ /** @brief supporting method for outputting a DebugMap */
+ QString toString( const QVariant& v );
+
+ /** @brief output operator for DebugMap */
+ inline QDebug&
+ operator <<( QDebug& s, const DebugMap& t )
+ {
+ for ( auto it = t.map.constBegin(); it != t.map.constEnd(); ++it )
+ s << continuation << it.key().toUtf8().constData() << ':' << ' ' << toString( it.value() ).toUtf8().constData();
+ return s;
+ }
}
-#define cLog Logger::CLog
#define cDebug Logger::CDebug
-#define cWarning() Logger::CDebug(Logger::LOGWARNING) << "WARNING:"
-#define cError() Logger::CDebug(Logger::LOGERROR) << "ERROR:"
+#define cWarning() Logger::CDebug(Logger::LOGWARNING)
+#define cError() Logger::CDebug(Logger::LOGERROR)
#endif // CALAMARES_LOGGER_H
diff --git a/src/libcalamaresui/utils/YamlUtils.cpp b/src/libcalamares/utils/YamlUtils.cpp
similarity index 100%
rename from src/libcalamaresui/utils/YamlUtils.cpp
rename to src/libcalamares/utils/YamlUtils.cpp
diff --git a/src/libcalamaresui/utils/YamlUtils.h b/src/libcalamares/utils/YamlUtils.h
similarity index 100%
rename from src/libcalamaresui/utils/YamlUtils.h
rename to src/libcalamares/utils/YamlUtils.h
diff --git a/src/libcalamaresui/CMakeLists.txt b/src/libcalamaresui/CMakeLists.txt
index 7c3e8fca2..6bbb285bb 100644
--- a/src/libcalamaresui/CMakeLists.txt
+++ b/src/libcalamaresui/CMakeLists.txt
@@ -10,7 +10,6 @@ set( calamaresui_SOURCES
utils/CalamaresUtilsGui.cpp
utils/DebugWindow.cpp
utils/ImageRegistry.cpp
- utils/YamlUtils.cpp
utils/qjsonmodel.cpp
utils/qjsonitem.cpp
@@ -25,7 +24,6 @@ set( calamaresui_SOURCES
ExecutionViewStep.cpp
Branding.cpp
- Settings.cpp
ViewManager.cpp
)
@@ -71,7 +69,6 @@ calamares_add_library( calamaresui
UI ${calamaresui_UI}
EXPORT_MACRO UIDLLEXPORT_PRO
LINK_PRIVATE_LIBRARIES
- ${YAMLCPP_LIBRARY}
${OPTIONAL_PRIVATE_LIBRARIES}
LINK_LIBRARIES
Qt5::Svg
diff --git a/src/libcalamaresui/ExecutionViewStep.cpp b/src/libcalamaresui/ExecutionViewStep.cpp
index 0a9850fd7..109bd1384 100644
--- a/src/libcalamaresui/ExecutionViewStep.cpp
+++ b/src/libcalamaresui/ExecutionViewStep.cpp
@@ -2,6 +2,7 @@
*
* Copyright 2014, Aurélien Gâteau
* Copyright 2014-2015, Teo Mrnjavac
+ * Copyright 2018, Adriaan de Groot
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -64,7 +65,7 @@ ExecutionViewStep::ExecutionViewStep( QObject* parent )
innerLayout->addWidget( m_progressBar );
innerLayout->addWidget( m_label );
- cDebug() << "QML import paths:" << m_slideShow->engine()->importPathList();
+ cDebug() << "QML import paths:" << Logger::DebugList( m_slideShow->engine()->importPathList() );
connect( JobQueue::instance(), &JobQueue::progress,
this, &ExecutionViewStep::updateFromJobQueue );
diff --git a/src/libcalamaresui/ViewManager.cpp b/src/libcalamaresui/ViewManager.cpp
index 2be3e3832..e597bf6a3 100644
--- a/src/libcalamaresui/ViewManager.cpp
+++ b/src/libcalamaresui/ViewManager.cpp
@@ -150,9 +150,9 @@ ViewManager::insertViewStep( int before, ViewStep* step )
void
ViewManager::onInstallationFailed( const QString& message, const QString& details )
{
- cLog() << "Installation failed:";
- cLog() << "- message:" << message;
- cLog() << "- details:" << details;
+ cError() << "Installation failed:";
+ cDebug() << "- message:" << message;
+ cDebug() << "- details:" << details;
QMessageBox* msgBox = new QMessageBox();
msgBox->setIcon( QMessageBox::Critical );
@@ -167,7 +167,7 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
msgBox->setInformativeText( text );
connect( msgBox, &QMessageBox::buttonClicked, qApp, &QApplication::quit );
- cLog() << "Calamares will quit when the dialog closes.";
+ cDebug() << "Calamares will quit when the dialog closes.";
msgBox->show();
}
diff --git a/src/libcalamaresui/modulesystem/Module.cpp b/src/libcalamaresui/modulesystem/Module.cpp
index 91642f415..f80f4d48b 100644
--- a/src/libcalamaresui/modulesystem/Module.cpp
+++ b/src/libcalamaresui/modulesystem/Module.cpp
@@ -72,8 +72,7 @@ Module::fromDescriptor( const QVariantMap& moduleDescriptor,
if ( typeString.isEmpty() ||
intfString.isEmpty() )
{
- cLog() << Q_FUNC_INFO << "bad module descriptor format"
- << instanceId;
+ cError() << "Bad module descriptor format" << instanceId;
return nullptr;
}
if ( ( typeString == "view" ) || ( typeString == "viewmodule" ) )
@@ -87,11 +86,11 @@ Module::fromDescriptor( const QVariantMap& moduleDescriptor,
#ifdef WITH_PYTHONQT
m = new PythonQtViewModule();
#else
- cLog() << "PythonQt modules are not supported in this version of Calamares.";
+ cError() << "PythonQt modules are not supported in this version of Calamares.";
#endif
}
else
- cLog() << "Bad interface" << intfString << "for module type" << typeString;
+ cError() << "Bad interface" << intfString << "for module type" << typeString;
}
else if ( typeString == "job" )
{
@@ -108,18 +107,18 @@ Module::fromDescriptor( const QVariantMap& moduleDescriptor,
#ifdef WITH_PYTHON
m = new PythonJobModule();
#else
- cLog() << "Python modules are not supported in this version of Calamares.";
+ cError() << "Python modules are not supported in this version of Calamares.";
#endif
}
else
- cLog() << "Bad interface" << intfString << "for module type" << typeString;
+ cError() << "Bad interface" << intfString << "for module type" << typeString;
}
else
- cLog() << "Bad module type" << typeString;
+ cError() << "Bad module type" << typeString;
if ( !m )
{
- cLog() << "Bad module type (" << typeString
+ cDebug() << "Bad module type (" << typeString
<< ") or interface string (" << intfString
<< ") for module " << instanceId;
return nullptr;
@@ -130,8 +129,8 @@ Module::fromDescriptor( const QVariantMap& moduleDescriptor,
m->m_directory = moduleDir.absolutePath();
else
{
- cLog() << Q_FUNC_INFO << "bad module directory"
- << instanceId;
+ cError() << "Bad module directory" << moduleDirectory
+ << "for" << instanceId;
delete m;
return nullptr;
}
diff --git a/src/libcalamaresui/modulesystem/ModuleManager.cpp b/src/libcalamaresui/modulesystem/ModuleManager.cpp
index 60b9b2ce9..7afe5eef8 100644
--- a/src/libcalamaresui/modulesystem/ModuleManager.cpp
+++ b/src/libcalamaresui/modulesystem/ModuleManager.cpp
@@ -200,8 +200,8 @@ ModuleManager::loadModules()
if ( moduleEntrySplit.length() < 1 ||
moduleEntrySplit.length() > 2 )
{
- cError() << "Wrong module entry format for module" << moduleEntry << "."
- << "\nCalamares will now quit.";
+ cError() << "Wrong module entry format for module" << moduleEntry << '.';
+ cError() << "Calamares will now quit.";
qApp->exit( 1 );
return;
}
@@ -213,7 +213,8 @@ ModuleManager::loadModules()
m_availableDescriptorsByModuleName.value( moduleName ).isEmpty() )
{
cError() << "Module" << moduleName << "not found in module search paths."
- << "\nCalamares will now quit.";
+ << Logger::DebugList( m_paths );
+ cError() << "Calamares will now quit.";
qApp->exit( 1 );
return;
}
@@ -240,8 +241,8 @@ ModuleManager::loadModules()
}
else //ought to be a custom instance, but cannot find instance entry
{
- cError() << "Custom instance" << moduleEntry << "not found in custom instances section."
- << "\nCalamares will now quit.";
+ cError() << "Custom instance" << moduleEntry << "not found in custom instances section.";
+ cError() << "Calamares will now quit.";
qApp->exit( 1 );
return;
}
diff --git a/src/modules/dummypythonqt/lang/bg/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/bg/LC_MESSAGES/dummypythonqt.mo
index 470525ae3..348cc2629 100644
Binary files a/src/modules/dummypythonqt/lang/bg/LC_MESSAGES/dummypythonqt.mo and b/src/modules/dummypythonqt/lang/bg/LC_MESSAGES/dummypythonqt.mo differ
diff --git a/src/modules/dummypythonqt/lang/bg/LC_MESSAGES/dummypythonqt.po b/src/modules/dummypythonqt/lang/bg/LC_MESSAGES/dummypythonqt.po
index 9d8734987..011a2294f 100644
--- a/src/modules/dummypythonqt/lang/bg/LC_MESSAGES/dummypythonqt.po
+++ b/src/modules/dummypythonqt/lang/bg/LC_MESSAGES/dummypythonqt.po
@@ -8,8 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-04 08:16-0400\n"
+"POT-Creation-Date: 2018-02-07 18:58+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Georgi Georgiev , 2018\n"
"Language-Team: Bulgarian (https://www.transifex.com/calamares/teams/20061/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,11 +20,11 @@ msgstr ""
#: src/modules/dummypythonqt/main.py:84
msgid "Click me!"
-msgstr ""
+msgstr "Натисни ме!"
#: src/modules/dummypythonqt/main.py:94
msgid "A new QLabel."
-msgstr ""
+msgstr "Нов QLabel."
#: src/modules/dummypythonqt/main.py:97
msgid "Dummy PythonQt ViewStep"
diff --git a/src/modules/dummypythonqt/lang/tr_TR/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/tr_TR/LC_MESSAGES/dummypythonqt.mo
index 12c4645f6..57e8ac336 100644
Binary files a/src/modules/dummypythonqt/lang/tr_TR/LC_MESSAGES/dummypythonqt.mo and b/src/modules/dummypythonqt/lang/tr_TR/LC_MESSAGES/dummypythonqt.mo differ
diff --git a/src/modules/dummypythonqt/lang/tr_TR/LC_MESSAGES/dummypythonqt.po b/src/modules/dummypythonqt/lang/tr_TR/LC_MESSAGES/dummypythonqt.po
index 316907674..cf65fd0e5 100644
--- a/src/modules/dummypythonqt/lang/tr_TR/LC_MESSAGES/dummypythonqt.po
+++ b/src/modules/dummypythonqt/lang/tr_TR/LC_MESSAGES/dummypythonqt.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-12-21 16:44+0100\n"
+"POT-Creation-Date: 2018-02-07 18:58+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Demiray “tulliana” Muhterem , 2016\n"
"Language-Team: Turkish (Turkey) (https://www.transifex.com/calamares/teams/20061/tr_TR/)\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: tr_TR\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: src/modules/dummypythonqt/main.py:84
msgid "Click me!"
diff --git a/src/modules/locale/LocaleConfiguration.cpp b/src/modules/locale/LocaleConfiguration.cpp
index d2aae0d4e..f4cbc800d 100644
--- a/src/modules/locale/LocaleConfiguration.cpp
+++ b/src/modules/locale/LocaleConfiguration.cpp
@@ -43,9 +43,11 @@ LocaleConfiguration::fromLanguageAndLocation( const QString& languageLocale,
const QStringList& availableLocales,
const QString& countryCode )
{
- LocaleConfiguration lc = LocaleConfiguration();
+ LocaleConfiguration lc;
+
+ // Note that the documentation how this works is in packages.conf
QString language = languageLocale.split( '_' ).first();
- lc.myLanguageLocaleBcp47 = QLocale(language).bcp47Name();
+ lc.myLanguageLocaleBcp47 = QLocale(language).bcp47Name().toLower();
QStringList linesForLanguage;
for ( const QString &line : availableLocales )
@@ -288,7 +290,7 @@ LocaleConfiguration::isEmpty() const
QMap< QString, QString >
-LocaleConfiguration::toMap()
+LocaleConfiguration::toMap() const
{
QMap< QString, QString > map;
@@ -324,3 +326,9 @@ LocaleConfiguration::toMap()
return map;
}
+
+QString
+LocaleConfiguration::toBcp47() const
+{
+ return myLanguageLocaleBcp47;
+}
diff --git a/src/modules/locale/LocaleConfiguration.h b/src/modules/locale/LocaleConfiguration.h
index 6eca97976..4f6cde556 100644
--- a/src/modules/locale/LocaleConfiguration.h
+++ b/src/modules/locale/LocaleConfiguration.h
@@ -35,16 +35,21 @@ public:
bool isEmpty() const;
+ QMap< QString, QString > toMap() const;
+ // Note that the documentation how this works is in packages.conf
+ QString toBcp47() const;
+
// These become all uppercase in locale.conf, but we keep them lowercase here to
// avoid confusion with locale.h.
QString lang, lc_numeric, lc_time, lc_monetary, lc_paper, lc_name, lc_address,
lc_telephone, lc_measurement, lc_identification;
- QString myLanguageLocaleBcp47;
- QMap< QString, QString > toMap();
// If the user has explicitly selected language (from the dialog)
// or numbers format, set these to avoid implicit changes to them.
bool explicit_lang, explicit_lc;
+
+private:
+ QString myLanguageLocaleBcp47;
};
#endif // LOCALECONFIGURATION_H
diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp
index 27d63f48e..e2571d085 100644
--- a/src/modules/locale/LocalePage.cpp
+++ b/src/modules/locale/LocalePage.cpp
@@ -489,8 +489,9 @@ LocalePage::updateGlobalStorage()
->insert( "locationRegion", location.region );
Calamares::JobQueue::instance()->globalStorage()
->insert( "locationZone", location.zone );
- Calamares::JobQueue::instance()->globalStorage()
- ->insert( "locale", m_selectedLocaleConfiguration.myLanguageLocaleBcp47);
+
+ const QString bcp47 = m_selectedLocaleConfiguration.toBcp47();
+ Calamares::JobQueue::instance()->globalStorage()->insert( "locale", bcp47 );
// If we're in chroot mode (normal install mode), then we immediately set the
// timezone on the live system.
diff --git a/src/modules/locale/locale.conf b/src/modules/locale/locale.conf
index 3d7f34e6f..48ea6d336 100644
--- a/src/modules/locale/locale.conf
+++ b/src/modules/locale/locale.conf
@@ -6,22 +6,42 @@
# Distributions using systemd can list available
# time zones by using the timedatectl command.
# timedatectl list-timezones
+#
+# The starting timezone (e.g. the pin-on-the-map) when entering
+# the locale page can be set through keys *region* and *zone*.
+# If either is not set, defaults to America/New_York.
+#
region: "America"
zone: "New_York"
# System locales are detected in the following order:
#
-# /usr/share/i18n/SUPPORTED
-# localeGenPath (defaults to /etc/locale.gen if not set)
-# 'locale -a' output
+# - /usr/share/i18n/SUPPORTED
+# - localeGenPath (defaults to /etc/locale.gen if not set)
+# - 'locale -a' output
+#
# Enable only when your Distribution is using an
# custom path for locale.gen
#localeGenPath: "PATH_TO/locale.gen"
# GeoIP based Language settings:
-# GeoIP need an working Internet connecion.
-# This can be managed from welcome.conf by adding
+#
+# GeoIP need an working Internet connection.
+# This can be managed from `welcome.conf` by adding
# internet to the list of required conditions.
+#
# Leave commented out to disable GeoIP.
-geoipUrl: "freegeoip.net"
+#
+# An HTTP request is made to http://*geoipUrl*/json (which just happens
+# to be the GET path needed by freegeoip.net, so calling this a URL
+# is a stretch). The request must return valid JSON data; there should
+# be an attribute *time_zone*, with a string value set to the
+# timezone, in / form.
+#
+# Suitable data looks like
+# ```
+# {"time_zone":"America/New_York"}
+# ```
+#
+geoipUrl: "freegeoip.net"
diff --git a/src/modules/packages/main.py b/src/modules/packages/main.py
index b246244f5..d9741287b 100644
--- a/src/modules/packages/main.py
+++ b/src/modules/packages/main.py
@@ -332,7 +332,10 @@ def subst_locale(plist):
"""
locale = libcalamares.globalstorage.value("locale")
if not locale:
- return plist
+ # It is possible to skip the locale-setting entirely.
+ # Then pretend it is "en", so that {LOCALE}-decorated
+ # package names are removed from the list.
+ locale = "en"
ret = []
for packagedata in plist:
@@ -378,20 +381,20 @@ def run_operations(pkgman, entry):
global group_packages, completed_packages, mode_packages
for key in entry.keys():
- entry[key] = subst_locale(entry[key])
- group_packages = len(entry[key])
+ package_list = subst_locale(entry[key])
+ group_packages = len(package_list)
if key == "install":
_change_mode(INSTALL)
- if all([isinstance(x, str) for x in entry[key]]):
- pkgman.install(entry[key])
+ if all([isinstance(x, str) for x in package_list]):
+ pkgman.install(package_list)
else:
- for package in entry[key]:
+ for package in package_list:
pkgman.install_package(package)
elif key == "try_install":
_change_mode(INSTALL)
# we make a separate package manager call for each package so a
# single failing package won't stop all of them
- for package in entry[key]:
+ for package in package_list:
try:
pkgman.install_package(package)
except subprocess.CalledProcessError:
@@ -400,10 +403,10 @@ def run_operations(pkgman, entry):
libcalamares.utils.warning(warn_text)
elif key == "remove":
_change_mode(REMOVE)
- pkgman.remove(entry[key])
+ pkgman.remove(package_list)
elif key == "try_remove":
_change_mode(REMOVE)
- for package in entry[key]:
+ for package in package_list:
try:
pkgman.remove([package])
except subprocess.CalledProcessError:
@@ -412,9 +415,9 @@ def run_operations(pkgman, entry):
libcalamares.utils.warning(warn_text)
elif key == "localInstall":
_change_mode(INSTALL)
- pkgman.install(entry[key], from_local=True)
+ pkgman.install(package_list, from_local=True)
- completed_packages += len(entry[key])
+ completed_packages += len(package_list)
libcalamares.job.setprogress(completed_packages * 1.0 / total_packages)
libcalamares.utils.debug(pretty_name())
@@ -458,7 +461,7 @@ def run():
completed_packages = 0
for op in operations:
for packagelist in op.values():
- total_packages += len(packagelist)
+ total_packages += len(subst_locale(packagelist))
if not total_packages:
# Avoids potential divide-by-zero in progress reporting
diff --git a/src/modules/packages/packages.conf b/src/modules/packages/packages.conf
index 60c86791b..ae141ee3a 100644
--- a/src/modules/packages/packages.conf
+++ b/src/modules/packages/packages.conf
@@ -76,7 +76,7 @@ update_db: true
# pre-script: touch /tmp/installing-vi
# post-script: rm -f /tmp/installing-vi
#
-# The pre- and post-scripts are optional, but not both optional: using
+# The pre- and post-scripts are optional, but you cannot leave both out: using
# "package: vi" with neither script option will trick Calamares into
# trying to install a package named "package: vi", which is unlikely to work.
#
@@ -84,11 +84,16 @@ update_db: true
# packages for software based on the selected system locale. By including
# the string LOCALE in the package name, the following happens:
#
-# - if the system locale is English (generally US English; en_GB is a valid
-# localization), then the package is not installed at all,
-# - otherwise $LOCALE or ${LOCALE} is replaced by the Bcp47 name of the selected
-# system locale, e.g. nl_BE. Note that just plain LOCALE will not be replaced,
-# so foo-LOCALE will be unchanged, while foo-$LOCALE will be changed.
+# - if the system locale is English (any variety), then the package is not
+# installed at all,
+# - otherwise $LOCALE or ${LOCALE} is replaced by the **lower-cased** BCP47
+# name of the **language** part of the selected system locale (not the
+# country/region/dialect part), e.g. selecting *nl_BE* will use *nl*
+# here.
+#
+# Take care that just plain LOCALE will not be replaced, so foo-LOCALE will
+# be left unchanged, while foo-$LOCALE will be changed. However, foo-LOCALE
+# **will** be removed from the list of packages, if English is selected.
#
# The following installs localizations for vi, if they are relevant; if
# there is no localization, installation continues normally.
@@ -127,6 +132,7 @@ update_db: true
operations:
- install:
- vi
+ - vi-${LOCALE}
- wget
- binutils
- remove:
diff --git a/src/modules/partition/core/PartitionModel.cpp b/src/modules/partition/core/PartitionModel.cpp
index bf61843d0..0265da29d 100644
--- a/src/modules/partition/core/PartitionModel.cpp
+++ b/src/modules/partition/core/PartitionModel.cpp
@@ -115,7 +115,7 @@ PartitionModel::parent( const QModelIndex& child ) const
return createIndex( row, 0, parentNode );
++row;
}
- cLog() << "No parent found!";
+ cWarning() << "No parent found!";
return QModelIndex();
}
diff --git a/src/modules/plasmalnf/CMakeLists.txt b/src/modules/plasmalnf/CMakeLists.txt
index 15897f98c..e39b1af9f 100644
--- a/src/modules/plasmalnf/CMakeLists.txt
+++ b/src/modules/plasmalnf/CMakeLists.txt
@@ -4,8 +4,13 @@ find_package(ECM ${ECM_VERSION} REQUIRED NO_MODULE)
# needs a runtime support component (which we don't test for).
set( lnf_ver 5.41 )
+find_package( KF5Config ${lnf_ver} )
find_package( KF5Plasma ${lnf_ver} )
find_package( KF5Package ${lnf_ver} )
+set_package_properties(
+ KF5Config PROPERTIES
+ PURPOSE "For finding default Plasma Look-and-Feel"
+)
set_package_properties(
KF5Plasma PROPERTIES
PURPOSE "For Plasma Look-and-Feel selection"
@@ -16,11 +21,19 @@ set_package_properties(
)
if ( KF5Plasma_FOUND AND KF5Package_FOUND )
- find_package( KF5 ${lnf_ver} REQUIRED CoreAddons Plasma Package )
+ if ( KF5Config_FOUND )
+ set( option_kf5 Config )
+ set( option_defs WITH_KCONFIG )
+ # set( option_libs KF5::Config ) # Not needed anyway
+ endif()
+
+ find_package( KF5 ${lnf_ver} REQUIRED CoreAddons Plasma Package ${option_kf5} )
calamares_add_plugin( plasmalnf
TYPE viewmodule
EXPORT_MACRO PLUGINDLLEXPORT_PRO
+ COMPILE_DEFINITIONS
+ ${option_defs}
SOURCES
PlasmaLnfViewStep.cpp
PlasmaLnfPage.cpp
@@ -32,6 +45,7 @@ if ( KF5Plasma_FOUND AND KF5Package_FOUND )
page_plasmalnf.ui
LINK_PRIVATE_LIBRARIES
calamaresui
+ ${option_libs}
KF5::Package
KF5::Plasma
SHARED_LIB
diff --git a/src/modules/plasmalnf/PlasmaLnfPage.cpp b/src/modules/plasmalnf/PlasmaLnfPage.cpp
index 651a17b6b..d34042e4f 100644
--- a/src/modules/plasmalnf/PlasmaLnfPage.cpp
+++ b/src/modules/plasmalnf/PlasmaLnfPage.cpp
@@ -23,6 +23,8 @@
#include "utils/Logger.h"
#include "utils/Retranslator.h"
+#include
+
#include
#include
@@ -55,13 +57,18 @@ static ThemeInfoList plasma_themes()
PlasmaLnfPage::PlasmaLnfPage( QWidget* parent )
: QWidget( parent )
, ui( new Ui::PlasmaLnfPage )
+ , m_showAll( false )
, m_buttonGroup( nullptr )
{
ui->setupUi( this );
CALAMARES_RETRANSLATE(
{
ui->retranslateUi( this );
- ui->generalExplanation->setText( tr( "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 installed." ) );
+ ui->generalExplanation->setText( tr(
+ "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 installed. Clicking on a look-and-feel "
+ "selection will give you a live preview of that look-and-feel.") );
updateThemeNames();
fillUi();
}
@@ -75,10 +82,18 @@ PlasmaLnfPage::setLnfPath( const QString& path )
}
void
-PlasmaLnfPage::setEnabledThemes(const ThemeInfoList& themes)
+PlasmaLnfPage::setEnabledThemes(const ThemeInfoList& themes, bool showAll )
{
m_enabledThemes = themes;
+ if ( showAll )
+ {
+ auto plasmaThemes = plasma_themes();
+ for ( auto& installed_theme : plasmaThemes )
+ if ( !m_enabledThemes.findById( installed_theme.id ) )
+ m_enabledThemes.append( installed_theme );
+ }
+
updateThemeNames();
winnowThemes();
fillUi();
@@ -87,9 +102,18 @@ PlasmaLnfPage::setEnabledThemes(const ThemeInfoList& themes)
void
PlasmaLnfPage::setEnabledThemesAll()
{
- setEnabledThemes( plasma_themes() );
+ // Don't need to set showAll=true, because we're already passing in
+ // the complete list of installed themes.
+ setEnabledThemes( plasma_themes(), false );
}
+void
+PlasmaLnfPage::setPreselect( const QString& id )
+{
+ m_preselect = id;
+ if ( !m_enabledThemes.isEmpty() )
+ fillUi();
+}
void PlasmaLnfPage::updateThemeNames()
{
@@ -162,6 +186,11 @@ void PlasmaLnfPage::fillUi()
{
theme.widget->updateThemeName( theme );
}
+ if ( theme.id == m_preselect )
+ {
+ const QSignalBlocker b( theme.widget->button() );
+ theme.widget->button()->setChecked( true );
+ }
++c;
}
}
diff --git a/src/modules/plasmalnf/PlasmaLnfPage.h b/src/modules/plasmalnf/PlasmaLnfPage.h
index 2a4d3dd07..b90e4cfb4 100644
--- a/src/modules/plasmalnf/PlasmaLnfPage.h
+++ b/src/modules/plasmalnf/PlasmaLnfPage.h
@@ -46,10 +46,17 @@ public:
explicit PlasmaLnfPage( QWidget* parent = nullptr );
void setLnfPath( const QString& path );
- /** @brief enable only the listed themes. */
- void setEnabledThemes( const ThemeInfoList& themes );
+ /** @brief enable only the listed themes.
+ *
+ * Shows the listed @p themes with full information (e.g. screenshot).
+ * If @p showAll is true, then also show all installed themes
+ * not explicitly listed (without a screenshot).
+ */
+ void setEnabledThemes( const ThemeInfoList& themes, bool showAll );
/** @brief enable all installed plasma themes. */
void setEnabledThemesAll();
+ /** @brief set which theme is to be preselected. */
+ void setPreselect( const QString& id );
signals:
void plasmaThemeSelected( const QString& id );
@@ -64,6 +71,8 @@ private:
Ui::PlasmaLnfPage* ui;
QString m_lnfPath;
+ QString m_preselect;
+ bool m_showAll; // If true, don't winnow according to enabledThemes
ThemeInfoList m_enabledThemes;
QButtonGroup *m_buttonGroup;
diff --git a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp
index 64c1932f6..c5b9d5a83 100644
--- a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp
+++ b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp
@@ -27,8 +27,25 @@
#include
#include
+#ifdef WITH_KCONFIG
+#include
+#include
+#endif
+
CALAMARES_PLUGIN_FACTORY_DEFINITION( PlasmaLnfViewStepFactory, registerPlugin(); )
+static QString
+currentPlasmaTheme()
+{
+#ifdef WITH_KCONFIG
+ KConfigGroup cg( KSharedConfig::openConfig( QStringLiteral( "kdeglobals" ) ), "KDE" );
+ return cg.readEntry( "LookAndFeelPackage", QString() );
+#else
+ cWarning() << "No KConfig support, cannot determine Plasma theme.";
+ return QString();
+#endif
+}
+
PlasmaLnfViewStep::PlasmaLnfViewStep( QObject* parent )
: Calamares::ViewStep( parent )
, m_widget( new PlasmaLnfPage )
@@ -132,10 +149,18 @@ PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap )
m_liveUser = CalamaresUtils::getString( configurationMap, "liveuser" );
+ QString preselect = CalamaresUtils::getString( configurationMap, "preselect" );
+ if ( preselect == QStringLiteral( "*" ) )
+ preselect = currentPlasmaTheme();
+ if ( !preselect.isEmpty() )
+ m_widget->setPreselect( preselect );
+
+ bool showAll = CalamaresUtils::getBool( configurationMap, "showAll", false );
+
if ( configurationMap.contains( "themes" ) &&
configurationMap.value( "themes" ).type() == QVariant::List )
{
- ThemeInfoList allThemes;
+ ThemeInfoList listedThemes;
auto themeList = configurationMap.value( "themes" ).toList();
// Create the ThemInfo objects for the listed themes; information
// about the themes from Plasma (e.g. human-readable name and description)
@@ -144,14 +169,14 @@ PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap )
if ( i.type() == QVariant::Map )
{
auto iv = i.toMap();
- allThemes.append( ThemeInfo( iv.value( "theme" ).toString(), iv.value( "image" ).toString() ) );
+ listedThemes.append( ThemeInfo( iv.value( "theme" ).toString(), iv.value( "image" ).toString() ) );
}
else if ( i.type() == QVariant::String )
- allThemes.append( ThemeInfo( i.toString() ) );
+ listedThemes.append( ThemeInfo( i.toString() ) );
- if ( allThemes.length() == 1 )
+ if ( listedThemes.length() == 1 )
cWarning() << "only one theme enabled in plasmalnf";
- m_widget->setEnabledThemes( allThemes );
+ m_widget->setEnabledThemes( listedThemes, showAll );
}
else
m_widget->setEnabledThemesAll(); // All of them
diff --git a/src/modules/plasmalnf/PlasmaLnfViewStep.h b/src/modules/plasmalnf/PlasmaLnfViewStep.h
index 1f48798bc..192d7085e 100644
--- a/src/modules/plasmalnf/PlasmaLnfViewStep.h
+++ b/src/modules/plasmalnf/PlasmaLnfViewStep.h
@@ -61,9 +61,9 @@ public slots:
private:
PlasmaLnfPage* m_widget;
- QString m_lnfPath;
- QString m_themeId;
- QString m_liveUser;
+ QString m_lnfPath; // Path to the lnf tool
+ QString m_themeId; // Id of selected theme
+ QString m_liveUser; // Name of the live user (for OEM mode)
};
CALAMARES_PLUGIN_FACTORY_DECLARATION( PlasmaLnfViewStepFactory )
diff --git a/src/modules/plasmalnf/ThemeWidget.cpp b/src/modules/plasmalnf/ThemeWidget.cpp
index 0dd73dbd3..125085db4 100644
--- a/src/modules/plasmalnf/ThemeWidget.cpp
+++ b/src/modules/plasmalnf/ThemeWidget.cpp
@@ -65,7 +65,7 @@ ThemeWidget::ThemeWidget(const ThemeInfo& info, QWidget* parent)
layout->addWidget( image_label, 1 );
layout->addWidget( m_description, 3 );
- connect( m_check, &QRadioButton::clicked, this, &ThemeWidget::clicked );
+ connect( m_check, &QRadioButton::toggled, this, &ThemeWidget::clicked );
}
void
diff --git a/src/modules/plasmalnf/plasmalnf.conf b/src/modules/plasmalnf/plasmalnf.conf
index e1021015b..85df64f0a 100644
--- a/src/modules/plasmalnf/plasmalnf.conf
+++ b/src/modules/plasmalnf/plasmalnf.conf
@@ -23,8 +23,9 @@ lnftool: "/usr/bin/lookandfeeltool"
# You can limit the list of Plasma look-and-feel themes by listing ids
# here. If this key is not present, all of the installed themes are listed.
-# If the key is present, only installed themes that are *also* included
-# in the list are shown (could be none!).
+# If the key is present, only installed themes that are **also** included
+# in the list are shown (could be none!). See the *showAll* key, below,
+# to change that.
#
# Themes may be listed by id, (e.g. fluffy-bunny, below) or as a theme
# and an image (e.g. breeze) which will be used to show a screenshot.
@@ -49,3 +50,26 @@ themes:
- theme: org.kde.breezedark.desktop
image: "breeze-dark.png"
- org.kde.fluffy-bunny.desktop
+
+# If *showAll* is true, then all installed themes are shown in the
+# UI for selection, even if they are not listed in *themes*. This
+# allows selection of all themes even while not all of them are
+# listed in *themes* -- which is useful to show screenshots for those
+# you do have a screenshot for.
+showAll: false
+
+# You can pre-select one of the themes; it is not applied
+# immediately, but its radio-button is switched on to indicate
+# that that is the theme (that is most likely) currently in use.
+# Do this only on Live images where you are reasonably sure
+# that the user is not going to change the theme out from under
+# themselves before running the installer.
+#
+# If this key is present, its value should be the id of the theme
+# which should be pre-selected. If absent, empty, or the pre-selected
+# theme is not found on the live system, no theme will be pre-selected.
+#
+# As a special setting, use "*", to try to find the currently-
+# selected theme by reading the Plasma configuration. This requires
+# KF5::Config at build- and run-time.
+preselect: "*"
diff --git a/src/modules/users/SetHostNameJob.cpp b/src/modules/users/SetHostNameJob.cpp
index 948f78d17..87c89c3b8 100644
--- a/src/modules/users/SetHostNameJob.cpp
+++ b/src/modules/users/SetHostNameJob.cpp
@@ -57,21 +57,21 @@ Calamares::JobResult SetHostNameJob::exec()
if ( !gs || !gs->contains( "rootMountPoint" ) )
{
- cLog() << "No rootMountPoint in global storage";
+ cError() << "No rootMountPoint in global storage";
return Calamares::JobResult::error( tr( "Internal Error" ) );
}
QString destDir = gs->value( "rootMountPoint" ).toString();
if ( !QDir( destDir ).exists() )
{
- cLog() << "rootMountPoint points to a dir which does not exist";
+ cError() << "rootMountPoint points to a dir which does not exist";
return Calamares::JobResult::error( tr( "Internal Error" ) );
}
QFile hostfile( destDir + "/etc/hostname" );
if ( !hostfile.open( QFile::WriteOnly ) )
{
- cLog() << "Can't write to hostname file";
+ cError() << "Can't write to hostname file";
return Calamares::JobResult::error( tr( "Cannot write hostname to target system" ) );
}
@@ -82,7 +82,7 @@ Calamares::JobResult SetHostNameJob::exec()
QFile hostsfile( destDir + "/etc/hosts" );
if ( !hostsfile.open( QFile::WriteOnly ) )
{
- cLog() << "Can't write to hosts file";
+ cError() << "Can't write to hosts file";
return Calamares::JobResult::error( tr( "Cannot write hostname to target system" ) );
}
diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp
index 852a5bfb9..5781b3a58 100644
--- a/src/modules/welcome/WelcomePage.cpp
+++ b/src/modules/welcome/WelcomePage.cpp
@@ -162,6 +162,7 @@ WelcomePage::initLanguages()
QLocale thisLocale = ui->languageWidget->itemData( i, Qt::UserRole ).toLocale();
if ( thisLocale == QLocale( QLocale::English, QLocale::UnitedStates ) )
{
+ isTranslationAvailable = true;
ui->languageWidget->setCurrentIndex( i );
cDebug() << "Translation unavailable, so initial locale set to " << thisLocale.name();
QLocale::setDefault( thisLocale );
@@ -173,6 +174,9 @@ WelcomePage::initLanguages()
}
}
+ if ( !isTranslationAvailable )
+ cWarning() << "No available translation matched" << defaultLocale;
+
connect( ui->languageWidget,
static_cast< void ( QComboBox::* )( int ) >( &QComboBox::currentIndexChanged ),
this, [ & ]( int newIndex )
diff --git a/src/modules/welcome/checker/RequirementsChecker.cpp b/src/modules/welcome/checker/RequirementsChecker.cpp
index 9ccdfae33..a5255058d 100644
--- a/src/modules/welcome/checker/RequirementsChecker.cpp
+++ b/src/modules/welcome/checker/RequirementsChecker.cpp
@@ -1,7 +1,7 @@
/* === This file is part of Calamares - ===
*
* Copyright 2014-2017, Teo Mrnjavac
- * Copyright 2017, Adriaan de Groot
+ * Copyright 2017-2018, Adriaan de Groot
* Copyright 2017, Gabriel Craciunescu
*
* Calamares is free software: you can redistribute it and/or modify
@@ -100,12 +100,14 @@ RequirementsChecker::RequirementsChecker( QObject* parent )
if ( m_entriesToCheck.contains( "root" ) )
isRoot = checkIsRoot();
+ using TR = Logger::DebugRow;
+
cDebug() << "RequirementsChecker output:"
- << " enoughStorage:" << enoughStorage
- << " enoughRam:" << enoughRam
- << " hasPower:" << hasPower
- << " hasInternet:" << hasInternet
- << " isRoot:" << isRoot;
+ << TR("enoughStorage", enoughStorage)
+ << TR("enoughRam", enoughRam)
+ << TR("hasPower", hasPower)
+ << TR("hasInternet", hasInternet)
+ << TR("isRoot", isRoot);
QList< PrepareEntry > checkEntries;
foreach ( const QString& entry, m_entriesToCheck )
@@ -305,7 +307,9 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
}
if ( incompleteConfiguration )
- cWarning() << "RequirementsChecker configuration map:\n" << configurationMap;
+ {
+ cWarning() << "RequirementsChecker configuration map:" << Logger::DebugMap( configurationMap );
+ }
}
diff --git a/src/modules/welcome/welcome.conf b/src/modules/welcome/welcome.conf
index 18e71b1ef..b7ce5cfcd 100644
--- a/src/modules/welcome/welcome.conf
+++ b/src/modules/welcome/welcome.conf
@@ -25,6 +25,6 @@ requirements:
# If any of these conditions are not met, the user cannot
# continue past the welcome page.
required:
- - storage
+ # - storage
- ram
- - root
+ # - root