qsgen2: Messed up finding language files again...

This commit is contained in:
Stig-Ørjan Smelror 2024-02-16 20:36:57 +01:00
parent b07d0a6708
commit 2dc1f3a929

8
qsgen2
View File

@ -41,15 +41,19 @@ fi
# Load language as defined in config # Load language as defined in config
typeset -A qsgenlang typeset -A qsgenlang
lang_found=false
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}"
lang_found=true
break break
elif [[ ! -f "${dir}/${language}" ]]; then fi
done
if [[ ${lang_found} == "false" ]]; then
# Fall back to en_US if defined language isn't found # Fall back to en_US if defined language isn't found
echo "Defined language, ${language}, not found. Using en_US." echo "Defined language, ${language}, not found. Using en_US."
source "${dir}/en_US" source "${HOME}/bin/include/qsgen2/lang/en_US"
fi fi
done done