From a92ae5bebe5e6a03535f94dc745fc7a9a199c3fb Mon Sep 17 00:00:00 2001 From: raphael60650 Date: Wed, 14 Jul 2021 14:45:32 +0200 Subject: [PATCH] translated to english --- Updater/Updater.py | 22 ++++++++++------------ Updater/setup.py | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Updater/Updater.py b/Updater/Updater.py index 9cb2911..9418413 100644 --- a/Updater/Updater.py +++ b/Updater/Updater.py @@ -5,7 +5,7 @@ import sys Dir, ext = os.path.splitext(sys.argv[0]) if ext == ".py": - input("Ce code ne doit être lancé que sous sa forme .exe !") + input("This code need to be started from its .exe version !") exit() VERSION_FILE_URL = "https://raw.githubusercontent.com/Faraphel/MKWF-Install/master/version" @@ -18,28 +18,26 @@ try: dl_size = int(dl.headers["Content-Length"]) with open("./download.zip", "wb") as file: - print(f"Téléchargement de la version {gitversion['version']}.{gitversion['subversion']} en cours...") + print(f"Downloading version {gitversion['version']}.{gitversion['subversion']}...") chunk_size = 1024 for i, chunk in enumerate(dl.iter_content(chunk_size=chunk_size)): progress = int((i * chunk_size * 100) / dl_size) - print("("+str(progress)+"%) | " + "#" * (progress//5) + "_"* (20 - (progress//5)) + " | " + - str(round(i*chunk_size/1000000,1)) + "Mo/" + str(round(dl_size/1000000,1)) + "Mo", end="\r") + print("("+str(progress)+"%) | " + "#" * (progress//5) + "_" * (20 - (progress//5)) + " | " + + str(round(i*chunk_size/1000000,1)) + "Mo/" + str(round(dl_size/1000000,1)) + "Mo" + " " * 10, + end="\r") file.write(chunk) file.flush() - print("fin du téléchargement, début de l'extraction...") + print("end of the download, starting extraction..." + (" " * 10)) with zipfile.ZipFile("./download.zip") as file: file.extractall("./") - print("fin de l'extraction") + print("end of extraction") os.remove("./download.zip") - print("lancement de l'application...") + print("restarting application...") os.startfile(os.path.realpath("./MKWF-Install.exe")) except Exception as e: - print(f"Impossible d'effectuer la mise à jour :\n\n{str(e)}") - input("Appuyez pour continuer...") - -# TODO: Use requests.get("https://api.github.com/repos/Faraphel/MKWF-Install/git/trees/master?recursive=1") to avoid -# redownloading the same files again and again + print(f"Can't update :\n\n{str(e)}") + input("Press to close...") diff --git a/Updater/setup.py b/Updater/setup.py index 1654d34..970e266 100644 --- a/Updater/setup.py +++ b/Updater/setup.py @@ -16,7 +16,7 @@ setup( license='GPL-3.0', author='Faraphel', author_email='rc60650@hotmail.com', - description='Logiciel de mise à jour pour MKWF-Install.', + description='MKWF-Install Updater.', executables = [Executable("./Updater.py", target_name = "Updater.exe", shortcut_name = "MKWF-Install Updater",