From e7d2559bc1dd5a3b3b6325c1358e6b981b1c2b88 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 2 Mar 2012 15:09:10 +0100 Subject: [PATCH] * grub-core/commands/i386/pc/drivemap.c: Add TRANSLATORS comments. * grub-core/commands/lsmmap.c: Likewise. * grub-core/commands/minicmd.c: Likewise. * grub-core/commands/mips/loongson/lsspd.c: Likewise. * grub-core/commands/regexp.c: Likewise. * grub-core/gdb/gdb.c: Likewise. * grub-core/term/gfxterm.c: Likewise. * util/grub-mkconfig.in: Likewise. * util/grub-mkfont.c: Likewise. * util/grub-mklayout.c: Likewise. * util/grub-mknetdir.in: Likewise. * util/grub-mkrescue.in: Likewise. * util/grub.d/30_os-prober.in: Likewise. --- ChangeLog | 16 ++++++++++++++++ grub-core/commands/i386/pc/drivemap.c | 3 +++ grub-core/commands/lsmmap.c | 4 ++++ grub-core/commands/minicmd.c | 5 +++++ grub-core/commands/mips/loongson/lsspd.c | 3 +++ grub-core/commands/regexp.c | 8 ++++++++ grub-core/gdb/gdb.c | 7 ++++++- grub-core/term/gfxterm.c | 14 ++++++++++---- util/grub-mkconfig.in | 1 + util/grub-mkfont.c | 23 ++++++++++++++++++++--- util/grub-mklayout.c | 4 ++++ util/grub-mknetdir.in | 1 + util/grub-mkrescue.in | 9 ++++++--- util/grub.d/30_os-prober.in | 1 + 14 files changed, 88 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index f532d8053..3baee5a13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2012-03-02 Vladimir Serbinenko + + * grub-core/commands/i386/pc/drivemap.c: Add TRANSLATORS comments. + * grub-core/commands/lsmmap.c: Likewise. + * grub-core/commands/minicmd.c: Likewise. + * grub-core/commands/mips/loongson/lsspd.c: Likewise. + * grub-core/commands/regexp.c: Likewise. + * grub-core/gdb/gdb.c: Likewise. + * grub-core/term/gfxterm.c: Likewise. + * util/grub-mkconfig.in: Likewise. + * util/grub-mkfont.c: Likewise. + * util/grub-mklayout.c: Likewise. + * util/grub-mknetdir.in: Likewise. + * util/grub-mkrescue.in: Likewise. + * util/grub.d/30_os-prober.in: Likewise. + 2012-03-02 Vladimir Serbinenko * grub-core/commands/videoinfo.c (hook): Replace "Direct" diff --git a/grub-core/commands/i386/pc/drivemap.c b/grub-core/commands/i386/pc/drivemap.c index 54e08e3d2..ae0bb2fe2 100644 --- a/grub-core/commands/i386/pc/drivemap.c +++ b/grub-core/commands/i386/pc/drivemap.c @@ -185,6 +185,9 @@ list_mappings (void) return GRUB_ERR_NONE; } + /* TRANSLATORS: This is the header of mapping list. + On the left is how OS will see the disks and + on the right current GRUB vision. */ grub_puts_ (N_("OS disk #num ------> GRUB/BIOS device")); drivemap_node_t *curnode = map_head; while (curnode) diff --git a/grub-core/commands/lsmmap.c b/grub-core/commands/lsmmap.c index 260b4536d..bd32c338e 100644 --- a/grub-core/commands/lsmmap.c +++ b/grub-core/commands/lsmmap.c @@ -28,7 +28,11 @@ static const char *names[] = { [GRUB_MEMORY_AVAILABLE] = N_("available RAM"), [GRUB_MEMORY_RESERVED] = N_("reserved RAM"), + /* TRANSLATORS: this refers to memory where ACPI tables are stored + and which can be used by OS once it loads ACPI tables. */ [GRUB_MEMORY_ACPI] = N_("ACPI reclaimable RAM"), + /* TRANSLATORS: this refers to memory which ACPI-compliant OS + is required to save accross hibernations. */ [GRUB_MEMORY_NVS] = N_("ACPI non-volatile storage RAM"), [GRUB_MEMORY_BADRAM] = N_("faulty RAM (BadRAM)"), [GRUB_MEMORY_CODE] = N_("RAM holding firmware code"), diff --git a/grub-core/commands/minicmd.c b/grub-core/commands/minicmd.c index 2a258bcfe..344ea7c18 100644 --- a/grub-core/commands/minicmd.c +++ b/grub-core/commands/minicmd.c @@ -145,6 +145,11 @@ grub_mini_cmd_lsmod (struct grub_command *cmd __attribute__ ((unused)), { grub_dl_t mod; + /* TRANSLATORS: this is module list header. Name + is module name, Ref Count is a reference counter + (how many modules or open descriptors use it). + Dependencies are the other modules it uses. + */ grub_printf_ (N_("Name\tRef Count\tDependencies\n")); FOR_DL_MODULES (mod) { diff --git a/grub-core/commands/mips/loongson/lsspd.c b/grub-core/commands/mips/loongson/lsspd.c index d4870a2b2..a88ab87ac 100644 --- a/grub-core/commands/mips/loongson/lsspd.c +++ b/grub-core/commands/mips/loongson/lsspd.c @@ -49,6 +49,9 @@ grub_cmd_lsspd (grub_command_t cmd __attribute__ ((unused)), if (err) return err; + /* TRANSLATORS: System management bus is often used to access components like + RAM (info only, not data) or batteries. I/O space is where in memory + its ports are. */ grub_printf_ (N_("System management bus controller I/O space is at 0x%x\n"), smbbase); diff --git a/grub-core/commands/regexp.c b/grub-core/commands/regexp.c index b911ffd60..35844c5e1 100644 --- a/grub-core/commands/regexp.c +++ b/grub-core/commands/regexp.c @@ -32,6 +32,14 @@ GRUB_MOD_LICENSE ("GPLv3+"); static const struct grub_arg_option options[] = { { "set", 's', GRUB_ARG_OPTION_REPEATABLE, + /* TRANSLATORS: in regexp you can mark some + groups with parentheses. These groups are + then numbered and you can save some of + them in variables. In other programs + those components aree often referenced with + back slash, e.g. \1. Compare + sed -e 's,\([a-z][a-z]*\),lowercase=\1,g' + */ N_("Store matched component NUMBER in VARNAME."), N_("[NUMBER:]VARNAME"), ARG_TYPE_STRING }, { 0, 0, 0, 0, 0, 0 } diff --git a/grub-core/gdb/gdb.c b/grub-core/gdb/gdb.c index 7cc7a4134..847a1e1e3 100644 --- a/grub-core/gdb/gdb.c +++ b/grub-core/gdb/gdb.c @@ -76,7 +76,12 @@ GRUB_MOD_INIT (gdb) { grub_gdb_idtinit (); cmd = grub_register_command ("gdbstub", grub_cmd_gdbstub, - N_("PORT"), N_("Start GDB stub on given port")); + N_("PORT"), + /* TRANSLATORS: GDB stub is a small part of + GDB functionality running on local host + which allows remote debugger to + connect to it. */ + N_("Start GDB stub on given port")); cmd_break = grub_register_command ("gdbstub_break", grub_cmd_gdb_break, /* TRANSLATORS: this refers to triggering a breakpoint so that the user will land diff --git a/grub-core/term/gfxterm.c b/grub-core/term/gfxterm.c index 3b30eaeb0..96c57534f 100644 --- a/grub-core/term/gfxterm.c +++ b/grub-core/term/gfxterm.c @@ -1100,10 +1100,16 @@ grub_gfxterm_set_repaint_callback (grub_gfxterm_repaint_callback_t func) static const struct grub_arg_option background_image_cmd_options[] = { - /* TRANSLATORS: note that GRUB will accept only original keywords stretch - and normal, not the translated ones. So please put both in translation - e.g. stretch=(%STRETCH%)|normal(=%NORMAL). */ - {"mode", 'm', 0, N_("Background image mode."), N_("stretch|normal"), + {"mode", 'm', 0, N_("Background image mode."), + /* TRANSLATORS: This refers to background image mode (stretched or + in left-top conrner). Note that GRUB will accept only original + keywords stretch and normal, not the translated ones. + So please put both in translation + e.g. stretch(=%STRETCH%)|normal(=%NORMAL). Since many people + may not know the word stretch or normal I recommend + putting the translation either here or in "Background image mode." + string. */ + N_("stretch|normal"), ARG_TYPE_STRING}, {0, 0, 0, 0, 0, 0} }; diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in index b98c6f11e..51ae7472c 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -248,6 +248,7 @@ done if test "x${grub_cfg}" != "x" ; then if ! ${grub_script_check} ${grub_cfg}.new; then + # TRANSLATORS: %s is replaced by filename gettext_printf "Syntax errors are detected in generated GRUB config file. Ensure that there are no errors in /etc/default/grub and /etc/grub.d/* files or please file a bug report with diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c index b279384bb..a30260f98 100644 --- a/util/grub-mkfont.c +++ b/util/grub-mkfont.c @@ -552,6 +552,11 @@ process_cursive (struct gsub_feature *feature, subst (m); } else + /* TRANSLATORS: most font transformations apply only to + some glyphs. Those glyphs are described as "coverage". + There are 2 coverage specifications: list and range. + This warning is thrown when another coverage specification + is detected. */ printf (_("Unsupported coverage specification: %d\n"), covertype); } } @@ -961,8 +966,15 @@ write_font_pf2 (struct grub_font_info *font_info, char *output_file) static struct argp_option options[] = { {"output", 'o', N_("FILE"), 0, N_("save output in FILE [required]"), 0}, {"ascii-bitmaps", 0x102, 0, 0, N_("save only the ASCII bitmaps"), 0}, - {"width-spec", 0x103, 0, 0, N_("create width summary file"), 0}, - {"index", 'i', N_("NUM"), 0, N_("set face index"), 0}, + {"width-spec", 0x103, 0, 0, + /* TRANSLATORS: this refers to creating a file containing the width of + every glyph but not the glyphs themselves. */ + N_("create width summary file"), 0}, + {"index", 'i', N_("NUM"), 0, + /* TRANSLATORS: some font files may have multiple faces (fonts). + This option is used to chose among them, the first face being '0'. + Rarely used. */ + N_("set face index"), 0}, {"range", 'r', N_("FROM-TO[,FROM-TO]"), 0, N_("set font range"), 0}, {"name", 'n', N_("NAME"), 0, N_("set font family name"), 0}, {"size", 's', N_("SIZE"), 0, N_("set font size"), 0}, @@ -971,7 +983,12 @@ static struct argp_option options[] = { {"bold", 'b', 0, 0, N_("convert to bold font"), 0}, {"force-autohint", 'a', 0, 0, N_("force autohint"), 0}, {"no-hinting", 0x101, 0, 0, N_("disable hinting"), 0}, - {"no-bitmap", 0x100, 0, 0, N_("ignore bitmap strikes when loading"), 0}, + {"no-bitmap", 0x100, 0, 0, + /* TRANSLATORS: some fonts contain bitmap rendering for + some sizes. This option forces rerendering even if + pre-rendered bitmap is available. + */ + N_("ignore bitmap strikes when loading"), 0}, {"verbose", 'v', 0, 0, N_("print verbose messages."), 0}, { 0, 0, 0, 0, 0, 0 } }; diff --git a/util/grub-mklayout.c b/util/grub-mklayout.c index 74e08a160..87bfd3c62 100644 --- a/util/grub-mklayout.c +++ b/util/grub-mklayout.c @@ -289,6 +289,7 @@ lookup (char *code, int shift) if (strcmp (code, console_grub_equivalences_common[i].layout) == 0) return console_grub_equivalences_common[i].grub; + /* TRANSLATORS: scan identifier is keyboard key symbolic name. */ fprintf (stderr, _("Unknown keyboard scan identifier %s\n"), code); return '\0'; @@ -385,6 +386,7 @@ write_keymaps (FILE *in, FILE *out) if (keycode_usb == 0 || keycode_usb >= GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE) { + /* TRANSLATORS: scan code is keyboard key numeric identifier. */ fprintf (stderr, _("Unknown keyboard scan code 0x%02x\n"), keycode_linux); continue; } @@ -403,6 +405,8 @@ write_keymaps (FILE *in, FILE *out) if (ok == 0) { + /* TRANSLATORS: this error is triggered when input doesn't contain any + key descriptions. */ fprintf (stderr, "%s", _("ERROR: no valid keyboard layout found. Check the input.\n")); exit (1); } diff --git a/util/grub-mknetdir.in b/util/grub-mknetdir.in index c9cf4cb3c..635617d8d 100644 --- a/util/grub-mknetdir.in +++ b/util/grub-mknetdir.in @@ -228,6 +228,7 @@ source ${subdir}/grub.cfg EOF "$grub_mkimage" ${config_opt} -d "${input_dir}" -O ${mkimage_target} "--output=${grubdir}/core.$ext" "--prefix=$prefix" $modules $netmodules tftp || exit 1 + # TRANSLATORS: First %s is replaced by platform name. Second one by filename. gettext_printf "Netboot directory for %s created. Configure your DHCP server to point to %s\n" "${platform}" "${subdir}/${platform}/core.$ext" } diff --git a/util/grub-mkrescue.in b/util/grub-mkrescue.in index a218379a0..1cd253284 100644 --- a/util/grub-mkrescue.in +++ b/util/grub-mkrescue.in @@ -58,15 +58,18 @@ export TEXTDOMAINDIR="@localedir@" # Print the usage. usage () { gettext_printf "Usage: %s [OPTION] SOURCE...\n" "$self" + # TRANSLATORS: it generates one single image which is bootable through any method. gettext "Make GRUB CD-ROM, disk, pendrive and floppy bootable image."; echo echo + filetrans="$(gettext FILE)" 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]")" + printf " -o, --output=%-11s%s\n" "$filetrans" "$(gettext "save output in FILE [required]")" printf " --modules=%-14s%s\n" "$(gettext "MODULES")" "$(gettext "pre-load specified modules MODULES")" printf " --rom-directory=%-8s%s\n" "$(gettext "DIR")" "$(gettext "save rom images in DIR [optional]")" - printf " --xorriso=%-14s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as xorriso [optional]")" - printf " --grub-mkimage=%-9s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as grub-mkimage")" + # TRANSLATORS: xorriso is a program for creating ISOs and burning CDs + printf " --xorriso=%-14s%s\n" "$filetrans" "$(gettext "use FILE as xorriso [optional]")" + printf " --grub-mkimage=%-9s%s\n" "$filetrans" "$(gettext "use FILE as grub-mkimage")" echo gettext_printf "%s generates a bootable rescue image with specified source files, source directories, or mkisofs options listed by the output of \`%s'\n" "xorriso -as mkisofs -help" "$self" echo diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in index 707423154..4be888866 100644 --- a/util/grub.d/30_os-prober.in +++ b/util/grub.d/30_os-prober.in @@ -217,6 +217,7 @@ EOF ;; *) echo -n " " + # TRANSLATORS: %s is replaced by OS name. gettext_printf "%s is not yet supported by grub-mkconfig.\n" "${LONGNAME}" >&2 ;; esac