summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/locale.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/locale.sh b/lib/locale.sh
index b564f7f..e5e1ac6 100644
--- a/lib/locale.sh
+++ b/lib/locale.sh
@@ -19,7 +19,7 @@
_OB_DEFAULT_LOCALE='en_US'
_OB_INTERNAL_TEXT_DOMAIN="libopkbuild_${LIBOPKBUILD_SHSOVERSION}"
-_OB_TEXT_DOMAIN=
+_ob_text_domain=
_OB_LOCALE_PATH="${LOCALEDIR}/%s/LC_MESSAGES/%s.ms"
## @brief Get the current message domain
@@ -33,7 +33,7 @@ ob_get_text_domain()
return 125
fi
- echo "${_OB_TEXT_DOMAIN}"
+ echo "${_ob_text_domain}"
return 0
}
@@ -44,7 +44,7 @@ _ob_try_load_messages()
locale="${1}"
ms="$(printf "${_OB_LOCALE_PATH}" \
- "${locale}" "${_OB_TEXT_DOMAIN}")"
+ "${locale}" "${_ob_text_domain}")"
if [ -f "${ms}" ]; then
. "${ms}"
@@ -69,11 +69,11 @@ _ob_try_load_messages()
ob_set_text_domain()
{
if [ ${#} -eq 1 ]; then
- _OB_TEXT_DOMAIN="${1}"
+ _ob_text_domain="${1}"
else
return 125
fi
- case "${_OB_TEXT_DOMAIN}" in *[!A-Za-z0-9_]*)
+ case "${_ob_text_domain}" in *[!A-Za-z0-9_]*)
return 125
esac
@@ -89,10 +89,10 @@ ob_set_text_domain()
fi
# Exit early if domain's messages have already been loaded.
- if eval "\${_ob_text_domain_${_OB_TEXT_DOMAIN}_loaded}"; then
+ if eval "\${_ob_text_domain_${_ob_text_domain}_loaded}"; then
return
fi
- eval "\${_ob_text_domain_${_OB_TEXT_DOMAIN}_loaded}=true"
+ eval "\${_ob_text_domain_${_ob_text_domain}_loaded}=true"
# Try to load the messages.
if ! _ob_try_load_messages "${LC_MESSAGES%.*}"; then
@@ -138,7 +138,7 @@ ob_get_msg()
return 125
fi
- IFS= eval echo \$\{"msg_${_OB_TEXT_DOMAIN}_${msgid}"\}
+ IFS= eval echo \$\{"msg_${_ob_text_domain}_${msgid}"\}
return 0
}