summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/locale.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/locale.sh b/lib/locale.sh
index 103e734..1ac543b 100644
--- a/lib/locale.sh
+++ b/lib/locale.sh
@@ -29,10 +29,10 @@ _OH_LOCALE_PATH='@@LOCALEDIR@@/%s/LC_MESSAGES/%s.ms'
oh_load_locale()
{
# Make sure LC_MESSAGES is set.
- if [ -z "${LC_MESSAGES}" ]; then
- if [ -n "${LC_ALL}" ]; then
+ if [ "x${LC_MESSAGES+set}" != 'xset' ]; then
+ if [ "x${LC_ALL+set}" = 'xset' ]; then
LC_MESSAGES="${LC_ALL}"
- elif [ -n "${LANG}" ]; then
+ elif [ "x${LANG+set}" = 'xset' ]; then
LC_MESSAGES="${LANG}"
else
LC_MESSAGES="${_OH_DEFAULT_LOCALE}"