qsgen2: Messed up finding language files again...
This commit is contained in:
parent
b07d0a6708
commit
2dc1f3a929
16
qsgen2
16
qsgen2
@ -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}"
|
||||||
break
|
lang_found=true
|
||||||
elif [[ ! -f "${dir}/${language}" ]]; then
|
break
|
||||||
|
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user