From 6fc3017853b8ecaf4ed0b8cd7d92fd04083c30e5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 27 Nov 2015 11:42:16 +0000 Subject: [PATCH] Prepare for translations --- src/freedombone | 5 +++++ src/freedombone-addcert | 7 ++++++- src/freedombone-addemail | 5 +++++ src/freedombone-addlist | 5 +++++ src/freedombone-addsipuser | 9 +++++++-- src/freedombone-adduser | 5 +++++ src/freedombone-addxmpp | 7 ++++++- src/freedombone-client | 5 +++++ src/freedombone-clientcert | 5 +++++ src/freedombone-config | 5 +++++ src/freedombone-controlpanel | 5 +++++ src/freedombone-deploy | 5 +++++ src/freedombone-format | 4 ++++ src/freedombone-ignore | 5 +++++ src/freedombone-image | 4 ++++ src/freedombone-image-customise | 3 +++ src/freedombone-image-hardware-setup | 5 +++++ src/freedombone-image-make | 5 +++++ src/freedombone-image-vmdebootstrap | 5 +++++ src/freedombone-keydrive | 4 ++++ src/freedombone-logging | 5 +++++ src/freedombone-mesh | 5 +++++ src/freedombone-meshweb | 5 +++++ src/freedombone-prep | 5 +++++ src/freedombone-recoverkey | 5 +++++ src/freedombone-remote | 5 +++++ src/freedombone-renew-cert | 5 +++++ src/freedombone-rmemail | 5 +++++ src/freedombone-rmlist | 5 +++++ src/freedombone-rmsipuser | 5 +++++ src/freedombone-rmuser | 5 +++++ src/freedombone-rmxmpp | 5 +++++ src/freedombone-sec | 13 +++++++++---- src/freedombone-sipfreeext | 5 +++++ src/freedombone-splitkey | 5 +++++ src/freedombone-unignore | 5 +++++ src/freedombone-xmpp-pass | 5 +++++ src/zeronetavahi | 5 +++++ 38 files changed, 193 insertions(+), 8 deletions(-) diff --git a/src/freedombone b/src/freedombone index 76114764..313c640b 100755 --- a/src/freedombone +++ b/src/freedombone @@ -30,6 +30,11 @@ NO_OF_ARGS=$# +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + # Web site FREEDOMBONE_WEBSITE="http://freedombone.uk.to" diff --git a/src/freedombone-addcert b/src/freedombone-addcert index 73f83eb9..8d3c705d 100755 --- a/src/freedombone-addcert +++ b/src/freedombone-addcert @@ -28,6 +28,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + HOSTNAME= LETSENCRYPT_HOSTNAME= COUNTRY_CODE="US" @@ -177,7 +182,7 @@ if [ $LETSENCRYPT_HOSTNAME ]; then fi 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 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 - + # link the private key if [ -f /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key ]; then if [ ! -f /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key.old ]; then diff --git a/src/freedombone-addemail b/src/freedombone-addemail index 854aac73..e2efa602 100755 --- a/src/freedombone-addemail +++ b/src/freedombone-addemail @@ -29,6 +29,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + MYUSERNAME=$USER EMAILADDRESS= GROUP_NAME= diff --git a/src/freedombone-addlist b/src/freedombone-addlist index 8a8f4ca7..6c6fc34e 100755 --- a/src/freedombone-addlist +++ b/src/freedombone-addlist @@ -29,6 +29,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + MYUSERNAME=$USER MAILINGLIST= SUBJECTTAG= diff --git a/src/freedombone-addsipuser b/src/freedombone-addsipuser index 83512af8..391d97d0 100755 --- a/src/freedombone-addsipuser +++ b/src/freedombone-addsipuser @@ -29,6 +29,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + MY_USERNAME= EXTENSION= PASSWORD= @@ -71,11 +76,11 @@ function update_sip_user { fi if [[ "$line" == *""* ]]; then line="$PASSWORD" - fi + fi if [[ "$line" == *""* ]]; then line="$MY_USERNAME $EXTENSION" USER_FOUND= - fi + fi fi echo $line >> $NEW_CONFIG_FILE done < $CONFIG_FILE diff --git a/src/freedombone-adduser b/src/freedombone-adduser index d334df54..646a0bd3 100755 --- a/src/freedombone-adduser +++ b/src/freedombone-adduser @@ -29,6 +29,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + MY_USERNAME=$1 SSH_PUBLIC_KEY="$2" GPG_KEYSERVER='hkp://keys.gnupg.net' diff --git a/src/freedombone-addxmpp b/src/freedombone-addxmpp index e3d9a6b7..b7ac1252 100755 --- a/src/freedombone-addxmpp +++ b/src/freedombone-addxmpp @@ -29,6 +29,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + EMAIL_ADDRESS= NEW_USER_PASSWORD= @@ -77,7 +82,7 @@ if [ ! $NEW_USER_PASSWORD ]; then else USERNAME=$(echo $EMAIL_ADDRESS | awk -F '@' '{print $1}') DOMAIN_NAME=$(echo $EMAIL_ADDRESS | awk -F '@' '{print $2}') - prosodyctl register $USERNAME $DOMAIN_NAME "$NEW_USER_PASSWORD" + prosodyctl register $USERNAME $DOMAIN_NAME "$NEW_USER_PASSWORD" if [ ! "$?" = "0" ]; then exit 2 fi diff --git a/src/freedombone-client b/src/freedombone-client index 7a4acb15..24c0f81b 100755 --- a/src/freedombone-client +++ b/src/freedombone-client @@ -26,6 +26,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + CURR_USER=$USER # Version number of this script diff --git a/src/freedombone-clientcert b/src/freedombone-clientcert index ebf17ffd..3d94272c 100755 --- a/src/freedombone-clientcert +++ b/src/freedombone-clientcert @@ -32,6 +32,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + USERNAME= COUNTRY_CODE="US" AREA="Free Speech Zone" diff --git a/src/freedombone-config b/src/freedombone-config index a45b0719..e32a629b 100755 --- a/src/freedombone-config +++ b/src/freedombone-config @@ -31,6 +31,11 @@ NO_OF_ARGS=$# +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + # Web site FREEDOMBONE_WEBSITE="http://freedombone.uk.to" diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index 8ffd7983..f26638a9 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -28,6 +28,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + COMPLETION_FILE=$HOME/freedombone-completed.txt SELECTED_USERNAME= SIP_CONFIG_FILE=/etc/sipwitch.conf diff --git a/src/freedombone-deploy b/src/freedombone-deploy index 9b5e072f..91840081 100755 --- a/src/freedombone-deploy +++ b/src/freedombone-deploy @@ -29,6 +29,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + # Default username for disk images DEFAULT_IMAGE_USERNAME='freedom' diff --git a/src/freedombone-format b/src/freedombone-format index 2303d5f0..1830ef62 100755 --- a/src/freedombone-format +++ b/src/freedombone-format @@ -28,6 +28,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" if [ ! $1 ]; then echo 'Specify a drive, such as sdb, sdc, etc' diff --git a/src/freedombone-ignore b/src/freedombone-ignore index a9f05a01..83dd040e 100755 --- a/src/freedombone-ignore +++ b/src/freedombone-ignore @@ -30,6 +30,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + MYUSERNAME=$USER EMAIL_ADDRESS= SUBJECT_TEXT= diff --git a/src/freedombone-image b/src/freedombone-image index 67f71fdf..fb8f7d7f 100755 --- a/src/freedombone-image +++ b/src/freedombone-image @@ -29,6 +29,10 @@ # along with this program. If not, see . PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + IMAGE_TYPE='beaglebone' CURR_DIR=$(pwd) CURR_USER=$(echo $USER) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 8d83ff62..58c531ce 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -31,6 +31,9 @@ set -x PROJECT_NAME='freedombone' +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + MY_USERNAME='debian' MY_PASSWORD='freedombone' diff --git a/src/freedombone-image-hardware-setup b/src/freedombone-image-hardware-setup index e66836ab..f51a50fc 100755 --- a/src/freedombone-image-hardware-setup +++ b/src/freedombone-image-hardware-setup @@ -26,6 +26,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + enable_serial_console() { # By default, spawn a console on the serial port device="$1" diff --git a/src/freedombone-image-make b/src/freedombone-image-make index 7448e3e4..2eefc1b8 100755 --- a/src/freedombone-image-make +++ b/src/freedombone-image-make @@ -29,6 +29,11 @@ set -e # Exit on first error +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + #set -x # Enable debugging IMAGE=$1 diff --git a/src/freedombone-image-vmdebootstrap b/src/freedombone-image-vmdebootstrap index bde83baf..c9462254 100755 --- a/src/freedombone-image-vmdebootstrap +++ b/src/freedombone-image-vmdebootstrap @@ -26,6 +26,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + mkdir -p vendor if [ -d vendor/vmdebootstrap ] ; then (cd vendor/vmdebootstrap; git checkout .; git pull) diff --git a/src/freedombone-keydrive b/src/freedombone-keydrive index e40ed1c3..cecac59e 100755 --- a/src/freedombone-keydrive +++ b/src/freedombone-keydrive @@ -28,6 +28,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" USB_DRIVE=/dev/sdb1 USB_MOUNT=/mnt/usb diff --git a/src/freedombone-logging b/src/freedombone-logging index 162b8e61..b37eb79c 100755 --- a/src/freedombone-logging +++ b/src/freedombone-logging @@ -28,6 +28,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + WEBSERVER_LOG_LEVEL='warn' if [ ! "$1" ]; then diff --git a/src/freedombone-mesh b/src/freedombone-mesh index 1d3754e5..f1dbbd20 100755 --- a/src/freedombone-mesh +++ b/src/freedombone-mesh @@ -28,6 +28,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + MUMBLE_PATH=/usr/bin/mumble TOXIC_PATH=/usr/bin/toxic DHTNODES=/usr/share/toxic/DHTnodes diff --git a/src/freedombone-meshweb b/src/freedombone-meshweb index e6f2dd95..60968f3a 100755 --- a/src/freedombone-meshweb +++ b/src/freedombone-meshweb @@ -1,5 +1,10 @@ #!/bin/bash +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + # client or server installations sounds odd for a mesh, but this # indicates whether this is a dedicated mesh peer ("yes") or # a 'client' such as a laptop or desktop machine with diff --git a/src/freedombone-prep b/src/freedombone-prep index 1b2d04e6..0782ac20 100755 --- a/src/freedombone-prep +++ b/src/freedombone-prep @@ -32,6 +32,11 @@ # The number of arguments NO_OF_ARGS=$# +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + # Version number of this script VERSION="1.01" diff --git a/src/freedombone-recoverkey b/src/freedombone-recoverkey index f7b9917a..fc6ef101 100755 --- a/src/freedombone-recoverkey +++ b/src/freedombone-recoverkey @@ -28,6 +28,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + FRIENDS_SERVERS_LIST= MY_USERNAME= GPG_USB_DRIVE='sdb1' diff --git a/src/freedombone-remote b/src/freedombone-remote index 2a4fa445..4d124233 100755 --- a/src/freedombone-remote +++ b/src/freedombone-remote @@ -30,6 +30,11 @@ NO_OF_ARGS=$# +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + # User to create the list for MY_USERNAME=$USER diff --git a/src/freedombone-renew-cert b/src/freedombone-renew-cert index 46cda431..50e35523 100755 --- a/src/freedombone-renew-cert +++ b/src/freedombone-renew-cert @@ -28,6 +28,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + HOSTNAME= PROVIDER='startssl' DH_KEYLENGTH=2048 diff --git a/src/freedombone-rmemail b/src/freedombone-rmemail index 177fbe25..8b665621 100755 --- a/src/freedombone-rmemail +++ b/src/freedombone-rmemail @@ -29,6 +29,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + MYUSERNAME=$USER function show_help { diff --git a/src/freedombone-rmlist b/src/freedombone-rmlist index ac1b939c..19ccc5b3 100755 --- a/src/freedombone-rmlist +++ b/src/freedombone-rmlist @@ -29,6 +29,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + MYUSERNAME=$USER MAILINGLIST= LIST_ADDRESS= diff --git a/src/freedombone-rmsipuser b/src/freedombone-rmsipuser index 5d335a93..e25a84c3 100755 --- a/src/freedombone-rmsipuser +++ b/src/freedombone-rmsipuser @@ -29,6 +29,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + MY_USERNAME=$1 CONFIG_FILE=/etc/sipwitch.conf USER_EXISTS="no" diff --git a/src/freedombone-rmuser b/src/freedombone-rmuser index 27c45c4c..7f266c93 100755 --- a/src/freedombone-rmuser +++ b/src/freedombone-rmuser @@ -1,5 +1,10 @@ #!/bin/bash +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + MY_USERNAME=$1 COMPLETION_FILE=$HOME/freedombone-completed.txt diff --git a/src/freedombone-rmxmpp b/src/freedombone-rmxmpp index cfa13d61..ab1fc49d 100755 --- a/src/freedombone-rmxmpp +++ b/src/freedombone-rmxmpp @@ -29,6 +29,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + EMAIL_ADDRESS= function show_help { diff --git a/src/freedombone-sec b/src/freedombone-sec index 1c2eeb5e..1e8ff9e3 100755 --- a/src/freedombone-sec +++ b/src/freedombone-sec @@ -28,6 +28,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + SSL_PROTOCOLS= SSL_CIPHERS= SSH_CIPHERS= @@ -404,11 +409,11 @@ function renew_startssl { --msgbox "An existing certificate for $renew_domain was not found" 6 40 return fi - + if [[ $renew_domain != *"."* ]]; then dialog --title "Renew a StartSSL certificate" \ --msgbox "Invalid domain name: $renew_domain" 6 40 - return + return fi freedombone-renew-cert -h $renew_domain -p startssl @@ -445,11 +450,11 @@ function renew_letsencrypt { --msgbox "An existing certificate for $renew_domain was not found" 6 40 return fi - + if [[ $renew_domain != *"."* ]]; then dialog --title "Renew a Let's Encrypt certificate" \ --msgbox "Invalid domain name: $renew_domain" 6 40 - return + return fi freedombone-renew-cert -h $renew_domain -p 'letsencrypt' diff --git a/src/freedombone-sipfreeext b/src/freedombone-sipfreeext index 3196fbf9..7b4bbdff 100755 --- a/src/freedombone-sipfreeext +++ b/src/freedombone-sipfreeext @@ -29,6 +29,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + CONFIG_FILE=/etc/sipwitch.conf maxnum=201 diff --git a/src/freedombone-splitkey b/src/freedombone-splitkey index 739dfc12..ba9d9567 100755 --- a/src/freedombone-splitkey +++ b/src/freedombone-splitkey @@ -34,6 +34,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + KEY_FRAGMENTS=3 MY_USERNAME= MY_EMAIL_ADDRESS= diff --git a/src/freedombone-unignore b/src/freedombone-unignore index e80a49b4..6d13941d 100755 --- a/src/freedombone-unignore +++ b/src/freedombone-unignore @@ -30,6 +30,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + MYUSERNAME=$USER EMAIL_ADDRESS= SUBJECT_TEXT= diff --git a/src/freedombone-xmpp-pass b/src/freedombone-xmpp-pass index 37a049be..7dd0151c 100755 --- a/src/freedombone-xmpp-pass +++ b/src/freedombone-xmpp-pass @@ -29,6 +29,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + EMAIL_ADDRESS= function show_help { diff --git a/src/zeronetavahi b/src/zeronetavahi index fabb1200..73109ded 100755 --- a/src/zeronetavahi +++ b/src/zeronetavahi @@ -31,6 +31,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PROJECT_NAME='freedombone' + +export TEXTDOMAIN=$PROJECT_NAME +export TEXTDOMAINDIR="/usr/share/locale" + WEB_PAGE_TITLE="Freedombone Mesh" TRACKER_PORT=6969 ZERONET_INSTALL=/opt/zeronet