From 2ec8ae840f87dee29eba81e2d3abd282b422dff2 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 16 Mar 2019 23:03:57 -0400 Subject: _ob_load_internal_text_domain(): More safely check if LC_MESSAGES etc. are set --- (limited to 'lib') 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}" -- cgit v0.9.1