summaryrefslogtreecommitdiffstats
path: root/lib/locale.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/locale.sh')
-rw-r--r--lib/locale.sh11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/locale.sh b/lib/locale.sh
index 1bd3c6c..f53611d 100644
--- a/lib/locale.sh
+++ b/lib/locale.sh
@@ -54,13 +54,7 @@ oh_load_locale()
oh_get_msg()
{
- local msgid=
-
- if [ ${#} -eq 1 ]; then
- msgid="${1}"
- else
- return 125
- fi
+ local msgid="${1}"
eval "printf '%s' \"\${msg_${_OH_TEXT_DOMAIN}_${msgid}}\""
@@ -69,10 +63,9 @@ oh_get_msg()
_oh_try_load_messages()
{
- local locale=
+ local locale="${1}"
local ms=
- locale="${1}"
ms="$(printf "${_OH_LOCALE_PATH}" \
"${locale}" "${_OH_TEXT_DOMAIN}")"