summaryrefslogtreecommitdiffstats
path: root/lib/locale.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-07-31 23:03:12 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-07-31 23:03:12 (EDT)
commit9cb2dc90a75860cebee24729a30716ff24f60382 (patch)
tree500a75402c3b9eb5ea7bbd3002c708d8e43b3028 /lib/locale.sh
parentf0467575ed8cf423c8c590f33cfa5238b47eb370 (diff)
Fix substring patterns in oh_locale_set().
Diffstat (limited to 'lib/locale.sh')
-rw-r--r--lib/locale.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/locale.sh b/lib/locale.sh
index 3f33b67..da2e4d6 100644
--- a/lib/locale.sh
+++ b/lib/locale.sh
@@ -38,10 +38,10 @@ oh_locale_set()
fi
# Try to load the locale.
- if [ -f "@@LOCALEDIR@@/${_locale%.}" ]; then
- . "@@LOCALEDIR@@/${_locale%.}"
- elif [ -f "@@LOCALEDIR@@/${_locale%_}" ]; then
- . "@@LOCALEDIR@@/${_locale%_}"
+ if [ -f "@@LOCALEDIR@@/${_locale%.*}" ]; then
+ . "@@LOCALEDIR@@/${_locale%.*}"
+ elif [ -f "@@LOCALEDIR@@/${_locale%_*}" ]; then
+ . "@@LOCALEDIR@@/${_locale%_*}"
else
. @@LOCALEDIR@@/en_US
fi