diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-15 12:25:01 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-15 12:25:01 (EDT) |
commit | 8c769f857af83d7ef464e751f69ed8063382ff5b (patch) | |
tree | 4673015c038259b6733b8bb2ef21884e34eae09b | |
parent | a1aa40e4e02aa6284796e741310aceab23cc71b2 (diff) |
_ob_get_msg(): Don't call ob_set_text_domain()
Repeat instead of reusing code, as the result is actually shorter and
faster code.
-rw-r--r-- | lib/locale.sh | 6 |
1 files changed, 1 insertions, 5 deletions
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 } |