diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-11 21:14:33 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-11 21:25:17 (EDT) |
commit | 3023ae350823f87b2f21a0bad0a2a11b3e58dc4c (patch) | |
tree | 22af9f6bda5fc594d5467d79cb1afb1efb74a1d9 | |
parent | b27f21996ba3e079f46dabaa42e985c15574bd40 (diff) |
_ob_*_msg(): New internal functions
-rw-r--r-- | lib/output.sh | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/lib/output.sh b/lib/output.sh index 0e141ac..0befca1 100644 --- a/lib/output.sh +++ b/lib/output.sh @@ -1,6 +1,6 @@ # Functions for printing messages # -# Copyright (C) 2012, 2018 Patrick McDermott +# Copyright (C) 2012, 2018, 2019 Patrick McDermott # # This file is part of opkbuild. # @@ -83,3 +83,45 @@ ob_info() return 0 } + +_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}" + + return 0 +} + +_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}" + + return 0 +} + +_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}" + + return 0 +} |