From 3023ae350823f87b2f21a0bad0a2a11b3e58dc4c Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 11 Mar 2019 21:14:33 -0400 Subject: _ob_*_msg(): New internal functions --- (limited to 'lib') 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 +} -- cgit v0.9.1