* 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

@ -24,6 +24,7 @@ exec_prefix=@exec_prefix@
bindir=@bindir@
PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
datadir="@datadir@"
self=`basename $0`
@ -32,22 +33,22 @@ rootdir=
bootdir=
grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
usage () {
cat <<EOF
Usage: $self [OPTION] entry
Set the default boot entry for GRUB, for the next boot only.
-h, --help print this message and exit
-v, --version print the version information and exit
--boot-directory=DIR expect GRUB images under the directory DIR/@grubdirname@
instead of the $grubdir directory
ENTRY is a number or a menu item title.
Report bugs to <bug-grub@gnu.org>.
EOF
gettext_printf "Usage: %s [OPTION] entry" "$self"
gettext "Set the default boot entry for GRUB, for the next boot only."; echo
echo
printf " -h, --help %s\n" "$(gettext "print this message and exit")"
printf " -v, --version %s\n" "$(gettext "print the version information and exit")"
dirmsg="$(gettext_printf "expect GRUB images under the directory DIR/%s instead of the %s directory" "@grubdirname@" "$grubdir")"
printf " --boot-directory=%-7s%s\n" "$(gettext "DIR")" "$dirmsg"
echo
gettext "ENTRY is a number or a menu item title."; echo
echo
gettext "Report bugs to <bug-grub@gnu.org>."; echo
}
argument () {
@ -55,7 +56,7 @@ argument () {
shift
if test $# -eq 0; then
echo "$0: option requires an argument -- '$opt'" 1>&2
gettext_printf "%s: option requires an argument -- '%s'\n" "$0" "$opt" 1>&2
exit 1
fi
echo $1
@ -87,13 +88,14 @@ do
bootdir=`echo "$option" | sed 's/--boot-directory=//'` ;;
-*)
echo "Unrecognized option \`$option'" 1>&2
gettext_printf "Unrecognized option \`%s'" "$option" 1>&2
usage
exit 1
;;
*)
if test "x$entry" != x; then
echo "More than one entry?" 1>&2
gettext "More than one entry?" 1>&2
echo >&2
usage
exit 1
fi
@ -102,7 +104,8 @@ do
done
if test "x$entry" = x; then
echo "entry not specified." 1>&2
gettext "entry not specified." 1>&2
echo >&2
usage
exit 1
fi