From 37e6f92c242ee4cd6aaf54dd795bdaa338daf740 Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Fri, 9 Mar 2018 11:34:28 -0500 Subject: [PATCH 01/34] i18n: [calamares] Automatic merge of Transifex translations --- lang/calamares_bg.ts | 68 +++++++++++------------ lang/calamares_ca.ts | 14 ++--- lang/calamares_da.ts | 12 ++-- lang/calamares_nb.ts | 118 ++++++++++++++++++++-------------------- lang/calamares_pt_BR.ts | 10 ++-- lang/calamares_tr_TR.ts | 95 ++++++++++++++++---------------- 6 files changed, 159 insertions(+), 158 deletions(-) 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 @@ Cancel installation without changing the system. - Отказ от инсталацията без промяна на системата + Отказ от инсталацията без промяна на системата. @@ -525,7 +525,7 @@ The installer will quit and all changes will be lost. LVM LV name - + LVM LV име @@ -565,7 +565,7 @@ The installer will quit and all changes will be lost. Mountpoint already in use. Please select another one. - Точкака на монтиране вече се използва. Моля изберете друга. + Точката за монтиране вече се използва. Моля изберете друга. @@ -692,7 +692,7 @@ The installer will quit and all changes will be lost. Cannot add user %1 to groups: %2. - Не може да бъе добавен потребител %1 към групи: %2. + Не може да се добави потребител %1 към групи: %2. @@ -789,7 +789,7 @@ The installer will quit and all changes will be lost. Failed to open %1 - + Неуспешно отваряне на %1 @@ -797,7 +797,7 @@ The installer will quit and all changes will be lost. Dummy C++ Job - + Фиктивна С++ задача @@ -855,7 +855,7 @@ The installer will quit and all changes will be lost. Mountpoint already in use. Please select another one. - Точкака на монтиране вече се използва. Моля изберете друга. + Точката за монтиране вече се използва. Моля изберете друга. @@ -883,7 +883,7 @@ The installer will quit and all changes will be lost. Please enter the same passphrase in both boxes. - + Моля, въведете еднаква парола в двете полета. @@ -1003,7 +1003,7 @@ The installer will quit and all changes will be lost. Please install KDE Konsole and try again! - + Моля, инсталирайте KDE Konsole и опитайте отново! @@ -1060,7 +1060,7 @@ The installer will quit and all changes will be lost. &OK - + &ОК @@ -1146,7 +1146,7 @@ The installer will quit and all changes will be lost. The system language will be set to %1. - + Системният език ще бъде %1. @@ -1204,7 +1204,7 @@ The installer will quit and all changes will be lost. Description - + Описание @@ -1222,7 +1222,7 @@ The installer will quit and all changes will be lost. Package selection - + Избор на пакети @@ -1230,17 +1230,17 @@ The installer will quit and all changes will be lost. Password is too short - + Паролата е твърде кратка Password is too long - + Паролата е твърде дълга Password is too weak - + Паролата е твърде слаба @@ -1255,12 +1255,12 @@ The installer will quit and all changes will be lost. The password is the same as the old one - + Паролата съвпада с предишната The password is a palindrome - + Паролата е палиндром @@ -1270,7 +1270,7 @@ The installer will quit and all changes will be lost. The password is too similar to the old one - + Паролата е твърде сходна с предишната @@ -1335,7 +1335,7 @@ The installer will quit and all changes will be lost. The password is too short - + Паролата е твърде кратка @@ -1385,7 +1385,7 @@ The installer will quit and all changes will be lost. No password supplied - + Липсва парола @@ -1465,7 +1465,7 @@ The installer will quit and all changes will be lost. Unknown error - + Неизвестна грешка @@ -2151,7 +2151,7 @@ Output: Failed to write keyboard configuration to existing /etc/default directory. - + Неуспешно записване на клавиатурна конфигурация в съществуващата директория /etc/default. @@ -2164,12 +2164,12 @@ Output: Set flags on %1MB %2 partition. - + Задай флагове на дял %1MB %2. Set flags on new partition. - + Задай флагове на нов дял. @@ -2179,12 +2179,12 @@ Output: Clear flags on %1MB <strong>%2</strong> partition. - + Изчисти флагове на дял %1MB <strong>%2</strong>. Clear flags on new partition. - + Изчисти флагове на нов дял. @@ -2194,12 +2194,12 @@ Output: Flag %1MB <strong>%2</strong> partition as <strong>%3</strong>. - + Сложи флаг на дял %1MB <strong>%2</strong> като <strong>%3</strong>. Flag new partition as <strong>%1</strong>. - + Сложи флаг на новия дял като <strong>%1</strong>. @@ -2209,12 +2209,12 @@ Output: Clearing flags on %1MB <strong>%2</strong> partition. - + Изчистване флаговете на дял %1MB <strong>%2</strong>. Clearing flags on new partition. - + Изчистване на флаговете на новия дял. @@ -2224,12 +2224,12 @@ Output: Setting flags <strong>%3</strong> on %1MB <strong>%2</strong> partition. - + Задаване на флагове <strong>%3</strong> на дял %1MB <strong>%2</strong>. Setting flags <strong>%1</strong> on new partition. - + Задаване на флагове <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 @@ 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. - 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. This system was started with a <strong>BIOS</strong> boot environment.<br><br>To configure startup from a BIOS environment, this installer must install a boot loader, like <strong>GRUB</strong>, either at the beginning of a partition or on the <strong>Master Boot Record</strong> near the beginning of the partition table (preferred). This is automatic, unless you choose manual partitioning, in which case you must set it up on your own. - 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>Manual partitioning</strong><br/>You can create or resize partitions yourself. - <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. An EFI system partition cannot be found anywhere on this system. Please go back and use manual partitioning to set up %1. - 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. <strong>Manual</strong> partitioning. - Partiment <strong>manual</strong>. + Particions <strong>manuals</strong>. @@ -1731,7 +1731,7 @@ L'instal·lador es tancarà i tots els canvis es perdran. <strong>Manual</strong> partitioning on disk <strong>%1</strong> (%2). - 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/>An EFI system partition cannot be found anywhere on this system. Please go back and use manual partitioning to set up %1. - <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. The password contains the user name in some form - 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. The password contains less than %1 digits - Adgangskoden indeholder færre end %1 tal + Adgangskoden indeholder færre end %1 cifre The password contains too few digits - Adgangskoden indeholder for få tal + Adgangskoden indeholder for få cifre @@ -1419,7 +1419,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt. Bad integer value of setting - %1 - Dårlig heltalsværdi til indstilling - %1 + Ugyldig heltalsværdi til indstilling - %1 @@ -1845,7 +1845,7 @@ Output: Command <i>%1</i> crashed. - Kommandoen <i>%1</i> holdet op med at virke. + Kommandoen <i>%1</i> holdte op med at virke. @@ -1860,7 +1860,7 @@ Output: Internal error when starting command. - 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) - + %1 (%2) @@ -120,7 +120,7 @@ Running command %1 %2 - + Kjører kommando %1 %2 @@ -195,17 +195,17 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. &Yes - + &Ja &No - + &Nei &Close - + &Lukk @@ -230,12 +230,12 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. &Done - + &Ferdig The installation is complete. Close the installer. - + Installasjonen er fullført. Lukk installeringsprogrammet. @@ -289,7 +289,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. This computer does not satisfy the minimum requirements for installing %1.<br/>Installation cannot continue. <a href="#details">Details...</a> - + 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. System requirements - + Systemkrav @@ -327,7 +327,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. <strong>Manual partitioning</strong><br/>You can create or resize partitions yourself. - + <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. Cannot get list of temporary mounts. - 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. Creating user %1. - + Oppretter bruker %1. @@ -681,7 +681,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. Cannot create user %1. - Klarte ikke å opprette bruker %1 + Klarte ikke opprette bruker %1 @@ -938,7 +938,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. &Restart now - + &Start på nytt nå @@ -948,7 +948,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. <h1>Installation Failed</h1><br/>%1 has not been installed on your computer.<br/>The error message was: %2. - + <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. Installation Complete - + Installasjon fullført The installation of %1 is complete. - + Installasjonen av %1 er fullført. @@ -984,7 +984,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. Formatting partition %1 with file system %2. - + Formaterer partisjon %1 med filsystem %2. @@ -1023,12 +1023,12 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. Set keyboard model to %1.<br/> - + Sett tastaturmodell til %1.<br/> Set keyboard layout to %1/%2. - + Sett tastaturoppsett til %1/%2. @@ -1059,7 +1059,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. &OK - + &OK @@ -1098,18 +1098,18 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. <strong>%1 driver</strong><br/>by %2 %1 is an untranslatable product name, example: Creative Audigy driver - + <strong>%1 driver</strong><br/>fra %2 <strong>%1 graphics driver</strong><br/><font color="Grey">by %2</font> %1 is usually a vendor name, example: Nvidia graphics driver - + <strong>%1 grafikkdriver</strong><br/><font color="Grey">fra %2</font> <strong>%1 browser plugin</strong><br/><font color="Grey">by %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">by %2</font> - + <strong>%1</strong><br/><font color="Grey">fra %2</font> @@ -1137,7 +1137,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. License - + Lisens @@ -1166,7 +1166,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. &Change... - + &Endre... @@ -1177,7 +1177,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. %1 (%2) Language (Country) - + %1 (%2) @@ -1229,17 +1229,17 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. Password is too short - + Passordet er for kort Password is too long - + Passordet er for langt Password is too weak - + Passordet er for svakt @@ -1254,7 +1254,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. The password is the same as the old one - + Passordet er det samme som det gamle @@ -1269,7 +1269,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. The password is too similar to the old one - + Passordet likner for mye på det gamle @@ -1299,22 +1299,22 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. The password contains less than %1 uppercase letters - + Passordet inneholder mindre enn %1 store bokstaver The password contains too few uppercase letters - + Passordet inneholder for få store bokstaver The password contains less than %1 lowercase letters - + Passordet inneholder mindre enn %1 små bokstaver The password contains too few lowercase letters - + Passordet inneholder for få små bokstaver @@ -1334,7 +1334,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. The password is too short - + Passordet er for kort @@ -1359,7 +1359,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. The password contains too many same characters consecutively - + Passordet inneholder for mange like tegn etter hverandre @@ -1444,7 +1444,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. Setting is not of string type - + Innstillingen er ikke av type streng @@ -1464,7 +1464,7 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. Unknown error - + Ukjent feil @@ -1477,12 +1477,12 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. Keyboard Model: - + Tastaturmodell: Type here to test your keyboard - + Skriv her for å teste tastaturet ditt @@ -1495,12 +1495,12 @@ Installasjonsprogrammet vil avsluttes og alle endringer vil gå tapt. What is your name? - + Hva heter du? What name do you want to use to log in? - + Hvilket navn vil du bruke for å logge inn? @@ -1890,13 +1890,13 @@ Output: Default Keyboard Model - + Standard tastaturmodell Default - + Standard @@ -1954,7 +1954,7 @@ Output: %1 cannot be installed on this partition. - + %1 kan ikke bli installert på denne partisjonen. @@ -2029,22 +2029,22 @@ Output: is plugged in to a power source - + er koblet til en strømkilde The system is not plugged in to a power source. - + Systemet er ikke koblet til en strømkilde. is connected to the Internet - + er tilkoblet Internett The system is not connected to the Internet. - + Systemet er ikke tilkoblet Internett. @@ -2114,7 +2114,7 @@ Output: Internal Error - + Intern feil @@ -2314,7 +2314,7 @@ Output: Cannot open /etc/timezone for writing - + Klarte ikke åpne /etc/timezone for skriving @@ -2463,7 +2463,7 @@ Output: Your username is too long. - + Brukernavnet ditt er for langt. @@ -2497,7 +2497,7 @@ Output: Users - + Brukere @@ -2510,7 +2510,7 @@ Output: &Language: - + &Språk: @@ -2530,7 +2530,7 @@ Output: &About - + &Om @@ -2563,7 +2563,7 @@ Output: Welcome - + 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 @@ 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. - 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. This system was started with a <strong>BIOS</strong> boot environment.<br><br>To configure startup from a BIOS environment, this installer must install a boot loader, like <strong>GRUB</strong>, either at the beginning of a partition or on the <strong>Master Boot Record</strong> near the beginning of the partition table (preferred). This is automatic, unless you choose manual partitioning, in which case you must set it up on your own. - 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. This storage device does not seem to have 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. - 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>If more than one person will use this computer, you can set up multiple accounts after installation.</small> - <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>This name will be used if you make the computer visible to others on a network.</small> - <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. Password is too weak - + Şifre çok zayıf Memory allocation error when setting '%1' - + '%1' ayarlanırken bellek ayırma hatası Memory allocation error - + Bellek ayırma hatası The password is the same as the old one - + Şifre eski şifreyle aynı The password is a palindrome - + Parola eskilerden birinin ters okunuşu olabilir The password differs with case changes only - + Parola sadece vaka değişiklikleri ile farklılık gösterir The password is too similar to the old one - + Parola eski parolaya çok benzer The password contains the user name in some form - + Parola kullanıcı adını bir biçimde içeriyor The password contains words from the real name of the user in some form - + Şifre, kullanıcının gerçek adına ait kelimeleri bazı biçimde içerir The password contains forbidden words in some form - + Şifre, bazı biçimde yasak kelimeler içeriyor The password contains less than %1 digits - + Şifre %1 den az hane içeriyor The password contains too few digits - + Parola çok az basamak içeriyor The password contains less than %1 uppercase letters - + Parola %1 den az büyük harf içeriyor The password contains too few uppercase letters - + Parola çok az harf içermektedir The password contains less than %1 lowercase letters - + Parola %1 den daha küçük harf içermektedir The password contains too few lowercase letters - + Parola çok az küçük harf içeriyor The password contains less than %1 non-alphanumeric characters - + Şifre %1 den az alfasayısal olmayan karakter içeriyor The password contains too few non-alphanumeric characters - + Parola çok az sayıda alfasayısal olmayan karakter içeriyor The password is shorter than %1 characters - + Parola %1 karakterden kısa The password is too short - + Parola çok kısa The password is just rotated old one - + Şifre önceden kullanıldı The password contains less than %1 character classes - + Parola %1 den az karakter sınıfı içeriyor The password does not contain enough character classes - + Parola yeterli sayıda karakter sınıfı içermiyor The password contains more than %1 same characters consecutively - + Şifre, %1 den fazla aynı karakteri ardışık olarak içeriyor The password contains too many same characters consecutively - + Parola ardışık olarak aynı sayıda çok karakter içeriyor The password contains more than %1 characters of the same class consecutively - + Parola, aynı sınıftan %1 den fazla karakter ardışık olarak içeriyor The password contains too many characters of the same class consecutively - + Parola aynı sınıfta çok fazla karakter içeriyor The password contains monotonic sequence longer than %1 characters - + Şifre, %1 karakterden daha uzun monoton dizilim içeriyor The password contains too long of a monotonic character sequence - + Parola çok uzun monoton karakter dizisi içeriyor No password supplied - + Parola sağlanmadı Cannot obtain random numbers from the RNG device - + RNG cihazından rastgele sayılar elde edemiyor Password generation failed - required entropy too low for settings - + Şifre üretimi başarısız oldu - ayarlar için entropi çok düşük gerekli The password fails the dictionary check - %1 - + Parola, sözlüğü kontrolü başarısız - %1 The password fails the dictionary check - + Parola, sözlük onayı başarısız Unknown setting - %1 - + Bilinmeyen ayar - %1 Unknown setting - + Bilinmeyen ayar Bad integer value of setting - %1 - + Ayarın bozuk tam sayı değeri - %1 Bad integer value - + Yanlış tamsayı değeri Setting %1 is not of integer type - + %1 ayarı tamsayı tipi değil Setting is not of integer type - + Ayar tamsayı tipi değil Setting %1 is not of string type - + Ayar %1, dize tipi değil Setting is not of string type - + Ayar, dize tipi değil Opening the configuration file failed - + Yapılandırma dosyasını açma başarısız oldu The configuration file is malformed - + Yapılandırma dosyası hatalı biçimlendirildi Fatal failure - + Ölümcül arıza Unknown error - + Bilinmeyen hata @@ -1829,7 +1829,8 @@ Kuruluma devam edebilirsiniz fakat bazı özellikler devre dışı kalabilir. There was no output from the command. - + +Komut çıktısı yok. From 7e2f7dc4146148cc0732a786d294f8c5ff8800c2 Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Fri, 9 Mar 2018 11:34:28 -0500 Subject: [PATCH 02/34] i18n: [desktop] Automatic merge of Transifex translations --- calamares.desktop | 4 ++++ 1 file changed, 4 insertions(+) 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 From 1791ac2d43a18c1c61689dcbec3c0532367f8289 Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Fri, 9 Mar 2018 11:34:30 -0500 Subject: [PATCH 03/34] i18n: [dummypythonqt] Automatic merge of Transifex translations --- .../lang/bg/LC_MESSAGES/dummypythonqt.mo | Bin 423 -> 585 bytes .../lang/bg/LC_MESSAGES/dummypythonqt.po | 7 ++++--- .../lang/tr_TR/LC_MESSAGES/dummypythonqt.mo | Bin 991 -> 997 bytes .../lang/tr_TR/LC_MESSAGES/dummypythonqt.po | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/dummypythonqt/lang/bg/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/bg/LC_MESSAGES/dummypythonqt.mo index 470525ae3c03bfc99adf9ede7a19efd849d2daf4..348cc26294c8cb7f4ad5b1d04b0a3c36757650f5 100644 GIT binary patch delta 255 zcmZ3^e3GU9o)F7a1|VPtVi_Pd0b*7l_5orLNC0A9AWj5gP9V+);?;}{43$8d4~SKn z7#Ku=v`2C0F8i4{Qt=DG%!x&|f+ T1{PL^W, 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 12c4645f65f7e37608731a4b5759232956ab5261..57e8ac336a81599713f72037dedeced41d905e6a 100644 GIT binary patch delta 105 zcmcc5{*-+}i0NTQ28IM67GPjtP+?|ZFa^@4K$;IoX9H, 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!" From a519be130cf68f97054553d276440dd19e9e0971 Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Fri, 9 Mar 2018 11:34:31 -0500 Subject: [PATCH 04/34] i18n: [python] Automatic merge of Transifex translations --- lang/python/bg/LC_MESSAGES/python.mo | Bin 423 -> 894 bytes lang/python/bg/LC_MESSAGES/python.po | 11 ++++++----- lang/python/ru/LC_MESSAGES/python.mo | Bin 559 -> 740 bytes lang/python/ru/LC_MESSAGES/python.po | 3 ++- lang/python/tr_TR/LC_MESSAGES/python.mo | Bin 1054 -> 1117 bytes lang/python/tr_TR/LC_MESSAGES/python.po | 4 +++- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lang/python/bg/LC_MESSAGES/python.mo b/lang/python/bg/LC_MESSAGES/python.mo index 98846ddf8564d3191e4d3f2154d33fc173c9b0cc..20ac27ce5d77fcf2b1e8e992eded0b4371a652bc 100644 GIT binary patch literal 894 zcmaiy&2G~`5XTLai*MzO#Bu;7D(jD^KizY+ZxBYj!tDx$z+$ zp%OP9fJ=pl6rd5Wuz3OQyakicv_&nj(ocVTX8tql_5Qdpw`;(f11tfwzDI41tel4C5#0Rbcn5VFaN2pie+Aoihwb8z9r(AO@riqsF8nNrEyGJ|_{C z)+`dU2ysSdi9h03a;%%?JF^^^S~TUo6PCm1NkdccXEao}*1?-p$e1$^H7nJ-m31F& z`mOu5#)jFV85auIWfXVtN;i_Y%{^o`8*N+_lqfLaRidbe3XWUEP60bNkz4ex7Z)7Y zai9>lXfK{LKd5`?S6aBr{UFW3y&HbzIl&Gh1-HKnGnT=ht??oOGwO0DBLDO zQdNG?Uc<$sy2+?5DzMK&-hrRup<)oL!;N|=+AnnN5^dc gHq36!@iE}|0MiG0U+<0I=})kM{|xwR`RVO{0Ua(>umAu6 delta 68 zcmeyzww&4Go)F7a1|VPrVi_P-0b*t#)&XJ=umIv*prj>`2C0F8i7)ymZ)JP{02;ao A@c;k- 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 ffbafcfcc5c0ca3553671755dc1dfce9afc7e5ab..493a6c00bf495f41b073ef65e234b30c4627d406 100644 GIT binary patch delta 251 zcmZ3_@`Sbio)F7a1|VPpVi_RT0b*7lwgF-g2moSjAPxj#9iXCGAZ-c6tAK1qAPoW_ zy>Jjvl%JehT%4Jgu27JeoSm4STCAX, 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 a95ca03ad5a130c3ac4757fc58e146758ca95e1a..fa297fff9263b5f1bc9a597c23248f58551c3120 100644 GIT binary patch delta 108 zcmbQoahGF4jNM^I28NYDEXcsXkju=#AOfW8fwUx$o&ux=fb=>bZ49LM18Hp_{TWEx w0%>`cjkESM2^(1}6y%f^CFa;_ delta 93 zcmcc1F^^+HjNM*F28NYDEXcsXkj~7&AOfT-fwUx$?gP>SKzap~zY|Dn1NoPMv>cHB f&%ANgekN{1YlVWG(xSv1TZ742%=wc)GkXI7)Eg3K 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." From d4f0be02d3f01ca5574a2bc50298a38183f4bfbf Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 12 Mar 2018 09:09:29 -0400 Subject: [PATCH 05/34] i18n: make build reproducible The RCC output files in version 2 contain a timestamp of the source file, which changes per build. Drop down to version 1, which just removes the timestamp. See reproducible builds note 'timestamps in source generated by rcc'. FIXES #917 --- CMakeModules/CalamaresAddTranslations.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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} ) From 902e392b6d422118e4de59ec0d4ccf38629cf119 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 12 Mar 2018 10:13:33 -0400 Subject: [PATCH 06/34] CMake: bump version for -rc4 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f8c96777..f3c5baca8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,7 +198,7 @@ set( CALAMARES_TRANSLATION_LANGUAGES ar ast bg ca cs_CZ da de el en en_GB es_MX 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}" ) From b95fe2227ffc5bc07d41e1c627fee0020d87d1d8 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 14 Mar 2018 08:54:55 -0400 Subject: [PATCH 07/34] CMake: remove debugging from macro --- CMakeModules/CalamaresAddBrandingSubdirectory.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake index 40c153ef7..f5219ca99 100644 --- a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake +++ b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake @@ -64,7 +64,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} ) From abe05ac8abae4662823cbbaab02952ca5fc50434 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 14 Mar 2018 09:12:27 -0400 Subject: [PATCH 08/34] CMake: document add_branding_subdirectory() - add feature to allow (re)naming and to support greater directory depths. --- .../CalamaresAddBrandingSubdirectory.cmake | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake index f5219ca99..77e1b7892 100644 --- a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake +++ b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake @@ -110,23 +110,31 @@ 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} ) + set( _CABS_NAME "${SUBDIRECTORY}" ) + cmake_parse_arguments( _CABS "" "NAME" "SUBDIRECTORIES" ${ARGN} ) 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." ) From ace30e149a7a3d392fb03650d5e1628fe86612e0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 16 Mar 2018 11:51:50 -0400 Subject: [PATCH 09/34] CMake: fix defaults-handling which was breaking in-tree build --- .../CalamaresAddBrandingSubdirectory.cmake | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake index 77e1b7892..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} ) @@ -92,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} ) @@ -126,8 +132,10 @@ endfunction() # 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 ) - set( _CABS_NAME "${SUBDIRECTORY}" ) 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} ) From 24305bd58fe2aa1ba1744e98b415f6d20596ac44 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Mar 2018 11:10:14 -0400 Subject: [PATCH 10/34] CMake: make the translations more transparent; easier to update --- CMakeLists.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f3c5baca8..9d004c9d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -185,6 +185,18 @@ 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) +# ok = incomplete +# bad = 0% translated, placeholder in tx +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,7 +204,8 @@ 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 ${_tx_complete} ${_tx_good} ${_tx_ok} ) +list( SORT CALAMARES_TRANSLATION_LANGUAGES ) ### Bump version here set( CALAMARES_VERSION_MAJOR 3 ) From 0f289e25520176e7990aaf48c6765c59bec09a51 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Mar 2018 05:01:07 -0400 Subject: [PATCH 11/34] [calamares]: Improve startup logging - Don't bother with the address of the main thread - Do put a marker on restart into the log file - Do put the Calamares version into the log file (previously, the version was printed through cDebug() before the log file was opened, so it was lost to the on-disk log). --- src/calamares/CalamaresApplication.cpp | 3 --- src/libcalamares/utils/Logger.cpp | 10 ++++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/calamares/CalamaresApplication.cpp b/src/calamares/CalamaresApplication.cpp index f606bb78b..601f6b388 100644 --- a/src/calamares/CalamaresApplication.cpp +++ b/src/calamares/CalamaresApplication.cpp @@ -65,9 +65,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/utils/Logger.cpp b/src/libcalamares/utils/Logger.cpp index fe95ad36b..85a05d22b 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 @@ -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 ); } From cdf80615b84bcae215de630055b6b08783544224 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Mar 2018 05:11:34 -0400 Subject: [PATCH 12/34] [libcalamares] Rename the log file --- src/calamares/CalamaresApplication.cpp | 7 ++++++- src/libcalamares/utils/Logger.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/calamares/CalamaresApplication.cpp b/src/calamares/CalamaresApplication.cpp index 601f6b388..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 ) ); diff --git a/src/libcalamares/utils/Logger.cpp b/src/libcalamares/utils/Logger.cpp index 85a05d22b..5c17cdddc 100644 --- a/src/libcalamares/utils/Logger.cpp +++ b/src/libcalamares/utils/Logger.cpp @@ -119,7 +119,7 @@ CalamaresLogHandler( QtMsgType type, const QMessageLogContext& context, const QS QString logFile() { - return CalamaresUtils::appLogDir().filePath( "Calamares.log" ); + return CalamaresUtils::appLogDir().filePath( "session.log" ); } From d9a1f6b18bc879a398829a2612737538988912ed Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Mar 2018 07:25:22 -0400 Subject: [PATCH 13/34] CMake: restore en to translations list --- CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d004c9d0..d74148978 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,13 +187,17 @@ endif() ### Transifex Translation status # -# complete = 100% translated -# good = nearly complete (use own judgement) -# ok = incomplete -# bad = 0% translated, placeholder in tx +# 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 +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 ) @@ -204,7 +208,7 @@ 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 ${_tx_complete} ${_tx_good} ${_tx_ok} ) +set( CALAMARES_TRANSLATION_LANGUAGES en ${_tx_complete} ${_tx_good} ${_tx_ok} ) list( SORT CALAMARES_TRANSLATION_LANGUAGES ) ### Bump version here From e2b8fb0afed3c0df351d8bd1da675149674f2ad1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Mar 2018 07:47:13 -0400 Subject: [PATCH 14/34] [welcome] Log if no translations matched at all --- src/modules/welcome/WelcomePage.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 ) From 3e30bb682e0b78ea5fe10691062d5cfbf509827b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Mar 2018 09:22:37 -0400 Subject: [PATCH 15/34] [libcalamaresui] Use cError() for logging errors, not cLog() --- src/libcalamaresui/modulesystem/Module.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) 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; } From ad6227ce2153117b82040f080cd89c0e769f46ca Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Mar 2018 09:27:11 -0400 Subject: [PATCH 16/34] [libcalamares] Remove internal functions from the logging API --- src/libcalamares/utils/Logger.cpp | 4 ++-- src/libcalamares/utils/Logger.h | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/libcalamares/utils/Logger.cpp b/src/libcalamares/utils/Logger.cpp index 5c17cdddc..17ccb60ad 100644 --- a/src/libcalamares/utils/Logger.cpp +++ b/src/libcalamares/utils/Logger.cpp @@ -86,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; @@ -116,7 +116,7 @@ CalamaresLogHandler( QtMsgType type, const QMessageLogContext& context, const QS } -QString +static QString logFile() { return CalamaresUtils::appLogDir().filePath( "session.log" ); diff --git a/src/libcalamares/utils/Logger.h b/src/libcalamares/utils/Logger.h index b6211c4fe..2c8cb0809 100644 --- a/src/libcalamares/utils/Logger.h +++ b/src/libcalamares/utils/Logger.h @@ -58,9 +58,14 @@ namespace Logger 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. From 6bb72d173d8bb5ef45aed983e5c89620e134d6ab Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Mar 2018 09:31:45 -0400 Subject: [PATCH 17/34] [libcalamares] Drop generic cLog() - Use cWarning or cError() for errors - Use cDebug(level) for other uses (but there aren't any) --- src/libcalamares/JobQueue.cpp | 2 +- src/libcalamares/utils/Logger.h | 3 +-- src/libcalamaresui/ViewManager.cpp | 8 ++++---- src/modules/partition/core/PartitionModel.cpp | 2 +- src/modules/users/SetHostNameJob.cpp | 8 ++++---- 5 files changed, 11 insertions(+), 12 deletions(-) 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/libcalamares/utils/Logger.h b/src/libcalamares/utils/Logger.h index 2c8cb0809..2da602d23 100644 --- a/src/libcalamares/utils/Logger.h +++ b/src/libcalamares/utils/Logger.h @@ -41,7 +41,7 @@ namespace Logger class DLLEXPORT CLog : public QDebug { public: - CLog( unsigned int debugLevel = 0 ); + explicit CLog( unsigned int debugLevel ); virtual ~CLog(); private: @@ -79,7 +79,6 @@ namespace Logger DLLEXPORT void setupLogLevel( unsigned int level ); } -#define cLog Logger::CLog #define cDebug Logger::CDebug #define cWarning() Logger::CDebug(Logger::LOGWARNING) << "WARNING:" #define cError() Logger::CDebug(Logger::LOGERROR) << "ERROR:" 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/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/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" ) ); } From 94000b6847c01b947b8a8a5b572bddbc7ddfcf4a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 29 Mar 2018 04:33:55 -0400 Subject: [PATCH 18/34] [plasmalnf] Improve wording of LnF explanation. --- src/modules/plasmalnf/PlasmaLnfPage.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/plasmalnf/PlasmaLnfPage.cpp b/src/modules/plasmalnf/PlasmaLnfPage.cpp index 2b171cc40..8462261c9 100644 --- a/src/modules/plasmalnf/PlasmaLnfPage.cpp +++ b/src/modules/plasmalnf/PlasmaLnfPage.cpp @@ -61,7 +61,11 @@ PlasmaLnfPage::PlasmaLnfPage( QWidget* parent ) 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(); } From 11652c585669d3d25615f1fbd3edaf7d6e17142c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 29 Mar 2018 04:45:34 -0400 Subject: [PATCH 19/34] [plasmalnf] Add pre-selected theme - For OEM modes where there is already a theme, add a preselect: key to pick a specific theme and have that one come up as already- selected in the list. - Don't re-run the lnftool if an already-selected theme is clicked again. Use toggled() instead of clicked(). --- src/modules/plasmalnf/PlasmaLnfPage.cpp | 15 +++++++++++++++ src/modules/plasmalnf/PlasmaLnfPage.h | 3 +++ src/modules/plasmalnf/PlasmaLnfViewStep.cpp | 6 ++++++ src/modules/plasmalnf/PlasmaLnfViewStep.h | 6 +++--- src/modules/plasmalnf/ThemeWidget.cpp | 2 +- src/modules/plasmalnf/plasmalnf.conf | 12 ++++++++++++ 6 files changed, 40 insertions(+), 4 deletions(-) diff --git a/src/modules/plasmalnf/PlasmaLnfPage.cpp b/src/modules/plasmalnf/PlasmaLnfPage.cpp index 8462261c9..2638ca9b1 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 @@ -94,6 +96,14 @@ PlasmaLnfPage::setEnabledThemesAll() setEnabledThemes( plasma_themes() ); } +void +PlasmaLnfPage::setPreselect( const QString& id ) +{ + m_preselect = id; + if ( !m_enabledThemes.isEmpty() ) + fillUi(); +} + void PlasmaLnfPage::updateThemeNames() { @@ -166,6 +176,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 e489e99a7..104fca83d 100644 --- a/src/modules/plasmalnf/PlasmaLnfPage.h +++ b/src/modules/plasmalnf/PlasmaLnfPage.h @@ -50,6 +50,8 @@ public: void setEnabledThemes( const ThemeInfoList& themes ); /** @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 +66,7 @@ private: Ui::PlasmaLnfPage* ui; QString m_lnfPath; + QString m_preselect; ThemeInfoList m_enabledThemes; QButtonGroup *m_buttonGroup; diff --git a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp index db8529d56..a14b8e338 100644 --- a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp +++ b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp @@ -137,6 +137,12 @@ PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap ) liveUser = configurationMap.value( "liveuser" ).toString(); m_liveUser = liveUser; + QString preselect; + if ( configurationMap.contains( "preselect" ) && configurationMap.value( "preselect" ).type() == QVariant::String ) + preselect = configurationMap.value( "preselect" ).toString(); + if ( !preselect.isEmpty() ) + m_widget->setPreselect( preselect ); + if ( configurationMap.contains( "themes" ) && configurationMap.value( "themes" ).type() == QVariant::List ) { diff --git a/src/modules/plasmalnf/PlasmaLnfViewStep.h b/src/modules/plasmalnf/PlasmaLnfViewStep.h index 7fcfc50cc..1fa4139e1 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 28e01c2ff..68a8c5f83 100644 --- a/src/modules/plasmalnf/ThemeWidget.cpp +++ b/src/modules/plasmalnf/ThemeWidget.cpp @@ -62,7 +62,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 aa9865117..49a91b3b5 100644 --- a/src/modules/plasmalnf/plasmalnf.conf +++ b/src/modules/plasmalnf/plasmalnf.conf @@ -27,3 +27,15 @@ themes: - theme: org.kde.breezedark.desktop image: "breeze-dark.png" - org.kde.fluffy-bunny.desktop + +# 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. +preselect: org.kde.breeze.desktop From c2efae765da30d3c3e28518ed8f8a976143bc007 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 29 Mar 2018 08:49:22 -0400 Subject: [PATCH 20/34] [plasmalnf] Add auto-detection of Plasma theme. - Although it's not necessarily accurate for an extensively-modified Plasma configuration, we can read the Look-and-Feel from the configuration files. Allows auto-detection. --- src/modules/plasmalnf/CMakeLists.txt | 16 +++++++++++++++- src/modules/plasmalnf/PlasmaLnfViewStep.cpp | 19 +++++++++++++++++++ src/modules/plasmalnf/plasmalnf.conf | 6 +++++- 3 files changed, 39 insertions(+), 2 deletions(-) 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/PlasmaLnfViewStep.cpp b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp index a14b8e338..2ba4f7bca 100644 --- a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp +++ b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp @@ -26,8 +26,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 ) @@ -140,6 +157,8 @@ PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap ) QString preselect; if ( configurationMap.contains( "preselect" ) && configurationMap.value( "preselect" ).type() == QVariant::String ) preselect = configurationMap.value( "preselect" ).toString(); + if ( preselect == QStringLiteral( "*" ) ) + preselect = currentPlasmaTheme(); if ( !preselect.isEmpty() ) m_widget->setPreselect( preselect ); diff --git a/src/modules/plasmalnf/plasmalnf.conf b/src/modules/plasmalnf/plasmalnf.conf index 49a91b3b5..e6ed88e77 100644 --- a/src/modules/plasmalnf/plasmalnf.conf +++ b/src/modules/plasmalnf/plasmalnf.conf @@ -38,4 +38,8 @@ themes: # 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. -preselect: org.kde.breeze.desktop +# +# 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: "*" From b0828faadb4eccbd4c2441d23860e452b406a434 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 29 Mar 2018 09:57:19 -0400 Subject: [PATCH 21/34] [plasmalnf] New setting to show all installed LnF themes - This enables working in three modes: - No themes listed; all are shown without screenshots, - Themes listed, showAll false; only those are shown, - Themes listed, showAll true; the installed-but-not-listed themes are shown after the listed ones, and have limited info. --- src/modules/plasmalnf/PlasmaLnfPage.cpp | 15 +++++++++++++++ src/modules/plasmalnf/PlasmaLnfPage.h | 3 +++ src/modules/plasmalnf/PlasmaLnfViewStep.cpp | 5 +++++ src/modules/plasmalnf/plasmalnf.conf | 12 ++++++++++-- 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/modules/plasmalnf/PlasmaLnfPage.cpp b/src/modules/plasmalnf/PlasmaLnfPage.cpp index 2638ca9b1..247fa950b 100644 --- a/src/modules/plasmalnf/PlasmaLnfPage.cpp +++ b/src/modules/plasmalnf/PlasmaLnfPage.cpp @@ -57,6 +57,7 @@ static ThemeInfoList plasma_themes() PlasmaLnfPage::PlasmaLnfPage( QWidget* parent ) : QWidget( parent ) , ui( new Ui::PlasmaLnfPage ) + , m_showAll( false ) , m_buttonGroup( nullptr ) { ui->setupUi( this ); @@ -85,6 +86,14 @@ PlasmaLnfPage::setEnabledThemes(const ThemeInfoList& themes) { m_enabledThemes = themes; + if ( m_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(); @@ -104,6 +113,12 @@ PlasmaLnfPage::setPreselect( const QString& id ) fillUi(); } +void +PlasmaLnfPage::setShowAll(bool b) +{ + m_showAll = b; +} + void PlasmaLnfPage::updateThemeNames() { diff --git a/src/modules/plasmalnf/PlasmaLnfPage.h b/src/modules/plasmalnf/PlasmaLnfPage.h index 104fca83d..564b61fef 100644 --- a/src/modules/plasmalnf/PlasmaLnfPage.h +++ b/src/modules/plasmalnf/PlasmaLnfPage.h @@ -52,6 +52,8 @@ public: void setEnabledThemesAll(); /** @brief set which theme is to be preselected. */ void setPreselect( const QString& id ); + /** @brief set whether to show all themes, not just the listed ones. */ + void setShowAll( bool b ); signals: void plasmaThemeSelected( const QString& id ); @@ -67,6 +69,7 @@ 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 2ba4f7bca..929d57360 100644 --- a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp +++ b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp @@ -162,6 +162,11 @@ PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap ) if ( !preselect.isEmpty() ) m_widget->setPreselect( preselect ); + bool showAll( false ); + if ( configurationMap.contains( "showAll" ) && configurationMap.value( "showAll" ).type() == QVariant::Bool ) + showAll = configurationMap.value( "showAll" ).toBool(); + m_widget->setShowAll( showAll ); + if ( configurationMap.contains( "themes" ) && configurationMap.value( "themes" ).type() == QVariant::List ) { diff --git a/src/modules/plasmalnf/plasmalnf.conf b/src/modules/plasmalnf/plasmalnf.conf index e6ed88e77..a3a80fcff 100644 --- a/src/modules/plasmalnf/plasmalnf.conf +++ b/src/modules/plasmalnf/plasmalnf.conf @@ -13,8 +13,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. @@ -28,6 +29,13 @@ themes: 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. From fb93a8288e74cdbcca90b905dadc72649d9e76ff Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 29 Mar 2018 10:09:45 -0400 Subject: [PATCH 22/34] [plasmalnf] Simplify showAll handling - Only need the showAll parameter once, when passing in the list of themes to show. --- src/modules/plasmalnf/PlasmaLnfPage.cpp | 15 +++++---------- src/modules/plasmalnf/PlasmaLnfPage.h | 11 +++++++---- src/modules/plasmalnf/PlasmaLnfViewStep.cpp | 11 +++++------ 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/modules/plasmalnf/PlasmaLnfPage.cpp b/src/modules/plasmalnf/PlasmaLnfPage.cpp index 247fa950b..c65e79ba2 100644 --- a/src/modules/plasmalnf/PlasmaLnfPage.cpp +++ b/src/modules/plasmalnf/PlasmaLnfPage.cpp @@ -82,11 +82,11 @@ PlasmaLnfPage::setLnfPath( const QString& path ) } void -PlasmaLnfPage::setEnabledThemes(const ThemeInfoList& themes) +PlasmaLnfPage::setEnabledThemes(const ThemeInfoList& themes, bool showAll ) { m_enabledThemes = themes; - if ( m_showAll ) + if ( showAll ) { auto plasmaThemes = plasma_themes(); for ( auto& installed_theme : plasmaThemes ) @@ -102,7 +102,9 @@ 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 @@ -113,13 +115,6 @@ PlasmaLnfPage::setPreselect( const QString& id ) fillUi(); } -void -PlasmaLnfPage::setShowAll(bool b) -{ - m_showAll = b; -} - - void PlasmaLnfPage::updateThemeNames() { auto plasmaThemes = plasma_themes(); diff --git a/src/modules/plasmalnf/PlasmaLnfPage.h b/src/modules/plasmalnf/PlasmaLnfPage.h index 564b61fef..49a6ff69a 100644 --- a/src/modules/plasmalnf/PlasmaLnfPage.h +++ b/src/modules/plasmalnf/PlasmaLnfPage.h @@ -46,14 +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 ); - /** @brief set whether to show all themes, not just the listed ones. */ - void setShowAll( bool b ); signals: void plasmaThemeSelected( const QString& id ); diff --git a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp index 929d57360..498a40fe0 100644 --- a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp +++ b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp @@ -165,12 +165,11 @@ PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap ) bool showAll( false ); if ( configurationMap.contains( "showAll" ) && configurationMap.value( "showAll" ).type() == QVariant::Bool ) showAll = configurationMap.value( "showAll" ).toBool(); - m_widget->setShowAll( showAll ); 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) @@ -179,14 +178,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 ) cDebug() << "WARNING: only one theme enabled in plasmalnf"; - m_widget->setEnabledThemes( allThemes ); + m_widget->setEnabledThemes( listedThemes, showAll ); } else m_widget->setEnabledThemesAll(); // All of them From 32a1c849352c6e5650dc0cf17e3e90bf397a172d Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 29 Mar 2018 16:50:02 -0400 Subject: [PATCH 23/34] [locale] Document the settings in locale.conf - The geoipUrl is weird, because it is not a complete URL. Document that, and what kind of data is expected. FIXES #920 --- src/modules/locale/locale.conf | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/modules/locale/locale.conf b/src/modules/locale/locale.conf index 824c8abeb..88148f47a 100644 --- a/src/modules/locale/locale.conf +++ b/src/modules/locale/locale.conf @@ -1,7 +1,33 @@ --- +# 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" -# GeoIP settings. Leave commented out to disable GeoIP. +# Some distros come with a meaningfully commented and easy to parse +# `/etc/locale.gen`, and others ship a separate file +# `/usr/share/i18n/SUPPORTED` with a clean list of supported locales. +# We first try SUPPORTED, and if it doesn't exist, we fall back +# to parsing the lines from `locale.gen`. For distro's that ship +# the `locale.gen` file installed elsewhere, the key *localeGenPath* +# can be used to specify where it is. If not set, the default +# `/etc/locale.gen` is used. +# #localeGenPath: "/etc/locale.gen" + +# GeoIP settings. Leave commented out to disable GeoIP. +# +# 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" From 240efd30f170f7f668c63ee487eea8fd908cc4c8 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 28 Mar 2018 09:59:26 -0400 Subject: [PATCH 24/34] [libcalamares] Add support for formatted, table-like output - Use DebugRow for one-row-at-a-time output with continuations. - Use DebugList for one-item-per-line with continuations. - Use DebugMap for one-row-at-a-time output of a QVariantMap. --- src/libcalamares/utils/Logger.cpp | 18 ++++ src/libcalamares/utils/Logger.h | 95 ++++++++++++++++++- src/libcalamaresui/ExecutionViewStep.cpp | 3 +- .../welcome/checker/RequirementsChecker.cpp | 18 ++-- 4 files changed, 125 insertions(+), 9 deletions(-) diff --git a/src/libcalamares/utils/Logger.cpp b/src/libcalamares/utils/Logger.cpp index 17ccb60ad..0a13881d3 100644 --- a/src/libcalamares/utils/Logger.cpp +++ b/src/libcalamares/utils/Logger.cpp @@ -177,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 2da602d23..5db7253bb 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, @@ -77,6 +79,97 @@ 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 cDebug Logger::CDebug 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/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 ); + } } From 9cdb6734bfa83fe3476b096f8bbe851567330240 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 3 Apr 2018 08:02:16 -0400 Subject: [PATCH 25/34] [packages] If locale is empty, pretend it is 'en'. - Otherwise packages like vi-$LOCALE will be retained in the package list, which will cause install problems. --- src/modules/packages/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/packages/main.py b/src/modules/packages/main.py index 60ede34fa..3105474f8 100644 --- a/src/modules/packages/main.py +++ b/src/modules/packages/main.py @@ -318,7 +318,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: From fd1279dbe36aef6665d04eb78b413434dfc8b3f2 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 3 Apr 2018 08:19:45 -0400 Subject: [PATCH 26/34] [welcome] Make the example configuration less strict --- src/modules/welcome/welcome.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 36aede52ef6c0d4ddb3b8cf5f752f798446ba769 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 3 Apr 2018 08:20:01 -0400 Subject: [PATCH 27/34] [packages] Example configuration installs a localization package --- src/modules/packages/packages.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/packages/packages.conf b/src/modules/packages/packages.conf index 2d6ca116f..38497c2f5 100644 --- a/src/modules/packages/packages.conf +++ b/src/modules/packages/packages.conf @@ -127,6 +127,7 @@ update_db: true operations: - install: - vi + - vi-${LOCALE} - wget - binutils - remove: From 4c04260b9783d3c14c6187fced640292d41725e8 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 3 Apr 2018 08:28:29 -0400 Subject: [PATCH 28/34] [packages] Don't change the global package list. - Count only the packages that will be changed, given the current locale settings. - Preserve global storage unchanged (don't remove any locale-packages). --- src/modules/packages/main.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/modules/packages/main.py b/src/modules/packages/main.py index 3105474f8..f252bc15f 100644 --- a/src/modules/packages/main.py +++ b/src/modules/packages/main.py @@ -367,20 +367,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: @@ -389,10 +389,10 @@ def run_operations(pkgman, entry): libcalamares.utils.debug(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: @@ -401,9 +401,9 @@ def run_operations(pkgman, entry): libcalamares.utils.debug(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()) @@ -447,7 +447,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 From b8e61445531f2ec1a56d3720a16755df6c69aafa Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 3 Apr 2018 12:10:05 -0400 Subject: [PATCH 29/34] [locale] Document how the locale entry in Global Storage works. - Make the BCP47 value explicitly lower-case. - Add some constness and encapsulation. - Fix up documentation in the packages module explaining the format of the ${LOCALE} replacement (now forced to lower-case, but it is also only the language part, not e.g. en-UK). FIXES #922 --- src/modules/locale/LocaleConfiguration.cpp | 14 +++++++++++--- src/modules/locale/LocaleConfiguration.h | 9 +++++++-- src/modules/locale/LocalePage.cpp | 6 ++++-- src/modules/packages/packages.conf | 17 +++++++++++------ 4 files changed, 33 insertions(+), 13 deletions(-) diff --git a/src/modules/locale/LocaleConfiguration.cpp b/src/modules/locale/LocaleConfiguration.cpp index b8f5f6a9e..c612c50c4 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 073d19a5b..04d1db456 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 2172586ff..8b05ccfba 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -489,8 +489,10 @@ 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 ); + cDebug() << "Updated locale globals, BCP47=" << 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/packages/packages.conf b/src/modules/packages/packages.conf index 38497c2f5..7e5717b7c 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. From 032b33f56f20c2cc7080ba240e2905e14e901384 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 4 Apr 2018 11:25:28 -0400 Subject: [PATCH 30/34] [libcalamaresui] Improve logging. - Put the (constant) 'Calamares will now quit' on its own debug line. - Tell the user what the search paths are if a module is not found (prompted by a mis-configuration in a Neon live image). --- src/libcalamaresui/modulesystem/ModuleManager.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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; } From 7e5c91aae654d41b836d90433754406fcd196fa1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 4 Apr 2018 11:42:38 -0400 Subject: [PATCH 31/34] [locale] Reduce debugging bla bla --- src/modules/locale/LocalePage.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp index aeda2c44a..e2571d085 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -492,7 +492,6 @@ LocalePage::updateGlobalStorage() const QString bcp47 = m_selectedLocaleConfiguration.toBcp47(); Calamares::JobQueue::instance()->globalStorage()->insert( "locale", bcp47 ); - cDebug() << "Updated locale globals, BCP47=" << bcp47; // If we're in chroot mode (normal install mode), then we immediately set the // timezone on the live system. From 4d459f7fc06dc832ed7f639914262e7f18e3e64a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 5 Apr 2018 04:31:13 -0400 Subject: [PATCH 32/34] [libcalamares] Move non-UI stuff from libcalamaresui - Settings is just a settings class, no UI involved, so move to libcalamares where it can be used also from system helpers. - YAML utilities are useful at a lower level of the stack, too. --- src/libcalamares/CMakeLists.txt | 9 +++++++-- src/{libcalamaresui => libcalamares}/Settings.cpp | 0 src/{libcalamaresui => libcalamares}/Settings.h | 0 src/{libcalamaresui => libcalamares}/utils/YamlUtils.cpp | 0 src/{libcalamaresui => libcalamares}/utils/YamlUtils.h | 0 src/libcalamaresui/CMakeLists.txt | 3 --- 6 files changed, 7 insertions(+), 5 deletions(-) rename src/{libcalamaresui => libcalamares}/Settings.cpp (100%) rename src/{libcalamaresui => libcalamares}/Settings.h (100%) rename src/{libcalamaresui => libcalamares}/utils/YamlUtils.cpp (100%) rename src/{libcalamaresui => libcalamares}/utils/YamlUtils.h (100%) 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/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/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 From b5c3fc8cf69274f326f5ba5d554f38f71019e9d2 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 5 Apr 2018 04:51:51 -0400 Subject: [PATCH 33/34] [libcalamares] Improve process logging - Log output on crash - If debugging is on (-d) then also log output on success FIXES #925 --- src/libcalamares/utils/CalamaresUtilsSystem.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index 54243553a..ba0de827a 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() << "Timed out. Output so far:\n" << process.readAllStandardOutput(); return -4; } @@ -182,13 +183,13 @@ System::runCommand( if ( process.exitStatus() == QProcess::CrashExit ) { - cWarning() << "Process crashed"; + cWarning() << "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; From 00a5baa3d9ce321bd3cbc9f32173c1709c96c820 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 5 Apr 2018 05:17:21 -0400 Subject: [PATCH 34/34] [libcalamares] Improve process logging - Don't insert a space before the output of a process - To do this, suppress space and quoting on the output, and to do that move the labeling-output for warnings and errors into the constructor (so that an idiomatic .nospace() does the right thing). --- src/libcalamares/utils/CalamaresUtilsSystem.cpp | 6 +++--- src/libcalamares/utils/Logger.h | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index ba0de827a..cb4bbd66a 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp +++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp @@ -174,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; } @@ -183,7 +183,7 @@ System::runCommand( if ( process.exitStatus() == QProcess::CrashExit ) { - cWarning() << "Process crashed. Output so far:\n" << output; + cWarning().noquote().nospace() << "Process crashed. Output so far:\n" << output; return -1; } @@ -192,7 +192,7 @@ System::runCommand( 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.h b/src/libcalamares/utils/Logger.h index 5db7253bb..f7488b553 100644 --- a/src/libcalamares/utils/Logger.h +++ b/src/libcalamares/utils/Logger.h @@ -56,6 +56,10 @@ namespace Logger public: CDebug( unsigned int debugLevel = LOGDEBUG ) : CLog( debugLevel ) { + if ( debugLevel <= LOGERROR ) + *this << "ERROR:"; + else if ( debugLevel <= LOGWARNING ) + *this << "WARNING:"; } virtual ~CDebug(); }; @@ -173,7 +177,7 @@ namespace Logger } #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