diff options
-rw-r--r-- | lib/locale.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/locale.sh b/lib/locale.sh index 06bd60a..7cc1635 100644 --- a/lib/locale.sh +++ b/lib/locale.sh @@ -34,6 +34,7 @@ ob_set_locale() _obsl_locale="${1}" _obsl_domain="${2}" else + unset _obsl_locale _obsl_domain return 125 fi @@ -57,11 +58,13 @@ ob_set_locale() if ! _ob_try_load_locale "${_OB_DEFAULT_LOCALE}" \ "${_obsl_domain}"; then printf 'Error: cannot load locale file\n' + unset _obsl_locale _obsl_domain return 1 fi fi fi + unset _obsl_locale _obsl_domain return 0 } @@ -74,8 +77,10 @@ _ob_try_load_locale() if [ -f "${_obtll_ms}" ]; then . "${_obtll_ms}" else + unset _obtll_locale _obtll_domain _obtll_ms return 1 fi + unset _obtll_locale _obtll_domain _obtll_ms return 0 } |