Update utils.sh

This commit is contained in:
MacRimi 2025-01-31 22:10:53 +01:00 committed by GitHub
parent f448bad28b
commit 1633fe0dfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,8 +37,6 @@ HOLD="-"
CM="${GN}${CL}"
TAB=" "
# Default language
LANGUAGE="${LANGUAGE:-en}"
# Create and display spinner
spinner() {
@ -87,6 +85,12 @@ initialize_cache() {
fi
}
load_language() {
if [ -f "$CONFIG_FILE" ]; then
LANGUAGE=$(jq -r '.language' "$CONFIG_FILE")
fi
}
# Translation with cache and predefined terms
translate() {
local text="$1"