Use submenus in grub-mkconfig.

* util/grub-mkconfig.in: Define GRUB_ACTUAL_DEFAULT.
	* util/grub-mkconfig_lib.in (grub_quote): New function.
	(gettext_printf): Use gettext and not gettext_quoted to fix several
	messages.
	* util/grub.d/10_hurd.in: Use submenus.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
	* util/grub.d/10_illumos.in: Add missing quoting.
	* util/grub.d/10_windows.in: Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-03-04 22:18:33 +01:00
parent d9bef9bc43
commit 0cdc126ca2
11 changed files with 424 additions and 154 deletions

View file

@ -239,6 +239,11 @@ version_find_latest ()
# One layer of quotation is eaten by "", the second by sed, and the third by
# printf; so this turns ' into \'. Note that you must use the output of
# this function in a printf format string.
grub_quote () {
sed "s/'/'\\\\\\\\''/g"
}
gettext_quoted () {
gettext "$@" | sed "s/'/'\\\\\\\\''/g"
}
@ -249,7 +254,7 @@ gettext_quoted () {
gettext_printf () {
gettext_printf_format="$1"
shift
printf "$(gettext_quoted "$gettext_printf_format")" "$@"
printf "$(gettext "$gettext_printf_format")" "$@"
}
uses_abstraction () {