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

@ -56,11 +56,11 @@ linux_entry ()
recovery="$3"
args="$4"
if ${recovery} ; then
title="$(gettext "%s, with Linux %s (recovery mode)")"
title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
else
title="$(gettext "%s, with Linux %s")"
title="$(gettext_quoted "%s, with Linux %s")"
fi
printf "menuentry \"${title}\" ${CLASS} {\n" "${os}" "${version}"
printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
save_default_entry | sed -e "s/^/\t/"
# Use ELILO's generic "efifb" when it's known to be available.
@ -83,12 +83,12 @@ EOF
fi
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
echo $(printf "$(gettext "Loading Linux %s ...")" ${version})
echo '$(printf "$(gettext_quoted "Loading Linux %s ...")" ${version})'
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
cat << EOF
echo $(gettext "Loading initial ramdisk ...")
echo '$(gettext_quoted "Loading initial ramdisk ...")'
initrd ${rel_dirname}/${initrd}
EOF
fi