summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/output.sh44
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
+}