瀏覽代碼

Beginning translation strings

Bob Mottram 9 年之前
父節點
當前提交
2558225fb5
共有 2 個文件被更改,包括 451 次插入446 次删除
  1. 251
    250
      src/freedombone-config
  2. 200
    196
      src/freedombone-controlpanel

+ 251
- 250
src/freedombone-config 查看文件

104
 
104
 
105
 function show_help {
105
 function show_help {
106
     echo ''
106
     echo ''
107
-    echo 'freedombone-config -f [config filename] -m [min password length]'
107
+    echo $'freedombone-config -f [config filename] -m [min password length]'
108
     echo ''
108
     echo ''
109
-    echo 'Creates an inventory of remote backup locations'
109
+    echo $'Creates an inventory of remote backup locations'
110
     echo ''
110
     echo ''
111
     echo ''
111
     echo ''
112
-    echo '  -h --help             Show help'
113
-    echo '  -f --filename         Configuration file (usually freedombone.cfg)'
114
-    echo '  -m --min              Minimum password length (characters)'
115
-    echo '  -w --www              Freedombone web site'
116
-    echo '  -b --bm               Freedombone support Bitmessage address'
112
+    echo $'  -h --help             Show help'
113
+    echo $'  -f --filename         Configuration file (usually freedombone.cfg)'
114
+    echo $'  -m --min              Minimum password length (characters)'
115
+    echo $'  -w --www              Freedombone web site'
116
+    echo $'  -b --bm               Freedombone support Bitmessage address'
117
     echo ''
117
     echo ''
118
     exit 0
118
     exit 0
119
 }
119
 }
276
     freedombone-remote -u $MY_USERNAME -l $REMOTE_SERVERS_LIST -t "Remote server"
276
     freedombone-remote -u $MY_USERNAME -l $REMOTE_SERVERS_LIST -t "Remote server"
277
 
277
 
278
     if [ ! -f $REMOTE_SERVERS_LIST ]; then
278
     if [ ! -f $REMOTE_SERVERS_LIST ]; then
279
-        dialog --title "Encryption keys" --msgbox 'Error obtaining server list' 6 70
279
+        dialog --title $"Encryption keys" --msgbox $'Error obtaining server list' 6 70
280
         return 1
280
         return 1
281
     fi
281
     fi
282
 
282
 
283
     # check the number of entries in the file
283
     # check the number of entries in the file
284
     no_of_servers=$(cat $REMOTE_SERVERS_LIST | wc -l)
284
     no_of_servers=$(cat $REMOTE_SERVERS_LIST | wc -l)
285
     if (( no_of_servers < 3 )); then
285
     if (( no_of_servers < 3 )); then
286
-        dialog --title "Encryption keys" \
287
-               --msgbox 'There must be at least three servers to recover the key' 6 70
286
+        dialog --title $"Encryption keys" \
287
+               --msgbox $'There must be at least three servers to recover the key' 6 70
288
         return 2
288
         return 2
289
     fi
289
     fi
290
 
290
 
292
     apt-get -y install libgfshare-bin gnupg
292
     apt-get -y install libgfshare-bin gnupg
293
     freedombone-recoverkey -u $MY_USERNAME -l $REMOTE_SERVERS_LIST
293
     freedombone-recoverkey -u $MY_USERNAME -l $REMOTE_SERVERS_LIST
294
     if [ ! "$?" = "0" ]; then
294
     if [ ! "$?" = "0" ]; then
295
-        dialog --title "Encryption keys" --msgbox 'Your key could not be recovered' 6 70
295
+        dialog --title $"Encryption keys" --msgbox $'Your key could not be recovered' 6 70
296
         return 3
296
         return 3
297
     fi
297
     fi
298
 
298
 
299
-    dialog --title "Encryption keys" --msgbox 'Your key has been recovered' 6 70
299
+    dialog --title $"Encryption keys" --msgbox $'Your key has been recovered' 6 70
300
 
300
 
301
     return 0
301
     return 0
302
 }
302
 }
308
     cd /home/$MY_USERNAME/.gnupg_fragments
308
     cd /home/$MY_USERNAME/.gnupg_fragments
309
     no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
309
     no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
310
     if (( no_of_shares < 4 )); then
310
     if (( no_of_shares < 4 )); then
311
-        dialog --title "Encryption keys" --msgbox 'Not enough fragments to reconstruct the key' 6 70
311
+        dialog --title $"Encryption keys" --msgbox $'Not enough fragments to reconstruct the key' 6 70
312
         exit 7348
312
         exit 7348
313
     fi
313
     fi
314
     apt-get -y install libgfshare-bin gnupg
314
     apt-get -y install libgfshare-bin gnupg
315
     gfcombine /home/$MY_USERNAME/.gnupg_fragments/keyshare*
315
     gfcombine /home/$MY_USERNAME/.gnupg_fragments/keyshare*
316
     if [ ! "$?" = "0" ]; then
316
     if [ ! "$?" = "0" ]; then
317
-        dialog --title "Encryption keys" --msgbox 'Unable to reconstruct the key' 6 70
317
+        dialog --title $"Encryption keys" --msgbox $'Unable to reconstruct the key' 6 70
318
         exit 7348
318
         exit 7348
319
     fi
319
     fi
320
 
320
 
321
     KEYS_FILE=/home/$MY_USERNAME/.gnupg_fragments/keyshare.asc
321
     KEYS_FILE=/home/$MY_USERNAME/.gnupg_fragments/keyshare.asc
322
     if [ ! -f $KEYS_FILE ]; then
322
     if [ ! -f $KEYS_FILE ]; then
323
-        dialog --title "Encryption keys" --msgbox 'Unable to reconstruct the key' 6 70
323
+        dialog --title $"Encryption keys" --msgbox $'Unable to reconstruct the key' 6 70
324
     fi
324
     fi
325
 
325
 
326
     su -c "gpg --allow-secret-key-import --import $KEYS_FILE" - $MY_USERNAME
326
     su -c "gpg --allow-secret-key-import --import $KEYS_FILE" - $MY_USERNAME
327
     if [ ! "$?" = "0" ]; then
327
     if [ ! "$?" = "0" ]; then
328
-        echo 'Unable to import gpg key'
328
+        echo $'Unable to import gpg key'
329
         shred -zu $KEYS_FILE
329
         shred -zu $KEYS_FILE
330
         rm -rf /home/$MY_USERNAME/.tempgnupg
330
         rm -rf /home/$MY_USERNAME/.tempgnupg
331
         exit 9654
331
         exit 9654
332
     fi
332
     fi
333
     shred -zu $KEYS_FILE
333
     shred -zu $KEYS_FILE
334
 
334
 
335
-    dialog --title "Encryption keys" --msgbox 'Key has been reconstructed' 6 70
335
+    dialog --title $"Encryption keys" --msgbox $'Key has been reconstructed' 6 70
336
 }
336
 }
337
 
337
 
338
 function interactive_gpg_from_usb {
338
 function interactive_gpg_from_usb {
339
-    dialog --title "Encryption keys" \
340
-           --msgbox 'Plug in a USB drive containing a copy of your full key or key fragment' 6 70
339
+    dialog --title $"Encryption keys" \
340
+           --msgbox $'Plug in a USB drive containing a copy of your full key or key fragment' 6 70
341
 
341
 
342
     HOME_DIR=/home/$MY_USERNAME
342
     HOME_DIR=/home/$MY_USERNAME
343
     GPG_LOADING="yes"
343
     GPG_LOADING="yes"
352
                     reconstruct_key
352
                     reconstruct_key
353
                     return 0
353
                     return 0
354
                 fi
354
                 fi
355
-                dialog --title "Encryption keys" --msgbox 'No USB drive found' 6 30
355
+                dialog --title $"Encryption keys" --msgbox $'No USB drive found' 6 30
356
                 exit 739836
356
                 exit 739836
357
             fi
357
             fi
358
         else
358
         else
366
                             reconstruct_key
366
                             reconstruct_key
367
                             return 0
367
                             return 0
368
                         fi
368
                         fi
369
-                        dialog --title "Encryption keys" --msgbox 'No USB drive found' 6 30
369
+                        dialog --title $"Encryption keys" --msgbox $'No USB drive found' 6 30
370
                         exit 27852
370
                         exit 27852
371
                     fi
371
                     fi
372
                 fi
372
                 fi
394
                 reconstruct_key
394
                 reconstruct_key
395
                 return 0
395
                 return 0
396
             fi
396
             fi
397
-            dialog --title "Encryption keys" \
398
-                   --msgbox "There was a problem mounting the USB drive to $GPG_USB_MOUNT" 6 70
397
+            dialog --title $"Encryption keys" \
398
+                   --msgbox $"There was a problem mounting the USB drive to $GPG_USB_MOUNT" 6 70
399
             rm -rf $GPG_USB_MOUNT
399
             rm -rf $GPG_USB_MOUNT
400
             exit 74393
400
             exit 74393
401
         fi
401
         fi
408
                     reconstruct_key
408
                     reconstruct_key
409
                     return 0
409
                     return 0
410
                 fi
410
                 fi
411
-                dialog --title "Encryption keys" \
412
-                       --msgbox "The directory $GPG_USB_MOUNT/.gnupg or $GPG_USB_MOUNT/.gnupg_fragments was not found" 6 70
411
+                dialog --title $"Encryption keys" \
412
+                       --msgbox $"The directory $GPG_USB_MOUNT/.gnupg or $GPG_USB_MOUNT/.gnupg_fragments was not found" 6 70
413
                 umount -f $GPG_USB_MOUNT
413
                 umount -f $GPG_USB_MOUNT
414
                 rm -rf $GPG_USB_MOUNT
414
                 rm -rf $GPG_USB_MOUNT
415
                 exit 723814
415
                 exit 723814
422
             fi
422
             fi
423
             cp -r $GPG_USB_MOUNT/.gnupg/* $HOME_DIR/.gnupg
423
             cp -r $GPG_USB_MOUNT/.gnupg/* $HOME_DIR/.gnupg
424
             GPG_LOADING="no"
424
             GPG_LOADING="no"
425
-            dialog --title "Encryption keys" \
426
-                   --msgbox "GPG Keyring loaded to $HOME_DIR" 6 70
425
+            dialog --title $"Encryption keys" \
426
+                   --msgbox $"GPG Keyring loaded to $HOME_DIR" 6 70
427
         else
427
         else
428
             if [ ! -d $HOME_DIR/.gnupg_fragments ]; then
428
             if [ ! -d $HOME_DIR/.gnupg_fragments ]; then
429
                 mkdir $HOME_DIR/.gnupg_fragments
429
                 mkdir $HOME_DIR/.gnupg_fragments
437
                     mkdir $HOME_DIR/.ssh
437
                     mkdir $HOME_DIR/.ssh
438
                 fi
438
                 fi
439
                 cp $GPG_USB_MOUNT/.ssh/* $HOME_DIR/.ssh
439
                 cp $GPG_USB_MOUNT/.ssh/* $HOME_DIR/.ssh
440
-                dialog --title "Encryption keys" \
441
-                       --msgbox "ssh keys imported" 6 70
440
+                dialog --title $"Encryption keys" \
441
+                       --msgbox $"ssh keys imported" 6 70
442
                 SSH_IMPORTED="yes"
442
                 SSH_IMPORTED="yes"
443
             fi
443
             fi
444
         fi
444
         fi
446
         umount -f $GPG_USB_MOUNT
446
         umount -f $GPG_USB_MOUNT
447
         rm -rf $GPG_USB_MOUNT
447
         rm -rf $GPG_USB_MOUNT
448
         if [[ $GPG_LOADING == "yes" ]]; then
448
         if [[ $GPG_LOADING == "yes" ]]; then
449
-            dialog --title "Encryption keys" \
450
-                   --msgbox "Now remove the USB drive. Insert the next drive containing a key fragment, or select Ok to finish" 6 70
449
+            dialog --title $"Encryption keys" \
450
+                   --msgbox $"Now remove the USB drive. Insert the next drive containing a key fragment, or select Ok to finish" 6 70
451
         fi
451
         fi
452
         GPG_CTR=$((GPG_CTR + 1))
452
         GPG_CTR=$((GPG_CTR + 1))
453
     done
453
     done
460
         GPG_CONFIGURED="yes"
460
         GPG_CONFIGURED="yes"
461
         data=$(tempfile 2>/dev/null)
461
         data=$(tempfile 2>/dev/null)
462
         trap "rm -f $data" 0 1 2 5 15
462
         trap "rm -f $data" 0 1 2 5 15
463
-        dialog --backtitle "Freedombone Configuration" \
464
-               --radiolist "GPG/PGP keys for your system:" 13 70 3 \
465
-               1 "Generate new keys (new user)" on \
466
-               2 "Import keys from USB drive/s" off \
467
-               3 "Retrieve keys from friends servers" off 2> $data
463
+        dialog --backtitle $"Freedombone Configuration" \
464
+               --radiolist $"GPG/PGP keys for your system:" 13 70 3 \
465
+               1 $"Generate new keys (new user)" on \
466
+               2 $"Import keys from USB drive/s" off \
467
+               3 $"Retrieve keys from friends servers" off 2> $data
468
         sel=$?
468
         sel=$?
469
         case $sel in
469
         case $sel in
470
             1) exit 1;;
470
             1) exit 1;;
489
         cp $CONFIGURATION_FILE temp.cfg
489
         cp $CONFIGURATION_FILE temp.cfg
490
     fi
490
     fi
491
 
491
 
492
-    FREEDNS_MESSAGE="Please enter the FreeDNS code for this domain.\n\nThe code can be found by going to https://freedns.afraid.org, selecting 'Dynamic DNS' and then opening 'Wget example'. The code will consist of letters and numbers and be between the ? and = characters."
492
+    FREEDNS_MESSAGE=$"Please enter the FreeDNS code for this domain.\n\nThe code can be found by going to https://freedns.afraid.org, selecting 'Dynamic DNS' and then opening 'Wget example'. The code will consist of letters and numbers and be between the ? and = characters."
493
 
493
 
494
-    dialog --title "Freedombone" --msgbox "Welcome to the Freedombone interactive installer. Communications freedom is only a short time away.\n\nEnsure that you have your domain and dynamic DNS settings ready.\n\nFor more information please visit $FREEDOMBONE_WEBSITE or send a Bitmessage to $FREEDOMBONE_BITMESSAGE" 15 50
494
+    dialog --title $"Freedombone" --msgbox $"Welcome to the Freedombone interactive installer. Communications freedom is only a short time away.\n\nEnsure that you have your domain and dynamic DNS settings ready.\n\nFor more information please visit $FREEDOMBONE_WEBSITE or send a Bitmessage to $FREEDOMBONE_BITMESSAGE" 15 50
495
 
495
 
496
     data=$(tempfile 2>/dev/null)
496
     data=$(tempfile 2>/dev/null)
497
     trap "rm -f $data" 0 1 2 5 15
497
     trap "rm -f $data" 0 1 2 5 15
498
-    dialog --backtitle "Freedombone Configuration" \
499
-           --radiolist "Type of Installation:" 18 40 11 \
500
-           1 Full on \
501
-           2 Writer off \
502
-           3 Cloud off \
503
-           4 Chat off \
504
-           5 Mailbox off \
505
-           6 Non-Mailbox off \
506
-           7 Social off \
507
-           8 Media off \
508
-           9 Developer off \
509
-           10 "Mesh (router)" off \
510
-           11 "Mesh (user device)" off 2> $data
498
+    dialog --backtitle $"Freedombone Configuration" \
499
+           --radiolist $"Type of Installation:" 18 40 11 \
500
+           1 $"Full" on \
501
+           2 $"Writer" off \
502
+           3 $"Cloud" off \
503
+           4 $"Chat" off \
504
+           5 $"Mailbox" off \
505
+           6 $"Non-Mailbox" off \
506
+           7 $"Social" off \
507
+           8 $"Media" off \
508
+           9 $"Developer" off \
509
+           10 $"Mesh (router)" off \
510
+           11 $"Mesh (user device)" off 2> $data
511
     sel=$?
511
     sel=$?
512
     case $sel in
512
     case $sel in
513
         1) exit 1;;
513
         1) exit 1;;
554
 
554
 
555
         data=$(tempfile 2>/dev/null)
555
         data=$(tempfile 2>/dev/null)
556
         trap "rm -f $data" 0 1 2 5 15
556
         trap "rm -f $data" 0 1 2 5 15
557
-        dialog --backtitle "Freedombone Configuration" \
558
-               --inputbox "Wireless Mesh ESSID\n\nIf you press enter the default will be '$ESSID'" 10 40 "$(grep 'ESSID' temp.cfg | awk -F '=' '{print $2}')" 2> $data
557
+        dialog --backtitle $"Freedombone Configuration" \
558
+               --inputbox $"Wireless Mesh ESSID\n\nIf you press enter the default will be '$ESSID'" 10 40 "$(grep 'ESSID' temp.cfg | awk -F '=' '{print $2}')" 2> $data
559
         sel=$?
559
         sel=$?
560
         case $sel in
560
         case $sel in
561
             0) ESSID=$(cat $data);;
561
             0) ESSID=$(cat $data);;
567
         if [[ $SYSTEM_TYPE != "$VARIANT_MESH_USER" ]]; then
567
         if [[ $SYSTEM_TYPE != "$VARIANT_MESH_USER" ]]; then
568
             data=$(tempfile 2>/dev/null)
568
             data=$(tempfile 2>/dev/null)
569
             trap "rm -f $data" 0 1 2 5 15
569
             trap "rm -f $data" 0 1 2 5 15
570
-            dialog --backtitle "Freedombone Configuration" \
571
-                   --inputbox "Give your mesh peer a name" 10 40 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
570
+            dialog --backtitle $"Freedombone Configuration" \
571
+                   --inputbox $"Give your mesh peer a name" 10 40 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
572
             sel=$?
572
             sel=$?
573
             case $sel in
573
             case $sel in
574
                 0) DEFAULT_DOMAIN_NAME=$(cat $data);;
574
                 0) DEFAULT_DOMAIN_NAME=$(cat $data);;
582
 
582
 
583
         data=$(tempfile 2>/dev/null)
583
         data=$(tempfile 2>/dev/null)
584
         trap "rm -f $data" 0 1 2 5 15
584
         trap "rm -f $data" 0 1 2 5 15
585
-        dialog --backtitle "Freedombone Configuration" \
586
-               --radiolist "Wifi Channel (spaced to be non-overlapping):" 11 50 4 \
585
+        dialog --backtitle $"Freedombone Configuration" \
586
+               --radiolist $"Wifi Channel (spaced to be non-overlapping):" 11 50 4 \
587
                1 "1" on \
587
                1 "1" on \
588
                2 "5" off \
588
                2 "5" off \
589
                3 "9" off \
589
                3 "9" off \
626
             echo "|    |   (.-' (.-' (   | (   )|  |  | |   )(   )|  | (.-' "
626
             echo "|    |   (.-' (.-' (   | (   )|  |  | |   )(   )|  | (.-' "
627
             echo "'    '     --'  --'  -' -  -' '  '   -' -'   -' '   -  --'"
627
             echo "'    '     --'  --'  -' -  -' '  '   -' -'   -' '   -  --'"
628
             echo ''
628
             echo ''
629
-            echo 'Your system is now ready for connection to the mesh network'
629
+            echo $'Your system is now ready for connection to the mesh network'
630
             echo ''
630
             echo ''
631
-            echo 'To connect to the network open a terminal and type:'
631
+            echo $'To connect to the network open a terminal and type:'
632
             echo ''
632
             echo ''
633
             echo '    meshweb'
633
             echo '    meshweb'
634
             echo ''
634
             echo ''
635
-            echo 'To disconnect from the mesh and return to the internet type:'
635
+            echo $'To disconnect from the mesh and return to the internet type:'
636
             echo ''
636
             echo ''
637
             echo '    sudo batman stop'
637
             echo '    sudo batman stop'
638
             echo ''
638
             echo ''
639
-            echo 'To turn your system into a dedicated mesh peer you could add'
640
-            echo 'the meshweb command to your startup applications'
639
+            echo $'To turn your system into a dedicated mesh peer you could add'
640
+            echo $'the meshweb command to your startup applications'
641
             echo ''
641
             echo ''
642
             touch /tmp/meshuserdevice
642
             touch /tmp/meshuserdevice
643
             exit 0
643
             exit 0
644
         else
644
         else
645
-            echo 'Failed to fully install the mesh networking system'
645
+            echo $'Failed to fully install the mesh networking system'
646
             exit 74589
646
             exit 74589
647
         fi
647
         fi
648
     fi
648
     fi
652
     else
652
     else
653
         data=$(tempfile 2>/dev/null)
653
         data=$(tempfile 2>/dev/null)
654
         trap "rm -f $data" 0 1 2 5 15
654
         trap "rm -f $data" 0 1 2 5 15
655
-        dialog --title "Select the user account to install as" \
656
-               --backtitle "Freedombone Configuration" \
655
+        dialog --title $"Select the user account to install as" \
656
+               --backtitle $"Freedombone Configuration" \
657
                --dselect "/home/$(grep 'MY_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 14 40 2> $data
657
                --dselect "/home/$(grep 'MY_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 14 40 2> $data
658
         sel=$?
658
         sel=$?
659
         case $sel in
659
         case $sel in
664
     fi
664
     fi
665
 
665
 
666
     if [ ! $MY_USERNAME ]; then
666
     if [ ! $MY_USERNAME ]; then
667
-        echo 'No user account was selected'
667
+        echo $'No user account was selected'
668
         exit 64398
668
         exit 64398
669
     fi
669
     fi
670
     if [[ $MY_USERNAME == '-f' ]]; then
670
     if [[ $MY_USERNAME == '-f' ]]; then
671
-        echo 'No user account was selected'
671
+        echo $'No user account was selected'
672
         exit 8347
672
         exit 8347
673
     fi
673
     fi
674
     if [[ $MY_USERNAME == 'debian' ]]; then
674
     if [[ $MY_USERNAME == 'debian' ]]; then
675
-        echo "Don't use the default debian user account"
675
+        echo $"Don't use the default debian user account"
676
         exit 9341
676
         exit 9341
677
     fi
677
     fi
678
     if [ ! -d /home/$MY_USERNAME ]; then
678
     if [ ! -d /home/$MY_USERNAME ]; then
679
-        echo "The directory /home/$MY_USERNAME does not exist"
679
+        echo $"The directory /home/$MY_USERNAME does not exist"
680
         exit 6437
680
         exit 6437
681
     fi
681
     fi
682
     save_configuration_file
682
     save_configuration_file
683
 
683
 
684
     if [[ $(grep "INSTALLING_ON_BBB" temp.cfg | awk -F '=' '{print $2}') == "yes" ]]; then
684
     if [[ $(grep "INSTALLING_ON_BBB" temp.cfg | awk -F '=' '{print $2}') == "yes" ]]; then
685
-        dialog --title "Install Target" \
686
-               --backtitle "Freedombone Configuration" \
687
-               --yesno "\nAre you installing onto a Beaglebone Black?" 7 60
685
+        dialog --title $"Install Target" \
686
+               --backtitle $"Freedombone Configuration" \
687
+               --yesno $"\nAre you installing onto a Beaglebone Black?" 7 60
688
     else
688
     else
689
-        dialog --title "Install Target" \
690
-               --backtitle "Freedombone Configuration" \
689
+        dialog --title $"Install Target" \
690
+               --backtitle $"Freedombone Configuration" \
691
                --defaultno \
691
                --defaultno \
692
-               --yesno "\nAre you installing onto a Beaglebone Black?" 7 60
692
+               --yesno $"\nAre you installing onto a Beaglebone Black?" 7 60
693
     fi
693
     fi
694
     sel=$?
694
     sel=$?
695
     case $sel in
695
     case $sel in
712
 
712
 
713
         data=$(tempfile 2>/dev/null)
713
         data=$(tempfile 2>/dev/null)
714
         trap "rm -f $data" 0 1 2 5 15
714
         trap "rm -f $data" 0 1 2 5 15
715
-        SOCIAL_KEY_STR="\nDo you wish to enable social key management, otherwise known as \"the unforgettable key\"?\n\nThis means that fragments of your GPG key will be included with any remote backups so that if you later lose your key then it can be reconstructed from your friends servers. If you select \"no\" then you can still do social key management, but offline using physical USB thumb drives, which is more secure but less convenient."
715
+        SOCIAL_KEY_STR=$"\nDo you wish to enable social key management, otherwise known as \"the unforgettable key\"?\n\nThis means that fragments of your GPG key will be included with any remote backups so that if you later lose your key then it can be reconstructed from your friends servers. If you select \"no\" then you can still do social key management, but offline using physical USB thumb drives, which is more secure but less convenient."
716
         if [[ $(grep "ENABLE_SOCIAL_KEY_MANAGEMENT" temp.cfg | awk -F '=' '{print $2}') == "yes" ]]; then
716
         if [[ $(grep "ENABLE_SOCIAL_KEY_MANAGEMENT" temp.cfg | awk -F '=' '{print $2}') == "yes" ]]; then
717
-            dialog --title "Social Key Management" \
718
-                   --backtitle "Freedombone Configuration" \
717
+            dialog --title $"Social Key Management" \
718
+                   --backtitle $"Freedombone Configuration" \
719
                    --yesno "$SOCIAL_KEY_STR" 15 60
719
                    --yesno "$SOCIAL_KEY_STR" 15 60
720
         else
720
         else
721
-            dialog --title "Social Key Management" \
722
-                   --backtitle "Freedombone Configuration" \
721
+            dialog --title $"Social Key Management" \
722
+                   --backtitle $"Freedombone Configuration" \
723
                    --defaultno \
723
                    --defaultno \
724
                    --yesno "$SOCIAL_KEY_STR" 15 60
724
                    --yesno "$SOCIAL_KEY_STR" 15 60
725
         fi
725
         fi
734
     data=$(tempfile 2>/dev/null)
734
     data=$(tempfile 2>/dev/null)
735
     trap "rm -f $data" 0 1 2 5 15
735
     trap "rm -f $data" 0 1 2 5 15
736
     if [[ $INSTALLING_ON_BBB != "yes" ]]; then
736
     if [[ $INSTALLING_ON_BBB != "yes" ]]; then
737
-        dialog --backtitle "Freedombone Configuration" \
738
-               --radiolist "Type of Random Number Generator:" 10 40 2 \
737
+        dialog --backtitle $"Freedombone Configuration" \
738
+               --radiolist $"Type of Random Number Generator:" 10 40 2 \
739
                1 Haveged on \
739
                1 Haveged on \
740
                2 OneRNG off 2> $data
740
                2 OneRNG off 2> $data
741
         sel=$?
741
         sel=$?
745
         esac
745
         esac
746
         case $(cat $data) in
746
         case $(cat $data) in
747
             2) HWRNG_TYPE="onerng"
747
             2) HWRNG_TYPE="onerng"
748
-               dialog --title "OneRNG Device" \
749
-                      --msgbox "Please ensure that the OneRNG device is disconnected. You can reconnect it later during the installation" 8 60
748
+               dialog --title $"OneRNG Device" \
749
+                      --msgbox $"Please ensure that the OneRNG device is disconnected. You can reconnect it later during the installation" 8 60
750
                ;;
750
                ;;
751
             255) exit 1;;
751
             255) exit 1;;
752
         esac
752
         esac
757
 
757
 
758
     data=$(tempfile 2>/dev/null)
758
     data=$(tempfile 2>/dev/null)
759
     trap "rm -f $data" 0 1 2 5 15
759
     trap "rm -f $data" 0 1 2 5 15
760
-    dialog --backtitle "Freedombone Configuration" \
761
-           --radiolist "Where to download Debian packages from:" 25 45 49 \
762
-           1 "Australia" off \
763
-           2 "Austria" off \
764
-           3 "Belarus" off \
765
-           4 "Belgium" off \
766
-           5 "Bosnia and Herzegovina" off \
767
-           6 "Brazil" off \
768
-           7 "Bulgaria" off \
769
-           8 "Canada" off \
770
-           9 "Chile" off \
771
-           10 "China" off \
772
-           11 "Croatia" off \
773
-           12 "Czech Republic" off \
774
-           13 "Denmark" off \
775
-           14 "El Salvador" off \
776
-           15 "Estonia" off \
777
-           16 "Finland" off \
778
-           17 "France 1" off \
779
-           18 "France 2" off \
780
-           19 "Germany 1" off \
781
-           20 "Germany 2" off \
782
-           21 "Greece" off \
783
-           22 "Hungary" off \
784
-           23 "Iceland" off \
785
-           24 "Iran" off \
786
-           25 "Ireland" off \
787
-           26 "Italy" off \
788
-           27 "Japan" off \
789
-           28 "Korea" off \
790
-           29 "Lithuania" off \
791
-           30 "Mexico" off \
792
-           31 "Netherlands" off \
793
-           32 "New Caledonia" off \
794
-           33 "New Zealand" off \
795
-           34 "Norway" off \
796
-           35 "Poland" off \
797
-           36 "Portugal" off \
798
-           37 "Romania" off \
799
-           38 "Russia" off \
800
-           39 "Slovakia" off \
801
-           40 "Slovenia" off \
802
-           41 "Spain" off \
803
-           42 "Sweden" off \
804
-           43 "Switzerland" off \
805
-           44 "Taiwan" off \
806
-           45 "Thailand" off \
807
-           46 "Turkey" off \
808
-           47 "Ukraine" off \
809
-           48 "United Kingdom" off \
810
-           49 "United States" on 2> $data
760
+    dialog --backtitle $"Freedombone Configuration" \
761
+           --radiolist $"Where to download Debian packages from:" 25 45 49 \
762
+           1 $"Australia" off \
763
+           2 $"Austria" off \
764
+           3 $"Belarus" off \
765
+           4 $"Belgium" off \
766
+           5 $"Bosnia and Herzegovina" off \
767
+           6 $"Brazil" off \
768
+           7 $"Bulgaria" off \
769
+           8 $"Canada" off \
770
+           9 $"Chile" off \
771
+           10 $"China" off \
772
+           11 $"Croatia" off \
773
+           12 $"Czech Republic" off \
774
+           13 $"Denmark" off \
775
+           14 $"El Salvador" off \
776
+           15 $"Estonia" off \
777
+           16 $"Finland" off \
778
+           17 $"France 1" off \
779
+           18 $"France 2" off \
780
+           19 $"Germany 1" off \
781
+           20 $"Germany 2" off \
782
+           21 $"Greece" off \
783
+           22 $"Hungary" off \
784
+           23 $"Iceland" off \
785
+           24 $"Iran" off \
786
+           25 $"Ireland" off \
787
+           26 $"Italy" off \
788
+           27 $"Japan" off \
789
+           28 $"Korea" off \
790
+           29 $"Lithuania" off \
791
+           30 $"Mexico" off \
792
+           31 $"Netherlands" off \
793
+           32 $"New Caledonia" off \
794
+           33 $"New Zealand" off \
795
+           34 $"Norway" off \
796
+           35 $"Poland" off \
797
+           36 $"Portugal" off \
798
+           37 $"Romania" off \
799
+           38 $"Russia" off \
800
+           39 $"Slovakia" off \
801
+           40 $"Slovenia" off \
802
+           41 $"Spain" off \
803
+           42 $"Sweden" off \
804
+           43 $"Switzerland" off \
805
+           44 $"Taiwan" off \
806
+           45 $"Thailand" off \
807
+           46 $"Turkey" off \
808
+           47 $"Ukraine" off \
809
+           48 $"United Kingdom" off \
810
+           49 $"United States" on 2> $data
811
     sel=$?
811
     sel=$?
812
     case $sel in
812
     case $sel in
813
         1) exit 1;;
813
         1) exit 1;;
869
 
869
 
870
     data=$(tempfile 2>/dev/null)
870
     data=$(tempfile 2>/dev/null)
871
     trap "rm -f $data" 0 1 2 5 15
871
     trap "rm -f $data" 0 1 2 5 15
872
-    dialog --backtitle "Freedombone Configuration" \
873
-           --radiolist "Pick a domain name service (DNS):" 25 50 16 \
874
-           1 "Digital Courage" on \
875
-           2 "German Privacy Foundation 1" off \
876
-           3 "German Privacy Foundation 2" off \
877
-           4 "Chaos Computer Club" off \
878
-           5 "ClaraNet" off \
879
-           6 "OpenNIC 1" off \
880
-           7 "OpenNIC 2" off \
881
-           8 "OpenNIC 3" off \
882
-           9 "OpenNIC 4" off \
883
-           10 "OpenNIC 5" off \
884
-           11 "OpenNIC 6" off \
885
-           12 "OpenNIC 7" off \
886
-           13 "PowerNS" off \
887
-           14 "ValiDOM" off \
888
-           15 "Freie Unzensierte" off \
889
-           16 "Google" off 2> $data
872
+    dialog --backtitle $"Freedombone Configuration" \
873
+           --radiolist $"Pick a domain name service (DNS):" 25 50 16 \
874
+           1 $"Digital Courage" on \
875
+           2 $"German Privacy Foundation 1" off \
876
+           3 $"German Privacy Foundation 2" off \
877
+           4 $"Chaos Computer Club" off \
878
+           5 $"ClaraNet" off \
879
+           6 $"OpenNIC 1" off \
880
+           7 $"OpenNIC 2" off \
881
+           8 $"OpenNIC 3" off \
882
+           9 $"OpenNIC 4" off \
883
+           10 $"OpenNIC 5" off \
884
+           11 $"OpenNIC 6" off \
885
+           12 $"OpenNIC 7" off \
886
+           13 $"PowerNS" off \
887
+           14 $"ValiDOM" off \
888
+           15 $"Freie Unzensierte" off \
889
+           16 $"Google" off 2> $data
890
     sel=$?
890
     sel=$?
891
     case $sel in
891
     case $sel in
892
         1) exit 1;;
892
         1) exit 1;;
949
 
949
 
950
         data=$(tempfile 2>/dev/null)
950
         data=$(tempfile 2>/dev/null)
951
         trap "rm -f $data" 0 1 2 5 15
951
         trap "rm -f $data" 0 1 2 5 15
952
-        dialog --backtitle "Freedombone Configuration" \
953
-               --radiolist "Choose Dynamic DNS provider:" 15 40 14 \
952
+        dialog --backtitle $"Freedombone Configuration" \
953
+               --radiolist $"Choose Dynamic DNS provider:" 15 40 14 \
954
                1 dyndns off \
954
                1 dyndns off \
955
                2 freedns on \
955
                2 freedns on \
956
                3 zoneedit off \
956
                3 zoneedit off \
993
         do
993
         do
994
             data=$(tempfile 2>/dev/null)
994
             data=$(tempfile 2>/dev/null)
995
             trap "rm -f $data" 0 1 2 5 15
995
             trap "rm -f $data" 0 1 2 5 15
996
-            dialog --backtitle "Freedombone Configuration" \
997
-                   --inputbox "Dynamic DNS provider username" 10 30 "$(grep 'DDNS_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
996
+            dialog --backtitle $"Freedombone Configuration" \
997
+                   --inputbox $"Dynamic DNS provider username" 10 30 "$(grep 'DDNS_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
998
             sel=$?
998
             sel=$?
999
             case $sel in
999
             case $sel in
1000
                 0) DDNS_USERNAME=$(cat $data);;
1000
                 0) DDNS_USERNAME=$(cat $data);;
1008
         do
1008
         do
1009
             data=$(tempfile 2>/dev/null)
1009
             data=$(tempfile 2>/dev/null)
1010
             trap "rm -f $data" 0 1 2 5 15
1010
             trap "rm -f $data" 0 1 2 5 15
1011
-            dialog --backtitle "Freedombone Configuration" \
1011
+            dialog --backtitle $"Freedombone Configuration" \
1012
                    --clear \
1012
                    --clear \
1013
                    --insecure \
1013
                    --insecure \
1014
-                   --passwordbox "Dynamic DNS provider password" 10 30 "$(grep 'DDNS_PASSWORD' temp.cfg | awk -F '=' '{print $2}')" 2> $data
1014
+                   --passwordbox $"Dynamic DNS provider password" 10 30 "$(grep 'DDNS_PASSWORD' temp.cfg | awk -F '=' '{print $2}')" 2> $data
1015
             sel=$?
1015
             sel=$?
1016
             case $sel in
1016
             case $sel in
1017
                 0) DDNS_PASSWORD=$(cat $data);;
1017
                 0) DDNS_PASSWORD=$(cat $data);;
1019
                 255) exit 1;;
1019
                 255) exit 1;;
1020
             esac
1020
             esac
1021
             if [ ${#DDNS_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then
1021
             if [ ${#DDNS_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then
1022
-                dialog --title "Password quality check" --msgbox "The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters. You may need to change your password on the dynamic DNS provider's web site." 10 40
1022
+                dialog --title $"Password quality check" --msgbox $"The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters. You may need to change your password on the dynamic DNS provider's web site." 10 40
1023
                 DDNS_PASSWORD=""
1023
                 DDNS_PASSWORD=""
1024
             fi
1024
             fi
1025
         done
1025
         done
1031
         do
1031
         do
1032
             data=$(tempfile 2>/dev/null)
1032
             data=$(tempfile 2>/dev/null)
1033
             trap "rm -f $data" 0 1 2 5 15
1033
             trap "rm -f $data" 0 1 2 5 15
1034
-            dialog --backtitle "Freedombone Configuration" \
1035
-                   --inputbox "Your full name (or nick)" 10 30 "$(grep 'MY_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
1034
+            dialog --backtitle $"Freedombone Configuration" \
1035
+                   --inputbox $"Your full name (or nick)" 10 30 "$(grep 'MY_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
1036
             sel=$?
1036
             sel=$?
1037
             case $sel in
1037
             case $sel in
1038
                 0) MY_NAME=$(cat $data);;
1038
                 0) MY_NAME=$(cat $data);;
1057
     fi
1057
     fi
1058
     data=$(tempfile 2>/dev/null)
1058
     data=$(tempfile 2>/dev/null)
1059
     trap "rm -f $data" 0 1 2 5 15
1059
     trap "rm -f $data" 0 1 2 5 15
1060
-    dialog --backtitle "Freedombone Configuration" \
1061
-           --title "Local Network Configuration" \
1062
-           --form "\nPlease enter the IP addresses:" 11 55 3 \
1063
-           "This system:" 1 1 "$LOCAL_NETWORK_STATIC_IP_ADDRESS" 1 16 16 15 \
1064
-           "Internet router:" 2 1 "$ROUTER_IP_ADDRESS" 2 16 16 15 \
1060
+    dialog --backtitle $"Freedombone Configuration" \
1061
+           --title $"Local Network Configuration" \
1062
+           --form $"\nPlease enter the IP addresses:" 11 55 3 \
1063
+           $"This system:" 1 1 "$LOCAL_NETWORK_STATIC_IP_ADDRESS" 1 16 16 15 \
1064
+           $"Internet router:" 2 1 "$ROUTER_IP_ADDRESS" 2 16 16 15 \
1065
            2> $data
1065
            2> $data
1066
     sel=$?
1066
     sel=$?
1067
     case $sel in
1067
     case $sel in
1080
             trap "rm -f $data" 0 1 2 5 15
1080
             trap "rm -f $data" 0 1 2 5 15
1081
 
1081
 
1082
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1082
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1083
-                dialog --backtitle "Freedombone Configuration" \
1084
-                       --title "Wiki Configuration" \
1085
-                       --form "\nPlease enter your wiki details:" 11 55 4 \
1086
-                       "Title:" 1 1 "$(grep 'WIKI_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
1087
-                       "Domain:" 2 1 "$(grep 'WIKI_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
1088
-                       "Code:" 3 1 "$(grep 'WIKI_CODE' temp.cfg | awk -F '=' '{print $2}')" 3 16 25 40 \
1083
+                dialog --backtitle $"Freedombone Configuration" \
1084
+                       --title $"Wiki Configuration" \
1085
+                       --form $"\nPlease enter your wiki details:" 11 55 4 \
1086
+                       $"Title:" 1 1 "$(grep 'WIKI_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
1087
+                       $"Domain:" 2 1 "$(grep 'WIKI_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
1088
+                       $"Code:" 3 1 "$(grep 'WIKI_CODE' temp.cfg | awk -F '=' '{print $2}')" 3 16 25 40 \
1089
                        2> $data
1089
                        2> $data
1090
             else
1090
             else
1091
-                dialog --backtitle "Freedombone Configuration" \
1092
-                       --title "Wiki Configuration" \
1093
-                       --form "\nPlease enter your wiki details:" 11 55 3 \
1094
-                       "Title:" 1 1 "$(grep 'WIKI_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
1095
-                       "Domain:" 2 1 "$(grep 'WIKI_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
1091
+                dialog --backtitle $"Freedombone Configuration" \
1092
+                       --title $"Wiki Configuration" \
1093
+                       --form $"\nPlease enter your wiki details:" 11 55 3 \
1094
+                       $"Title:" 1 1 "$(grep 'WIKI_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
1095
+                       $"Domain:" 2 1 "$(grep 'WIKI_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
1096
                        2> $data
1096
                        2> $data
1097
             fi
1097
             fi
1098
             sel=$?
1098
             sel=$?
1107
                 validate_domain_name
1107
                 validate_domain_name
1108
                 if [[ $TEST_DOMAIN_NAME != $WIKI_DOMAIN_NAME ]]; then
1108
                 if [[ $TEST_DOMAIN_NAME != $WIKI_DOMAIN_NAME ]]; then
1109
                     WIKI_DOMAIN_NAME=
1109
                     WIKI_DOMAIN_NAME=
1110
-                    dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1110
+                    dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1111
                 else
1111
                 else
1112
                     if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1112
                     if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1113
                         WIKI_CODE=$(cat $data | sed -n 3p)
1113
                         WIKI_CODE=$(cat $data | sed -n 3p)
1114
                         if [ ${#WIKI_CODE} -lt 30 ]; then
1114
                         if [ ${#WIKI_CODE} -lt 30 ]; then
1115
                             WIKI_DOMAIN_NAME=
1115
                             WIKI_DOMAIN_NAME=
1116
-                            dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1116
+                            dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1117
                         fi
1117
                         fi
1118
                     fi
1118
                     fi
1119
                 fi
1119
                 fi
1132
             data=$(tempfile 2>/dev/null)
1132
             data=$(tempfile 2>/dev/null)
1133
             trap "rm -f $data" 0 1 2 5 15
1133
             trap "rm -f $data" 0 1 2 5 15
1134
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1134
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1135
-                dialog --backtitle "Freedombone Configuration" \
1136
-                       --title "Blog Configuration" \
1137
-                       --form "\nPlease enter your blog details:" 11 55 4 \
1138
-                       "Title:" 1 1 "$(grep 'MY_BLOG_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1139
-                       "Domain:" 2 1 "$(grep 'FULLBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
1140
-                       "Code:" 3 1 "$(grep 'FULLBLOG_CODE' temp.cfg | awk -F '=' '{print $2}')" 3 16 25 30 \
1135
+                dialog --backtitle $"Freedombone Configuration" \
1136
+                       --title $"Blog Configuration" \
1137
+                       --form $"\nPlease enter your blog details:" 11 55 4 \
1138
+                       $"Title:" 1 1 "$(grep 'MY_BLOG_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1139
+                       $"Domain:" 2 1 "$(grep 'FULLBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
1140
+                       $"Code:" 3 1 "$(grep 'FULLBLOG_CODE' temp.cfg | awk -F '=' '{print $2}')" 3 16 25 30 \
1141
                        2> $data
1141
                        2> $data
1142
             else
1142
             else
1143
-                dialog --backtitle "Freedombone Configuration" \
1144
-                       --title "Blog Configuration" \
1145
-                       --form "\nPlease enter your blog details:" 11 55 3 \
1146
-                       "Title:" 1 1 "$(grep 'MY_BLOG_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1147
-                       "Domain:" 2 1 "$(grep 'FULLBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
1143
+                dialog --backtitle $"Freedombone Configuration" \
1144
+                       --title $"Blog Configuration" \
1145
+                       --form $"\nPlease enter your blog details:" 11 55 3 \
1146
+                       $"Title:" 1 1 "$(grep 'MY_BLOG_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1147
+                       $"Domain:" 2 1 "$(grep 'FULLBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
1148
                        2> $data
1148
                        2> $data
1149
             fi
1149
             fi
1150
             sel=$?
1150
             sel=$?
1162
                 validate_domain_name
1162
                 validate_domain_name
1163
                 if [[ $TEST_DOMAIN_NAME != $FULLBLOG_DOMAIN_NAME ]]; then
1163
                 if [[ $TEST_DOMAIN_NAME != $FULLBLOG_DOMAIN_NAME ]]; then
1164
                     FULLBLOG_DOMAIN_NAME=
1164
                     FULLBLOG_DOMAIN_NAME=
1165
-                    dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1165
+                    dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1166
                 else
1166
                 else
1167
                     if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1167
                     if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1168
                         FULLBLOG_CODE=$(cat $data | sed -n 3p)
1168
                         FULLBLOG_CODE=$(cat $data | sed -n 3p)
1169
                         if [ ${#FULLBLOG_CODE} -lt 30 ]; then
1169
                         if [ ${#FULLBLOG_CODE} -lt 30 ]; then
1170
                             FULLBLOG_DOMAIN_NAME=
1170
                             FULLBLOG_DOMAIN_NAME=
1171
-                            dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1171
+                            dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1172
                         fi
1172
                         fi
1173
                     fi
1173
                     fi
1174
                 fi
1174
                 fi
1187
             data=$(tempfile 2>/dev/null)
1187
             data=$(tempfile 2>/dev/null)
1188
             trap "rm -f $data" 0 1 2 5 15
1188
             trap "rm -f $data" 0 1 2 5 15
1189
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1189
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1190
-                dialog --backtitle "Freedombone Configuration" \
1191
-                       --title "Owncloud Configuration" \
1192
-                       --form "\nPlease enter your Owncloud details:" 11 55 3 \
1193
-                       "Domain:" 1 1 "$(grep 'OWNCLOUD_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1194
-                       "Code:" 2 1 "$(grep 'OWNCLOUD_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
1190
+                dialog --backtitle $"Freedombone Configuration" \
1191
+                       --title $"Owncloud Configuration" \
1192
+                       --form $"\nPlease enter your Owncloud details:" 11 55 3 \
1193
+                       $"Domain:" 1 1 "$(grep 'OWNCLOUD_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1194
+                       $"Code:" 2 1 "$(grep 'OWNCLOUD_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
1195
                        2> $data
1195
                        2> $data
1196
             else
1196
             else
1197
-                dialog --backtitle "Freedombone Configuration" \
1198
-                       --title "Owncloud Configuration" \
1199
-                       --form "\nPlease enter your Owncloud details:" 11 55 3 \
1200
-                       "Domain:" 1 1 "$(grep 'OWNCLOUD_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1197
+                dialog --backtitle $"Freedombone Configuration" \
1198
+                       --title $"Owncloud Configuration" \
1199
+                       --form $"\nPlease enter your Owncloud details:" 11 55 3 \
1200
+                       $"Domain:" 1 1 "$(grep 'OWNCLOUD_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1201
                        2> $data
1201
                        2> $data
1202
             fi
1202
             fi
1203
             sel=$?
1203
             sel=$?
1211
                 validate_domain_name
1211
                 validate_domain_name
1212
                 if [[ $TEST_DOMAIN_NAME != $OWNCLOUD_DOMAIN_NAME ]]; then
1212
                 if [[ $TEST_DOMAIN_NAME != $OWNCLOUD_DOMAIN_NAME ]]; then
1213
                     OWNCLOUD_DOMAIN_NAME=
1213
                     OWNCLOUD_DOMAIN_NAME=
1214
-                    dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1214
+                    dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1215
                 else
1215
                 else
1216
                     if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1216
                     if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1217
                         OWNCLOUD_CODE=$(cat $data | sed -n 2p)
1217
                         OWNCLOUD_CODE=$(cat $data | sed -n 2p)
1218
                         if [ ${#OWNCLOUD_CODE} -lt 30 ]; then
1218
                         if [ ${#OWNCLOUD_CODE} -lt 30 ]; then
1219
                             OWNCLOUD_DOMAIN_NAME=
1219
                             OWNCLOUD_DOMAIN_NAME=
1220
-                            dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1220
+                            dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1221
                         fi
1221
                         fi
1222
                     fi
1222
                     fi
1223
                 fi
1223
                 fi
1236
             data=$(tempfile 2>/dev/null)
1236
             data=$(tempfile 2>/dev/null)
1237
             trap "rm -f $data" 0 1 2 5 15
1237
             trap "rm -f $data" 0 1 2 5 15
1238
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1238
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1239
-                dialog --backtitle "Freedombone Configuration" \
1240
-                       --title "Hubzilla Configuration" \
1241
-                       --form "\nPlease enter your Hubzilla details:" 11 55 3 \
1242
-                       "Domain:" 1 1 "$(grep 'HUBZILLA_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1243
-                       "Code:" 2 1 "$(grep 'HUBZILLA_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
1239
+                dialog --backtitle $"Freedombone Configuration" \
1240
+                       --title $"Hubzilla Configuration" \
1241
+                       --form $"\nPlease enter your Hubzilla details:" 11 55 3 \
1242
+                       $"Domain:" 1 1 "$(grep 'HUBZILLA_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1243
+                       $"Code:" 2 1 "$(grep 'HUBZILLA_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
1244
                        2> $data
1244
                        2> $data
1245
             else
1245
             else
1246
-                dialog --backtitle "Freedombone Configuration" \
1247
-                       --title "Hubzilla Configuration" \
1248
-                       --form "\nPlease enter your Hubzilla details:" 11 55 3 \
1249
-                       "Domain:" 1 1 "$(grep 'HUBZILLA_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1246
+                dialog --backtitle $"Freedombone Configuration" \
1247
+                       --title $"Hubzilla Configuration" \
1248
+                       --form $"\nPlease enter your Hubzilla details:" 11 55 3 \
1249
+                       $"Domain:" 1 1 "$(grep 'HUBZILLA_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1250
                        2> $data
1250
                        2> $data
1251
             fi
1251
             fi
1252
             sel=$?
1252
             sel=$?
1260
                 validate_domain_name
1260
                 validate_domain_name
1261
                 if [[ $TEST_DOMAIN_NAME != $HUBZILLA_DOMAIN_NAME ]]; then
1261
                 if [[ $TEST_DOMAIN_NAME != $HUBZILLA_DOMAIN_NAME ]]; then
1262
                     HUBZILLA_DOMAIN_NAME=
1262
                     HUBZILLA_DOMAIN_NAME=
1263
-                    dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1263
+                    dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1264
                 else
1264
                 else
1265
                     if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1265
                     if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1266
                         HUBZILLA_CODE=$(cat $data | sed -n 2p)
1266
                         HUBZILLA_CODE=$(cat $data | sed -n 2p)
1267
                         if [ ${#HUBZILLA_CODE} -lt 30 ]; then
1267
                         if [ ${#HUBZILLA_CODE} -lt 30 ]; then
1268
                             HUBZILLA_DOMAIN_NAME=
1268
                             HUBZILLA_DOMAIN_NAME=
1269
-                            dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1269
+                            dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1270
                         fi
1270
                         fi
1271
                     fi
1271
                     fi
1272
                 fi
1272
                 fi
1285
             data=$(tempfile 2>/dev/null)
1285
             data=$(tempfile 2>/dev/null)
1286
             trap "rm -f $data" 0 1 2 5 15
1286
             trap "rm -f $data" 0 1 2 5 15
1287
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1287
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1288
-                dialog --backtitle "Freedombone Configuration" \
1289
-                       --title "Microblog Configuration" \
1290
-                       --form "\nPlease enter your Microblog details:" 11 55 3 \
1291
-                       "Domain:" 1 1 "$(grep 'MICROBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1292
-                       "Code:" 2 1 "$(grep 'MICROBLOG_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
1288
+                dialog --backtitle $"Freedombone Configuration" \
1289
+                       --title $"Microblog Configuration" \
1290
+                       --form $"\nPlease enter your Microblog details:" 11 55 3 \
1291
+                       $"Domain:" 1 1 "$(grep 'MICROBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1292
+                       $"Code:" 2 1 "$(grep 'MICROBLOG_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
1293
                        2> $data
1293
                        2> $data
1294
             else
1294
             else
1295
-                dialog --backtitle "Freedombone Configuration" \
1296
-                       --title "Microblog Configuration" \
1297
-                       --form "\nPlease enter your Microblog details:" 11 55 3 \
1298
-                       "Domain:" 1 1 "$(grep 'MICROBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1295
+                dialog --backtitle $"Freedombone Configuration" \
1296
+                       --title $"Microblog Configuration" \
1297
+                       --form $"\nPlease enter your Microblog details:" 11 55 3 \
1298
+                       $"Domain:" 1 1 "$(grep 'MICROBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1299
                        2> $data
1299
                        2> $data
1300
             fi
1300
             fi
1301
             sel=$?
1301
             sel=$?
1312
                 validate_domain_name
1312
                 validate_domain_name
1313
                 if [[ $TEST_DOMAIN_NAME != $MICROBLOG_DOMAIN_NAME ]]; then
1313
                 if [[ $TEST_DOMAIN_NAME != $MICROBLOG_DOMAIN_NAME ]]; then
1314
                     MICROBLOG_DOMAIN_NAME=
1314
                     MICROBLOG_DOMAIN_NAME=
1315
-                    dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1315
+                    dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1316
                 else
1316
                 else
1317
                     if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1317
                     if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1318
                         MICROBLOG_CODE=$(cat $data | sed -n 2p)
1318
                         MICROBLOG_CODE=$(cat $data | sed -n 2p)
1319
                         if [ ${#MICROBLOG_CODE} -lt 30 ]; then
1319
                         if [ ${#MICROBLOG_CODE} -lt 30 ]; then
1320
                             MICROBLOG_DOMAIN_NAME=
1320
                             MICROBLOG_DOMAIN_NAME=
1321
-                            dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1321
+                            dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1322
                         fi
1322
                         fi
1323
                     fi
1323
                     fi
1324
                 fi
1324
                 fi
1338
             trap "rm -f $data" 0 1 2 5 15
1338
             trap "rm -f $data" 0 1 2 5 15
1339
 
1339
 
1340
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1340
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1341
-                dialog --backtitle "Freedombone Configuration" \
1342
-                       --title "Developer Configuration" \
1343
-                       --form "\nPlease enter your Git hosting site details.\nIf You don't need developer tools then just select Ok" 11 55 3 \
1344
-                       "Domain:" 1 1 "$(grep 'GIT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
1345
-                       "Code:" 2 1 "$(grep 'GIT_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
1341
+                dialog --backtitle $"Freedombone Configuration" \
1342
+                       --title $"Developer Configuration" \
1343
+                       --form $"\nPlease enter your Git hosting site details.\nIf You don't need developer tools then just select Ok" 11 55 3 \
1344
+                       $"Domain:" 1 1 "$(grep 'GIT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
1345
+                       $"Code:" 2 1 "$(grep 'GIT_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
1346
                        2> $data
1346
                        2> $data
1347
             else
1347
             else
1348
-                dialog --backtitle "Freedombone Configuration" \
1349
-                       --title "Developer Configuration" \
1350
-                       --form "\nPlease enter your Git hosting site details.\nIf You don't need developer tools then just select Ok" 11 55 2 \
1351
-                       "Domain:" 1 1 "$(grep 'GIT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
1348
+                dialog --backtitle $"Freedombone Configuration" \
1349
+                       --title $"Developer Configuration" \
1350
+                       --form $"\nPlease enter your Git hosting site details.\nIf You don't need developer tools then just select Ok" 11 55 2 \
1351
+                       $"Domain:" 1 1 "$(grep 'GIT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
1352
                        2> $data
1352
                        2> $data
1353
             fi
1353
             fi
1354
             sel=$?
1354
             sel=$?
1362
                 validate_domain_name
1362
                 validate_domain_name
1363
                 if [[ $TEST_DOMAIN_NAME != $GIT_DOMAIN_NAME ]]; then
1363
                 if [[ $TEST_DOMAIN_NAME != $GIT_DOMAIN_NAME ]]; then
1364
                     GIT_DOMAIN_NAME=
1364
                     GIT_DOMAIN_NAME=
1365
-                    dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1365
+                    dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1366
                 else
1366
                 else
1367
                     if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1367
                     if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1368
                         GIT_CODE=$(cat $data | sed -n 2p)
1368
                         GIT_CODE=$(cat $data | sed -n 2p)
1369
                         if [ ${#GIT_CODE} -lt 30 ]; then
1369
                         if [ ${#GIT_CODE} -lt 30 ]; then
1370
                             GIT_DOMAIN_NAME=
1370
                             GIT_DOMAIN_NAME=
1371
-                            dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1371
+                            dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1372
                         fi
1372
                         fi
1373
                     fi
1373
                     fi
1374
                 fi
1374
                 fi
1389
             data=$(tempfile 2>/dev/null)
1389
             data=$(tempfile 2>/dev/null)
1390
             trap "rm -f $data" 0 1 2 5 15
1390
             trap "rm -f $data" 0 1 2 5 15
1391
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1391
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1392
-                dialog --backtitle "Freedombone Configuration" \
1393
-                       --title "Default Domain" \
1394
-                       --form "\nWhich domain name should your email/XMPP/IRC/VoIP be associated with?" 11 55 3 \
1395
-                       "Domain:" 1 1 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1396
-                       "Code:" 2 1 "$(grep 'DEFAULT_DOMAIN_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
1392
+                dialog --backtitle $"Freedombone Configuration" \
1393
+                       --title $"Default Domain" \
1394
+                       --form $"\nWhich domain name should your email/XMPP/IRC/VoIP be associated with?" 11 55 3 \
1395
+                       $"Domain:" 1 1 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
1396
+                       $"Code:" 2 1 "$(grep 'DEFAULT_DOMAIN_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
1397
                        2> $data
1397
                        2> $data
1398
                 sel=$?
1398
                 sel=$?
1399
                 case $sel in
1399
                 case $sel in
1405
                 if [ $DEFAULT_DOMAIN_NAME ]; then
1405
                 if [ $DEFAULT_DOMAIN_NAME ]; then
1406
                     if [ ${#DEFAULT_DOMAIN_CODE} -lt 30 ]; then
1406
                     if [ ${#DEFAULT_DOMAIN_CODE} -lt 30 ]; then
1407
                         DEFAULT_DOMAIN_NAME=
1407
                         DEFAULT_DOMAIN_NAME=
1408
-                        dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1408
+                        dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
1409
                     fi
1409
                     fi
1410
                 fi
1410
                 fi
1411
             else
1411
             else
1412
-                dialog --backtitle "Freedombone Configuration" \
1413
-                       --inputbox "Which domain name should your email/XMPP/IRC/VoIP be associated with?" 10 45 \
1412
+                dialog --backtitle $"Freedombone Configuration" \
1413
+                       --inputbox $"Which domain name should your email/XMPP/IRC/VoIP be associated with?" 10 45 \
1414
                        "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
1414
                        "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
1415
                 sel=$?
1415
                 sel=$?
1416
                 case $sel in
1416
                 case $sel in
1424
                 validate_domain_name
1424
                 validate_domain_name
1425
                 if [[ $TEST_DOMAIN_NAME != $DEFAULT_DOMAIN_NAME ]]; then
1425
                 if [[ $TEST_DOMAIN_NAME != $DEFAULT_DOMAIN_NAME ]]; then
1426
                     DEFAULT_DOMAIN_NAME=
1426
                     DEFAULT_DOMAIN_NAME=
1427
-                    dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1427
+                    dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
1428
                 else
1428
                 else
1429
                     DEFAULT_DOMAIN_DETAILS_COMPLETE="yes"
1429
                     DEFAULT_DOMAIN_DETAILS_COMPLETE="yes"
1430
                 fi
1430
                 fi
1444
 
1444
 
1445
             data=$(tempfile 2>/dev/null)
1445
             data=$(tempfile 2>/dev/null)
1446
             trap "rm -f $data" 0 1 2 5 15
1446
             trap "rm -f $data" 0 1 2 5 15
1447
-            dialog --backtitle "Freedombone Configuration" \
1448
-                   --inputbox "Your email address" 10 30 "$EMAIL_ADDRESS" 2> $data
1447
+            dialog --backtitle $"Freedombone Configuration" \
1448
+                   --inputbox $"Your email address" 10 30 "$EMAIL_ADDRESS" 2> $data
1449
             sel=$?
1449
             sel=$?
1450
             case $sel in
1450
             case $sel in
1451
                 0) MY_EMAIL_ADDRESS=$(cat $data);;
1451
                 0) MY_EMAIL_ADDRESS=$(cat $data);;
1465
 function show_result {
1465
 function show_result {
1466
     clear
1466
     clear
1467
     echo ''
1467
     echo ''
1468
-    echo "Configuration filename: $CONFIGURATION_FILE"
1468
+    echo -n $"Configuration filename:"
1469
+    echo " $CONFIGURATION_FILE"
1469
     echo ''
1470
     echo ''
1470
-    echo 'Contents:'
1471
+    echo $'Contents:'
1471
     echo ''
1472
     echo ''
1472
     cat $CONFIGURATION_FILE
1473
     cat $CONFIGURATION_FILE
1473
     echo ''
1474
     echo ''

+ 200
- 196
src/freedombone-controlpanel 查看文件

37
 SELECTED_USERNAME=
37
 SELECTED_USERNAME=
38
 SIP_CONFIG_FILE=/etc/sipwitch.conf
38
 SIP_CONFIG_FILE=/etc/sipwitch.conf
39
 ADMIN_USER=
39
 ADMIN_USER=
40
-UPGRADE_SCRIPT_NAME="freedombone-upgrade"
40
+UPGRADE_SCRIPT_NAME="${PROJECT_NAME}-upgrade"
41
 
41
 
42
 function any_key {
42
 function any_key {
43
     echo ' '
43
     echo ' '
46
 
46
 
47
 function check_for_updates {
47
 function check_for_updates {
48
     if [ ! -f /etc/cron.weekly/$UPGRADE_SCRIPT_NAME ]; then
48
     if [ ! -f /etc/cron.weekly/$UPGRADE_SCRIPT_NAME ]; then
49
-        dialog --title "Check for updates" \
50
-               --msgbox "Upgrade script was not found" 6 40
49
+        dialog --title $"Check for updates" \
50
+               --msgbox $"Upgrade script was not found" 6 40
51
         return
51
         return
52
     fi
52
     fi
53
 
53
 
59
 function add_user {
59
 function add_user {
60
     data=$(tempfile 2>/dev/null)
60
     data=$(tempfile 2>/dev/null)
61
     trap "rm -f $data" 0 1 2 5 15
61
     trap "rm -f $data" 0 1 2 5 15
62
-    dialog --backtitle "Freedombone Control Panel" \
63
-           --title "Add new user" \
62
+    dialog --backtitle $"Freedombone Control Panel" \
63
+           --title $"Add new user" \
64
            --form "\n" 8 40 3 \
64
            --form "\n" 8 40 3 \
65
-              "Username:" 1 1 "" 1 11 16 15 \
66
-              "ssh public key (optional):" 2 1 "" 3 1 40 10000 \
65
+              $"Username:" 1 1 "" 1 11 16 15 \
66
+              $"ssh public key (optional):" 2 1 "" 3 1 40 10000 \
67
               2> $data
67
               2> $data
68
     sel=$?
68
     sel=$?
69
     case $sel in
69
     case $sel in
73
     new_user_username=$(cat $data | sed -n 1p)
73
     new_user_username=$(cat $data | sed -n 1p)
74
     new_user_ssh_public_key=$(cat $data | sed -n 2p)
74
     new_user_ssh_public_key=$(cat $data | sed -n 2p)
75
     if [ ${#new_user_username} -lt 2 ]; then
75
     if [ ${#new_user_username} -lt 2 ]; then
76
-        dialog --title "New username" \
77
-               --msgbox "No username was given" 6 40
76
+        dialog --title $"New username" \
77
+               --msgbox $"No username was given" 6 40
78
         return
78
         return
79
     fi
79
     fi
80
     if [[ "$new_user_username" == *" "* ]]; then
80
     if [[ "$new_user_username" == *" "* ]]; then
81
-        dialog --title "Invalid username" \
82
-               --msgbox "The username should not contain any spaces" 6 40
81
+        dialog --title $"Invalid username" \
82
+               --msgbox $"The username should not contain any spaces" 6 40
83
         return
83
         return
84
     fi
84
     fi
85
     if [ ${#new_user_ssh_public_key} -lt 20 ]; then
85
     if [ ${#new_user_ssh_public_key} -lt 20 ]; then
92
             freedombone-adduser "$new_user_username" "$new_user_ssh_public_key"
92
             freedombone-adduser "$new_user_username" "$new_user_ssh_public_key"
93
             any_key
93
             any_key
94
         else
94
         else
95
-            dialog --title "ssh public key" \
96
-                   --msgbox "This does not look like an ssh public key" 6 40
95
+            dialog --title $"ssh public key" \
96
+                   --msgbox $"This does not look like an ssh public key" 6 40
97
         fi
97
         fi
98
     fi
98
     fi
99
 }
99
 }
103
         return;
103
         return;
104
     fi
104
     fi
105
     clear
105
     clear
106
-    echo "SIP phone extensions:"
106
+    echo $"SIP phone extensions:"
107
     echo " "
107
     echo " "
108
     while read ext; do
108
     while read ext; do
109
         if [[ $ext == *"user id"* ]]; then
109
         if [[ $ext == *"user id"* ]]; then
123
     data=$(tempfile 2>/dev/null)
123
     data=$(tempfile 2>/dev/null)
124
     trap "rm -f $data" 0 1 2 5 15
124
     trap "rm -f $data" 0 1 2 5 15
125
     dialog --title "Select a user" \
125
     dialog --title "Select a user" \
126
-           --backtitle "Freedombone Control Panel" \
126
+           --backtitle $"Freedombone Control Panel" \
127
            --dselect "/home/" 14 40 2> $data
127
            --dselect "/home/" 14 40 2> $data
128
     sel=$?
128
     sel=$?
129
     case $sel in
129
     case $sel in
135
         SELECTED_USERNAME=
135
         SELECTED_USERNAME=
136
     fi
136
     fi
137
     if [ ! -d /home/$SELECTED_USERNAME/Maildir ]; then
137
     if [ ! -d /home/$SELECTED_USERNAME/Maildir ]; then
138
-        dialog --title "User directory check" \
139
-               --msgbox "This does not look like a user directory" 6 40
138
+        dialog --title $"User directory check" \
139
+               --msgbox $"This does not look like a user directory" 6 40
140
         SELECTED_USERNAME=
140
         SELECTED_USERNAME=
141
     fi
141
     fi
142
 }
142
 }
147
         return
147
         return
148
     fi
148
     fi
149
     if grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
149
     if grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
150
-        dialog --title "Administrator user" \
151
-               --msgbox "You can't delete the administrator user" 6 40
150
+        dialog --title $"Administrator user" \
151
+               --msgbox $"You can't delete the administrator user" 6 40
152
         return
152
         return
153
     fi
153
     fi
154
     clear
154
     clear
158
 
158
 
159
 function configure_remote_backups {
159
 function configure_remote_backups {
160
     if ! grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
160
     if ! grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
161
-        dialog --title "Administrator user" \
162
-               --msgbox "No Administrator user found. Check $COMPLETION_FILE" 6 40
161
+        dialog --title $"Administrator user" \
162
+               --msgbox $"No Administrator user found. Check $COMPLETION_FILE" 6 40
163
         return
163
         return
164
     fi
164
     fi
165
     if [ ${#ADMIN} -lt 2 ]; then
165
     if [ ${#ADMIN} -lt 2 ]; then
166
-        dialog --title "Administrator user" \
167
-               --msgbox "Username not found" 6 40
166
+        dialog --title $"Administrator user" \
167
+               --msgbox $"Username not found" 6 40
168
         return
168
         return
169
     fi
169
     fi
170
     if [ ! -d /home/$ADMIN_USER ]; then
170
     if [ ! -d /home/$ADMIN_USER ]; then
171
-        dialog --title "Administrator user" \
172
-               --msgbox "Home directory not found" 6 40
171
+        dialog --title $"Administrator user" \
172
+               --msgbox $"Home directory not found" 6 40
173
         return
173
         return
174
     fi
174
     fi
175
     freedombone-remote -u $ADMIN_USER
175
     freedombone-remote -u $ADMIN_USER
181
         return
181
         return
182
     fi
182
     fi
183
     clear
183
     clear
184
-    echo "Change password for $SELECTED_USERNAME"
184
+    echo -n $"Change password for"
185
+    echo " $SELECTED_USERNAME"
185
     echo ""
186
     echo ""
186
     su -c "passwd" - $SELECTED_USERNAME
187
     su -c "passwd" - $SELECTED_USERNAME
187
     any_key
188
     any_key
194
     fi
195
     fi
195
 
196
 
196
     if grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
197
     if grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
197
-        dialog --title "Change ssh public key" \
198
-               --backtitle "Freedombone Control Panel" \
198
+        dialog --title $"Change ssh public key" \
199
+               --backtitle $"Freedombone Control Panel" \
199
                --defaultno \
200
                --defaultno \
200
-               --yesno "\nThis is the administrator user.\n\nAre you sure you want to change the ssh public key for the administrator?" 10 60
201
+               --yesno $"\nThis is the administrator user.\n\nAre you sure you want to change the ssh public key for the administrator?" 10 60
201
         sel=$?
202
         sel=$?
202
         case $sel in
203
         case $sel in
203
             1) return;;
204
             1) return;;
207
 
208
 
208
     data=$(tempfile 2>/dev/null)
209
     data=$(tempfile 2>/dev/null)
209
     trap "rm -f $data" 0 1 2 5 15
210
     trap "rm -f $data" 0 1 2 5 15
210
-    dialog --title "Change ssh public key for $SELECTED_USERNAME" \
211
-           --backtitle "Freedombone Control Panel" \
212
-           --inputbox "Paste the ssh public key below" 8 60 2>$data
211
+    dialog --title $"Change ssh public key for $SELECTED_USERNAME" \
212
+           --backtitle $"Freedombone Control Panel" \
213
+           --inputbox $"Paste the ssh public key below" 8 60 2>$data
213
     sel=$?
214
     sel=$?
214
     case $sel in
215
     case $sel in
215
         0)
216
         0)
224
                            /home/$SELECTED_USERNAME/.ssh/authorized_keys
225
                            /home/$SELECTED_USERNAME/.ssh/authorized_keys
225
                         chown -R $SELECTED_USERNAME:$SELECTED_USERNAME \
226
                         chown -R $SELECTED_USERNAME:$SELECTED_USERNAME \
226
                               /home/$SELECTED_USERNAME/.ssh
227
                               /home/$SELECTED_USERNAME/.ssh
227
-                        dialog --title "Change ssh public key" \
228
-                               --msgbox "ssh public key was installed" 6 40
228
+                        dialog --title $"Change ssh public key" \
229
+                               --msgbox $"ssh public key was installed" 6 40
229
                     else
230
                     else
230
                         if [[ "$SSH_PUBLIC_KEY" == "ssh-"* ]]; then
231
                         if [[ "$SSH_PUBLIC_KEY" == "ssh-"* ]]; then
231
                             if [ ! -d /home/$SELECTED_USERNAME/.ssh ]; then
232
                             if [ ! -d /home/$SELECTED_USERNAME/.ssh ]; then
235
                                  /home/$SELECTED_USERNAME/.ssh/authorized_keys
236
                                  /home/$SELECTED_USERNAME/.ssh/authorized_keys
236
                             chown -R $SELECTED_USERNAME:$SELECTED_USERNAME \
237
                             chown -R $SELECTED_USERNAME:$SELECTED_USERNAME \
237
                                   /home/$SELECTED_USERNAME/.ssh
238
                                   /home/$SELECTED_USERNAME/.ssh
238
-                            dialog --title "Change ssh public key" \
239
-                                   --msgbox "ssh public key was installed" 6 40
239
+                            dialog --title $"Change ssh public key" \
240
+                                   --msgbox $"ssh public key was installed" 6 40
240
                         fi
241
                         fi
241
                     fi
242
                     fi
242
                 fi
243
                 fi
252
     fi
253
     fi
253
     data=$(tempfile 2>/dev/null)
254
     data=$(tempfile 2>/dev/null)
254
     trap "rm -f $data" 0 1 2 5 15
255
     trap "rm -f $data" 0 1 2 5 15
255
-    dialog --backtitle "Freedombone Control Panel" \
256
-           --title "Subscribe $SELECTED_USERNAME to a mailing list" \
256
+    dialog --backtitle $"Freedombone Control Panel" \
257
+           --title $"Subscribe $SELECTED_USERNAME to a mailing list" \
257
            --form "\n" 8 68 4 \
258
            --form "\n" 8 68 4 \
258
-              "List folder name:" 1 1 "" 1 35 26 25 \
259
-              "Name between [] on subject line:" 2 1 "" 2 35 26 25 \
260
-              "List email address:" 3 1 "" 3 35 26 25 \
259
+              $"List folder name:" 1 1 "" 1 35 26 25 \
260
+              $"Name between [] on subject line:" 2 1 "" 2 35 26 25 \
261
+              $"List email address:" 3 1 "" 3 35 26 25 \
261
               2> $data
262
               2> $data
262
     sel=$?
263
     sel=$?
263
     case $sel in
264
     case $sel in
269
     LIST_EMAIL=$(cat $data | sed -n 3p)
270
     LIST_EMAIL=$(cat $data | sed -n 3p)
270
 
271
 
271
     if [ ${#LIST_NAME} -lt 2 ]; then
272
     if [ ${#LIST_NAME} -lt 2 ]; then
272
-        dialog --title "Add mailing list" \
273
-               --msgbox "No mailing list name was given" 6 40
273
+        dialog --title $"Add mailing list" \
274
+               --msgbox $"No mailing list name was given" 6 40
274
         return
275
         return
275
     fi
276
     fi
276
     if [ ${#LIST_SUBJECT} -lt 2 ]; then
277
     if [ ${#LIST_SUBJECT} -lt 2 ]; then
277
-        dialog --title "Add mailing list" \
278
-               --msgbox "No mailing list subject was given" 6 40
278
+        dialog --title $"Add mailing list" \
279
+               --msgbox $"No mailing list subject was given" 6 40
279
         return
280
         return
280
     fi
281
     fi
281
     if [ ${#LIST_EMAIL} -lt 2 ]; then
282
     if [ ${#LIST_EMAIL} -lt 2 ]; then
282
-        dialog --title "Add mailing list" \
283
-               --msgbox "No mailing list email address was given" 6 40
283
+        dialog --title $"Add mailing list" \
284
+               --msgbox $"No mailing list email address was given" 6 40
284
         return
285
         return
285
     fi
286
     fi
286
     if [[ "$LIST_EMAIL" != *"@"* || "$LIST_EMAIL" != *"."* ]]; then
287
     if [[ "$LIST_EMAIL" != *"@"* || "$LIST_EMAIL" != *"."* ]]; then
287
-        dialog --title "Add mailing list" \
288
-               --msgbox "Unrecognised email address" 6 40
288
+        dialog --title $"Add mailing list" \
289
+               --msgbox $"Unrecognised email address" 6 40
289
         return
290
         return
290
     fi
291
     fi
291
 
292
 
292
     freedombone-addlist -u $SELECTED_USERNAME -l "$LIST_NAME" \
293
     freedombone-addlist -u $SELECTED_USERNAME -l "$LIST_NAME" \
293
                         -s "$LIST_SUBJECT" -e "$LIST_EMAIL"
294
                         -s "$LIST_SUBJECT" -e "$LIST_EMAIL"
294
-    dialog --title "Add mailing list" \
295
-           --msgbox "$LIST_NAME list was added" 6 40
295
+    dialog --title $"Add mailing list" \
296
+           --msgbox $"$LIST_NAME list was added" 6 40
296
 }
297
 }
297
 
298
 
298
 function email_rule {
299
 function email_rule {
302
     fi
303
     fi
303
     data=$(tempfile 2>/dev/null)
304
     data=$(tempfile 2>/dev/null)
304
     trap "rm -f $data" 0 1 2 5 15
305
     trap "rm -f $data" 0 1 2 5 15
305
-    dialog --backtitle "Freedombone Control Panel" \
306
-           --title "Email rule for user $SELECTED_USERNAME" \
306
+    dialog --backtitle $"Freedombone Control Panel" \
307
+           --title $"Email rule for user $SELECTED_USERNAME" \
307
            --form "\n" 8 65 3 \
308
            --form "\n" 8 65 3 \
308
-              "When email arrives from address:" 1 1 "" 1 35 24 28 \
309
-              "Move to folder:" 2 1 "" 2 35 24 28 \
309
+              $"When email arrives from address:" 1 1 "" 1 35 24 28 \
310
+              $"Move to folder:" 2 1 "" 2 35 24 28 \
310
               2> $data
311
               2> $data
311
     sel=$?
312
     sel=$?
312
     case $sel in
313
     case $sel in
317
     RULE_FOLDER=$(cat $data | sed -n 2p)
318
     RULE_FOLDER=$(cat $data | sed -n 2p)
318
 
319
 
319
     if [ ${#RULE_EMAIL} -lt 2 ]; then
320
     if [ ${#RULE_EMAIL} -lt 2 ]; then
320
-        dialog --title "Add email rule" \
321
-               --msgbox "No email address was given" 6 40
321
+        dialog --title $"Add email rule" \
322
+               --msgbox $"No email address was given" 6 40
322
         return
323
         return
323
     fi
324
     fi
324
     if [ ${#RULE_FOLDER} -lt 2 ]; then
325
     if [ ${#RULE_FOLDER} -lt 2 ]; then
325
-        dialog --title "Add email rule" \
326
-               --msgbox "No folder name was given" 6 40
326
+        dialog --title $"Add email rule" \
327
+               --msgbox $"No folder name was given" 6 40
327
         return
328
         return
328
     fi
329
     fi
329
     if [[ "$RULE_EMAIL" != *"@"* || "$RULE_EMAIL" != *"."* ]]; then
330
     if [[ "$RULE_EMAIL" != *"@"* || "$RULE_EMAIL" != *"."* ]]; then
330
-        dialog --title "Add email rule" \
331
-               --msgbox "Unrecognised email address" 6 40
331
+        dialog --title $"Add email rule" \
332
+               --msgbox $"Unrecognised email address" 6 40
332
         return
333
         return
333
     fi
334
     fi
334
 
335
 
335
     freedombone-addemail -u $SELECTED_USERNAME -e "$RULE_EMAIL" \
336
     freedombone-addemail -u $SELECTED_USERNAME -e "$RULE_EMAIL" \
336
                          -g "$RULE_FOLDER"
337
                          -g "$RULE_FOLDER"
337
-    dialog --title "Add email rule" \
338
-           --msgbox "Email rule for $RULE_EMAIL was added" 6 40
338
+    dialog --title $"Add email rule" \
339
+           --msgbox $"Email rule for $RULE_EMAIL was added" 6 40
339
 }
340
 }
340
 
341
 
341
 function block_unblock_email {
342
 function block_unblock_email {
343
     if [ ! $SELECTED_USERNAME ]; then
344
     if [ ! $SELECTED_USERNAME ]; then
344
         return
345
         return
345
     fi
346
     fi
347
+	blockstr=$"Block/Unblock email going to"
346
     data=$(tempfile 2>/dev/null)
348
     data=$(tempfile 2>/dev/null)
347
     trap "rm -f $data" 0 1 2 5 15
349
     trap "rm -f $data" 0 1 2 5 15
348
-    dialog --backtitle "Freedombone Control Panel" \
349
-           --title "Block/Unblock email going to $SELECTED_USERNAME" \
350
+    dialog --backtitle $"Freedombone Control Panel" \
351
+           --title "$blockstr $SELECTED_USERNAME" \
350
            --form "\n" 8 65 3 \
352
            --form "\n" 8 65 3 \
351
-              "When email arrives from address:" 1 1 "" 1 35 24 28 \
352
-              "Block it:" 2 1 "yes" 2 35 4 4 \
353
+              $"When email arrives from address:" 1 1 "" 1 35 24 28 \
354
+              $"Block it:" 2 1 "yes" 2 35 4 4 \
353
               2> $data
355
               2> $data
354
     sel=$?
356
     sel=$?
355
     case $sel in
357
     case $sel in
359
     BLOCK_EMAIL=$(cat $data | sed -n 1p)
361
     BLOCK_EMAIL=$(cat $data | sed -n 1p)
360
     BLOCK=$(cat $data | sed -n 2p)
362
     BLOCK=$(cat $data | sed -n 2p)
361
     if [ ${#BLOCK_EMAIL} -lt 2 ]; then
363
     if [ ${#BLOCK_EMAIL} -lt 2 ]; then
362
-        dialog --title "Block/Unblock an email" \
363
-               --msgbox "No email address was given" 6 40
364
+        dialog --title $"Block/Unblock an email" \
365
+               --msgbox $"No email address was given" 6 40
364
         return
366
         return
365
     fi
367
     fi
366
     if [[ "$BLOCK_EMAIL" != *"@"* || "$BLOCK_EMAIL" != *"."* ]]; then
368
     if [[ "$BLOCK_EMAIL" != *"@"* || "$BLOCK_EMAIL" != *"."* ]]; then
367
-        dialog --title "Block/Unblock an email" \
368
-               --msgbox "Unrecognised email address" 6 40
369
+        dialog --title $"Block/Unblock an email" \
370
+               --msgbox $"Unrecognised email address" 6 40
369
         return
371
         return
370
     fi
372
     fi
371
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
373
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
372
         freedombone-ignore -u $SELECTED_USERNAME -e "$BLOCK_EMAIL"
374
         freedombone-ignore -u $SELECTED_USERNAME -e "$BLOCK_EMAIL"
373
-        dialog --title "Block an email" \
375
+        dialog --title $"Block an email" \
374
                --msgbox "Email from $BLOCK_EMAIL to $SELECTED_USERNAME blocked" 6 40
376
                --msgbox "Email from $BLOCK_EMAIL to $SELECTED_USERNAME blocked" 6 40
375
     else
377
     else
376
         freedombone-unignore -u $SELECTED_USERNAME -e "$BLOCK_EMAIL"
378
         freedombone-unignore -u $SELECTED_USERNAME -e "$BLOCK_EMAIL"
377
-        dialog --title "Unblock an email" \
379
+        dialog --title $"Unblock an email" \
378
                --msgbox "Email from $BLOCK_EMAIL to $SELECTED_USERNAME unblocked" 6 40
380
                --msgbox "Email from $BLOCK_EMAIL to $SELECTED_USERNAME unblocked" 6 40
379
     fi
381
     fi
380
 }
382
 }
384
     if [ ! $SELECTED_USERNAME ]; then
386
     if [ ! $SELECTED_USERNAME ]; then
385
         return
387
         return
386
     fi
388
     fi
389
+	blockstr=$"Block/Unblock email going to"
387
     data=$(tempfile 2>/dev/null)
390
     data=$(tempfile 2>/dev/null)
388
     trap "rm -f $data" 0 1 2 5 15
391
     trap "rm -f $data" 0 1 2 5 15
389
-    dialog --backtitle "Freedombone Control Panel" \
390
-           --title "Block/Unblock email going to $SELECTED_USERNAME" \
392
+    dialog --backtitle $"Freedombone Control Panel" \
393
+           --title "$blockstr $SELECTED_USERNAME" \
391
            --form "\n" 8 70 3 \
394
            --form "\n" 8 70 3 \
392
-              "When email arrives with subject text:" 1 1 "" 1 40 24 28 \
393
-              "Block it:" 2 1 "yes" 2 40 4 4 \
395
+              $"When email arrives with subject text:" 1 1 "" 1 40 24 28 \
396
+              $"Block it:" 2 1 "yes" 2 40 4 4 \
394
               2> $data
397
               2> $data
395
     sel=$?
398
     sel=$?
396
     case $sel in
399
     case $sel in
400
     BLOCK_SUBJECT=$(cat $data | sed -n 1p)
403
     BLOCK_SUBJECT=$(cat $data | sed -n 1p)
401
     BLOCK=$(cat $data | sed -n 2p)
404
     BLOCK=$(cat $data | sed -n 2p)
402
     if [ ${#BLOCK_SUBJECT} -lt 2 ]; then
405
     if [ ${#BLOCK_SUBJECT} -lt 2 ]; then
403
-        dialog --title "Block/Unblock an email" \
404
-               --msgbox "No subject was given" 6 40
406
+        dialog --title $"Block/Unblock an email" \
407
+               --msgbox $"No subject was given" 6 40
405
         return
408
         return
406
     fi
409
     fi
407
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
410
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
408
         freedombone-ignore -u $SELECTED_USERNAME -t "$BLOCK_SUBJECT"
411
         freedombone-ignore -u $SELECTED_USERNAME -t "$BLOCK_SUBJECT"
409
-        dialog --title "Block an email" \
412
+        dialog --title $"Block an email" \
410
                --msgbox "Email with subject $BLOCK_SUBJECT to $SELECTED_USERNAME blocked" 6 40
413
                --msgbox "Email with subject $BLOCK_SUBJECT to $SELECTED_USERNAME blocked" 6 40
411
     else
414
     else
412
         freedombone-unignore -u $SELECTED_USERNAME -t "$BLOCK_SUBJECT"
415
         freedombone-unignore -u $SELECTED_USERNAME -t "$BLOCK_SUBJECT"
413
-        dialog --title "Unblock an email" \
416
+        dialog --title $"Unblock an email" \
414
                --msgbox "Email with subject $BLOCK_SUBJECT to $SELECTED_USERNAME unblocked" 6 40
417
                --msgbox "Email with subject $BLOCK_SUBJECT to $SELECTED_USERNAME unblocked" 6 40
415
     fi
418
     fi
416
 }
419
 }
420
     if [ ! $SELECTED_USERNAME ]; then
423
     if [ ! $SELECTED_USERNAME ]; then
421
         return
424
         return
422
     fi
425
     fi
423
-    dialog --title "USB Master Keydrive" \
424
-           --msgbox "Plug in a LUKS encrypted USB drive" 6 40
426
+    dialog --title $"USB Master Keydrive" \
427
+           --msgbox $"Plug in a LUKS encrypted USB drive" 6 40
425
     clear
428
     clear
426
     freedombone-keydrive -u $SELECTED_USERNAME --master 'yes'
429
     freedombone-keydrive -u $SELECTED_USERNAME --master 'yes'
427
     any_key
430
     any_key
432
     if [ ! $SELECTED_USERNAME ]; then
435
     if [ ! $SELECTED_USERNAME ]; then
433
         return
436
         return
434
     fi
437
     fi
435
-    dialog --title "USB Fragment Keydrive" \
436
-           --msgbox "Plug in a LUKS encrypted USB drive" 6 40
438
+    dialog --title $"USB Fragment Keydrive" \
439
+           --msgbox $"Plug in a LUKS encrypted USB drive" 6 40
437
     clear
440
     clear
438
     freedombone-keydrive -u $SELECTED_USERNAME
441
     freedombone-keydrive -u $SELECTED_USERNAME
439
     any_key
442
     any_key
440
 }
443
 }
441
 
444
 
442
 function backup_data {
445
 function backup_data {
443
-    dialog --title "Backup data to USB" \
444
-           --msgbox "Plug in a LUKS encrypted USB drive" 6 40
446
+    dialog --title $"Backup data to USB" \
447
+           --msgbox $"Plug in a LUKS encrypted USB drive" 6 40
445
     clear
448
     clear
446
     echo ' '
449
     echo ' '
447
-    echo 'Enter the passphrase for your LUKS encrypted backup drive:'
450
+    echo $'Enter the passphrase for your LUKS encrypted backup drive:'
448
     backup
451
     backup
449
     any_key
452
     any_key
450
 }
453
 }
451
 
454
 
452
 function restore_data {
455
 function restore_data {
453
-    dialog --title "Restore data from USB" \
454
-           --msgbox "Plug in your backup USB drive" 6 40
456
+    dialog --title $"Restore data from USB" \
457
+           --msgbox $"Plug in your backup USB drive" 6 40
455
     clear
458
     clear
456
     echo ' '
459
     echo ' '
457
-    echo 'Enter the passphrase for your LUKS encrypted backup drive:'
460
+    echo $'Enter the passphrase for your LUKS encrypted backup drive:'
458
     restore
461
     restore
459
     any_key
462
     any_key
460
 }
463
 }
461
 
464
 
462
 function restore_data_remote {
465
 function restore_data_remote {
463
     if [ ! $ADMIN_USER ]; then
466
     if [ ! $ADMIN_USER ]; then
464
-        dialog --title "Restore data from remote server" \
465
-               --msgbox "Unknown admin user" 6 40
467
+        dialog --title $"Restore data from remote server" \
468
+               --msgbox $"Unknown admin user" 6 40
466
         return
469
         return
467
     fi
470
     fi
468
     data=$(tempfile 2>/dev/null)
471
     data=$(tempfile 2>/dev/null)
469
     trap "rm -f $data" 0 1 2 5 15
472
     trap "rm -f $data" 0 1 2 5 15
470
-    dialog --title "Restore from remote server" \
471
-           --backtitle "Freedombone Control Panel" \
472
-           --inputbox "Enter the domain name of the server from which you wish to restore" 8 60 2>$data
473
+    dialog --title $"Restore from remote server" \
474
+           --backtitle $"Freedombone Control Panel" \
475
+           --inputbox $"Enter the domain name of the server from which you wish to restore" 8 60 2>$data
473
     sel=$?
476
     sel=$?
474
     case $sel in
477
     case $sel in
475
         0)
478
         0)
480
             fi
483
             fi
481
 
484
 
482
             if [[ $friend_server_domain_name != *"."* ]]; then
485
             if [[ $friend_server_domain_name != *"."* ]]; then
483
-                dialog --title "Remote server domain name" \
484
-                       --msgbox "Invalid domain name" 6 40
486
+                dialog --title $"Remote server domain name" \
487
+                       --msgbox $"Invalid domain name" 6 40
485
                 return
488
                 return
486
             fi
489
             fi
487
 
490
 
493
 
496
 
494
 function logging_on_off {
497
 function logging_on_off {
495
     logging="no"
498
     logging="no"
496
-    dialog --title "Logging" \
497
-           --backtitle "Freedombone Control Panel" \
498
-           --yesno "\nDo you want to turn logging on?" 7 60
499
+    dialog --title $"Logging" \
500
+           --backtitle $"Freedombone Control Panel" \
501
+           --yesno $"\nDo you want to turn logging on?" 7 60
499
     sel=$?
502
     sel=$?
500
     case $sel in
503
     case $sel in
501
         0) logging="yes";;
504
         0) logging="yes";;
504
 
507
 
505
     clear
508
     clear
506
     echo ''
509
     echo ''
507
-    echo 'This may take a few seconds. Please wait...'
510
+    echo $'This may take a few seconds. Please wait...'
508
     if [[ $logging == "no" ]]; then
511
     if [[ $logging == "no" ]]; then
509
         freedombone-logging off
512
         freedombone-logging off
510
     else
513
     else
517
     if [ ! $SELECTED_USERNAME ]; then
520
     if [ ! $SELECTED_USERNAME ]; then
518
         return
521
         return
519
     fi
522
     fi
520
-    dialog --title "Restore GPG key for user $SELECTED_USERNAME" \
521
-           --msgbox "Plug in your USB keydrive" 6 40
523
+	restorestr=$"Restore GPG key for user"
524
+    dialog --title "$restorestr $SELECTED_USERNAME" \
525
+           --msgbox $"Plug in your USB keydrive" 6 40
522
     clear
526
     clear
523
     freedombone-recoverkey -u $SELECTED_USERNAME
527
     freedombone-recoverkey -u $SELECTED_USERNAME
524
     any_key
528
     any_key
531
 
535
 
532
 function reset_tripwire {
536
 function reset_tripwire {
533
   clear
537
   clear
534
-  echo 'Resetting the Tripwire...'
538
+  echo $'Resetting the Tripwire...'
535
   echo ' '
539
   echo ' '
536
   echo '
540
   echo '
537
 
541
 
540
 }
544
 }
541
 
545
 
542
 function hubzilla_renew_cert {
546
 function hubzilla_renew_cert {
543
-    dialog --title "Renew SSL certificate" \
544
-           --backtitle "Freedombone Control Panel" \
545
-           --yesno "\nThis will renew a letsencrypt certificate. Select 'yes' to continue" 16 60
547
+    dialog --title $"Renew SSL certificate" \
548
+           --backtitle $"Freedombone Control Panel" \
549
+           --yesno $"\nThis will renew a letsencrypt certificate. Select 'yes' to continue" 16 60
546
     sel=$?
550
     sel=$?
547
     case $sel in
551
     case $sel in
548
         1) return;;
552
         1) return;;
550
     esac
554
     esac
551
     HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
555
     HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
552
     if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
556
     if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
553
-       dialog --title "Renew SSL certificate" \
554
-              --msgbox "Hubzilla install directory not found" 6 40
557
+       dialog --title $"Renew SSL certificate" \
558
+              --msgbox $"Hubzilla install directory not found" 6 40
555
        return
559
        return
556
     fi
560
     fi
557
     freedombone-renew-cert -h $HUBZILLA_DOMAIN_NAME -p 'letsencrypt'
561
     freedombone-renew-cert -h $HUBZILLA_DOMAIN_NAME -p 'letsencrypt'
558
     if [ ! "$?" = "0" ]; then
562
     if [ ! "$?" = "0" ]; then
559
         any_key
563
         any_key
560
     else
564
     else
561
-        dialog --title "Renew SSL certificate" \
562
-               --msgbox "Hubzilla certificate has been renewed" 6 40
565
+        dialog --title $"Renew SSL certificate" \
566
+               --msgbox $"Hubzilla certificate has been renewed" 6 40
563
     fi
567
     fi
564
 }
568
 }
565
 
569
 
566
 function hubzilla_restore {
570
 function hubzilla_restore {
567
-    dialog --title "Restore hubzilla from USB backup" \
568
-           --backtitle "Freedombone Control Panel" \
569
-           --yesno "\nInsert your USB backup drive and select 'yes' to continue" 16 60
571
+    dialog --title $"Restore hubzilla from USB backup" \
572
+           --backtitle $"Freedombone Control Panel" \
573
+           --yesno $"\nInsert your USB backup drive and select 'yes' to continue" 16 60
570
     sel=$?
574
     sel=$?
571
     case $sel in
575
     case $sel in
572
         1) return;;
576
         1) return;;
573
         255) return;;
577
         255) return;;
574
     esac
578
     esac
575
     clear
579
     clear
576
-    echo 'Enter your backup drive password:'
580
+    echo $'Enter your backup drive password:'
577
     restorehubzilla
581
     restorehubzilla
578
 }
582
 }
579
 
583
 
580
 function hubzilla_channel_directory_server {
584
 function hubzilla_channel_directory_server {
581
     if ! grep -q "Hubzilla domain" $COMPLETION_FILE; then
585
     if ! grep -q "Hubzilla domain" $COMPLETION_FILE; then
582
-       dialog --title "Hubzilla channel directory server" \
583
-              --msgbox "Hubzilla is not installed on this system" 6 40
586
+       dialog --title $"Hubzilla channel directory server" \
587
+              --msgbox $"Hubzilla is not installed on this system" 6 40
584
        return
588
        return
585
     fi
589
     fi
586
     HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
590
     HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
587
     if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
591
     if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
588
-       dialog --title "Hubzilla channel directory server" \
589
-              --msgbox "Hubzilla install directory not found" 6 40
592
+       dialog --title $"Hubzilla channel directory server" \
593
+              --msgbox $"Hubzilla install directory not found" 6 40
590
        return
594
        return
591
     fi
595
     fi
592
 
596
 
593
     data=$(tempfile 2>/dev/null)
597
     data=$(tempfile 2>/dev/null)
594
     trap "rm -f $data" 0 1 2 5 15
598
     trap "rm -f $data" 0 1 2 5 15
595
-    dialog --title "Hubzilla channel directory server" \
596
-           --backtitle "Freedombone Control Panel" \
597
-           --inputbox "When you click on 'channel directory' this is where Hubzilla will obtain its list from" 8 60 2>$data
599
+    dialog --title $"Hubzilla channel directory server" \
600
+           --backtitle $"Freedombone Control Panel" \
601
+           --inputbox $"When you click on 'channel directory' this is where Hubzilla will obtain its list from" 8 60 2>$data
598
     sel=$?
602
     sel=$?
599
     case $sel in
603
     case $sel in
600
         0)
604
         0)
603
                 return
607
                 return
604
             fi
608
             fi
605
             if [[ $hubzilla_domain_server != "https"* ]]; then
609
             if [[ $hubzilla_domain_server != "https"* ]]; then
606
-                dialog --title "Hubzilla channel directory server" \
607
-                       --msgbox "Invalid domain - include the https://" 6 40
610
+                dialog --title $"Hubzilla channel directory server" \
611
+                       --msgbox $"Invalid domain - include the https://" 6 40
608
                 return
612
                 return
609
             fi
613
             fi
610
             ./var/www/$HUBZILLA_DOMAIN_NAME/htdocs/util/config system directory_server $hubzilla_domain_server
614
             ./var/www/$HUBZILLA_DOMAIN_NAME/htdocs/util/config system directory_server $hubzilla_domain_server
611
-            dialog --title "Hubzilla channel directory server" \
612
-                   --msgbox "Domain channel directory server changed to $hubzilla_domain_server" 6 40
615
+            dialog --title $"Hubzilla channel directory server" \
616
+                   --msgbox $"Domain channel directory server changed to $hubzilla_domain_server" 6 40
613
             ;;
617
             ;;
614
     esac
618
     esac
615
 }
619
 }
618
     drive=
622
     drive=
619
     data=$(tempfile 2>/dev/null)
623
     data=$(tempfile 2>/dev/null)
620
     trap "rm -f $data" 0 1 2 5 15
624
     trap "rm -f $data" 0 1 2 5 15
621
-    dialog --backtitle "Freedombone Control Panel" \
622
-           --title "Format a USB drive (LUKS encrypted)" \
623
-           --radiolist "Choose a drive:" 12 70 5 \
624
-           1 "sda (Beaglebone Black)" off \
625
-           2 "sdb" off \
626
-           3 "sdc" off \
627
-           4 "sdd" off \
628
-           5 "Back to Backup and Restore menu" on 2> $data
625
+    dialog --backtitle $"Freedombone Control Panel" \
626
+           --title $"Format a USB drive (LUKS encrypted)" \
627
+           --radiolist $"Choose a drive:" 12 70 5 \
628
+           1 $"sda (Beaglebone Black)" off \
629
+           2 $"sdb" off \
630
+           3 $"sdc" off \
631
+           4 $"sdd" off \
632
+           5 $"Back to Backup and Restore menu" on 2> $data
629
     sel=$?
633
     sel=$?
630
     case $sel in
634
     case $sel in
631
         1) return;;
635
         1) return;;
639
         5) return;;
643
         5) return;;
640
     esac
644
     esac
641
 
645
 
642
-    dialog --title "Format USB drive" \
643
-           --backtitle "Freedombone Control Panel" \
646
+    dialog --title $"Format USB drive" \
647
+           --backtitle $"Freedombone Control Panel" \
644
            --defaultno \
648
            --defaultno \
645
-           --yesno "\nPlease confirm that you wish to format drive\n\n    ${drive}\n\nAll current data on the drive will be lost, and you will be prompted to give a password used to encrypt the drive.\n\nDANGER: If you screw up here and format the wrong drive it's your own fault!" 16 60
649
+           --yesno $"\nPlease confirm that you wish to format drive\n\n    ${drive}\n\nAll current data on the drive will be lost, and you will be prompted to give a password used to encrypt the drive.\n\nDANGER: If you screw up here and format the wrong drive it's your own fault!" 16 60
646
     sel=$?
650
     sel=$?
647
     case $sel in
651
     case $sel in
648
         1) return;;
652
         1) return;;
655
 }
659
 }
656
 
660
 
657
 function shut_down_system {
661
 function shut_down_system {
658
-    dialog --title "Power off the system" \
659
-           --backtitle "Freedombone Control Panel" \
662
+    dialog --title $"Power off the system" \
663
+           --backtitle $"Freedombone Control Panel" \
660
            --defaultno \
664
            --defaultno \
661
-           --yesno "\nPlease confirm that you wish to power off the system.\n\nWARNING: to power on again you will need to have physical access to the hardware." 10 60
665
+           --yesno $"\nPlease confirm that you wish to power off the system.\n\nWARNING: to power on again you will need to have physical access to the hardware." 10 60
662
     sel=$?
666
     sel=$?
663
     case $sel in
667
     case $sel in
664
         1) return;;
668
         1) return;;
668
 }
672
 }
669
 
673
 
670
 function restart_system {
674
 function restart_system {
671
-    dialog --title "Restart the system" \
672
-           --backtitle "Freedombone Control Panel" \
675
+    dialog --title $"Restart the system" \
676
+           --backtitle $"Freedombone Control Panel" \
673
            --defaultno \
677
            --defaultno \
674
-           --yesno "\nPlease confirm that you wish to restart the system.\n\nWARNING: If you are using full disk encryption then you will need physical access to the hardware to type in the password" 10 60
678
+           --yesno $"\nPlease confirm that you wish to restart the system.\n\nWARNING: If you are using full disk encryption then you will need physical access to the hardware to type in the password" 10 60
675
     sel=$?
679
     sel=$?
676
     case $sel in
680
     case $sel in
677
         1) return;;
681
         1) return;;
685
     do
689
     do
686
         data=$(tempfile 2>/dev/null)
690
         data=$(tempfile 2>/dev/null)
687
         trap "rm -f $data" 0 1 2 5 15
691
         trap "rm -f $data" 0 1 2 5 15
688
-        dialog --backtitle "Freedombone Control Panel" \
689
-               --title "Backup and Restore" \
690
-               --radiolist "Choose an operation:" 17 70 10 \
691
-               1 "Backup data to USB drive" off \
692
-               2 "Restore GPG key from USB keydrive" off \
693
-               3 "Restore data from USB drive" off \
694
-               4 "Restore Hubzilla data from USB drive" off \
695
-               5 "Configure remote backups" off \
696
-               6 "Restore from remote backup" off \
697
-               7 "Backup GPG key to USB (master keydrive)" off \
698
-               8 "Backup GPG key to USB (fragment keydrive)" off \
699
-               9 "Format a USB drive (LUKS encrypted)" off \
700
-               10 "Back to main menu" on 2> $data
692
+        dialog --backtitle $"Freedombone Control Panel" \
693
+               --title $"Backup and Restore" \
694
+               --radiolist $"Choose an operation:" 17 70 10 \
695
+               1 $"Backup data to USB drive" off \
696
+               2 $"Restore GPG key from USB keydrive" off \
697
+               3 $"Restore data from USB drive" off \
698
+               4 $"Restore Hubzilla data from USB drive" off \
699
+               5 $"Configure remote backups" off \
700
+               6 $"Restore from remote backup" off \
701
+               7 $"Backup GPG key to USB (master keydrive)" off \
702
+               8 $"Backup GPG key to USB (fragment keydrive)" off \
703
+               9 $"Format a USB drive (LUKS encrypted)" off \
704
+               10 $"Back to main menu" on 2> $data
701
         sel=$?
705
         sel=$?
702
         case $sel in
706
         case $sel in
703
             1) break;;
707
             1) break;;
723
     do
727
     do
724
         data=$(tempfile 2>/dev/null)
728
         data=$(tempfile 2>/dev/null)
725
         trap "rm -f $data" 0 1 2 5 15
729
         trap "rm -f $data" 0 1 2 5 15
726
-        dialog --backtitle "Freedombone Control Panel" \
727
-               --title "Email Filtering Rules" \
728
-               --radiolist "Choose an operation:" 12 70 5 \
729
-               1 "Add a user to a mailing list" off \
730
-               2 "Add an email rule" off \
731
-               3 "Block/Unblock an email address" off \
732
-               4 "Block/Unblock email with subject text" off \
733
-               5 "Back to main menu" on 2> $data
730
+        dialog --backtitle $"Freedombone Control Panel" \
731
+               --title $"Email Filtering Rules" \
732
+               --radiolist $"Choose an operation:" 12 70 5 \
733
+               1 $"Add a user to a mailing list" off \
734
+               2 $"Add an email rule" off \
735
+               3 $"Block/Unblock an email address" off \
736
+               4 $"Block/Unblock email with subject text" off \
737
+               5 $"Back to main menu" on 2> $data
734
         sel=$?
738
         sel=$?
735
         case $sel in
739
         case $sel in
736
             1) break;;
740
             1) break;;
751
     do
755
     do
752
         data=$(tempfile 2>/dev/null)
756
         data=$(tempfile 2>/dev/null)
753
         trap "rm -f $data" 0 1 2 5 15
757
         trap "rm -f $data" 0 1 2 5 15
754
-        dialog --backtitle "Freedombone Control Panel" \
755
-               --title "Manage Users" \
756
-               --radiolist "Choose an operation:" 12 70 5 \
757
-               1 "Add a user" off \
758
-               2 "Delete a user" off \
759
-               3 "Change user password" off \
760
-               4 "Change user ssh public key" off \
761
-               5 "Back to main menu" on 2> $data
758
+        dialog --backtitle $"Freedombone Control Panel" \
759
+               --title $"Manage Users" \
760
+               --radiolist $"Choose an operation:" 12 70 5 \
761
+               1 $"Add a user" off \
762
+               2 $"Delete a user" off \
763
+               3 $"Change user password" off \
764
+               4 $"Change user ssh public key" off \
765
+               5 $"Back to main menu" on 2> $data
762
         sel=$?
766
         sel=$?
763
         case $sel in
767
         case $sel in
764
             1) break;;
768
             1) break;;
779
     do
783
     do
780
         data=$(tempfile 2>/dev/null)
784
         data=$(tempfile 2>/dev/null)
781
         trap "rm -f $data" 0 1 2 5 15
785
         trap "rm -f $data" 0 1 2 5 15
782
-        dialog --backtitle "Freedombone Control Panel" \
783
-               --title "Hubzilla" \
784
-               --radiolist "Choose an operation:" 13 70 4 \
785
-               1 "Restore from usb backup" off \
786
-               2 "Set channel directory server" off \
787
-               3 "Renew SSL certificate" off \
788
-               4 "Back to main menu" on 2> $data
786
+        dialog --backtitle $"Freedombone Control Panel" \
787
+               --title $"Hubzilla" \
788
+               --radiolist $"Choose an operation:" 13 70 4 \
789
+               1 $"Restore from usb backup" off \
790
+               2 $"Set channel directory server" off \
791
+               3 $"Renew SSL certificate" off \
792
+               4 $"Back to main menu" on 2> $data
789
         sel=$?
793
         sel=$?
790
         case $sel in
794
         case $sel in
791
             1) break;;
795
             1) break;;
805
     do
809
     do
806
         data=$(tempfile 2>/dev/null)
810
         data=$(tempfile 2>/dev/null)
807
         trap "rm -f $data" 0 1 2 5 15
811
         trap "rm -f $data" 0 1 2 5 15
808
-        dialog --backtitle "Freedombone Control Panel" \
809
-               --title "Control Panel" \
810
-               --radiolist "Choose an operation:" 19 70 12 \
811
-               1 "Backup and Restore" off \
812
-               2 "Show SIP Phone Extensions" off \
813
-               3 "Reset Tripwire" off \
814
-               4 "Logging on/off" off \
815
-               5 "Manage Users" off \
816
-               6 "Email Filtering Rules" off \
817
-               7 "Security Settings" off \
818
-               8 "Hubzilla" off \
819
-               9 "Check for updates" off \
820
-               10 "Power off the system" off \
821
-               11 "Restart the system" off \
822
-               12 "Exit" on 2> $data
812
+        dialog --backtitle $"Freedombone Control Panel" \
813
+               --title $"Control Panel" \
814
+               --radiolist $"Choose an operation:" 19 70 12 \
815
+               1 $"Backup and Restore" off \
816
+               2 $"Show SIP Phone Extensions" off \
817
+               3 $"Reset Tripwire" off \
818
+               4 $"Logging on/off" off \
819
+               5 $"Manage Users" off \
820
+               6 $"Email Filtering Rules" off \
821
+               7 $"Security Settings" off \
822
+               8 $"Hubzilla" off \
823
+               9 $"Check for updates" off \
824
+               10 $"Power off the system" off \
825
+               11 $"Restart the system" off \
826
+               12 $"Exit" on 2> $data
823
         sel=$?
827
         sel=$?
824
         case $sel in
828
         case $sel in
825
             1) exit 1;;
829
             1) exit 1;;
843
 }
847
 }
844
 
848
 
845
 if [ ! -f $COMPLETION_FILE ]; then
849
 if [ ! -f $COMPLETION_FILE ]; then
846
-    echo 'This command should only be run on an installed Freedombone system'
850
+    echo $'This command should only be run on an installed Freedombone system'
847
     exit 1
851
     exit 1
848
 fi
852
 fi
849
 
853