From 812c1756ff91c55b4b664b1e3c24a4b6038b12c1 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 25 Feb 2014 17:20:26 -0500 Subject: oh_set_text_domain(): Rename and remove parameter. --- 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 -- cgit v0.9.1