Gettextify.
This commit is contained in:
parent
5f4db17d00
commit
a1085f18c5
1 changed files with 16 additions and 6 deletions
|
@ -21,6 +21,9 @@ exec_prefix=@exec_prefix@
|
||||||
libdir=@libdir@
|
libdir=@libdir@
|
||||||
. ${libdir}/grub/grub-mkconfig_lib
|
. ${libdir}/grub/grub-mkconfig_lib
|
||||||
|
|
||||||
|
. /usr/bin/gettext.sh
|
||||||
|
export TEXTDOMAIN=@PACKAGE@
|
||||||
|
|
||||||
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
||||||
OS=GNU/Linux
|
OS=GNU/Linux
|
||||||
else
|
else
|
||||||
|
@ -44,15 +47,22 @@ fi
|
||||||
|
|
||||||
linux_entry ()
|
linux_entry ()
|
||||||
{
|
{
|
||||||
cat << EOF
|
os="$1"
|
||||||
menuentry "$1" {
|
version="$2"
|
||||||
EOF
|
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
|
if [ -z "${prepare_boot_cache}" ]; then
|
||||||
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
|
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
|
||||||
fi
|
fi
|
||||||
printf '%s\n' "${prepare_boot_cache}"
|
printf '%s\n' "${prepare_boot_cache}"
|
||||||
cat << EOF
|
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
|
EOF
|
||||||
if test -n "${initrd}" ; then
|
if test -n "${initrd}" ; then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
@ -95,10 +105,10 @@ while [ "x$list" != "x" ] ; do
|
||||||
linux_root_device_thisversion=${GRUB_DEVICE}
|
linux_root_device_thisversion=${GRUB_DEVICE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
linux_entry "${OS}, with Linux ${version}" \
|
linux_entry "${OS}" "${version}" false \
|
||||||
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||||
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
|
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}"
|
"single ${GRUB_CMDLINE_LINUX}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue