summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/changelog.sh5
-rw-r--r--lib/control.sh6
-rw-r--r--lib/package.sh16
3 files changed, 12 insertions, 15 deletions
diff --git a/lib/changelog.sh b/lib/changelog.sh
index bced08d..ec1240a 100644
--- a/lib/changelog.sh
+++ b/lib/changelog.sh
@@ -32,6 +32,9 @@ _ob_parse_changelog_error()
file_info="$(printf '%20s(l%d):' "${file}" "${line_nr}")"
+ # TODO: Use _ob_warn_msg(), add "%s: " prefix to locale messages, and
+ # drop ":" from file_info above.
+
orig_text_domain="$(ob_get_text_domain)"
ob_set_text_domain "${_OB_INTERNAL_TEXT_DOMAIN}"
@@ -46,6 +49,8 @@ _ob_get_changelog_expect_str()
{
local orig_text_domain=
+ # TODO: ???
+
orig_text_domain="$(ob_get_text_domain)"
ob_set_text_domain "${_OB_INTERNAL_TEXT_DOMAIN}"
diff --git a/lib/control.sh b/lib/control.sh
index 30c6b9c..727fafa 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -38,6 +38,9 @@ _ob_parse_control_error()
file_info="$(printf '%20s(l%d):' "${file}" "${line_nr}")"
fi
+ # TODO: Use _ob_warn_msg(), add "%s: " prefix to locale messages, and
+ # drop ":" from file_info above.
+
orig_text_domain="$(ob_get_text_domain)"
ob_set_text_domain "${_OB_INTERNAL_TEXT_DOMAIN}"
@@ -283,8 +286,7 @@ ob_substvars()
fi
if [ ${depth} -ge ${_OB_SUBSTVARS_MAX_DEPTH} ]; then
# Warn of possible recursion.
- # TODO: This doesn't set the text domain.
- ob_warn "$(ob_get_msg 'substvar_deep_nesting')"
+ _ob_warn_msg 'substvar_deep_nesting'
return 1
fi
old_rhs="${rhs}"
diff --git a/lib/package.sh b/lib/package.sh
index 2e97af3..75f2f29 100644
--- a/lib/package.sh
+++ b/lib/package.sh
@@ -26,7 +26,6 @@ _OB_BINARY_PARAMETERS=
ob_init_package()
{
local dir=
- local orig_text_domain=
if [ ${#} -eq 1 ]; then
dir="${1}"
@@ -45,10 +44,7 @@ ob_init_package()
fi
if [ -z "${_OB_PACKAGE_FORMAT}" ]; then
- orig_text_domain="$(ob_get_text_domain)"
- ob_set_text_domain "${_OB_INTERNAL_TEXT_DOMAIN}"
- ob_warn "$(ob_get_msg 'unable_to_detect_package_format')"
- ob_set_text_domain "${orig_text_domain}"
+ _ob_warn_msg 'unable_to_detect_package_format'
return 1
fi
@@ -142,7 +138,6 @@ ob_get_binary_packages()
local pkg=
local pkgs_clean=
local pkg_clean=
- local orig_text_domain=
OPTIND=1
while getopts 'a:P:' opt; do
@@ -170,16 +165,13 @@ ob_get_binary_packages()
_ob_package_do 'get_binary_packages'
- orig_text_domain="$(ob_get_text_domain)"
- ob_set_text_domain "${_OB_INTERNAL_TEXT_DOMAIN}"
-
pkgs_clean=' '
for pkg in ${_OB_BINARY_PACKAGES}; do
# Validate the name.
if ! ob_validate_binary_name "${pkg}"; then
- ob_warn "$(ob_get_msg 'bad_binary_name')" "${pkg}"
+ _ob_warn_msg 'bad_binary_name' "${pkg}"
continue
fi
@@ -188,7 +180,7 @@ ob_get_binary_packages()
tr -dC 'A-Z0-9') "
if echo "${pkgs_clean}" | grep "${pkg_clean}" \
>/dev/null 2>&1; then
- ob_warn "$(ob_get_msg 'duplicate_clean_binary_name')" \
+ _ob_warn_msg 'duplicate_clean_binary_name' \
"${pkg_clean}"
continue
else
@@ -201,8 +193,6 @@ ob_get_binary_packages()
_OB_BINARY_PACKAGES="$(IFS=' ' echo ${pkgs})"
- ob_set_text_domain "${orig_text_domain}"
-
fi
pkgs=''