From cc22c0473cbe8a6b6c1a4502bd46daf96d539fb9 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@robotics.uk.to>
Date: Thu, 25 Feb 2016 20:43:30 +0000
Subject: [PATCH] Change text to be more user oriented

---
 locale/de/freedombone-controlpanel-user.json | 48 ++++++++++++++++++++
 locale/de/freedombone.json                   |  2 +
 locale/es/freedombone-controlpanel-user.json | 48 ++++++++++++++++++++
 locale/es/freedombone.json                   |  2 +
 locale/fr/freedombone-controlpanel-user.json | 48 ++++++++++++++++++++
 locale/fr/freedombone.json                   |  2 +
 src/freedombone-controlpanel-user            | 42 ++++++++---------
 7 files changed, 171 insertions(+), 21 deletions(-)
 create mode 100644 locale/de/freedombone-controlpanel-user.json
 create mode 100644 locale/es/freedombone-controlpanel-user.json
 create mode 100644 locale/fr/freedombone-controlpanel-user.json

diff --git a/locale/de/freedombone-controlpanel-user.json b/locale/de/freedombone-controlpanel-user.json
new file mode 100644
index 000000000..d9ec92b97
--- /dev/null
+++ b/locale/de/freedombone-controlpanel-user.json
@@ -0,0 +1,48 @@
+{
+    "Press any key to continue...": "",
+    "Exit back to user mainenance": "",
+    "Freedombone User Control Panel": "",
+    "Remove yourself from a mailing list": "",
+    "Select one of the following:": "",
+    "Remove yourself from mailing list": "",
+    "You have been removed from ${remove_list_name}": "",
+    "Subscribe to a mailing list": "",
+    "You can either enter a subject or an email address\\n": "",
+    "List folder name:": "",
+    "Name between [] on subject line:": "",
+    "List email address:": "",
+    "Public:": "",
+    "yes": "",
+    "Add mailing list": "",
+    "No mailing list name was given": "",
+    "No mailing list subject or address was given": "",
+    "Unrecognised email address": "",
+    "$LIST_NAME list was added": "",
+    "Create an email rule": "",
+    "When email arrives from address:": "",
+    "Move to folder:": "",
+    "no": "",
+    "No email address was given": "",
+    "No folder name was given": "",
+    "Email rule for $RULE_EMAIL was added": "",
+    "Block or unblock emails from a given address": "",
+    "Block it:": "",
+    "Block an email": "",
+    "Unblock an email": "",
+    "Block or unblock emails with text in the subject line": "",
+    "When email arrives with subject text:": "",
+    "No subject was given": "",
+    "Change Email Filtering Rules": "",
+    "Choose an operation:": "",
+    "Add yourself to a mailing list": "",
+    "Add an email rule": "",
+    "Block or unblock an email address": "",
+    "Block or unblock email with subject text": "",
+    "Back to main menu": "",
+    "User Control Panel": "",
+    "Use Email": "",
+    "Use Chat": "",
+    "Use IRC": "",
+    "Exit to the command line": "",
+    "Log out": ""
+}
\ No newline at end of file
diff --git a/locale/de/freedombone.json b/locale/de/freedombone.json
index 2bfe1ebcc..c6d74def3 100644
--- a/locale/de/freedombone.json
+++ b/locale/de/freedombone.json
@@ -129,6 +129,8 @@
     "Microblog administrator nickname: $MY_USERNAME": "",
     "Microblog administrator password: $MICROBLOG_ADMIN_PASSWORD": "",
     "Microblog onion domain: ${MICROBLOG_ONION_HOSTNAME}": "",
+    "Open https://$HUBZILLA_DOMAIN_NAME and register a new user": "",
+    "Open http://$HUBZILLA_ONION_HOSTNAME and register a new user": "",
     "Your MariaDB Hubzilla admin password is: $HUBZILLA_ADMIN_PASSWORD": "",
     "ERROR: minidlna does not appear to have installed. $CHECK_MESSAGE": "",
     "VoIP onion domain": "",
diff --git a/locale/es/freedombone-controlpanel-user.json b/locale/es/freedombone-controlpanel-user.json
new file mode 100644
index 000000000..d9ec92b97
--- /dev/null
+++ b/locale/es/freedombone-controlpanel-user.json
@@ -0,0 +1,48 @@
+{
+    "Press any key to continue...": "",
+    "Exit back to user mainenance": "",
+    "Freedombone User Control Panel": "",
+    "Remove yourself from a mailing list": "",
+    "Select one of the following:": "",
+    "Remove yourself from mailing list": "",
+    "You have been removed from ${remove_list_name}": "",
+    "Subscribe to a mailing list": "",
+    "You can either enter a subject or an email address\\n": "",
+    "List folder name:": "",
+    "Name between [] on subject line:": "",
+    "List email address:": "",
+    "Public:": "",
+    "yes": "",
+    "Add mailing list": "",
+    "No mailing list name was given": "",
+    "No mailing list subject or address was given": "",
+    "Unrecognised email address": "",
+    "$LIST_NAME list was added": "",
+    "Create an email rule": "",
+    "When email arrives from address:": "",
+    "Move to folder:": "",
+    "no": "",
+    "No email address was given": "",
+    "No folder name was given": "",
+    "Email rule for $RULE_EMAIL was added": "",
+    "Block or unblock emails from a given address": "",
+    "Block it:": "",
+    "Block an email": "",
+    "Unblock an email": "",
+    "Block or unblock emails with text in the subject line": "",
+    "When email arrives with subject text:": "",
+    "No subject was given": "",
+    "Change Email Filtering Rules": "",
+    "Choose an operation:": "",
+    "Add yourself to a mailing list": "",
+    "Add an email rule": "",
+    "Block or unblock an email address": "",
+    "Block or unblock email with subject text": "",
+    "Back to main menu": "",
+    "User Control Panel": "",
+    "Use Email": "",
+    "Use Chat": "",
+    "Use IRC": "",
+    "Exit to the command line": "",
+    "Log out": ""
+}
\ No newline at end of file
diff --git a/locale/es/freedombone.json b/locale/es/freedombone.json
index 2bfe1ebcc..c6d74def3 100644
--- a/locale/es/freedombone.json
+++ b/locale/es/freedombone.json
@@ -129,6 +129,8 @@
     "Microblog administrator nickname: $MY_USERNAME": "",
     "Microblog administrator password: $MICROBLOG_ADMIN_PASSWORD": "",
     "Microblog onion domain: ${MICROBLOG_ONION_HOSTNAME}": "",
+    "Open https://$HUBZILLA_DOMAIN_NAME and register a new user": "",
+    "Open http://$HUBZILLA_ONION_HOSTNAME and register a new user": "",
     "Your MariaDB Hubzilla admin password is: $HUBZILLA_ADMIN_PASSWORD": "",
     "ERROR: minidlna does not appear to have installed. $CHECK_MESSAGE": "",
     "VoIP onion domain": "",
diff --git a/locale/fr/freedombone-controlpanel-user.json b/locale/fr/freedombone-controlpanel-user.json
new file mode 100644
index 000000000..d9ec92b97
--- /dev/null
+++ b/locale/fr/freedombone-controlpanel-user.json
@@ -0,0 +1,48 @@
+{
+    "Press any key to continue...": "",
+    "Exit back to user mainenance": "",
+    "Freedombone User Control Panel": "",
+    "Remove yourself from a mailing list": "",
+    "Select one of the following:": "",
+    "Remove yourself from mailing list": "",
+    "You have been removed from ${remove_list_name}": "",
+    "Subscribe to a mailing list": "",
+    "You can either enter a subject or an email address\\n": "",
+    "List folder name:": "",
+    "Name between [] on subject line:": "",
+    "List email address:": "",
+    "Public:": "",
+    "yes": "",
+    "Add mailing list": "",
+    "No mailing list name was given": "",
+    "No mailing list subject or address was given": "",
+    "Unrecognised email address": "",
+    "$LIST_NAME list was added": "",
+    "Create an email rule": "",
+    "When email arrives from address:": "",
+    "Move to folder:": "",
+    "no": "",
+    "No email address was given": "",
+    "No folder name was given": "",
+    "Email rule for $RULE_EMAIL was added": "",
+    "Block or unblock emails from a given address": "",
+    "Block it:": "",
+    "Block an email": "",
+    "Unblock an email": "",
+    "Block or unblock emails with text in the subject line": "",
+    "When email arrives with subject text:": "",
+    "No subject was given": "",
+    "Change Email Filtering Rules": "",
+    "Choose an operation:": "",
+    "Add yourself to a mailing list": "",
+    "Add an email rule": "",
+    "Block or unblock an email address": "",
+    "Block or unblock email with subject text": "",
+    "Back to main menu": "",
+    "User Control Panel": "",
+    "Use Email": "",
+    "Use Chat": "",
+    "Use IRC": "",
+    "Exit to the command line": "",
+    "Log out": ""
+}
\ No newline at end of file
diff --git a/locale/fr/freedombone.json b/locale/fr/freedombone.json
index 2bfe1ebcc..c6d74def3 100644
--- a/locale/fr/freedombone.json
+++ b/locale/fr/freedombone.json
@@ -129,6 +129,8 @@
     "Microblog administrator nickname: $MY_USERNAME": "",
     "Microblog administrator password: $MICROBLOG_ADMIN_PASSWORD": "",
     "Microblog onion domain: ${MICROBLOG_ONION_HOSTNAME}": "",
+    "Open https://$HUBZILLA_DOMAIN_NAME and register a new user": "",
+    "Open http://$HUBZILLA_ONION_HOSTNAME and register a new user": "",
     "Your MariaDB Hubzilla admin password is: $HUBZILLA_ADMIN_PASSWORD": "",
     "ERROR: minidlna does not appear to have installed. $CHECK_MESSAGE": "",
     "VoIP onion domain": "",
diff --git a/src/freedombone-controlpanel-user b/src/freedombone-controlpanel-user
index af2bd4a9d..63620d8f8 100755
--- a/src/freedombone-controlpanel-user
+++ b/src/freedombone-controlpanel-user
@@ -54,7 +54,7 @@ function remove_user_from_mailing_list {
     i=$((i+1))
     W+=($i $"Exit back to user mainenance")
 
-    list_selected=$(dialog --default-item "$i" --backtitle $"Freedombone User Control Panel" --title $"Remove a mailing list for $USER" --menu $"Select one of the following:" 24 50 17 "${W[@]}" 3>&2 2>&1 1>&3)
+    list_selected=$(dialog --default-item "$i" --backtitle $"Freedombone User Control Panel" --title $"Remove yourself from a mailing list" --menu $"Select one of the following:" 24 50 17 "${W[@]}" 3>&2 2>&1 1>&3)
 
     if [ $? -eq 0 ]; then # Exit with OK
         if [ ${list_selected} -ne ${i} ]; then
@@ -115,8 +115,8 @@ function remove_user_from_mailing_list {
             cp /home/${USER}/.procmailrc_new /home/${USER}/.procmailrc
             rm /home/${USER}/.procmailrc_new
             chown ${USER}:${USER} /home/${USER}/.procmailrc
-            dialog --title $"Remove user from mailing list" \
-                   --msgbox $"${USER} has been removed from ${remove_list_name}" 6 50
+            dialog --title $"Remove yourself from mailing list" \
+                   --msgbox $"You have been removed from ${remove_list_name}" 6 50
         fi
     fi
 }
@@ -184,7 +184,7 @@ function email_rule {
     data=$(tempfile 2>/dev/null)
     trap "rm -f $data" 0 1 2 5 15
     dialog --backtitle $"Freedombone User Control Panel" \
-           --title $"Email rule for user $USER" \
+           --title $"Create an email rule" \
            --form "\n" 9 65 4 \
               $"When email arrives from address:" 1 1 "" 1 35 24 28 \
               $"Move to folder:" 2 1 "" 2 35 24 28 \
@@ -208,33 +208,33 @@ function email_rule {
         RULE_PUBLIC='no'
     fi
     if [ ${#RULE_EMAIL} -lt 2 ]; then
-        dialog --title $"Add email rule" \
+        dialog --title $"Create an email rule" \
                --msgbox $"No email address was given" 6 40
         return
     fi
     if [ ${#RULE_FOLDER} -lt 2 ]; then
-        dialog --title $"Add email rule" \
+        dialog --title $"Create an email rule" \
                --msgbox $"No folder name was given" 6 40
         return
     fi
     if [[ "$RULE_EMAIL" != *"@"* || "$RULE_EMAIL" != *"."* ]]; then
-        dialog --title $"Add email rule" \
+        dialog --title $"Create an email rule" \
                --msgbox $"Unrecognised email address" 6 40
         return
     fi
 
     ${PROJECT_NAME}-addemail -u $USER -e "$RULE_EMAIL" \
                          -g "$RULE_FOLDER" --public $RULE_PUBLIC
-    dialog --title $"Add email rule" \
+    dialog --title $"Create an email rule" \
            --msgbox $"Email rule for $RULE_EMAIL was added" 6 40
 }
 
 function block_unblock_email {
-    blockstr=$"Block/Unblock email going to"
+    blockstr=$"Block or unblock emails from a given address"
     data=$(tempfile 2>/dev/null)
     trap "rm -f $data" 0 1 2 5 15
     dialog --backtitle $"Freedombone User Control Panel" \
-           --title "$blockstr $USER" \
+           --title "$blockstr" \
            --form "\n" 8 65 3 \
               $"When email arrives from address:" 1 1 "" 1 35 24 28 \
               $"Block it:" 2 1 "yes" 2 35 4 4 \
@@ -247,32 +247,32 @@ function block_unblock_email {
     BLOCK_EMAIL=$(cat $data | sed -n 1p)
     BLOCK=$(cat $data | sed -n 2p)
     if [ ${#BLOCK_EMAIL} -lt 2 ]; then
-        dialog --title $"Block/Unblock an email" \
+        dialog --title "$blockstr" \
                --msgbox $"No email address was given" 6 40
         return
     fi
     if [[ "$BLOCK_EMAIL" != *"@"* || "$BLOCK_EMAIL" != *"."* ]]; then
-        dialog --title $"Block/Unblock an email" \
+        dialog --title "$blockstr" \
                --msgbox $"Unrecognised email address" 6 40
         return
     fi
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
         ${PROJECT_NAME}-ignore -u $USER -e "$BLOCK_EMAIL"
         dialog --title $"Block an email" \
-               --msgbox "Email from $BLOCK_EMAIL to $USER blocked" 6 40
+               --msgbox "Email from $BLOCK_EMAIL is now blocked" 6 40
     else
         ${PROJECT_NAME}-unignore -u $USER -e "$BLOCK_EMAIL"
         dialog --title $"Unblock an email" \
-               --msgbox "Email from $BLOCK_EMAIL to $USER unblocked" 6 40
+               --msgbox "Email from $BLOCK_EMAIL is now unblocked" 6 40
     fi
 }
 
 function block_unblock_subject {
-    blockstr=$"Block/Unblock email going to"
+    blockstr=$"Block or unblock emails with text in the subject line"
     data=$(tempfile 2>/dev/null)
     trap "rm -f $data" 0 1 2 5 15
     dialog --backtitle $"Freedombone User Control Panel" \
-           --title "$blockstr $USER" \
+           --title "$blockstr" \
            --form "\n" 8 70 3 \
               $"When email arrives with subject text:" 1 1 "" 1 40 24 28 \
               $"Block it:" 2 1 "yes" 2 40 4 4 \
@@ -285,18 +285,18 @@ function block_unblock_subject {
     BLOCK_SUBJECT=$(cat $data | sed -n 1p)
     BLOCK=$(cat $data | sed -n 2p)
     if [ ${#BLOCK_SUBJECT} -lt 2 ]; then
-        dialog --title $"Block/Unblock an email" \
+        dialog --title "$blockstr" \
                --msgbox $"No subject was given" 6 40
         return
     fi
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
         ${PROJECT_NAME}-ignore -u $USER -t "$BLOCK_SUBJECT"
         dialog --title $"Block an email" \
-               --msgbox "Email with subject $BLOCK_SUBJECT to $USER blocked" 6 40
+               --msgbox "Email with subject $BLOCK_SUBJECT is now blocked" 6 40
     else
         ${PROJECT_NAME}-unignore -u $USER -t "$BLOCK_SUBJECT"
         dialog --title $"Unblock an email" \
-               --msgbox "Email with subject $BLOCK_SUBJECT to $USER unblocked" 6 40
+               --msgbox "Email with subject $BLOCK_SUBJECT is now unblocked" 6 40
     fi
 }
 
@@ -311,8 +311,8 @@ function menu_email {
                1 $"Add yourself to a mailing list" off \
                2 $"Remove yourself from a mailing list" off \
                3 $"Add an email rule" off \
-               4 $"Block/Unblock an email address" off \
-               5 $"Block/Unblock email with subject text" off \
+               4 $"Block or unblock an email address" off \
+               5 $"Block or unblock email with subject text" off \
                6 $"Back to main menu" on 2> $data
         sel=$?
         case $sel in
-- 
GitLab