diff --git a/scripts/menus/hw_grafics_menu.sh b/scripts/menus/hw_grafics_menu.sh index 573c25a..dfdd5bb 100644 --- a/scripts/menus/hw_grafics_menu.sh +++ b/scripts/menus/hw_grafics_menu.sh @@ -20,12 +20,24 @@ VENV_PATH="/opt/googletrans-env" LANGUAGE=$(jq -r '.language // "en"' "$BASE_DIR/config.json" 2>/dev/null) -# Try to load utils.sh from GitHub 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 +} + while true; do OPTION=$(whiptail --title "$(translate "GPUs and Coral-TPU Menu")" --menu "$(translate "Select an option:")" 15 60 8 \