summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common.sh5
-rw-r--r--lib/locale.sh8
2 files changed, 2 insertions, 11 deletions
diff --git a/lib/common.sh b/lib/common.sh
index d940065..73e0554 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -25,8 +25,5 @@ oh_init()
oh_use locale
oh_use output
- # Since nothing other than opkhelper is supposed to use libopkhelper, we can
- # do strange things like affecting application-wide locale settings from the
- # library and assume that no one will play with them.
- oh_set_text_domain 'opkhelper'
+ oh_load_locale
}
diff --git a/lib/locale.sh b/lib/locale.sh
index bf79507..57843cd 100644
--- a/lib/locale.sh
+++ b/lib/locale.sh
@@ -26,14 +26,8 @@ _OH_DEFAULT_LOCALE='en_US'
_OH_TEXT_DOMAIN='opkhelper'
_OH_LOCALE_PATH='@@LOCALEDIR@@/%s/LC_MESSAGES/%s.ms'
-oh_set_text_domain()
+oh_load_locale()
{
- if [ ${#} -eq 1 ]; then
- _OH_TEXT_DOMAIN="${1}"
- else
- return 125
- fi
-
# Make sure LC_MESSAGES is set.
if [ -z "${LC_MESSAGES}" ]; then
if [ -n "${LC_ALL}" ]; then