Adding german

This commit is contained in:
mrmarcus007
2023-05-03 12:03:16 +01:00
committed by GitHub
parent 595f3d6b15
commit 18280f36e6
+9 -4
View File
@@ -20,7 +20,7 @@ def lang():
global Lang global Lang
os.system('cls') os.system('cls')
print("Please select 1 of 2 languages, Bitte Wahalen sie 1 oder 2 Sprachen") print("Please select 1 of 2 languages, Bitte Wahalen sie 1 oder 2 Sprachen")
print("1. English \n 2. Deusche) print("1. English \n 2. Deusche")
Lang = input(">") Lang = input(">")
def start(): def start():
@@ -57,9 +57,10 @@ def load():
USBdevices = (data["USBdevices"]) USBdevices = (data["USBdevices"])
TotalUSBpower = (data["TotalUSBPower"]) TotalUSBpower = (data["TotalUSBPower"])
TotalPower = (data["TotalPower"]) TotalPower = (data["TotalPower"])
lang = data(data["Lang"])
def Menu(): def Menu():
if lang = 1: if lang == "1":
os.system('cls') os.system('cls')
print("="*40, "\n", graphics.Menu, "\n", graphics.Rever, "\n", "="*40) print("="*40, "\n", graphics.Menu, "\n", graphics.Rever, "\n", "="*40)
print(" 1. View current configuration \n 2. Edit configuration \n 3. export configuration \n 4. exit program") print(" 1. View current configuration \n 2. Edit configuration \n 3. export configuration \n 4. exit program")
@@ -78,7 +79,7 @@ def Menu():
existstage1() existstage1()
else: else:
Menu() Menu()
else: elif lang == "2":
os.system('cls') os.system('cls')
print("="*40, "\n", graphics.MenuD, "\n", graphics.ReverD, "\n", "="*40) print("="*40, "\n", graphics.MenuD, "\n", graphics.ReverD, "\n", "="*40)
print(" 1. Aktuelle Konfiguration anzeigen \n 2. Konfiguration bearbeiten \n 3. Konfiguration exportieren \n 4. Programm beenden") print(" 1. Aktuelle Konfiguration anzeigen \n 2. Konfiguration bearbeiten \n 3. Konfiguration exportieren \n 4. Programm beenden")
@@ -97,6 +98,9 @@ def Menu():
existstage1() existstage1()
else: else:
Menu() Menu()
else:
lang()
Menu()
def editor(): def editor():
my_system = platform.uname() my_system = platform.uname()
@@ -129,7 +133,8 @@ def editor():
"RyzenADJI": RyzenADJI, "RyzenADJI": RyzenADJI,
"USBdevices": USBdevices, "USBdevices": USBdevices,
"TotalUSBPower": TotalUSBpower, "TotalUSBPower": TotalUSBpower,
"TotalPower": TotalPower "TotalPower": TotalPower,
"lang": Lang,
} }
with open("Configuationtable.json", "w") as file: with open("Configuationtable.json", "w") as file:
file.write(json.dumps(data)) file.write(json.dumps(data))