diff --git a/ChangeLog b/ChangeLog index b0d0e9753..585699f64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,37 @@ +2012-02-05 Vladimir Serbinenko + + Clarify and unify messages. + + * grub-core/commands/hashsum.c (options): Unify messages. + * grub-core/commands/keystatus.c (GRUB_MOD_INIT): Don't mark a + literal-only message as translatable. + * grub-core/commands/lsacpi.c (GRUB_MOD_INIT): Likewise. + * grub-core/loader/ia64/efi/linux.c (GRUB_MOD_INIT): Likewise. + * grub-core/commands/legacycfg.c (GRUB_MOD_INIT): Add quoting around + commands. + * grub-core/commands/menuentry.c (options): Clarify that it's a keyboard + key, not the key used to unlock. Clarify what it's used for. + * grub-core/kern/emu/hostdisk.c (read_device_map): Unify error message. + * grub-core/loader/xnu.c (grub_xnu_load_driver): Remove erroneous colon. + * grub-core/script/main.c (GRUB_MOD_INIT): Clarify [n] to be [NUM]. + * util/grub-editenv.c (options): Unify "verbose" message. + * util/grub-fstest.c (read_file): Unify error message. + (fstest): Add quotes around commands. + (options): Unify "verbose" message. + * util/grub-install.in: Add quotes around variable name. + * util/grub-kbdcomp.in: Unify error message. + * util/grub-mkfont.c (main): Likewise. + * util/grub-mkrescue.in: Likewise. + * util/grub-mklayout.c (options): Unify "verbose" message. + * util/grub-mkstandalone.in: Unify help and verbose messages. + * util/grub-mount.c (options): Unify "verbose" message. + * util/grub-probe.c (options): Likewise. + * util/grub-script-check.c (options): Likewise. + * util/grub-setup.c (setup): Unify no-terminator message. + (options): Use DEVICE and not DEV. + Unify "verbose" message. + * util/ieee1275/ofpath.c (xrealpath): Unify error message. + 2012-02-05 Vladimir Serbinenko Improve and unify messages. diff --git a/grub-core/commands/hashsum.c b/grub-core/commands/hashsum.c index fb737c2f8..fb02aaabf 100644 --- a/grub-core/commands/hashsum.c +++ b/grub-core/commands/hashsum.c @@ -31,7 +31,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); static const struct grub_arg_option options[] = { {"hash", 'h', 0, N_("Specify hash to use."), N_("HASH"), ARG_TYPE_STRING}, {"check", 'c', 0, N_("Check hash list file."), N_("FILE"), ARG_TYPE_STRING}, - {"prefix", 'p', 0, N_("Base directory for hash list."), N_("DIRECTORY"), + {"prefix", 'p', 0, N_("Base directory for hash list."), N_("DIR"), ARG_TYPE_STRING}, {"keep-going", 'k', 0, N_("Don't stop after first error."), 0, 0}, {"uncompress", 'u', 0, N_("Uncompress file before checksumming."), 0, 0}, diff --git a/grub-core/commands/keystatus.c b/grub-core/commands/keystatus.c index f3a669942..cf37ad05f 100644 --- a/grub-core/commands/keystatus.c +++ b/grub-core/commands/keystatus.c @@ -99,7 +99,7 @@ static grub_extcmd_t cmd; GRUB_MOD_INIT(keystatus) { cmd = grub_register_extcmd ("keystatus", grub_cmd_keystatus, 0, - N_("[--shift] [--ctrl] [--alt]"), + "[--shift] [--ctrl] [--alt]", N_("Check key modifier status."), options); } diff --git a/grub-core/commands/legacycfg.c b/grub-core/commands/legacycfg.c index 4de2d84d5..b8effe43e 100644 --- a/grub-core/commands/legacycfg.c +++ b/grub-core/commands/legacycfg.c @@ -781,26 +781,26 @@ GRUB_MOD_INIT(legacycfg) cmd_kernel = grub_register_command ("legacy_kernel", grub_cmd_legacy_kernel, N_("[--no-mem-option] [--type=TYPE] FILE [ARG ...]"), - N_("Simulate grub-legacy kernel command")); + N_("Simulate grub-legacy `kernel' command")); cmd_initrd = grub_register_command ("legacy_initrd", grub_cmd_legacy_initrd, N_("FILE [ARG ...]"), - N_("Simulate grub-legacy initrd command")); + N_("Simulate grub-legacy `initrd' command")); cmd_initrdnounzip = grub_register_command ("legacy_initrd_nounzip", grub_cmd_legacy_initrdnounzip, N_("FILE [ARG ...]"), - N_("Simulate grub-legacy modulenounzip command")); + N_("Simulate grub-legacy `modulenounzip' command")); cmd_password = grub_register_command ("legacy_password", grub_cmd_legacy_password, N_("[--md5] PASSWD [FILE]"), - N_("Simulate grub-legacy password command")); + N_("Simulate grub-legacy `password' command")); cmd_check_password = grub_register_command ("legacy_check_password", grub_cmd_legacy_check_password, N_("[--md5] PASSWD [FILE]"), - N_("Simulate grub-legacy password command in menuentry mode")); + N_("Simulate grub-legacy `password' command in menuentry mode")); } diff --git a/grub-core/commands/lsacpi.c b/grub-core/commands/lsacpi.c index fd19e380a..fe6f70341 100644 --- a/grub-core/commands/lsacpi.c +++ b/grub-core/commands/lsacpi.c @@ -240,7 +240,7 @@ static grub_extcmd_t cmd; GRUB_MOD_INIT(lsapi) { - cmd = grub_register_extcmd ("lsacpi", grub_cmd_lsacpi, 0, N_("[-1|-2]"), + cmd = grub_register_extcmd ("lsacpi", grub_cmd_lsacpi, 0, "[-1|-2]", N_("Show ACPI information."), options); } diff --git a/grub-core/commands/menuentry.c b/grub-core/commands/menuentry.c index 57e4baa61..244a12b7a 100644 --- a/grub-core/commands/menuentry.c +++ b/grub-core/commands/menuentry.c @@ -32,7 +32,7 @@ static const struct grub_arg_option options[] = {"users", 2, 0, N_("Users allowed to boot this entry."), N_("USERNAME"), ARG_TYPE_STRING}, {"hotkey", 3, 0, - N_("Keyboard key for this entry."), N_("KEY"), ARG_TYPE_STRING}, + N_("Keyboard key to quickly boot this entry."), N_("KEYBOARD_KEY"), ARG_TYPE_STRING}, {"source", 4, 0, N_("Menu entry definition as a string."), N_("STRING"), ARG_TYPE_STRING}, {0, 0, 0, 0, 0, 0} diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c index 331e8095a..ac30fb04c 100644 --- a/grub-core/kern/emu/hostdisk.c +++ b/grub-core/kern/emu/hostdisk.c @@ -1225,7 +1225,7 @@ read_device_map (const char *dev_map) { map[drive].device = xmalloc (PATH_MAX); if (! realpath (p, map[drive].device)) - grub_util_error (_("cannot get the real path of `%s'"), p); + grub_util_error (_("failed to get canonical path of %s"), p); } else #endif diff --git a/grub-core/loader/ia64/efi/linux.c b/grub-core/loader/ia64/efi/linux.c index 1d30a5031..aa01d6b1c 100644 --- a/grub-core/loader/ia64/efi/linux.c +++ b/grub-core/loader/ia64/efi/linux.c @@ -815,7 +815,7 @@ GRUB_MOD_INIT(linux) N_("Load an additional file.")); cmd_relocate = grub_register_command ("relocate", grub_cmd_relocate, - N_("[on|off|force]"), + "[on|off|force]", N_("Set relocate feature.")); cmd_fpswa = grub_register_command ("fpswa", grub_cmd_fpswa, diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c index 44a440b08..ec7c3423f 100644 --- a/grub-core/loader/xnu.c +++ b/grub-core/loader/xnu.c @@ -739,7 +739,7 @@ grub_xnu_load_driver (char *infoplistname, grub_file_t binaryfile) { grub_file_close (infoplist); if (!grub_errno) - grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s: "), + grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"), infoplistname); return grub_errno; } diff --git a/grub-core/script/main.c b/grub-core/script/main.c index 482bb3fef..91ab55b6a 100644 --- a/grub-core/script/main.c +++ b/grub-core/script/main.c @@ -51,16 +51,18 @@ void grub_script_init (void) { cmd_break = grub_register_command ("break", grub_script_break, - N_("[n]"), N_("Exit from loops")); + N_("[NUM]"), N_("Exit from loops")); cmd_continue = grub_register_command ("continue", grub_script_break, - N_("[n]"), N_("Continue loops")); + N_("[NUM]"), N_("Continue loops")); cmd_shift = grub_register_command ("shift", grub_script_shift, - N_("[n]"), N_("Shift positional parameters.")); + N_("[NUM]"), + N_("Shift positional parameters.")); cmd_setparams = grub_register_command ("setparams", grub_script_setparams, N_("[VALUE]..."), N_("Set positional parameters.")); cmd_return = grub_register_command ("return", grub_script_return, - N_("[n]"), N_("Return from a function.")); + N_("[NUM]"), + N_("Return from a function.")); } void diff --git a/util/grub-editenv.c b/util/grub-editenv.c index f8b2ef7fe..3eef7f663 100644 --- a/util/grub-editenv.c +++ b/util/grub-editenv.c @@ -47,7 +47,7 @@ static struct argp_option options[] = { N_("Delete variables."), 0}, {0, 0, 0, OPTION_DOC, N_("Options:"), -1}, - {"verbose", 'v', 0, 0, N_("Print verbose messages."), 0}, + {"verbose", 'v', 0, 0, N_("print verbose messages."), 0}, { 0, 0, 0, 0, 0, 0 } }; diff --git a/util/grub-fstest.c b/util/grub-fstest.c index cb7f9a364..697881144 100644 --- a/util/grub-fstest.c +++ b/util/grub-fstest.c @@ -119,7 +119,7 @@ read_file (char *pathname, int (*hook) (grub_off_t ofs, char *buf, int len)) file = grub_file_open (pathname); if (!file) { - grub_util_error (_("cannot open file %s:%s"), pathname, + grub_util_error (_("cannot open `%s': %s"), pathname, grub_errmsg); return; } @@ -184,7 +184,7 @@ cmd_cp (char *src, char *dest) ff = fopen (dest, "wb"); if (ff == NULL) { - grub_util_error (_("OS file %s open error: %s"), dest, + grub_util_error (_("cannot open OS file `%s': %s"), dest, strerror (errno)); return; } @@ -332,7 +332,7 @@ fstest (int n, char **args) argv[1] = host_file; if (execute_command ("loopback", 2, argv)) - grub_util_error (_("loopback command fails")); + grub_util_error (_("\`loopback' command fails: %s"), grub_errmsg); grub_free (loop_name); grub_free (host_file); @@ -343,7 +343,7 @@ fstest (int n, char **args) if (mount_crypt) { if (execute_command ("cryptomount", 1, argv)) - grub_util_error (_("cryptomount command fails: %s"), grub_errmsg); + grub_util_error (_("\`cryptomount' command fails: %s"), grub_errmsg); } } @@ -447,7 +447,7 @@ static struct argp_option options[] = { {"debug", 'd', "S", 0, N_("Set debug environment variable."), 2}, {"crypto", 'C', NULL, OPTION_ARG_OPTIONAL, N_("Mount crypto devices."), 2}, {"zfs-key", 'K', N_("FILE|prompt"), 0, N_("Load zfs crypto key."), 2}, - {"verbose", 'v', NULL, OPTION_ARG_OPTIONAL, N_("Print verbose messages."), 2}, + {"verbose", 'v', NULL, OPTION_ARG_OPTIONAL, N_("print verbose messages."), 2}, {"uncompress", 'u', NULL, OPTION_ARG_OPTIONAL, N_("Uncompress data."), 2}, {0, 0, 0, 0, 0, 0} }; diff --git a/util/grub-install.in b/util/grub-install.in index c0d7d8b84..2ceab2d66 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -109,7 +109,7 @@ if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then printf " --disk-module=%-10s%s\n" "$(gettext "MODULE")" "$(gettext "disk module to use (biosdisk or native)")" fi if [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${platform}" = "powerpc-ieee1275" ] ; then - printf " --no-nvram %s\n" "$(gettext "don't update the boot-device NVRAM variable")" + printf " --no-nvram %s\n" "$(gettext "don't update the \`boot-device' NVRAM variable")" fi if [ "${platform}" = "efi" ]; then @@ -633,7 +633,7 @@ elif [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${pla dev="`echo $grub_device | sed -e 's/\/dev\///' -e 's/[0-9]\+//'`" partno="`echo $grub_device | sed -e 's/.*[^0-9]\([0-9]\+\)$/\1/'`" ofpath="`$ofpathname $dev`" || { - gettext_printf "Couldn't find Open Firmware device tree path for %s.\nYou will have to set boot-device manually.\n" "$dev" 1>&2 + gettext_printf "Couldn't find Open Firmware device tree path for %s.\nYou will have to set \`boot-device' variable manually.\n" "$dev" 1>&2 exit 1 } @@ -666,8 +666,9 @@ elif [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${pla fi "$nvsetenv" boot-device "$boot_device" || { - gettext_printf "%s failed.\n" "$nvsetenv" 1>&2 - gettext "You will have to set boot-device manually. At the Open Firmware prompt, type:" 1>&2 + # TRANSLATORS: The %s will be replaced by an external program name. + gettext_printf "\`%s' failed.\n" "$nvsetenv" 1>&2 + gettext "You will have to set \`boot-device' variable manually. At the Open Firmware prompt, type:" 1>&2 echo 1>&2 echo " setenv boot-device $boot_device" 1>&2 exit 1 diff --git a/util/grub-kbdcomp.in b/util/grub-kbdcomp.in index 2be541ba0..8854c880b 100644 --- a/util/grub-kbdcomp.in +++ b/util/grub-kbdcomp.in @@ -63,7 +63,7 @@ do done if [ "x${output}" = x ] ; then - gettext "output file must be given" >&2 + gettext "output file must be specified" >&2 echo >&2 usage exit 1 diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c index d809a0006..2f8189c6b 100644 --- a/util/grub-mkfont.c +++ b/util/grub-mkfont.c @@ -1143,7 +1143,7 @@ main (int argc, char *argv[]) } if (! arguments.output_file) - grub_util_error (_("no output file is specified")); + grub_util_error (_("output file must be specified")); if (FT_Init_FreeType (&ft_lib)) grub_util_error (_("FT_Init_FreeType fails")); diff --git a/util/grub-mklayout.c b/util/grub-mklayout.c index 6b85ef87f..b58759087 100644 --- a/util/grub-mklayout.c +++ b/util/grub-mklayout.c @@ -46,7 +46,7 @@ static struct argp_option options[] = { N_("set input filename. Default is STDIN"), 0}, {"output", 'o', N_("FILE"), 0, N_("set output filename. Default is STDOUT"), 0}, - {"verbose", 'v', 0, 0, N_("Print verbose messages."), 0}, + {"verbose", 'v', 0, 0, N_("print verbose messages."), 0}, { 0, 0, 0, 0, 0, 0 } }; diff --git a/util/grub-mkrescue.in b/util/grub-mkrescue.in index 22d43f6eb..6cf2a78c4 100644 --- a/util/grub-mkrescue.in +++ b/util/grub-mkrescue.in @@ -139,7 +139,7 @@ do done if [ "x${output_image}" = x ] ; then - gettext "output file must be given" >&2 + gettext "output file must be specified" >&2 echo >&2 usage exit 1 diff --git a/util/grub-mkstandalone.in b/util/grub-mkstandalone.in index 3cb3eb30c..7b5f3f896 100644 --- a/util/grub-mkstandalone.in +++ b/util/grub-mkstandalone.in @@ -52,7 +52,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]")" - dir_msg="$(gettext_printf "use images and modules under DIR [default=%s/]" "${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})")" + dir_msg="$(gettext_printf "use images and modules under DIR [default=%s/]" "${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})")" printf " -d, --directory=%-8s%s\n" \ "DIR" "$dir_msg" printf " -O, --format=%-11s%s" "$(gettext "FORMAT")" "$(gettext "generate an image in format")"; echo @@ -135,7 +135,7 @@ if [ "x${output_image}" = x ] ; then fi if [ "x${format}" = x ] ; then - gettext "format must be specified" >&2 + gettext "Target format not specified (use the -O option)." >&2 echo >&2 exit 1 fi diff --git a/util/grub-mount.c b/util/grub-mount.c index e5a3b9f8e..0546426b7 100644 --- a/util/grub-mount.c +++ b/util/grub-mount.c @@ -408,7 +408,7 @@ static struct argp_option options[] = { {"debug", 'd', "S", 0, N_("Set debug environment variable."), 2}, {"crypto", 'C', NULL, OPTION_ARG_OPTIONAL, N_("Mount crypto devices."), 2}, {"zfs-key", 'K', N_("FILE|prompt"), 0, N_("Load zfs crypto key."), 2}, - {"verbose", 'v', NULL, OPTION_ARG_OPTIONAL, N_("Print verbose messages."), 2}, + {"verbose", 'v', NULL, OPTION_ARG_OPTIONAL, N_("print verbose messages."), 2}, {0, 0, 0, 0, 0, 0} }; diff --git a/util/grub-probe.c b/util/grub-probe.c index 2a987b58b..080870d16 100644 --- a/util/grub-probe.c +++ b/util/grub-probe.c @@ -689,7 +689,7 @@ static struct argp_option options[] = { N_("use FILE as the device map [default=%s]"), 0}, {"target", 't', "(fs|fs_uuid|fs_label|drive|device|partmap|abstraction|cryptodisk_uuid|msdos_parttype)", 0, N_("print filesystem module, GRUB drive, system device, partition map module, abstraction module or CRYPTO UUID [default=fs]"), 0}, - {"verbose", 'v', 0, 0, N_("Print verbose messages."), 0}, + {"verbose", 'v', 0, 0, N_("print verbose messages."), 0}, { 0, 0, 0, 0, 0, 0 } }; diff --git a/util/grub-script-check.c b/util/grub-script-check.c index 5fed01e23..5a0e2fc28 100644 --- a/util/grub-script-check.c +++ b/util/grub-script-check.c @@ -45,7 +45,7 @@ struct arguments }; static struct argp_option options[] = { - {"verbose", 'v', 0, 0, N_("Print verbose messages."), 0}, + {"verbose", 'v', 0, 0, N_("print verbose messages."), 0}, { 0, 0, 0, 0, 0, 0 } }; diff --git a/util/grub-setup.c b/util/grub-setup.c index cdc728433..040b454c2 100644 --- a/util/grub-setup.c +++ b/util/grub-setup.c @@ -483,7 +483,7 @@ setup (const char *dir, block--; if ((char *) block <= core_img) - grub_util_error (_("No terminator in the core image")); + grub_util_error (_("no terminator in the core image")); } save_first_sector (sectors[0] + grub_partition_get_start (container), @@ -741,13 +741,13 @@ static struct argp_option options[] = { N_("Use GRUB files in the directory DIR [default=%s]"), 0}, {"device-map", 'm', N_("FILE"), 0, N_("Use FILE as the device map [default=%s]"), 0}, - {"root-device", 'r', N_("DEV"), 0, + {"root-device", 'r', N_("DEVICE"), 0, N_("Use DEV as the root device [default=guessed]"), 0}, {"force", 'f', 0, 0, N_("Install even if problems are detected"), 0}, {"skip-fs-probe",'s',0, 0, N_("Do not probe for filesystems in DEVICE"), 0}, - {"verbose", 'v', 0, 0, N_("Print verbose messages."), 0}, + {"verbose", 'v', 0, 0, N_("print verbose messages."), 0}, {"allow-floppy", 'a', 0, 0, N_("Make the drive also bootable as floppy (default for fdX devices). May break on some BIOSes."), 0}, diff --git a/util/ieee1275/ofpath.c b/util/ieee1275/ofpath.c index 932b79809..1d39ac38b 100644 --- a/util/ieee1275/ofpath.c +++ b/util/ieee1275/ofpath.c @@ -157,7 +157,7 @@ xrealpath (const char *in) out = realpath (in, NULL); #endif if (!out) - grub_util_error (_("cannot get the real path of `%s'"), in); + grub_util_error (_("failed to get canonical path of %s"), in); return out; }