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>
+2010-04-13 Carles Pina i Estany <carles@pina.cat>
+2010-04-13 Colin Watson <cjwatson@ubuntu.com>
+
+ 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.
+
2010-04-11 Vladimir Serbinenko <phcoder@gmail.com>
Fix cygwin compilation.
done
echo "$a"
}
+
+gettext_quoted () {
+ gettext "$@" | sed "s/'/'\\\\''/g"
+}
EOF
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
cat << EOF
- echo $(gettext "Loading GNU Mach ...")
+ echo '$(gettext_quoted "Loading GNU Mach ...")'
multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/}
EOF
save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/"
cat << EOF
- echo $(gettext "Loading the Hurd ...")
+ echo '$(gettext_quoted "Loading the Hurd ...")'
module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\
--multiboot-command-line='\${kernel-command-line}' \\
--host-priv-port='\${host-port}' \\
EOF
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
cat << EOF
- echo $(gettext "Loading GNU Mach ...")
+ echo '$(gettext_quoted "Loading GNU Mach ...")'
multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/} -s
EOF
save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/"
cat << EOF
- echo $(gettext "Loading the Hurd ...")
+ echo '$(gettext_quoted "Loading the Hurd ...")'
module /hurd/${hurd_fs}.static ${hurd_fs} \\
--multiboot-command-line='\${kernel-command-line}' \\
--host-priv-port='\${host-port}' \\
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
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.
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