Gettextify.

This commit is contained in:
Robert Millan 2009-11-16 20:19:42 +00:00
parent 5f4db17d00
commit a1085f18c5
1 changed files with 16 additions and 6 deletions

View File

@ -21,6 +21,9 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
. ${libdir}/grub/grub-mkconfig_lib
. /usr/bin/gettext.sh
export TEXTDOMAIN=@PACKAGE@
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else
@ -44,15 +47,22 @@ fi
linux_entry ()
{
cat << EOF
menuentry "$1" {
EOF
os="$1"
version="$2"
recovery="$3"
args="$4"
if ${recovery} ; then
title="$(gettext "%s, with Linux %s (recovery mode)")"
else
title="$(gettext "%s, with Linux %s")"
fi
printf "menuentry \"${title}\" {" ${os} ${version}
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
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro $2
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
cat << EOF
@ -95,10 +105,10 @@ while [ "x$list" != "x" ] ; do
linux_root_device_thisversion=${GRUB_DEVICE}
fi
linux_entry "${OS}, with Linux ${version}" \
linux_entry "${OS}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}, with Linux ${version} (recovery mode)" \
linux_entry "${OS}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"
fi