Enclose all translated strings in grub.cfg in single quotes, and

escape them appropriately (Ubuntu bug #552921).
* util/grub-mkconfig_lib.in (gettext_quoted): New function.
* util/grub.d/10_hurd.in: Use it.
* util/grub.d/10_kfreebsd.in (kfreebsd_entry): Likewise.
* util/grub.d/10_linux.in (linux_entry): Likewise.
	Also-By: Colin Watson <cjwatson@ubuntu.com>
This commit is contained in:
Carles Pina i Estany 2010-04-13 13:57:56 +01:00 committed by Colin Watson
parent 4b0cd8f813
commit ce44826e79
5 changed files with 27 additions and 12 deletions

View file

@ -44,15 +44,15 @@ kfreebsd_entry ()
version="$2"
recovery="$3" # not used yet
args="$4" # not used yet
title="$(gettext "%s, with kFreeBSD %s")"
printf "menuentry \"${title}\" ${CLASS} {\n" "${os}" "${version}"
title="$(gettext_quoted "%s, with kFreeBSD %s")"
printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
save_default_entry | sed -e "s/^/\t/"
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
fi
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
echo $(printf "$(gettext "Loading kernel of FreeBSD %s ...")" ${version})
echo '$(printf "$(gettext_quoted "Loading kernel of FreeBSD %s ...")" ${version})'
kfreebsd ${rel_dirname}/${basename}
EOF