summaryrefslogtreecommitdiffstats
path: root/lib/locale.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2014-03-06 11:45:14 (EST)
committer P. J. McDermott <pjm@nac.net>2014-03-06 11:45:14 (EST)
commit6c229db00449a0cfc4258c44e36247d0f6826173 (patch)
tree7afbf36146e438f2e84d38c34e597027956f35ff /lib/locale.sh
parent731e0cf0e59da3ee0b6bda99f70e8be4d54d4d08 (diff)
lib/*.sh: Consolidate arg variable assignments.
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}")"