_msg: Yay... It's working

This commit is contained in:
Stig-Ørjan Smelror 2024-02-14 16:03:50 +01:00
parent e395bba757
commit aafbc7ecaf

6
qsgen2
View File

@ -47,7 +47,7 @@ found=false
typeset -A qsgenlang typeset -A qsgenlang
for dir in $fpath; do for dir in $fpath; do
if [[ -f "${dir}/${language}" ]]; then if [[ -f "${dir}/${language}" ]]; then
echo "Language file: ${dir}/${language}" # echo "Language file: ${dir}/${language}"
source "${dir}/${language}" source "${dir}/${language}"
found=true found=true
break break
@ -79,10 +79,10 @@ function _msg() {
local full_msg="" local full_msg=""
for arg in "$@"; do for arg in "$@"; do
if [[ -n "${qsgenlang[$arg]}" ]]; then if [[ -n "${qsgenlang[$arg]}" ]]; then
echo "Found key: $arg" # Debug line to confirm key is found # echo "Found key: $arg" # Debug line to confirm key is found
full_msg+="${qsgenlang[$arg]}" full_msg+="${qsgenlang[$arg]}"
else else
echo "Key not found: $arg" # Debug line for keys not found # echo "Key not found: $arg" # Debug line for keys not found
full_msg+="$arg" full_msg+="$arg"
fi fi
done done