diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-16 23:03:57 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-16 23:03:57 (EDT) |
commit | 2ec8ae840f87dee29eba81e2d3abd282b422dff2 (patch) | |
tree | ea6f6042c6efddf58810aa26f5d53f5792d2feef /lib | |
parent | f57535c9ebf4f0564a404f81563a58d534578074 (diff) |
_ob_load_internal_text_domain(): More safely check if LC_MESSAGES etc. are set
Diffstat (limited to 'lib')
-rw-r--r-- | lib/locale.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/locale.sh b/lib/locale.sh index 591e346..8c4e46d 100644 --- a/lib/locale.sh +++ b/lib/locale.sh @@ -134,10 +134,10 @@ _ob_get_msg() _ob_load_internal_text_domain() { # Make sure LC_MESSAGES is set. - if [ -z "${LC_MESSAGES}" ]; then - if [ -n "${LC_ALL}" ]; then + if [ x"${LC_MESSAGES:+set}" != x'set' ]; then + if [ x"${LC_ALL:+set}" = x'set' ]; then LC_MESSAGES="${LC_ALL}" - elif [ -n "${LANG}" ]; then + elif [ x"${LANG:+set}" = x'set' ]; then LC_MESSAGES="${LANG}" else LC_MESSAGES="${_OB_DEFAULT_LOCALE}" |