From 8085aa9fc29bd849117a2b464ea5ad140f347c7f Mon Sep 17 00:00:00 2001 From: piotr Date: Wed, 21 Aug 2024 16:20:24 +0200 Subject: [PATCH] remove nwg-bar autotranslation --- nwg_shell_config/autotranslate.py | 42 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/nwg_shell_config/autotranslate.py b/nwg_shell_config/autotranslate.py index 03c6313..7250f95 100644 --- a/nwg_shell_config/autotranslate.py +++ b/nwg_shell_config/autotranslate.py @@ -113,27 +113,27 @@ def main(): print(f"Saving {path}") save_json(panels, path) - # Translate nwg-bar template - config_dir = os.path.join(config_home, "nwg-bar") - for template in ["bar.json", "hyprland.json"]: - path = os.path.join(config_dir, template) - - bar = load_json(path) - for item in bar: - if item["label"] == "Lock" or item["label"] == "Loc_k": - item["label"] = translation["lock"] - - if item["label"] == "Logout" or item["label"] == "_Logout": - item["label"] = translation["logout"] - - if item["label"] == "Reboot" or item["label"] == "_Reboot": - item["label"] = translation["reboot"] - - if item["label"] == "Shutdown" or item["label"] == "_Shutdown": - item["label"] = translation["shutdown"] - - print(f"Saving {path}") - save_json(bar, path) + # Translate nwg-bar template (no longer in use) + # config_dir = os.path.join(config_home, "nwg-bar") + # for template in ["bar.json", "hyprland.json"]: + # path = os.path.join(config_dir, template) + # + # bar = load_json(path) + # for item in bar: + # if item["label"] == "Lock" or item["label"] == "Loc_k": + # item["label"] = translation["lock"] + # + # if item["label"] == "Logout" or item["label"] == "_Logout": + # item["label"] = translation["logout"] + # + # if item["label"] == "Reboot" or item["label"] == "_Reboot": + # item["label"] = translation["reboot"] + # + # if item["label"] == "Shutdown" or item["label"] == "_Shutdown": + # item["label"] = translation["shutdown"] + # + # print(f"Saving {path}") + # save_json(bar, path) print("Marking autotranslation done.") shell_data["autotranslated"] = True