summaryrefslogtreecommitdiffstats
path: root/lib/locale.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2014-02-26 13:18:58 (EST)
committer P. J. McDermott <pjm@nac.net>2014-02-26 13:18:58 (EST)
commitb1a939f2506b8faa4f283f743f59f88014fa5b32 (patch)
tree4dbb1cab496ddf31519b02a11de73575467ef408 /lib/locale.sh
parent4bc3153d49471238a40daddc68efef4af0e2a1a2 (diff)
lib/locale.sh: Improve [ cmds with unset vars.
Diffstat (limited to 'lib/locale.sh')
-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}"