Browse Source

Prepare for translations

Bob Mottram 9 years ago
parent
commit
6fc3017853

+ 5
- 0
src/freedombone View File

@@ -30,6 +30,11 @@
30 30
 
31 31
 NO_OF_ARGS=$#
32 32
 
33
+PROJECT_NAME='freedombone'
34
+
35
+export TEXTDOMAIN=$PROJECT_NAME
36
+export TEXTDOMAINDIR="/usr/share/locale"
37
+
33 38
 # Web site
34 39
 FREEDOMBONE_WEBSITE="http://freedombone.uk.to"
35 40
 

+ 6
- 1
src/freedombone-addcert View File

@@ -28,6 +28,11 @@
28 28
 # You should have received a copy of the GNU General Public License
29 29
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
30 30
 
31
+PROJECT_NAME='freedombone'
32
+
33
+export TEXTDOMAIN=$PROJECT_NAME
34
+export TEXTDOMAINDIR="/usr/share/locale"
35
+
31 36
 HOSTNAME=
32 37
 LETSENCRYPT_HOSTNAME=
33 38
 COUNTRY_CODE="US"
@@ -177,7 +182,7 @@ if [ $LETSENCRYPT_HOSTNAME ]; then
177 182
 	fi
178 183
 	sed -i "s|ssl_certificate /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.bundle.crt|ssl_certificate /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem|g" /etc/nginx/sites-available/$LETSENCRYPT_HOSTNAME
179 184
 	sed -i "s|ssl_certificate /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.crt|ssl_certificate /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem|g" /etc/nginx/sites-available/$LETSENCRYPT_HOSTNAME
180
-  
185
+
181 186
 	# link the private key
182 187
 	if [ -f /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key ]; then
183 188
 		if [ ! -f /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key.old ]; then

+ 5
- 0
src/freedombone-addemail View File

@@ -29,6 +29,11 @@
29 29
 # You should have received a copy of the GNU General Public License
30 30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 31
 
32
+PROJECT_NAME='freedombone'
33
+
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
32 37
 MYUSERNAME=$USER
33 38
 EMAILADDRESS=
34 39
 GROUP_NAME=

+ 5
- 0
src/freedombone-addlist View File

@@ -29,6 +29,11 @@
29 29
 # You should have received a copy of the GNU General Public License
30 30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 31
 
32
+PROJECT_NAME='freedombone'
33
+
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
32 37
 MYUSERNAME=$USER
33 38
 MAILINGLIST=
34 39
 SUBJECTTAG=

+ 7
- 2
src/freedombone-addsipuser View File

@@ -29,6 +29,11 @@
29 29
 # You should have received a copy of the GNU General Public License
30 30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 31
 
32
+PROJECT_NAME='freedombone'
33
+
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
32 37
 MY_USERNAME=
33 38
 EXTENSION=
34 39
 PASSWORD=
@@ -71,11 +76,11 @@ function update_sip_user {
71 76
             fi
72 77
             if [[ "$line" == *"<secret>"* ]]; then
73 78
                 line="<secret>$PASSWORD</secret>"
74
-            fi              
79
+            fi
75 80
             if [[ "$line" == *"<display>"* ]]; then
76 81
                 line="<display>$MY_USERNAME $EXTENSION</display>"
77 82
                 USER_FOUND=
78
-            fi              
83
+            fi
79 84
         fi
80 85
         echo $line >> $NEW_CONFIG_FILE
81 86
     done < $CONFIG_FILE

+ 5
- 0
src/freedombone-adduser View File

@@ -29,6 +29,11 @@
29 29
 # You should have received a copy of the GNU General Public License
30 30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 31
 
32
+PROJECT_NAME='freedombone'
33
+
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
32 37
 MY_USERNAME=$1
33 38
 SSH_PUBLIC_KEY="$2"
34 39
 GPG_KEYSERVER='hkp://keys.gnupg.net'

+ 6
- 1
src/freedombone-addxmpp View File

@@ -29,6 +29,11 @@
29 29
 # You should have received a copy of the GNU General Public License
30 30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 31
 
32
+PROJECT_NAME='freedombone'
33
+
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
32 37
 EMAIL_ADDRESS=
33 38
 NEW_USER_PASSWORD=
34 39
 
@@ -77,7 +82,7 @@ if [ ! $NEW_USER_PASSWORD ]; then
77 82
 else
78 83
     USERNAME=$(echo $EMAIL_ADDRESS | awk -F '@' '{print $1}')
79 84
     DOMAIN_NAME=$(echo $EMAIL_ADDRESS | awk -F '@' '{print $2}')
80
-    prosodyctl register $USERNAME $DOMAIN_NAME "$NEW_USER_PASSWORD" 
85
+    prosodyctl register $USERNAME $DOMAIN_NAME "$NEW_USER_PASSWORD"
81 86
     if [ ! "$?" = "0" ]; then
82 87
         exit 2
83 88
     fi

+ 5
- 0
src/freedombone-client View File

@@ -26,6 +26,11 @@
26 26
 # You should have received a copy of the GNU General Public License
27 27
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
28 28
 
29
+PROJECT_NAME='freedombone'
30
+
31
+export TEXTDOMAIN=$PROJECT_NAME
32
+export TEXTDOMAINDIR="/usr/share/locale"
33
+
29 34
 CURR_USER=$USER
30 35
 
31 36
 # Version number of this script

+ 5
- 0
src/freedombone-clientcert View File

@@ -32,6 +32,11 @@
32 32
 # You should have received a copy of the GNU General Public License
33 33
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
34 34
 
35
+PROJECT_NAME='freedombone'
36
+
37
+export TEXTDOMAIN=$PROJECT_NAME
38
+export TEXTDOMAINDIR="/usr/share/locale"
39
+
35 40
 USERNAME=
36 41
 COUNTRY_CODE="US"
37 42
 AREA="Free Speech Zone"

+ 5
- 0
src/freedombone-config View File

@@ -31,6 +31,11 @@
31 31
 
32 32
 NO_OF_ARGS=$#
33 33
 
34
+PROJECT_NAME='freedombone'
35
+
36
+export TEXTDOMAIN=$PROJECT_NAME
37
+export TEXTDOMAINDIR="/usr/share/locale"
38
+
34 39
 # Web site
35 40
 FREEDOMBONE_WEBSITE="http://freedombone.uk.to"
36 41
 

+ 5
- 0
src/freedombone-controlpanel View File

@@ -28,6 +28,11 @@
28 28
 # You should have received a copy of the GNU General Public License
29 29
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
30 30
 
31
+PROJECT_NAME='freedombone'
32
+
33
+export TEXTDOMAIN=$PROJECT_NAME
34
+export TEXTDOMAINDIR="/usr/share/locale"
35
+
31 36
 COMPLETION_FILE=$HOME/freedombone-completed.txt
32 37
 SELECTED_USERNAME=
33 38
 SIP_CONFIG_FILE=/etc/sipwitch.conf

+ 5
- 0
src/freedombone-deploy View File

@@ -29,6 +29,11 @@
29 29
 # You should have received a copy of the GNU General Public License
30 30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 31
 
32
+PROJECT_NAME='freedombone'
33
+
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
32 37
 # Default username for disk images
33 38
 DEFAULT_IMAGE_USERNAME='freedom'
34 39
 

+ 4
- 0
src/freedombone-format View File

@@ -28,6 +28,10 @@
28 28
 # You should have received a copy of the GNU General Public License
29 29
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
30 30
 
31
+PROJECT_NAME='freedombone'
32
+
33
+export TEXTDOMAIN=$PROJECT_NAME
34
+export TEXTDOMAINDIR="/usr/share/locale"
31 35
 
32 36
 if [ ! $1 ]; then
33 37
    echo 'Specify a drive, such as sdb, sdc, etc'

+ 5
- 0
src/freedombone-ignore View File

@@ -30,6 +30,11 @@
30 30
 # You should have received a copy of the GNU General Public License
31 31
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
32 32
 
33
+PROJECT_NAME='freedombone'
34
+
35
+export TEXTDOMAIN=$PROJECT_NAME
36
+export TEXTDOMAINDIR="/usr/share/locale"
37
+
33 38
 MYUSERNAME=$USER
34 39
 EMAIL_ADDRESS=
35 40
 SUBJECT_TEXT=

+ 4
- 0
src/freedombone-image View File

@@ -29,6 +29,10 @@
29 29
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
30 30
 
31 31
 PROJECT_NAME='freedombone'
32
+
33
+export TEXTDOMAIN=$PROJECT_NAME
34
+export TEXTDOMAINDIR="/usr/share/locale"
35
+
32 36
 IMAGE_TYPE='beaglebone'
33 37
 CURR_DIR=$(pwd)
34 38
 CURR_USER=$(echo $USER)

+ 3
- 0
src/freedombone-image-customise View File

@@ -31,6 +31,9 @@ set -x
31 31
 
32 32
 PROJECT_NAME='freedombone'
33 33
 
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
34 37
 MY_USERNAME='debian'
35 38
 MY_PASSWORD='freedombone'
36 39
 

+ 5
- 0
src/freedombone-image-hardware-setup View File

@@ -26,6 +26,11 @@
26 26
 # You should have received a copy of the GNU General Public License
27 27
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
28 28
 
29
+PROJECT_NAME='freedombone'
30
+
31
+export TEXTDOMAIN=$PROJECT_NAME
32
+export TEXTDOMAINDIR="/usr/share/locale"
33
+
29 34
 enable_serial_console() {
30 35
     # By default, spawn a console on the serial port
31 36
     device="$1"

+ 5
- 0
src/freedombone-image-make View File

@@ -29,6 +29,11 @@
29 29
 
30 30
 set -e # Exit on first error
31 31
 
32
+PROJECT_NAME='freedombone'
33
+
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
32 37
 #set -x # Enable debugging
33 38
 
34 39
 IMAGE=$1

+ 5
- 0
src/freedombone-image-vmdebootstrap View File

@@ -26,6 +26,11 @@
26 26
 # You should have received a copy of the GNU General Public License
27 27
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
28 28
 
29
+PROJECT_NAME='freedombone'
30
+
31
+export TEXTDOMAIN=$PROJECT_NAME
32
+export TEXTDOMAINDIR="/usr/share/locale"
33
+
29 34
 mkdir -p vendor
30 35
 if [ -d vendor/vmdebootstrap ] ; then
31 36
     (cd vendor/vmdebootstrap; git checkout .; git pull)

+ 4
- 0
src/freedombone-keydrive View File

@@ -28,6 +28,10 @@
28 28
 # You should have received a copy of the GNU General Public License
29 29
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
30 30
 
31
+PROJECT_NAME='freedombone'
32
+
33
+export TEXTDOMAIN=$PROJECT_NAME
34
+export TEXTDOMAINDIR="/usr/share/locale"
31 35
 
32 36
 USB_DRIVE=/dev/sdb1
33 37
 USB_MOUNT=/mnt/usb

+ 5
- 0
src/freedombone-logging View File

@@ -28,6 +28,11 @@
28 28
 # You should have received a copy of the GNU General Public License
29 29
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
30 30
 
31
+PROJECT_NAME='freedombone'
32
+
33
+export TEXTDOMAIN=$PROJECT_NAME
34
+export TEXTDOMAINDIR="/usr/share/locale"
35
+
31 36
 WEBSERVER_LOG_LEVEL='warn'
32 37
 
33 38
 if [ ! "$1" ]; then

+ 5
- 0
src/freedombone-mesh View File

@@ -28,6 +28,11 @@
28 28
 # You should have received a copy of the GNU General Public License
29 29
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
30 30
 
31
+PROJECT_NAME='freedombone'
32
+
33
+export TEXTDOMAIN=$PROJECT_NAME
34
+export TEXTDOMAINDIR="/usr/share/locale"
35
+
31 36
 MUMBLE_PATH=/usr/bin/mumble
32 37
 TOXIC_PATH=/usr/bin/toxic
33 38
 DHTNODES=/usr/share/toxic/DHTnodes

+ 5
- 0
src/freedombone-meshweb View File

@@ -1,5 +1,10 @@
1 1
 #!/bin/bash
2 2
 
3
+PROJECT_NAME='freedombone'
4
+
5
+export TEXTDOMAIN=$PROJECT_NAME
6
+export TEXTDOMAINDIR="/usr/share/locale"
7
+
3 8
 # client or server installations sounds odd for a mesh, but this
4 9
 # indicates whether this is a dedicated mesh peer ("yes") or
5 10
 # a 'client' such as a laptop or desktop machine with

+ 5
- 0
src/freedombone-prep View File

@@ -32,6 +32,11 @@
32 32
 # The number of arguments
33 33
 NO_OF_ARGS=$#
34 34
 
35
+PROJECT_NAME='freedombone'
36
+
37
+export TEXTDOMAIN=$PROJECT_NAME
38
+export TEXTDOMAINDIR="/usr/share/locale"
39
+
35 40
 # Version number of this script
36 41
 VERSION="1.01"
37 42
 

+ 5
- 0
src/freedombone-recoverkey View File

@@ -28,6 +28,11 @@
28 28
 # You should have received a copy of the GNU General Public License
29 29
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
30 30
 
31
+PROJECT_NAME='freedombone'
32
+
33
+export TEXTDOMAIN=$PROJECT_NAME
34
+export TEXTDOMAINDIR="/usr/share/locale"
35
+
31 36
 FRIENDS_SERVERS_LIST=
32 37
 MY_USERNAME=
33 38
 GPG_USB_DRIVE='sdb1'

+ 5
- 0
src/freedombone-remote View File

@@ -30,6 +30,11 @@
30 30
 
31 31
 NO_OF_ARGS=$#
32 32
 
33
+PROJECT_NAME='freedombone'
34
+
35
+export TEXTDOMAIN=$PROJECT_NAME
36
+export TEXTDOMAINDIR="/usr/share/locale"
37
+
33 38
 # User to create the list for
34 39
 MY_USERNAME=$USER
35 40
 

+ 5
- 0
src/freedombone-renew-cert View File

@@ -28,6 +28,11 @@
28 28
 # You should have received a copy of the GNU General Public License
29 29
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
30 30
 
31
+PROJECT_NAME='freedombone'
32
+
33
+export TEXTDOMAIN=$PROJECT_NAME
34
+export TEXTDOMAINDIR="/usr/share/locale"
35
+
31 36
 HOSTNAME=
32 37
 PROVIDER='startssl'
33 38
 DH_KEYLENGTH=2048

+ 5
- 0
src/freedombone-rmemail View File

@@ -29,6 +29,11 @@
29 29
 # You should have received a copy of the GNU General Public License
30 30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 31
 
32
+PROJECT_NAME='freedombone'
33
+
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
32 37
 MYUSERNAME=$USER
33 38
 
34 39
 function show_help {

+ 5
- 0
src/freedombone-rmlist View File

@@ -29,6 +29,11 @@
29 29
 # You should have received a copy of the GNU General Public License
30 30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 31
 
32
+PROJECT_NAME='freedombone'
33
+
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
32 37
 MYUSERNAME=$USER
33 38
 MAILINGLIST=
34 39
 LIST_ADDRESS=

+ 5
- 0
src/freedombone-rmsipuser View File

@@ -29,6 +29,11 @@
29 29
 # You should have received a copy of the GNU General Public License
30 30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 31
 
32
+PROJECT_NAME='freedombone'
33
+
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
32 37
 MY_USERNAME=$1
33 38
 CONFIG_FILE=/etc/sipwitch.conf
34 39
 USER_EXISTS="no"

+ 5
- 0
src/freedombone-rmuser View File

@@ -1,5 +1,10 @@
1 1
 #!/bin/bash
2 2
 
3
+PROJECT_NAME='freedombone'
4
+
5
+export TEXTDOMAIN=$PROJECT_NAME
6
+export TEXTDOMAINDIR="/usr/share/locale"
7
+
3 8
 MY_USERNAME=$1
4 9
 COMPLETION_FILE=$HOME/freedombone-completed.txt
5 10
 

+ 5
- 0
src/freedombone-rmxmpp View File

@@ -29,6 +29,11 @@
29 29
 # You should have received a copy of the GNU General Public License
30 30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 31
 
32
+PROJECT_NAME='freedombone'
33
+
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
32 37
 EMAIL_ADDRESS=
33 38
 
34 39
 function show_help {

+ 9
- 4
src/freedombone-sec View File

@@ -28,6 +28,11 @@
28 28
 # You should have received a copy of the GNU General Public License
29 29
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
30 30
 
31
+PROJECT_NAME='freedombone'
32
+
33
+export TEXTDOMAIN=$PROJECT_NAME
34
+export TEXTDOMAINDIR="/usr/share/locale"
35
+
31 36
 SSL_PROTOCOLS=
32 37
 SSL_CIPHERS=
33 38
 SSH_CIPHERS=
@@ -404,11 +409,11 @@ function renew_startssl {
404 409
              --msgbox "An existing certificate for $renew_domain was not found" 6 40
405 410
 	  return
406 411
   fi
407
-  
412
+
408 413
   if [[ $renew_domain != *"."* ]]; then
409 414
       dialog --title "Renew a StartSSL certificate" \
410 415
              --msgbox "Invalid domain name: $renew_domain" 6 40
411
-	  return	  
416
+	  return
412 417
   fi
413 418
 
414 419
   freedombone-renew-cert -h $renew_domain -p startssl
@@ -445,11 +450,11 @@ function renew_letsencrypt {
445 450
              --msgbox "An existing certificate for $renew_domain was not found" 6 40
446 451
 	  return
447 452
   fi
448
-  
453
+
449 454
   if [[ $renew_domain != *"."* ]]; then
450 455
       dialog --title "Renew a Let's Encrypt certificate" \
451 456
              --msgbox "Invalid domain name: $renew_domain" 6 40
452
-	  return	  
457
+	  return
453 458
   fi
454 459
 
455 460
   freedombone-renew-cert -h $renew_domain -p 'letsencrypt'

+ 5
- 0
src/freedombone-sipfreeext View File

@@ -29,6 +29,11 @@
29 29
 # You should have received a copy of the GNU General Public License
30 30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 31
 
32
+PROJECT_NAME='freedombone'
33
+
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
32 37
 CONFIG_FILE=/etc/sipwitch.conf
33 38
 
34 39
 maxnum=201

+ 5
- 0
src/freedombone-splitkey View File

@@ -34,6 +34,11 @@
34 34
 # You should have received a copy of the GNU General Public License
35 35
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
36 36
 
37
+PROJECT_NAME='freedombone'
38
+
39
+export TEXTDOMAIN=$PROJECT_NAME
40
+export TEXTDOMAINDIR="/usr/share/locale"
41
+
37 42
 KEY_FRAGMENTS=3
38 43
 MY_USERNAME=
39 44
 MY_EMAIL_ADDRESS=

+ 5
- 0
src/freedombone-unignore View File

@@ -30,6 +30,11 @@
30 30
 # You should have received a copy of the GNU General Public License
31 31
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
32 32
 
33
+PROJECT_NAME='freedombone'
34
+
35
+export TEXTDOMAIN=$PROJECT_NAME
36
+export TEXTDOMAINDIR="/usr/share/locale"
37
+
33 38
 MYUSERNAME=$USER
34 39
 EMAIL_ADDRESS=
35 40
 SUBJECT_TEXT=

+ 5
- 0
src/freedombone-xmpp-pass View File

@@ -29,6 +29,11 @@
29 29
 # You should have received a copy of the GNU General Public License
30 30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 31
 
32
+PROJECT_NAME='freedombone'
33
+
34
+export TEXTDOMAIN=$PROJECT_NAME
35
+export TEXTDOMAINDIR="/usr/share/locale"
36
+
32 37
 EMAIL_ADDRESS=
33 38
 
34 39
 function show_help {

+ 5
- 0
src/zeronetavahi View File

@@ -31,6 +31,11 @@
31 31
 # You should have received a copy of the GNU General Public License
32 32
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
33 33
 
34
+PROJECT_NAME='freedombone'
35
+
36
+export TEXTDOMAIN=$PROJECT_NAME
37
+export TEXTDOMAINDIR="/usr/share/locale"
38
+
34 39
 WEB_PAGE_TITLE="Freedombone Mesh"
35 40
 TRACKER_PORT=6969
36 41
 ZERONET_INSTALL=/opt/zeronet