From 8c769f857af83d7ef464e751f69ed8063382ff5b Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Fri, 15 Mar 2019 12:25:01 -0400 Subject: _ob_get_msg(): Don't call ob_set_text_domain() Repeat instead of reusing code, as the result is actually shorter and faster code. --- (limited to 'lib/locale.sh') diff --git a/lib/locale.sh b/lib/locale.sh index 4ffd0bb..54bb211 100644 --- a/lib/locale.sh +++ b/lib/locale.sh @@ -133,12 +133,8 @@ _ob_get_msg() { local msgid="${1}" shift 1 || _ob_abort - 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}" + eval "printf '%s' \"\${msg_${_OB_INTERNAL_TEXT_DOMAIN}_${msgid}}\"" return 0 } -- cgit v0.9.1