summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-08-02 07:29:48 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-08-02 07:29:48 (EDT)
commit3917992a7d78cb1a08c01a067560391d6bba005a (patch)
treedba39583177206cc4bcf4de631ed2cb2e5cd403f /lib
parentac75cf3879e7060e0903e0d38f5e96bbabafb6f5 (diff)
Fix some problems with locale loading.
Diffstat (limited to 'lib')
-rw-r--r--lib/locale.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/locale.sh b/lib/locale.sh
index f3a8b8c..6e57fc3 100644
--- a/lib/locale.sh
+++ b/lib/locale.sh
@@ -1,5 +1,3 @@
-#!@@SHELL@@
-#
# opkhelper
# lib/locale
# Locale functions.
@@ -29,7 +27,8 @@ oh_locale_set()
_locale="${1}"
# Detect the system locale.
- if [ -z "{_locale}" ]; then
+ # The test command's -z option doesn't work here?
+ if [ ${#_locale} -eq 0 ]; then
if [ -n "${LC_ALL}" ]; then
_locale="${LC_ALL}"
elif [ -n "${LC_MESSAGES}" ]; then
@@ -51,7 +50,7 @@ oh_locale_set()
LC_MESSAGES="${LC_ALL}"
. "@@LOCALEDIR@@/${LC_MESSAGES}"
else
- LC_ALL=en_us
+ LC_ALL=en_US
LC_MESSAGES="${LC_ALL}"
. "@@LOCALEDIR@@/${LC_MESSAGES}"
fi