From f884272f3b5943f4b9888b41b070f704ddcdc417 Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Fri, 31 Jan 2025 22:07:16 +0100 Subject: [PATCH] Update config_menu.sh --- scripts/menus/config_menu.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/menus/config_menu.sh b/scripts/menus/config_menu.sh index c9280a4..85c7575 100644 --- a/scripts/menus/config_menu.sh +++ b/scripts/menus/config_menu.sh @@ -23,6 +23,19 @@ if ! source <(curl -sSf "$UTILS_URL"); then echo "$(translate 'Error: Could not load utils.sh from') $UTILS_URL" exit 1 fi + +initialize_cache() { + if [ ! -f "$CACHE_FILE" ]; then + echo "{}" > "$CACHE_FILE" + return + fi +} + +load_language() { + if [ -f "$CONFIG_FILE" ]; then + LANGUAGE=$(jq -r '.language' "$CONFIG_FILE") + fi +} # ==========================================================