Another round of string clarification and adding TRANSLATORS comments.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-26 17:28:05 +01:00
parent ad7b7b8527
commit 67093bc0ed
56 changed files with 131 additions and 71 deletions

View file

@ -1234,7 +1234,7 @@ grub_util_pull_device (const char *os_dev)
grub_err_t err;
err = grub_cryptodisk_cheat_mount (grdev, os_dev);
if (err)
grub_util_error (_("can't mount crypto volume `%s': %s"),
grub_util_error (_("can't mount encrypted volume `%s': %s"),
lastsubdev, grub_errmsg);
}
@ -1279,7 +1279,7 @@ grub_util_pull_device (const char *os_dev)
grub_err_t err;
err = grub_cryptodisk_cheat_mount (grdev, os_dev);
if (err)
grub_util_error (_("can't mount crypto volume `%s': %s"),
grub_util_error (_("can't mount encrypted volume `%s': %s"),
lastsubdev, grub_errmsg);
}
grub_free (grdev);

View file

@ -87,9 +87,9 @@ fi
usage () {
if [ "${target_cpu}-${platform}" = "i386-pc" ] \
|| [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ]; then
gettext_printf "Usage: %s [OPTION] install_device" "$self"
gettext_printf "Usage: %s [OPTION] INSTALL_DEVICE" "$self"
else
gettext_printf "Usage: %s [OPTION] [install_device]" "$self"
gettext_printf "Usage: %s [OPTION] [INSTALL_DEVICE]" "$self"
fi
echo
gettext "Install GRUB on your drive." ; echo
@ -247,7 +247,7 @@ do
;;
*)
if test "x$install_device" != x; then
gettext "More than one install_devices?" 1>&2
gettext "More than one install device?" 1>&2
echo 1>&2
usage
exit 1

View file

@ -1353,6 +1353,7 @@ generate_image (const char *dir, const char *prefix,
GRUB_MD_SHA512->final (context);
if (grub_memcmp (GRUB_MD_SHA512->read (context), fwstart_good_hash,
GRUB_MD_SHA512->mdlen) != 0)
/* TRANSLATORS: fwstart.img may still be good, just it wasn't checked. */
grub_util_warn ("%s",
_("fwstart.img doesn't match the known good version. "
"proceed at your own risk"));
@ -1639,9 +1640,13 @@ generate_image (const char *dir, const char *prefix,
static struct argp_option options[] = {
{"directory", 'd', N_("DIR"), 0, N_("use images and modules under DIR [default=%s/<platform>]"), 0},
{"directory", 'd', N_("DIR"), 0,
/* TRANSLATORS: platform here isn't identifier. It can be translated. */
N_("use images and modules under DIR [default=%s/<platform>]"), 0},
{"prefix", 'p', N_("DIR"), 0, N_("set prefix directory [default=%s]"), 0},
{"memdisk", 'm', N_("FILE"), 0, N_("embed FILE as a memdisk image"), 0},
{"memdisk", 'm', N_("FILE"), 0,
/* TRANSLATORS: memdisk here isn't an identifier, it can be translated. */
N_("embed FILE as a memdisk image"), 0},
{"config", 'c', N_("FILE"), 0, N_("embed FILE as an early config"), 0},
/* TRANSLATORS: NOTE is a name of segment. */
{"note", 'n', 0, 0, N_("add NOTE segment for CHRP IEEE1275"), 0},

View file

@ -166,6 +166,7 @@ main (int argc, char *argv[])
memset (pass2, 0, sizeof (pass2));
#if ! defined (__linux__) && ! defined (__FreeBSD__)
/* TRANSLATORS: The generator might still be secure just GRUB isn't sure about it. */
printf ("%s", _("WARNING: your random generator isn't known to be secure\n"));
#endif

View file

@ -54,7 +54,8 @@ argp_parser (int key, char *arg, struct argp_state *state)
else
{
/* Too many arguments. */
fprintf (stderr, _("Unknown extra argument `%s'.\n"), arg);
fprintf (stderr, _("Unknown extra argument `%s'."), arg);
fprintf (stderr, "\n");
argp_usage (state);
}
break;

View file

@ -55,7 +55,7 @@ xorriso=xorriso
# Print the usage.
usage () {
gettext_printf "Usage: %s [OPTION] SOURCE...\n" "$self"
gettext "Make GRUB CDROM, disk, pendrive and floppy bootable image."; echo
gettext "Make GRUB CD-ROM, disk, pendrive and floppy bootable image."; 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")"

View file

@ -57,6 +57,7 @@ usage () {
printf " -h, --help %s\n" "$(gettext "print this message and exit")"
printf " -v, --version %s\n" "$(gettext "print the version information and exit")"
printf " -o, --output=%-11s%s\n" "$(gettext FILE)" "$(gettext "save output in FILE [required]")"
# TRANSLATORS: platform here isn't identifier. It can be translated.
dir_msg="$(gettext_printf "use images and modules under DIR [default=%s/<platform>]" "${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})")"
printf " -d, --directory=%-8s%s\n" \
"DIR" "$dir_msg"

View file

@ -838,7 +838,8 @@ main (int argc, char *argv[])
if (arguments.ndevices != 1 && !argument_is_device)
{
char *program = xstrdup(program_name);
fprintf (stderr, _("Unknown extra argument `%s'.\n"), argv[optind + 1]);
fprintf (stderr, _("Unknown extra argument `%s'."), arguments.devices[1]);
fprintf (stderr, "\n");
argp_help (&argp, stderr, ARGP_HELP_STD_USAGE, program);
free (program);
exit(1);

View file

@ -42,15 +42,15 @@ grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
# Usage: usage
# Print the usage.
usage () {
gettext_printf "Usage: %s [OPTION] entry\n" "$self"
gettext "Set the default boot entry for GRUB, for the next boot only."; echo
gettext_printf "Usage: %s [OPTION] MENU_ENTRY\n" "$self"
gettext "Set the default boot menu 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
gettext "MENU_ENTRY is a number or a menu item title."; echo
echo
gettext "Report bugs to <bug-grub@gnu.org>."; echo
}
@ -92,13 +92,13 @@ do
bootdir=`echo "$option" | sed 's/--boot-directory=//'` ;;
-*)
gettext_printf "Unrecognized option \`%s'" "$option" 1>&2
gettext_printf "Unrecognized option \`%s'\n" "$option" 1>&2
usage
exit 1
;;
*)
if test "x$entry" != x; then
gettext "More than one entry?" 1>&2
gettext "More than one menu entry?" 1>&2
echo >&2
usage
exit 1
@ -108,7 +108,7 @@ do
done
if test "x$entry" = x; then
gettext "entry not specified." 1>&2
gettext "menu entry not specified." 1>&2
echo >&2
usage
exit 1

View file

@ -68,7 +68,8 @@ argp_parser (int key, char *arg, struct argp_state *state)
else
{
/* Too many arguments. */
fprintf (stderr, _("Unknown extra argument `%s'.\n"), arg);
fprintf (stderr, _("Unknown extra argument `%s'."), arg);
fprintf (stderr, "\n");
argp_usage (state);
}
break;

View file

@ -42,15 +42,15 @@ grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
# Usage: usage
# Print the usage.
usage () {
gettext_printf "Usage: %s [OPTION] entry\n" "$self"
gettext "Set the default boot entry for GRUB."; echo
gettext_printf "Usage: %s [OPTION] MENU_ENTRY\n" "$self"
gettext "Set the default boot menu entry for GRUB."; 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="$(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
gettext "MENU_ENTRY is a number or a menu item title."; echo
echo
gettext "Report bugs to <bug-grub@gnu.org>."; echo
}
@ -92,13 +92,13 @@ do
bootdir=`echo "$option" | sed 's/--boot-directory=//'` ;;
-*)
gettext_printf "Unrecognized option \`%s'" "$option" 1>&2
gettext_printf "Unrecognized option \`%s'\n" "$option" 1>&2
usage
exit 1
;;
*)
if test "x$entry" != x; then
gettext "More than one entry?" 1>&2
gettext "More than one menu entry?" 1>&2
echo >&2
usage
exit 1
@ -108,7 +108,7 @@ do
done
if test "x$entry" = x; then
gettext "entry not specified." 1>&2
gettext "menu entry not specified." 1>&2
echo >&2
usage
exit 1

View file

@ -381,6 +381,7 @@ setup (const char *dir,
grub_util_error (_("unable to identify a filesystem in %s; safety check can't be performed"),
dest_dev->disk->name);
if (fs && !fs->reserved_first_sector)
/* TRANSLATORS: Filesystem may reserve the space just GRUB isn't sure about it. */
grub_util_error (_("%s appears to contain a %s filesystem which isn't known to "
"reserve space for DOS-style boot. Installing GRUB there could "
"result in FILESYSTEM DESTRUCTION if valuable data is overwritten "
@ -393,6 +394,7 @@ setup (const char *dir,
&& strcmp (dest_partmap->name, "netbsd") != 0
&& strcmp (dest_partmap->name, "openbsd") != 0
&& strcmp (dest_partmap->name, "sunpc") != 0)
/* TRANSLATORS: Partition map may reserve the space just GRUB isn't sure about it. */
grub_util_error (_("%s appears to contain a %s partition map which isn't known to "
"reserve space for DOS-style boot. Installing GRUB there could "
"result in FILESYSTEM DESTRUCTION if valuable data is overwritten "
@ -853,7 +855,8 @@ argp_parser (int key, char *arg, struct argp_state *state)
else
{
/* Too many arguments. */
fprintf (stderr, _("Unknown extra argument `%s'.\n"), arg);
fprintf (stderr, _("Unknown extra argument `%s'."), arg);
fprintf (stderr, "\n");
argp_usage (state);
}
break;

View file

@ -119,6 +119,7 @@ EOF
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
message="$(gettext_printf "Loading initial ramdisk ...")"
cat << EOF
echo '$message'

View file

@ -98,6 +98,7 @@ linux_entry ()
module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
message="$(gettext_printf "Loading initial ramdisk ...")"
cat << EOF
echo '$message'

View file

@ -46,7 +46,7 @@ grub_mkimage="${bindir}/`echo grub-mkimage | sed ${transform}`"
# Print the usage.
usage () {
gettext_printf "Usage: %s [OPTION] SOURCE...\n" "$self"
gettext "Make GRUB CDROM, disk, pendrive and floppy bootable image."; echo
gettext "Make GRUB CD-ROM, disk, pendrive and floppy bootable image."; 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")"