fix hardcoded setfr in main file

This commit is contained in:
fatalerrors
2026-04-15 17:36:15 +02:00
parent 4da29872fc
commit c4b0516c45
3 changed files with 28 additions and 3 deletions

View File

@@ -258,8 +258,18 @@ if [[ $INTERACTIVE ]]; then
trap 'timer_start' DEBUG
PROMPT_COMMAND='set_prompt'
# Set default language
setfr
# Set default language from DEFAULT_LANG config key (set in [general]).
# The value must match one of the alias names defined in SET_LOCALE so that
# the corresponding set<alias> function exists after build_locale_shortcuts.
if [[ -n "${DEFAULT_LANG:-}" ]]; then
local _lang_fn="set${DEFAULT_LANG}"
if declare -F "$_lang_fn" >/dev/null 2>&1; then
"$_lang_fn"
else
disp W "DEFAULT_LANG '$DEFAULT_LANG' has no matching locale shortcut (check SET_LOCALE in profile.conf)."
fi
unset _lang_fn
fi
showinfo && printf "\n"
check_updates -q
disp I "Profile version $PROFVERSION chargé..."