From 1a4ed4f4e7c75d7a308c486a4d8dba7eea237bbf Mon Sep 17 00:00:00 2001 From: piair Date: Mon, 8 May 2023 20:56:55 +0200 Subject: [PATCH] lang + small error fix --- main.py | 27 ++++++++++++++++++++------- modules/config.py | 4 ++-- user_data/config.default | 1 - version | 2 +- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/main.py b/main.py index fcfc5b1..5325ee1 100644 --- a/main.py +++ b/main.py @@ -34,7 +34,7 @@ def confirm(texte, default = False): return False return default -lang = "fr" +lang = "en" text = {"fr" : { "compte" : "entrer l'adresse mail du compte ", @@ -55,6 +55,24 @@ text = {"fr" : { "proxye" : "voulez vous utiliser un proxy ", "proxyl" : "entrez le lien du proxy ", "proxyp" : "entrez le port du proxy " + }, + "en" : { + "compte" : "enter email of an account", + "mdp" : "enter password of this account ", + "next" : "Add another account ? ", + "finc" : "Adding accounts ", + "ajout" : "Accounts added ", + "discorde" : "Do you want to use discord ? (Highly recommended as it's untested without)", + "w1" : "Enter Webhook link for sending points everyday", + "w2" : "Enter Webhook link for errors ", + "msqle" : "Do you want to use a database ? ", + "msqll" : "database link ", + "msqlu" : "database username ", + "msqlp" : "database password ", + "msqlt" : "database name (should be MsRewards) ", + "proxye" : "Do you want to use a proxy ", + "proxyl" : "Proxy address ", + "proxyp" : "Proxy port " } } @@ -92,7 +110,7 @@ def edit_config_txt(ligne, contenu): txt = f.readlines() f.close() if txt.count(txt) >1: - raise NameError("il y a plus d'une occurence, echec de la modification") + raise NameError("Fail") for i in range(len(txt)) : name = txt[i].split(" = ")[0] @@ -106,16 +124,11 @@ def edit_config_txt(ligne, contenu): def setup_settings(): - general() discord() proxy() sql() -def general(): - if confirm(t["fidelity"]): - lien = input(t["lien"]) - edit_config_txt('FidelityLink',lien) def discord(): diff --git a/modules/config.py b/modules/config.py index 20e19db..971cf4f 100644 --- a/modules/config.py +++ b/modules/config.py @@ -152,12 +152,12 @@ g.sql_database = config["SQL"]["database"] try : - g.database_error_override = config["OTHER"]["database_override"] + g.database_error_override = config["OTHER"]["database_override"] == "True" except : pass try : - g.fast = config["OTHER"]["fast"] + g.fast = config["OTHER"]["fast"] == "True" except : pass h = open(g.mot_path, "r", encoding="utf-8") diff --git a/user_data/config.default b/user_data/config.default index 3681b75..662ad76 100644 --- a/user_data/config.default +++ b/user_data/config.default @@ -5,7 +5,6 @@ logpath = /your/path/to/loginandpass.csv [SETTINGS] -FidelityLink = Null embeds = False Headless = True diff --git a/version b/version index 19e0d42..302b2ec 100644 --- a/version +++ b/version @@ -1 +1 @@ -v5.10.6 +v5.10.7