* util/grub-mkstandalone.in: Fix help messages. Gettextize.

* util/grub-install.in: Gettextize.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mkconfig_lib.in: Replace gettext with echo -n and not echo
	if not available.
	(grub_warn): Gettextize.
	* util/grub-mknetdir.in: Gettextize.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub-reboot.in: Likewise.
	* util/grub-set-default.in: Likewise.
	* util/grub.d/00_header.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
	* po/POTFILES-shell.in: Regenerate.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-03 11:42:22 +01:00
parent 69edd81ab7
commit a32d5c712d
18 changed files with 265 additions and 204 deletions

View file

@ -113,11 +113,11 @@ done
if [ "x$serial" = x1 ]; then
if ! test -e "${GRUB_PREFIX}/serial.mod" ; then
echo "Serial terminal not available on this platform." >&2 ; exit 1
gettext "Serial terminal not available on this platform." >&2 ; echo >&2; exit 1
fi
if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
grub_warn "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used."
grub_warn "$(gettext "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used.")"
GRUB_SERIAL_COMMAND=serial
fi
echo "${GRUB_SERIAL_COMMAND}"
@ -174,7 +174,8 @@ esac
if [ "x$gfxterm" = x1 ]; then
if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
&& is_path_readable_by_grub "$GRUB_THEME"; then
echo "Found theme: $GRUB_THEME" >&2
gettext_printf "Found theme: %s\n" "$GRUB_THEME" >&2
prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
cat << EOF
insmod gfxmenu
@ -208,12 +209,12 @@ set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
EOF
elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
&& is_path_readable_by_grub "$GRUB_BACKGROUND"; then
echo "Found background: $GRUB_BACKGROUND" >&2
gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2
case "$GRUB_BACKGROUND" in
*.png) reader=png ;;
*.tga) reader=tga ;;
*.jpg|*.jpeg) reader=jpeg ;;
*) echo "Unsupported image format" >&2; exit 1 ;;
*) gettext "Unsupported image format" >&2; echo >&2; exit 1 ;;
esac
prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"`
cat << EOF

View file

@ -41,7 +41,8 @@ for i in /boot/gnumach* ; do
basename=`basename $i`
dirname=`dirname $i`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
echo "Found GNU Mach: $i" >&2
gettext_printf "Found GNU Mach: %s" "$i" >&2
echo >&2
kernels="${kernels} ${rel_dirname}/${basename}"
at_least_one=true
fi
@ -55,7 +56,8 @@ esac
for i in /hurd/${hurd_fs}.static /hurd/exec ; do
if test -e "$i" ; then
echo "Found Hurd module: $i" >&2
gettext_printf "Found Hurd module: %s" "$i" >&2
echo >&2
at_least_one=true
else
all_of_them=false
@ -68,7 +70,8 @@ if ${at_least_one} ; then : ; else
fi
if ${all_of_them} && test -e /lib/ld.so.1 ; then : ; else
echo "Some Hurd stuff found, but not enough to boot." >&2
gettext "Some Hurd stuff found, but not enough to boot." >&2
echo >&2
exit 1
fi

View file

@ -135,7 +135,7 @@ prepare_boot_cache=
while [ "x$list" != "x" ] ; do
kfreebsd=`version_find_latest $list`
echo "Found kernel of FreeBSD: $kfreebsd" >&2
gettext_printf "Found kernel of FreeBSD: %s\n" "$kfreebsd" >&2
basename=`basename $kfreebsd`
dirname=`dirname $kfreebsd`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
@ -184,7 +184,7 @@ while [ "x$list" != "x" ] ; do
fi
done
if test -n "${module_dir}" ; then
echo "Found kernel module directory: ${module_dir}" >&2
gettext_printf "Found kernel module directory: %s\n" "${module_dir}" >&2
module_dir_rel=$(make_system_path_relative_to_its_root $module_dir)
fi

View file

@ -146,7 +146,7 @@ prepare_root_cache=
while [ "x$list" != "x" ] ; do
linux=`version_find_latest $list`
echo "Found linux image: $linux" >&2
gettext_printf "Found linux image: %s\n" "$linux" >&2
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
@ -181,7 +181,7 @@ while [ "x$list" != "x" ] ; do
fi
if test -n "${initrd}" ; then
echo "Found initrd image: ${dirname}/${initrd}" >&2
gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
elif test -z "${initramfs}" ; then
# "UUID=" magic is parsed by initrd or initramfs. Since there's
# no initrd or builtin initramfs, it can't work here.

View file

@ -132,7 +132,7 @@ for k in $(ls -t /netbsd*) ; do
continue
fi
echo "Found NetBSD kernel: $k" >&2
gettext_printf "Found NetBSD kernel: %s\n" "$k" >&2
netbsd_entry "knetbsd" "$k" false "${GRUB_CMDLINE_NETBSD_DEFAULT}"
netbsd_entry "multiboot" "$k" false "${GRUB_CMDLINE_NETBSD_DEFAULT}"
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then

View file

@ -63,11 +63,11 @@ for drv in $drives ; do
# Check for Vista bootmgr.
if [ -f "$dir"/bootmgr -a -f "$dir"/boot/bcd ] ; then
OS="Windows Vista bootmgr"
OS="$(gettext_quoted "Windows Vista bootmgr")"
# Check for NTLDR.
elif [ -f "$dir"/ntldr -a -f "$dir"/ntdetect.com -a -f "$dir"/boot.ini ] ; then
OS=`get_os_name_from_boot_ini "$dir"/boot.ini` || OS="Windows NT/2000/XP loader"
OS=`get_os_name_from_boot_ini "$dir"/boot.ini` || OS="$(gettext_quoted "Windows NT/2000/XP loader")"
needmap=t
else
@ -77,7 +77,7 @@ for drv in $drives ; do
# Get boot /dev/ice.
dev=`${grub_probe} -t device "$dir" 2>/dev/null` || continue
echo "Found $OS on $drv ($dev)" >&2
gettext_printf "Found %s on %s (%s)\n" "$OS" "$drv" "$dev" >&2
cat << EOF
menuentry "$OS" {
EOF

View file

@ -142,7 +142,7 @@ while [ "x${xen_list}" != "x" ] ; do
echo "submenu \"Xen ${xen_version}\" {"
while [ "x$list" != "x" ] ; do
linux=`version_find_latest $list`
echo "Found linux image: $linux" >&2
gettext_printf "Found linux image: %s\n" "$linux" >&2
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
@ -162,7 +162,7 @@ while [ "x${xen_list}" != "x" ] ; do
fi
done
if test -n "${initrd}" ; then
echo "Found initrd image: ${dirname}/${initrd}" >&2
gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
else
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
linux_root_device_thisversion=${GRUB_DEVICE}

View file

@ -39,8 +39,17 @@ if [ -z "${OSPROBED}" ] ; then
fi
osx_entry() {
if [ x$2 = x32 ]; then
# TRANSLATORS: it refers to kernel architecture (32-bit)
bitstr="$(gettext "(32-bit)")"
else
# TRANSLATORS: it refers to kernel architecture (32-bit)
bitstr="$(gettext "(64-bit)")"
fi
# TRANSLATORS: it refers on the OS residing on device %s
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF
menuentry "${LONGNAME} (${2}-bit) (on ${DEVICE})" --class osx --class darwin --class os {
menuentry "${LONGNAME} $bitstr $onstr" --class osx --class darwin --class os {
EOF
save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
@ -99,13 +108,14 @@ for OS in ${OSPROBED} ; do
LONGNAME="${LABEL}"
fi
echo "Found ${LONGNAME} on ${DEVICE}" >&2
gettext_printf "Found %s on %s\n" "${LONGNAME}" "${DEVICE}" >&2
case ${BOOT} in
chain)
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" --class windows --class os {
menuentry "${LONGNAME} $onstr" --class windows --class os {
EOF
save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
@ -146,8 +156,9 @@ EOF
LINITRD="${LINITRD#/boot}"
fi
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF
menuentry "${LLABEL} (on ${DEVICE})" --class gnu-linux --class gnu --class os {
menuentry "${LLABEL} $onstr" --class gnu-linux --class gnu --class os {
EOF
save_default_entry | sed -e "s/^/\t/"
if [ -z "${prepare_boot_cache}" ]; then
@ -173,8 +184,9 @@ EOF
osx_entry xnu_kernel64 64
;;
hurd)
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" --class hurd --class gnu --class os {
menuentry "${LONGNAME} $onstr" --class hurd --class gnu --class os {
EOF
save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
@ -198,7 +210,8 @@ EOF
EOF
;;
*)
echo " ${LONGNAME} is not yet supported by grub-mkconfig." >&2
echo -n " "
gettext_printf "%s is not yet supported by grub-mkconfig.\n" "${LONGNAME}" >&2
;;
esac
done