translate to english

This commit is contained in:
Désiré Werner Menrath 2023-11-01 07:57:13 +01:00
parent 1d7138f0de
commit d81eec1ece

43
wire_g
View File

@ -26,7 +26,7 @@ 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 "<span color='#626ff1'><b>Wire-G Author: Désiré Werner Menrath</b></span>
<span color='#626ff1'><b>E-Mail: polunga40@unity-mail.de</b></span>
<span color='#626ff1'><b>Bei allen Tunnel wird der Autostart deaktiviert"!"</b></span>
<span color='#626ff1'><b>Benutzung ohne Gewähr"!"</b></span>
<span color='#626ff1'><b>At all tunnels, the auto start is disabled"!"</b></span>
<span color='#626ff1'><b>Use without warranty"!"</b></span>
" \
--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 "<b>Aktiver Tunnel:</b> <span color='#0fad0a'><b>$active</b></span> # mit <b>gewünschtes wort</b> 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 "<b>Aktiver Tunnel: </b> <span color='#0fad0a'><b>$active</b></span>
--text "<b>Activ Tunnel: </b> <span color='#0fad0a'><b>$active</b></span>
<b>----------------------------------------------------------------------------------</b>
<b>Sollten keine Tunnel aufgelistet sein,</b>
<b>so müssen sie ihren Tunnel zuvor importieren.</b>" \
--column 'Auswahl' $tunnel)
<b>If no tunnels are listed,</b>
<b>so they have to import their tunnel beforehand.</b>" \
--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 ##########################################################