diff --git a/wire_g b/wire_g
index b50e155..8eb28db 100755
--- a/wire_g
+++ b/wire_g
@@ -22,11 +22,11 @@ active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/
# funktion wg_notify
wg_notify(){
-
+
a_user=$(whoami)
active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//')
wg_pic="/home/$a_user/.icons/"
- notify-send --icon=${wg_pic}wg-vpn.png "$active eingeschaltet"
+ notify-send --icon=${wg_pic}wg-vpn.png "$active powered"
# autoconnect wird hier abgeschalten damit auch neu importierte nach einem Systemneustart nicht aktiv sind
nmcli con mod $active connection.autoconnect no
# ab hier beginnt yad notify
@@ -58,10 +58,10 @@ import_wg(){
wg_pic="/home/$a_user/.icons/"
wg_wdir="/home/$a_user/.config/wg_nmcli/"
wgconf=$(yad --file --separator=" \n" \
- --button="OK" --button="Abbrechen" \
+ --button="OK" --button="Cancel" \
--width=1200 --height=800 \
--window-icon=${wg_pic}wg-import.png \
- --title="Wireguard .conf Datei auswählen")
+ --title="Wireguard .conf Select file")
if [ "$?" = "0" ]
then
active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//')
@@ -93,24 +93,24 @@ remove(){
selection=$(yad --no-click --list --height=300 --width=60 \
--title="Wire-G Trash" --center \
--fixed --buttons-layout=center \
- --button="OK" --button="Abbrechen" \
+ --button="OK" --button="Cancel" \
--separator="" --window-icon=${wg_pic}wg-trash.png \
- --borders=8 --column 'Löschen' $tunnel)
+ --borders=8 --column 'Delete' $tunnel)
if [ "$?" = "0" ]
then
nmcli connection delete $selection &> ${wg_wdir}.tmp.txt
- success=$(grep -i "erfolgreich gelöscht" ${wg_wdir}.tmp.txt)
+ success=$(grep -i '"erfolgreich gelöscht"\|"successfully deleted"' ${wg_wdir}.tmp.txt)
if [ "$?" = "0" ]
then
yad --window-icon=${wg_pic}wg-trash.png \
--image-on-top --image=${wg_pic}wg-info.png \
- --text="Ihr Tunnel $selection wurde erfolgreich gelöscht.\n" \
+ --text="Your tunnel $selection was successfully deleted.\n" \
--text-align=center --button="OK" --title "Wire-G Trash" \
--fixed --center --buttons-layout=center --borders=8 --center
else
yad --window-icon=${wg_pic}wg-trash.png \
--image-on-top --image=${wg_pic}wg-info.png \
- --text="Oh etwas ging schief.\nBitte Tunnel im Networkmanager löschen." \
+ --text="Oh something went wrong.\nPlease delete tunnel in the network manager." \
--text-align=center --button="OK" --title "Wire-G Trash" \
--fixed --center --buttons-layout=center --borders=8 --center
fi
@@ -133,19 +133,20 @@ more(){
selection=$(yad --text "Wire-G Author: Désiré Werner Menrath
E-Mail: polunga40@unity-mail.de
-Bei allen Tunnel wird der Autostart deaktiviert"!"
-Benutzung ohne Gewähr"!"
+At all tunnels, the auto start is disabled"!"
+Use without warranty"!"
" \
--height=100 --width=80 \
--title="Wire-G" --center \
--fixed --borders=8 --close-on-unfocus \
--buttons-layout=center \
- --button=Importieren:"bash -c import_wg" \
+ --button=Import:"bash -c import_wg" \
--button="Wire-G Stop":"bash -c wg_stop" \
- --button="Abbrechen":1 \
+ --button="Cancel":1 \
--separator="" --window-icon=${wg_pic}wg-vpn.png)
}
export -f more
+
# function end
############################################################################################################
############################################################################################################
@@ -153,7 +154,7 @@ export -f more
connect(){
- success=$(grep -i "erfolgreich aktiviert" ${wg_wdir}.tmp.txt)
+ success=$(grep -i '"erfolgreich aktiviert"\|"successfully activated"' ${wg_wdir}.tmp.txt)
if [ "$?" = "0" ]
then
nmcli con mod $selection connection.autoconnect no
@@ -163,21 +164,21 @@ connect(){
# function end
############################################################################################################
############################################################################################################ # --text "Aktiver Tunnel: $active # mit gewünschtes wort wird fett geschrieben.
-# hiermit wird die Farbe für Variable $active festgelegt mit fetter Schrift.
+# Farbe für Variable $active festgelegt mit fetter Schrift. (bei --text zwischen " ")
selection=$(yad --no-click --list \
--close-on-unfocus --center \
--height=300 --width=60 --title="Wire-G" \
--fixed --buttons-layout=center \
- --button="OK" --button="Abbrechen" \
- --button=Mehr:"bash -c more" --button=Entfernen:"bash -c remove" --separator="" \
+ --button="OK" --button="Cancel" \
+ --button=More:"bash -c more" --button=Remove:"bash -c remove" --separator="" \
--window-icon=${wg_pic}wg-vpn.png \
--borders=8 --image-on-top --image=${wg_pic}wg-active.png \
- --text "Aktiver Tunnel: $active
+ --text "Activ Tunnel: $active
----------------------------------------------------------------------------------
-Sollten keine Tunnel aufgelistet sein,
-so müssen sie ihren Tunnel zuvor importieren." \
- --column 'Auswahl' $tunnel)
+If no tunnels are listed,
+so they have to import their tunnel beforehand." \
+ --column 'Selection' $tunnel)
if [ "$?" = "0" ]
then
active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//')
@@ -192,5 +193,5 @@ if [ "$?" = "0" ]
fi
fi
-############################################ ENDE #########################################################
+############################################ END ##########################################################