From b2cd70d82004ca9c5cb92ff51988d77e23497088 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob.mottram@codethink.co.uk>
Date: Wed, 17 Feb 2016 15:49:10 +0000
Subject: [PATCH] More translations

---
 locale/de/freedombone-controlpanel.json    |  1 +
 locale/de/freedombone-image-customise.json |  1 +
 locale/es/freedombone-controlpanel.json    |  1 +
 locale/es/freedombone-image-customise.json |  1 +
 locale/fr/freedombone-controlpanel.json    |  1 +
 locale/fr/freedombone-image-customise.json |  1 +
 src/freedombone-image-customise            | 21 ++++++++++++++-------
 7 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/locale/de/freedombone-controlpanel.json b/locale/de/freedombone-controlpanel.json
index 908e16ee1..f044ec6da 100644
--- a/locale/de/freedombone-controlpanel.json
+++ b/locale/de/freedombone-controlpanel.json
@@ -106,6 +106,7 @@
     "Email": "",
     "DLNA": "",
     "VoIP": "",
+    "RSS reader": "",
     "Tox": "",
     "Restore from ${remote_domain_name}": "",
     "Restore data from USB": "",
diff --git a/locale/de/freedombone-image-customise.json b/locale/de/freedombone-image-customise.json
index 6e9e2dc4c..ee898bd6c 100644
--- a/locale/de/freedombone-image-customise.json
+++ b/locale/de/freedombone-image-customise.json
@@ -5,6 +5,7 @@
     "warning: missing $rootdir$override": "",
     "\n .---.                  .              .\n |                      |              |\n |--- .--. .-.  .-.  .-.|  .-. .--.--. |.-.  .-. .--.  .-.\n |    |   (.-' (.-' (   | (   )|  |  | |   )(   )|  | (.-'\n '    '     --'  --'  -' -  -' '  '   -' -'   -' '   -  --'\n\n                    Initial base install\n\nYour system is not yet installed. To complete the process run the\nfollowing commands, then enter your details.\n\n    sudo su\n    ${PROJECT_NAME} menuconfig\n\n": "",
     "Using ssh public key:": "",
+    "Install failed. Press x to continue...": "",
     "File not found /usr/local/bin/tox-bootstrapd": "",
     "Account to run Tox's DHT bootstrap daemon": "",
     "File not found $INSTALL_DIR/toxcore/other/bootstrap_daemon/tox-bootstrapd.conf": "",
diff --git a/locale/es/freedombone-controlpanel.json b/locale/es/freedombone-controlpanel.json
index 908e16ee1..f044ec6da 100644
--- a/locale/es/freedombone-controlpanel.json
+++ b/locale/es/freedombone-controlpanel.json
@@ -106,6 +106,7 @@
     "Email": "",
     "DLNA": "",
     "VoIP": "",
+    "RSS reader": "",
     "Tox": "",
     "Restore from ${remote_domain_name}": "",
     "Restore data from USB": "",
diff --git a/locale/es/freedombone-image-customise.json b/locale/es/freedombone-image-customise.json
index 6e9e2dc4c..ee898bd6c 100644
--- a/locale/es/freedombone-image-customise.json
+++ b/locale/es/freedombone-image-customise.json
@@ -5,6 +5,7 @@
     "warning: missing $rootdir$override": "",
     "\n .---.                  .              .\n |                      |              |\n |--- .--. .-.  .-.  .-.|  .-. .--.--. |.-.  .-. .--.  .-.\n |    |   (.-' (.-' (   | (   )|  |  | |   )(   )|  | (.-'\n '    '     --'  --'  -' -  -' '  '   -' -'   -' '   -  --'\n\n                    Initial base install\n\nYour system is not yet installed. To complete the process run the\nfollowing commands, then enter your details.\n\n    sudo su\n    ${PROJECT_NAME} menuconfig\n\n": "",
     "Using ssh public key:": "",
+    "Install failed. Press x to continue...": "",
     "File not found /usr/local/bin/tox-bootstrapd": "",
     "Account to run Tox's DHT bootstrap daemon": "",
     "File not found $INSTALL_DIR/toxcore/other/bootstrap_daemon/tox-bootstrapd.conf": "",
diff --git a/locale/fr/freedombone-controlpanel.json b/locale/fr/freedombone-controlpanel.json
index 908e16ee1..f044ec6da 100644
--- a/locale/fr/freedombone-controlpanel.json
+++ b/locale/fr/freedombone-controlpanel.json
@@ -106,6 +106,7 @@
     "Email": "",
     "DLNA": "",
     "VoIP": "",
+    "RSS reader": "",
     "Tox": "",
     "Restore from ${remote_domain_name}": "",
     "Restore data from USB": "",
diff --git a/locale/fr/freedombone-image-customise.json b/locale/fr/freedombone-image-customise.json
index 6e9e2dc4c..ee898bd6c 100644
--- a/locale/fr/freedombone-image-customise.json
+++ b/locale/fr/freedombone-image-customise.json
@@ -5,6 +5,7 @@
     "warning: missing $rootdir$override": "",
     "\n .---.                  .              .\n |                      |              |\n |--- .--. .-.  .-.  .-.|  .-. .--.--. |.-.  .-. .--.  .-.\n |    |   (.-' (.-' (   | (   )|  |  | |   )(   )|  | (.-'\n '    '     --'  --'  -' -  -' '  '   -' -'   -' '   -  --'\n\n                    Initial base install\n\nYour system is not yet installed. To complete the process run the\nfollowing commands, then enter your details.\n\n    sudo su\n    ${PROJECT_NAME} menuconfig\n\n": "",
     "Using ssh public key:": "",
+    "Install failed. Press x to continue...": "",
     "File not found /usr/local/bin/tox-bootstrapd": "",
     "Account to run Tox's DHT bootstrap daemon": "",
     "File not found $INSTALL_DIR/toxcore/other/bootstrap_daemon/tox-bootstrapd.conf": "",
diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise
index 8222e6734..013b9510b 100755
--- a/src/freedombone-image-customise
+++ b/src/freedombone-image-customise
@@ -260,7 +260,10 @@ EOF
     echo '    else' >> $rootdir/root/.bashrc
     echo '        ENTROPY=$(cat /proc/sys/kernel/random/entropy_avail)' >> $rootdir/root/.bashrc
     echo '        if [ $ENTROPY -lt 500 ]; then' >> $rootdir/root/.bashrc
-    echo '            dialog --backtitle "Initial setup process" --title "Password Generation" --msgbox "WARNING: The entropy available on this system is too low to generate a password.\n\nThe installation process cannot continue." 8 50' >> $rootdir/root/.bashrc
+    ENTROPY_MESSAGE1=$'Initial setup process'
+    ENTROPY_MESSAGE2=$'Password Generation'
+    ENTROPY_MESSAGE3=$'WARNING: The entropy available on this system is too low to generate a password.\n\nThe installation process cannot continue.'
+    echo "            dialog --backtitle \"${ENTROPY_MESSAGE1}\" --title \"${ENTROPY_MESSAGE2}\" --msgbox \"${ENTROPY_MESSAGE3}\" 8 50" >> $rootdir/root/.bashrc
     echo '            exit' >> $rootdir/root/.bashrc
     echo '        fi' >> $rootdir/root/.bashrc
     echo '        NEW_USER_PASSWORD="$(openssl rand -base64 12 | cut -c1-10)"' >> $rootdir/root/.bashrc
@@ -269,18 +272,21 @@ EOF
 
     echo '    clear' >> $rootdir/root/.bashrc
     echo '    echo ""' >> $rootdir/root/.bashrc
-    echo '    echo "Your new login password is:"' >> $rootdir/root/.bashrc
+    NEW_LOGIN_PASSWORD_MESSAGE1=$'Your new login password is:'
+    NEW_LOGIN_PASSWORD_MESSAGE2=$'Use it whenever you wish to ssh into this system.'
+    NEW_LOGIN_PASSWORD_MESSAGE3=$'IMPORTANT: Please take a moment to enter the above password into a\npassword manager or write it down somewhere.'
+    PRESS_KEY_MESSAGE=$'Press any key to continue...'
+    echo "    echo \"${NEW_LOGIN_PASSWORD_MESSAGE1}\"" >> $rootdir/root/.bashrc
     echo '    echo ""' >> $rootdir/root/.bashrc
     echo '    toilet "${NEW_USER_PASSWORD}"' >> $rootdir/root/.bashrc
     echo '    echo ""' >> $rootdir/root/.bashrc
     echo '    echo "                          ${NEW_USER_PASSWORD}"' >> $rootdir/root/.bashrc
     echo '    echo ""' >> $rootdir/root/.bashrc
-    echo '    echo "Use it whenever you wish to ssh into this system."' >> $rootdir/root/.bashrc
+    echo "    echo \"${NEW_LOGIN_PASSWORD_MESSAGE2}\"" >> $rootdir/root/.bashrc
     echo '    echo ""' >> $rootdir/root/.bashrc
-    echo '    echo "IMPORTANT: Please take a moment to enter the above password into a"' >> $rootdir/root/.bashrc
-    echo '    echo "password manager or write it down somewhere."' >> $rootdir/root/.bashrc
+    echo "    echo \"${NEW_LOGIN_PASSWORD_MESSAGE3}\"" >> $rootdir/root/.bashrc
     echo '    echo ""' >> $rootdir/root/.bashrc
-    echo '    read -n1 -r -p "Press any key to continue..." key' >> $rootdir/root/.bashrc
+    echo "    read -n1 -r -p \"${PRESS_KEY_MESSAGE}\" key" >> $rootdir/root/.bashrc
 
     # change the password for the admin user
     echo -n "    echo \"${MY_USERNAME}:" >> $rootdir/root/.bashrc
@@ -325,7 +331,8 @@ EOF
     echo '    else' >> $rootdir/root/.bashrc
     echo '        key=' >> $rootdir/root/.bashrc
     echo '        while [[ $key != "x" ]]; do' >> $rootdir/root/.bashrc
-    echo '            read -n1 -r -p "Press x to continue..." key' >> $rootdir/root/.bashrc
+    INSTALL_FAIL_MESSAGE=$"Install failed. Press x to continue..."
+    echo "            read -n1 -r -p \"${INSTALL_FAIL_MESSAGE}\" key" >> $rootdir/root/.bashrc
     echo '        done' >> $rootdir/root/.bashrc
     echo '    fi' >> $rootdir/root/.bashrc
     echo '    exit' >> $rootdir/root/.bashrc
-- 
GitLab