summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-12 00:05:22 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-12 00:05:22 (EDT)
commitf0c37c2b1e6ac6b3373b62e484bd4e6f8f8d441c (patch)
tree561a7b54b892704e48ed4455f78b21ccd1198ec2
parentbde30bbd5b3c0aa834edef261aeb02c63ef7e0a0 (diff)
_ob_parse_changelog_error(): Use _ob_warn_msg()
-rw-r--r--lib/changelog.sh13
-rw-r--r--locale/en_US/libopkbuild_2.sh20
2 files changed, 12 insertions, 21 deletions
diff --git a/lib/changelog.sh b/lib/changelog.sh
index 2c64954..7cb6c0b 100644
--- a/lib/changelog.sh
+++ b/lib/changelog.sh
@@ -23,24 +23,15 @@ _ob_parse_changelog_error()
local line_nr=
local msg_id=
local file_info=
- local orig_text_domain=
file="${1}"
line_nr="${2}"
msg_id="${3}"
shift 3
- file_info="$(printf '%20s(l%d):' "${file}" "${line_nr}")"
+ 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}"
-
- ob_warn "${file_info} $(ob_get_msg "${msg_id}")" "${@}"
-
- ob_set_text_domain "${orig_text_domain}"
+ _ob_warn_msg "${msg_id}" "${file_info}" "${@}"
return 0
}
diff --git a/locale/en_US/libopkbuild_2.sh b/locale/en_US/libopkbuild_2.sh
index bf70a12..b0570fe 100644
--- a/locale/en_US/libopkbuild_2.sh
+++ b/locale/en_US/libopkbuild_2.sh
@@ -33,16 +33,16 @@ msg_libopkbuild_2_control_missing_fields='missing fields: %s'
msg_libopkbuild_2_substvar_deep_nesting='Possible recursion in substitutions'
# lib/changelog.sh
-msg_libopkbuild_2_changelog_found_blank_line='found blank line where expected %s'
-msg_libopkbuild_2_changelog_found_heading='found start of entry where expected %s'
-msg_libopkbuild_2_changelog_bad_heading='badly formatted heading line'
-msg_libopkbuild_2_changelog_bad_source='invalid source package name "%s"'
-msg_libopkbuild_2_changelog_bad_source_version='invalid source package version identifier "%s"'
-msg_libopkbuild_2_changelog_found_trailer='found trailer where expected %s'
-msg_libopkbuild_2_changelog_bad_trailer='badly formatted trailer line'
-msg_libopkbuild_2_changelog_found_change='found change data where expected %s'
-msg_libopkbuild_2_changelog_bad_line='unrecognized line'
-msg_libopkbuild_2_changelog_found_eof='found eof where expected %s'
+msg_libopkbuild_2_changelog_found_blank_line='%s: found blank line where expected %s'
+msg_libopkbuild_2_changelog_found_heading='%s: found start of entry where expected %s'
+msg_libopkbuild_2_changelog_bad_heading='%s: badly formatted heading line'
+msg_libopkbuild_2_changelog_bad_source='%s: invalid source package name "%s"'
+msg_libopkbuild_2_changelog_bad_source_version='%s: invalid source package version identifier "%s"'
+msg_libopkbuild_2_changelog_found_trailer='%s: found trailer where expected %s'
+msg_libopkbuild_2_changelog_bad_trailer='%s: badly formatted trailer line'
+msg_libopkbuild_2_changelog_found_change='%s: found change data where expected %s'
+msg_libopkbuild_2_changelog_bad_line='%s: unrecognized line'
+msg_libopkbuild_2_changelog_found_eof='%s: found eof where expected %s'
msg_libopkbuild_2_changelog_expect_first_heading='first heading'
msg_libopkbuild_2_changelog_expect_start_changes='next heading or eof'
msg_libopkbuild_2_changelog_expect_next_or_eof='start of change data'