From 567b00c91e5307d7dda2d867acb73ab235715689 Mon Sep 17 00:00:00 2001 From: Andrei Shevchuk Date: Mon, 5 Nov 2018 06:33:16 +0300 Subject: [PATCH] Add Italian translation; improve installation script reliability --- README.md | 2 +- install.sh | 12 ++++++++---- theme.txt | 6 +++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 27156ab..16c8d90 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Poly dark GRUB theme -Supported languages: Chinese (simplified), English, French, German, Norwegian, Portuguese, Russian, Spanish, Ukrainian +Supported languages: Chinese (simplified), English, French, German, Italian, Norwegian, Portuguese, Russian, Spanish, Ukrainian ![](https://i.imgur.com/OHGyR2N.gif) diff --git a/install.sh b/install.sh index 78909aa..1fbe6ca 100644 --- a/install.sh +++ b/install.sh @@ -3,6 +3,9 @@ THEME='poly-dark' LANG='English' +# Change to temporary directory +cd $(mktemp -d) + # Pre-authorise sudo sudo echo @@ -12,6 +15,7 @@ declare -A LANGS=( [English]=EN [French]=FR [German]=DE + [Italian]=IT [Norwegian]=NO [Portuguese]=PT [Russian]=RU @@ -53,7 +57,7 @@ if [ -e /etc/os-release ]; then elif [[ "$ID" =~ (centos|fedora|opensuse) || \ "$ID_LIKE" =~ (fedora|rhel|suse) ]]; then - + GRUB_DIR='grub2' UPDATE_GRUB='grub2-mkconfig -o /boot/grub2/grub.cfg' fi @@ -61,10 +65,10 @@ fi echo 'Fetching theme archive' -wget https://github.com/shvchk/${THEME}/archive/master.zip +wget -O ${THEME}.zip https://github.com/shvchk/${THEME}/archive/master.zip echo 'Unpacking theme' -unzip master.zip +unzip ${THEME}.zip if [[ "$LANG" != "English" ]] then @@ -95,7 +99,7 @@ echo 'Adding theme to GRUB config' echo "GRUB_THEME=/boot/${GRUB_DIR}/themes/${THEME}/theme.txt" | sudo tee -a /etc/default/grub echo 'Removing theme installation files' -rm -rf master.zip ${THEME}-master +rm -rf ${THEME}.zip ${THEME}-master echo 'Updating GRUB' if [[ $UPDATE_GRUB ]]; then diff --git a/theme.txt b/theme.txt index e321882..a51f4a7 100644 --- a/theme.txt +++ b/theme.txt @@ -37,9 +37,11 @@ terminal-border: "0" # EN text = "Booting in %d seconds" # ES - # text = "Arranque en% d segundos" + # text = "Arranque en %d segundos" # FR # text = "Démarrage automatique dans %d secondes" + # IT + # text = "Avvio in %d secondi" # NO # text = "Starter om %d sekunder" # PT @@ -68,6 +70,8 @@ terminal-border: "0" # text = "Use las teclas ↑ y ↓ para cambiar la selección, Enter para confirmar" # FR # text = "Choisissez le système avec les flèches du clavier (↑ et ↓), puis validez avec la touche Enter (↲)" + # IT + # text = "Usa i tasti ↑ e ↓ per cambiare la selezione, premi Invio ↲ per confermare" # NO # text = "Bruk ↑ og ↓ for å endre menyvalg, velg med Enter" # PT