summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/locale.sh14
-rw-r--r--lib/output.sh18
2 files changed, 17 insertions, 15 deletions
diff --git a/lib/locale.sh b/lib/locale.sh
index ae3c88c..b564f7f 100644
--- a/lib/locale.sh
+++ b/lib/locale.sh
@@ -142,3 +142,17 @@ ob_get_msg()
return 0
}
+
+_ob_get_msg()
+{
+ local msgid="${1}"
+ shift 1
+ local orig_text_domain=
+
+ orig_text_domain="$(ob_get_text_domain)"
+ ob_set_text_domain "${_OB_INTERNAL_TEXT_DOMAIN}"
+ ob_get_msg "${msgid}"
+ ob_set_text_domain "${orig_text_domain}"
+
+ return 0
+}
diff --git a/lib/output.sh b/lib/output.sh
index 0befca1..bc262e9 100644
--- a/lib/output.sh
+++ b/lib/output.sh
@@ -88,12 +88,8 @@ _ob_error_msg()
{
local msgid="${1}"
shift 1
- local orig_text_domain=
- orig_text_domain="$(ob_get_text_domain)"
- ob_set_text_domain "${_OB_INTERNAL_TEXT_DOMAIN}"
- ob_error "$(ob_get_msg "${msgid}")" "${@}"
- ob_set_text_domain "${orig_text_domain}"
+ ob_error "$(_ob_get_msg "${msgid}")" "${@}"
return 0
}
@@ -102,12 +98,8 @@ _ob_warn_msg()
{
local msgid="${1}"
shift 1
- local orig_text_domain=
- orig_text_domain="$(ob_get_text_domain)"
- ob_set_text_domain "${_OB_INTERNAL_TEXT_DOMAIN}"
- ob_warn "$(ob_get_msg "${msgid}")" "${@}"
- ob_set_text_domain "${orig_text_domain}"
+ ob_warn "$(_ob_get_msg "${msgid}")" "${@}"
return 0
}
@@ -116,12 +108,8 @@ _ob_info_msg()
{
local msgid="${1}"
shift 1
- local orig_text_domain=
- orig_text_domain="$(ob_get_text_domain)"
- ob_set_text_domain "${_OB_INTERNAL_TEXT_DOMAIN}"
- ob_info "$(ob_get_msg "${msgid}")" "${@}"
- ob_set_text_domain "${orig_text_domain}"
+ ob_info "$(_ob_get_msg "${msgid}")" "${@}"
return 0
}