From ef292a87757ee07fa7cf10b09e8a778e7b8a99ad Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 5 Mar 2012 16:42:26 +0100 Subject: [PATCH] * grub-core/net/http.c: Add TRANSLATORS comments. * grub-core/normal/cmdline.c: Likewise. * grub-core/normal/misc.c: Likewise. * grub-core/partmap/msdos.c: Likewise. * grub-core/parttool/msdospart.c: Likewise. * grub-core/script/execute.c: Likewise. * grub-core/script/main.c: Likewise. * grub-core/term/terminfo.c: Likewise. * grub-core/video/bitmap.c: Likewise. * util/grub-install.in: Likewise. * util/grub-mkimage.c: Likewise. * util/grub-mklayout.c: Likewise. * util/grub-setup.c: Likewise. --- ChangeLog | 16 ++++++++++++++++ grub-core/net/http.c | 2 ++ grub-core/normal/cmdline.c | 3 +++ grub-core/normal/misc.c | 2 ++ grub-core/partmap/msdos.c | 3 +++ grub-core/parttool/msdospart.c | 2 ++ grub-core/script/execute.c | 2 ++ grub-core/script/main.c | 2 ++ grub-core/term/terminfo.c | 4 ++++ grub-core/video/bitmap.c | 2 ++ util/grub-install.in | 4 ++++ util/grub-mkimage.c | 4 +++- util/grub-mklayout.c | 1 + util/grub-setup.c | 3 +++ 14 files changed, 49 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 33fc583f6..2b102cf48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2012-03-05 Vladimir Serbinenko + + * grub-core/net/http.c: Add TRANSLATORS comments. + * grub-core/normal/cmdline.c: Likewise. + * grub-core/normal/misc.c: Likewise. + * grub-core/partmap/msdos.c: Likewise. + * grub-core/parttool/msdospart.c: Likewise. + * grub-core/script/execute.c: Likewise. + * grub-core/script/main.c: Likewise. + * grub-core/term/terminfo.c: Likewise. + * grub-core/video/bitmap.c: Likewise. + * util/grub-install.in: Likewise. + * util/grub-mkimage.c: Likewise. + * util/grub-mklayout.c: Likewise. + * util/grub-setup.c: Likewise. + 2012-03-05 Vladimir Serbinenko * util/grub-mount.c (fuse_init): Unify cryptomount and loopback messages diff --git a/grub-core/net/http.c b/grub-core/net/http.c index 49edeb1d9..48b2ccf34 100644 --- a/grub-core/net/http.c +++ b/grub-core/net/http.c @@ -116,6 +116,8 @@ parse_line (grub_file_t file, http_data_t data, char *ptr, grub_size_t len) return GRUB_ERR_NONE; default: data->err = GRUB_ERR_NET_UNKNOWN_ERROR; + /* TRANSLATORS: GRUB HTTP code is pretty young. So even perfectly + valid answers like 403 will trigger this very generic message. */ data->errmsg = grub_xasprintf (_("unsupported HTTP error %d: %s"), code, ptr); return GRUB_ERR_NONE; diff --git a/grub-core/normal/cmdline.c b/grub-core/normal/cmdline.c index 8b255e6d7..0e8a1adbf 100644 --- a/grub-core/normal/cmdline.c +++ b/grub-core/normal/cmdline.c @@ -186,6 +186,9 @@ print_completion (const char *item, grub_completion_type_t type, int count) grub_puts_ (N_("Possible arguments are:")); break; default: + /* TRANSLATORS: this message is used if none of above matches. + This shouldn't happen but please use the general term for + "thing" or "object". */ grub_puts_ (N_("Possible things are:")); break; } diff --git a/grub-core/normal/misc.c b/grub-core/normal/misc.c index 8dc6d359e..43ffd9ccf 100644 --- a/grub-core/normal/misc.c +++ b/grub-core/normal/misc.c @@ -86,6 +86,8 @@ grub_normal_print_device_info (const char *name) { grub_unixtime2datetime (tm, &datetime); grub_xputs (" "); + /* TRANSLATORS: Arguments are year, month, day, hour, minute, + second, day of the week (translated). */ grub_printf_ (N_("- Last modification time %d-%02d-%02d " "%02d:%02d:%02d %s"), datetime.year, datetime.month, datetime.day, diff --git a/grub-core/partmap/msdos.c b/grub-core/partmap/msdos.c index 99fb85258..1cef2106d 100644 --- a/grub-core/partmap/msdos.c +++ b/grub-core/partmap/msdos.c @@ -42,6 +42,9 @@ struct embed_signature }; const char message_warn[][200] = { + /* TRANSLATORS: MBR gap and boot track is the same thing and is the space + between MBR and first partitition. If your language translates well only + "boot track", you can just use it everywhere. */ [TYPE_RAID] = N_("Sector %llu is already in use by raid controller `%s';" " avoiding it. " "Please ask the manufacturer not to store data in MBR gap"), diff --git a/grub-core/parttool/msdospart.c b/grub-core/parttool/msdospart.c index 3ae584829..dcbf74e3b 100644 --- a/grub-core/parttool/msdospart.c +++ b/grub-core/parttool/msdospart.c @@ -132,6 +132,8 @@ static grub_err_t grub_pcpart_type (const grub_device_t dev, } mbr.entries[index].type = type; + /* TRANSLATORS: In this case we're actually writing to the disk and actively + modifying partition type rather than just defining it. */ grub_printf_ (N_("Setting partition type to 0x%x\n"), type); /* Write the parttable. */ diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c index 9adc9da3b..a3ad3242a 100644 --- a/grub-core/script/execute.c +++ b/grub-core/script/execute.c @@ -87,6 +87,8 @@ grub_script_break (grub_command_t cmd, int argc, char *argv[]) if (*p != '\0') return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("unrecognized number")); if (count == 0) + /* TRANSLATORS: 0 is a quantifier. Break can be used e.g. to break + 3 loops at once. But asking it to break 0 loops makes no sense. */ return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("can't break 0 loops")); } diff --git a/grub-core/script/main.c b/grub-core/script/main.c index 91ab55b6a..faf196af4 100644 --- a/grub-core/script/main.c +++ b/grub-core/script/main.c @@ -56,6 +56,8 @@ grub_script_init (void) N_("[NUM]"), N_("Continue loops")); cmd_shift = grub_register_command ("shift", grub_script_shift, N_("[NUM]"), + /* TRANSLATORS: Positional arguments are + arguments $0, $1, $2, ... */ N_("Shift positional parameters.")); cmd_setparams = grub_register_command ("setparams", grub_script_setparams, N_("[VALUE]..."), diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c index b2c721c18..dd9541d13 100644 --- a/grub-core/term/terminfo.c +++ b/grub-core/term/terminfo.c @@ -600,6 +600,10 @@ print_terminfo (void) [GRUB_TERM_CODE_TYPE_UTF8_LOGICAL >> GRUB_TERM_CODE_TYPE_SHIFT] = _("UTF-8"), [GRUB_TERM_CODE_TYPE_UTF8_VISUAL >> GRUB_TERM_CODE_TYPE_SHIFT] + /* TRANSLATORS: visually ordered UTF-8 is a non-compliant encoding + based on UTF-8 with right-to-left languages written in reverse. + Used on some terminals. Normal UTF-8 is refered as + "logically-ordered UTF-8" by opposition. */ = _("visually-ordered UTF-8"), [GRUB_TERM_CODE_TYPE_VISUAL_GLYPHS >> GRUB_TERM_CODE_TYPE_SHIFT] = "Glyph descriptors", diff --git a/grub-core/video/bitmap.c b/grub-core/video/bitmap.c index 966f4cf6f..bb41d10cb 100644 --- a/grub-core/video/bitmap.c +++ b/grub-core/video/bitmap.c @@ -204,6 +204,8 @@ grub_video_bitmap_load (struct grub_video_bitmap **bitmap, } return grub_error (GRUB_ERR_BAD_FILE_TYPE, + /* TRANSLATORS: We're speaking about bitmap images like + JPEG or PNG. */ N_("bitmap file `%s' is of" " unsupported format"), filename); } diff --git a/util/grub-install.in b/util/grub-install.in index e9d5c3609..44c68e743 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -81,6 +81,8 @@ disk_module=unspecified # Usage: usage # Print the usage. usage () { + # TRANSLATORS: INSTALL_DEVICE isn't an identifier and is the DEVICE you + # install to. gettext_printf "Usage: %s [OPTION] [INSTALL_DEVICE]" "$self" echo gettext "Install GRUB on your drive." ; echo @@ -724,6 +726,8 @@ elif [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "i386-ieee1275" ] dev="`echo $install_device | sed -e 's/\/dev\///' -e 's/[0-9]\+//'`" partno="`echo $install_device | sed -e 's/.*[^0-9]\([0-9]\+\)$/\1/'`" ofpath="`$ofpathname $dev`" || { + # TRANSLATORS: "device tree path" is the name of the device + # for IEEE1275 gettext_printf "Couldn't find IEEE1275 device tree path for %s.\nYou will have to set \`boot-device' variable manually.\n" "$dev" 1>&2 exit 1 } diff --git a/util/grub-mkimage.c b/util/grub-mkimage.c index 72b8d047d..ef3421628 100644 --- a/util/grub-mkimage.c +++ b/util/grub-mkimage.c @@ -1645,8 +1645,10 @@ static struct argp_option options[] = { N_("use images and modules under DIR [default=%s/]"), 0}, {"prefix", 'p', N_("DIR"), 0, N_("set prefix directory [default=%s]"), 0}, {"memdisk", 'm', N_("FILE"), 0, - /* TRANSLATORS: memdisk here isn't an identifier, it can be translated. */ + /* TRANSLATORS: "memdisk" here isn't an identifier, it can be translated. + "embed" is a verb (command description). "*/ N_("embed FILE as a memdisk image"), 0}, + /* TRANSLATORS: "embed" is a verb (command description). "*/ {"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}, diff --git a/util/grub-mklayout.c b/util/grub-mklayout.c index 87bfd3c62..3165fd386 100644 --- a/util/grub-mklayout.c +++ b/util/grub-mklayout.c @@ -446,6 +446,7 @@ argp_parser (int key, char *arg, struct argp_state *state) static struct argp argp = { options, argp_parser, N_("[OPTIONS]"), + /* TRANSLATORS: "one" is a shortcut for "keyboard layout". */ N_("Generate GRUB keyboard layout from Linux console one."), NULL, NULL, NULL }; diff --git a/util/grub-setup.c b/util/grub-setup.c index c2833c4a2..8e537700b 100644 --- a/util/grub-setup.c +++ b/util/grub-setup.c @@ -588,6 +588,7 @@ unable_to_embed: "setup by using blocklists. However, blocklists are UNRELIABLE and " "their use is discouraged.")); if (! force) + /* TRANSLATORS: Here GRUB refuses to continue with blocklist install. */ grub_util_error ("%s", _("will not proceed with blocklists")); /* The core image must be put on a filesystem unfortunately. */ @@ -952,6 +953,8 @@ static struct argp_option options[] = { N_("do not probe for filesystems in DEVICE"), 0}, {"verbose", 'v', 0, 0, N_("print verbose messages."), 0}, {"allow-floppy", 'a', 0, 0, + /* TRANSLATORS: The potential breakage isn't limited to floppies but it's + likely to make the install unbootable from HDD. */ N_("make the drive also bootable as floppy (default for fdX devices). May break on some BIOSes."), 0}, { 0, 0, 0, 0, 0, 0 }