diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2021-08-27 20:51:14 +0200 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2021-08-27 20:51:14 +0200 |
commit | dc07baeb4b5443131e0bd7f2c5f3b506e23d74dc (patch) | |
tree | db108f0ac5c8d568f0e13f1b98a82b0cbb45fb6d /subr.rtl/rtl_fetch.subr | |
parent | 2c358983b2d80e298fdfd4f991bde9de54aa4302 (diff) | |
download | midipix_build-dc07baeb4b5443131e0bd7f2c5f3b506e23d74dc.tar.bz2 midipix_build-dc07baeb4b5443131e0bd7f2c5f3b506e23d74dc.tar.xz |
Implements localised message files, pt. II.
Diffstat (limited to 'subr.rtl/rtl_fetch.subr')
-rw-r--r-- | subr.rtl/rtl_fetch.subr | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/subr.rtl/rtl_fetch.subr b/subr.rtl/rtl_fetch.subr index 461893b6..5f557320 100644 --- a/subr.rtl/rtl_fetch.subr +++ b/subr.rtl/rtl_fetch.subr @@ -37,31 +37,26 @@ rtl_fetch_url_wget() { case "${_rc}" in 0) break; ;; 1) if [ "${_urls_count}" -ge 1 ]; then - rtl_log_msg "warning" "Warning: failed to acquire fetching lock for URL \`%s', retrying with alternative URL..." "${_url}"; + rtl_log_msg "warning" "${MSG_rtl_fetch_lockfail_retryurl}" "${_url}"; else - rtl_log_msg "fatal" "Error: failed to acquire fetching lock for URL \`%s'." "${_url}"; + rtl_log_msg "fatal" "${MSG_rtl_fetch_lockfail}" "${_url}"; rtl_fileop rm "${_target_fname_full}"; break; fi; ;; 2) if [ "${_urls_count}" -ge 1 ]; then - rtl_log_msg "warning" "Warning: hash mismatch for URL \`%s', retrying with alternative URL... (from build variables: %s.)"\ - "${_url}" "${_sha256sum_src}"; + rtl_log_msg "warning" "${MSG_rtl_fetch_hashfail_retryurl}" "${_url}" "${_sha256sum_src}"; else if _sha256sum_target="$(sha256sum "${_target_fname_full}" |\ awk '{print $1}' 2>/dev/null)"; then - rtl_log_msg "fatal" "Error: hash mismatch for URL \`%s' (should be: %s vs.: %s.)"\ - "${_url}" "${_sha256sum_src}" "${_sha256sum_target}"; + rtl_log_msg "fatal" "${MSG_rtl_fetch_hashfail1}" "${_url}" "${_sha256sum_src}" "${_sha256sum_target}"; else - rtl_log_msg "fatal" "Error: hash mismatch for URL \`%s' (should be: %s.)"\ - "${_url}" "${_sha256sum_src}"; + rtl_log_msg "fatal" "${MSG_rtl_fetch_hashfail2}" "${_url}" "${_sha256sum_src}"; fi; rtl_fileop rm "${_target_fname_full}"; break; fi; ;; *) if [ "${_urls_count}" -ge 1 ]; then - rtl_log_msg "warning" "Warning: failed to fetch URL \`%s', retrying with alternative URL... (wget(1) exit status: %s)"\ - "${_url}" "$((${_rc}-2))"; + rtl_log_msg "warning" "${MSG_rtl_fetch_fail_retryurl}" "${_url}" "$((${_rc}-2))"; else - rtl_log_msg "fatal" "Error: failed to fetch URL \`%s' (wget(1) exit status: %s)"\ - "${_url}" "$((${_rc}-2))"; + rtl_log_msg "fatal" "${MSG_rtl_fetch_fail}" "${_url}" "$((${_rc}-2))"; rtl_fileop rm "${_target_fname_full}"; break; fi; ;; esac; |