summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-09-05 15:30:04 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-09-05 15:30:04 (EDT)
commit39012ebd0db15caa3cc4c14f089f05b1d2551cdc (patch)
tree7a962158db599908bda3bafaba484f52f053e48a
parent7a45d007e479ac22636abc6e14a12dd947f3abca (diff)
Set text domain before getting message strings.
-rw-r--r--lib/changelog.sh19
-rw-r--r--lib/control.sh9
2 files changed, 26 insertions, 2 deletions
diff --git a/lib/changelog.sh b/lib/changelog.sh
index 7127282..d78dbd7 100644
--- a/lib/changelog.sh
+++ b/lib/changelog.sh
@@ -204,18 +204,35 @@ _ob_parse_changelog_error()
_obpche_line_nr="${2}"
_obpche_msg_id="${3}"
_obpche_file_info=
+ _obpche_orig_text_domain=
shift 3
_obpche_file_info=$(printf '%20s(l%d):' "${_obpche_file}" \
"${_obpche_line_nr}")
+ _obpche_orig_text_domain="$(ob_get_text_domain)"
+ ob_set_text_domain 'libopkbuild.1'
+
oh_warn "${_obpche_file_info} $(ob_get_msg "${_obpche_msg_id}")" "${@}"
- unset _obpche_file _obpche_line_nr _obpche_msg_id _obpche_file_info
+ ob_set_text_domain "${_obpche_orig_text_domain}"
+
+ unset _obpche_file _obpche_line_nr _obpche_msg_id \
+ _obpche_file_info _obpche_orig_text_domain=
return 0
}
_ob_get_changelog_expect_str()
{
+ _obgces_orig_text_domain=
+
+ _obgces_orig_text_domain="$(ob_get_text_domain)"
+ ob_set_text_domain 'libopkbuild.1'
+
echo "$(ob_get_msg "changelog_expect_${1}")"
+
+ ob_set_text_domain "${_obgces_orig_text_domain}"
+
+ unset _obgces_orig_text_domain
+ return 0
}
diff --git a/lib/control.sh b/lib/control.sh
index 0132121..fec7652 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -137,6 +137,7 @@ _ob_parse_control_error()
_obpcoe_line_nr="${2}"
_obpcoe_msg_id="${3}"
_obpcoe_file_info=
+ _obpcoe_orig_text_domain=
shift 3
if [ "${_obpcoe_line_nr}" -eq 0 ]; then
@@ -146,8 +147,14 @@ _ob_parse_control_error()
"${_obpcoe_line_nr}")"
fi
+ _obpcoe_orig_text_domain="$(ob_get_text_domain)"
+ ob_set_text_domain 'libopkbuild.1'
+
oh_warn "${_obpcoe_file_info} $(ob_get_msg "${_obpcoe_msg_id}")" "${@}"
- unset _obpcoe_file _obpcoe_line_nr _obpcoe_msg_id _obpcoe_file_info
+ ob_set_text_domain "${_obpcoe_orig_text_domain}"
+
+ unset _obpcoe_file _obpcoe_line_nr _obpcoe_msg_id \
+ _obpcoe_file_info _obpcoe_orig_text_domain
return 0
}