From 77a795923bd2fdde4b27233c0d7a918d46ce68ed Mon Sep 17 00:00:00 2001 From: carles Date: Sun, 3 Jan 2010 19:24:22 +0100 Subject: [PATCH] 2010-01-03 Carles Pina i Estany * commands/acpi.c: Gettextizze help strings and/or options. Include `grub/i18n.h' if needed. * commands/blocklist.c: Likewise. * commands/boot.c: Likewise. * commands/cat.c: Likewise. * commands/cmp.c: Likewise. * commands/configfile.c: Likewise. * commands/crc.c: Likewise. * commands/date.c: Likewise. * commands/echo.c: Likewise. * commands/efi/fixvideo.c: Likewise. * commands/efi/loadbios.c: Likewise. * commands/gptsync.c: Likewise. * commands/halt.c: Likewise. * commands/handler.c: Likewise. * commands/hdparm.c: Likewise. * commands/hexdump.c: Likewise. * commands/i386/cpuid.c: Likewise. * commands/i386/pc/drivemap.c: Likewise. * commands/i386/pc/halt.c: Likewise. * commands/i386/pc/pxecmd.c: Likewise. * commands/i386/pc/vbeinfo.c: Likewise. * commands/i386/pc/vbetest.c: Likewise. * commands/ieee1275/suspend.c: Likewise. * commands/keystatus.c: Likewise. * commands/loadenv.c: Likewise. * commands/ls.c: Likewise. * commands/lsmmap.c: Likewise. * commands/lspci.c: Likewise. * commands/memrw.c: Likewise. * commands/minicmd.c: Likewise. * commands/parttool.c: Likewise. * commands/password.c: Likewise. * commands/probe.c: Likewise. * commands/read.c: Likewise. * commands/reboot.c: Likewise. * commands/search.c: Likewise. * commands/sleep.c: Likewise. * commands/test.c: Likewise. * commands/true.c: Likewise. * commands/usbtest.c: Likewise. * commands/videotest.c: Likewise. * commands/xnu_uuid.c: Likewise. * disk/loopback.c: Likewise. * hello/hello.c: Likewise. * loader/i386/bsd.c: Likewise. * term/i386/pc/serial.c: Likewise. * po/POTFILES: Add new files. --- ChangeLog | 51 ++++++++++++++++++++++++++ commands/acpi.c | 31 ++++++++-------- commands/blocklist.c | 3 +- commands/boot.c | 3 +- commands/cat.c | 3 +- commands/cmp.c | 3 +- commands/configfile.c | 11 +++--- commands/crc.c | 5 ++- commands/date.c | 5 ++- commands/echo.c | 7 ++-- commands/efi/fixvideo.c | 3 +- commands/efi/loadbios.c | 5 ++- commands/gptsync.c | 7 ++-- commands/halt.c | 5 ++- commands/handler.c | 13 ++++--- commands/hdparm.c | 35 +++++++++--------- commands/hexdump.c | 9 +++-- commands/i386/cpuid.c | 5 ++- commands/i386/pc/drivemap.c | 11 +++--- commands/i386/pc/halt.c | 5 ++- commands/i386/pc/pxecmd.c | 3 +- commands/i386/pc/vbeinfo.c | 3 +- commands/i386/pc/vbetest.c | 3 +- commands/ieee1275/suspend.c | 3 +- commands/keystatus.c | 11 +++--- commands/loadenv.c | 3 +- commands/ls.c | 11 +++--- commands/lsmmap.c | 3 +- commands/lspci.c | 3 +- commands/memrw.c | 15 ++++---- commands/minicmd.c | 17 +++++---- commands/parttool.c | 3 +- commands/password.c | 7 ++-- commands/probe.c | 17 +++++---- commands/read.c | 5 ++- commands/reboot.c | 3 +- commands/search.c | 2 +- commands/sleep.c | 9 +++-- commands/test.c | 5 ++- commands/true.c | 5 ++- commands/usbtest.c | 3 +- commands/videotest.c | 3 +- commands/xnu_uuid.c | 7 ++-- disk/loopback.c | 9 +++-- hello/hello.c | 3 +- loader/i386/bsd.c | 73 +++++++++++++++++++------------------ po/POTFILES | 55 ++++++++++++++++++++++++++-- term/i386/pc/serial.c | 17 +++++---- 48 files changed, 333 insertions(+), 188 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3b7ccab32..7da0c929e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,54 @@ +2010-01-03 Carles Pina i Estany + + * commands/acpi.c: Gettextizze help strings and/or options. Include + `grub/i18n.h' if needed. + * commands/blocklist.c: Likewise. + * commands/boot.c: Likewise. + * commands/cat.c: Likewise. + * commands/cmp.c: Likewise. + * commands/configfile.c: Likewise. + * commands/crc.c: Likewise. + * commands/date.c: Likewise. + * commands/echo.c: Likewise. + * commands/efi/fixvideo.c: Likewise. + * commands/efi/loadbios.c: Likewise. + * commands/gptsync.c: Likewise. + * commands/halt.c: Likewise. + * commands/handler.c: Likewise. + * commands/hdparm.c: Likewise. + * commands/hexdump.c: Likewise. + * commands/i386/cpuid.c: Likewise. + * commands/i386/pc/drivemap.c: Likewise. + * commands/i386/pc/halt.c: Likewise. + * commands/i386/pc/pxecmd.c: Likewise. + * commands/i386/pc/vbeinfo.c: Likewise. + * commands/i386/pc/vbetest.c: Likewise. + * commands/ieee1275/suspend.c: Likewise. + * commands/keystatus.c: Likewise. + * commands/loadenv.c: Likewise. + * commands/ls.c: Likewise. + * commands/lsmmap.c: Likewise. + * commands/lspci.c: Likewise. + * commands/memrw.c: Likewise. + * commands/minicmd.c: Likewise. + * commands/parttool.c: Likewise. + * commands/password.c: Likewise. + * commands/probe.c: Likewise. + * commands/read.c: Likewise. + * commands/reboot.c: Likewise. + * commands/search.c: Likewise. + * commands/sleep.c: Likewise. + * commands/test.c: Likewise. + * commands/true.c: Likewise. + * commands/usbtest.c: Likewise. + * commands/videotest.c: Likewise. + * commands/xnu_uuid.c: Likewise. + * disk/loopback.c: Likewise. + * hello/hello.c: Likewise. + * loader/i386/bsd.c: Likewise. + * term/i386/pc/serial.c: Likewise. + * po/POTFILES: Add new files. + 2010-01-02 Colin Watson * term/i386/pc/at_keyboard.c diff --git a/commands/acpi.c b/commands/acpi.c index ce4e2db36..4d54539fd 100644 --- a/commands/acpi.c +++ b/commands/acpi.c @@ -28,6 +28,7 @@ #include #include #include +#include #ifdef GRUB_MACHINE_EFI #include @@ -36,23 +37,23 @@ static const struct grub_arg_option options[] = { {"exclude", 'x', 0, - "Don't load host tables specified by comma-separated list.", + N_("Don't load host tables specified by comma-separated list."), 0, ARG_TYPE_STRING}, {"load-only", 'n', 0, - "Load only tables specified by comma-separated list.", 0, ARG_TYPE_STRING}, - {"v1", '1', 0, "Expose v1 tables.", 0, ARG_TYPE_NONE}, - {"v2", '2', 0, "Expose v2 and v3 tables.", 0, ARG_TYPE_NONE}, - {"oemid", 'o', 0, "Set OEMID of RSDP, XSDT and RSDT.", 0, ARG_TYPE_STRING}, + N_("Load only tables specified by comma-separated list."), 0, ARG_TYPE_STRING}, + {"v1", '1', 0, N_("Expose v1 tables."), 0, ARG_TYPE_NONE}, + {"v2", '2', 0, N_("Expose v2 and v3 tables."), 0, ARG_TYPE_NONE}, + {"oemid", 'o', 0, N_("Set OEMID of RSDP, XSDT and RSDT."), 0, ARG_TYPE_STRING}, {"oemtable", 't', 0, - "Set OEMTABLE ID of RSDP, XSDT and RSDT.", 0, ARG_TYPE_STRING}, + N_("Set OEMTABLE ID of RSDP, XSDT and RSDT."), 0, ARG_TYPE_STRING}, {"oemtablerev", 'r', 0, - "Set OEMTABLE revision of RSDP, XSDT and RSDT.", 0, ARG_TYPE_INT}, + N_("Set OEMTABLE revision of RSDP, XSDT and RSDT."), 0, ARG_TYPE_INT}, {"oemtablecreator", 'c', 0, - "Set creator field of RSDP, XSDT and RSDT.", 0, ARG_TYPE_STRING}, + N_("Set creator field of RSDP, XSDT and RSDT."), 0, ARG_TYPE_STRING}, {"oemtablecreatorrev", 'd', 0, - "Set creator revision of RSDP, XSDT and RSDT.", 0, ARG_TYPE_INT}, - {"no-ebda", 'e', 0, "Don't update EBDA. May fix failures or hangs on some." - " BIOSes but makes it ineffective with OS not receiving RSDP from GRUB.", + N_("Set creator revision of RSDP, XSDT and RSDT."), 0, ARG_TYPE_INT}, + {"no-ebda", 'e', 0, N_("Don't update EBDA. May fix failures or hangs on some." + " BIOSes but makes it ineffective with OS not receiving RSDP from GRUB."), 0, ARG_TYPE_NONE}, {0, 0, 0, 0, 0, 0} }; @@ -759,11 +760,11 @@ GRUB_MOD_INIT(acpi) { cmd = grub_register_extcmd ("acpi", grub_cmd_acpi, GRUB_COMMAND_FLAG_BOTH, - "[-1|-2] [--exclude=table1,table2|" + N_("[-1|-2] [--exclude=table1,table2|" "--load-only=table1,table2] filename1 " - " [filename2] [...]", - "Load host acpi tables and tables " - "specified by arguments.", + " [filename2] [...]"), + N_("Load host acpi tables and tables " + "specified by arguments."), options); } diff --git a/commands/blocklist.c b/commands/blocklist.c index 3c9ef3a58..fec59a828 100644 --- a/commands/blocklist.c +++ b/commands/blocklist.c @@ -24,6 +24,7 @@ #include #include #include +#include static grub_err_t grub_cmd_blocklist (grub_command_t cmd __attribute__ ((unused)), @@ -110,7 +111,7 @@ static grub_command_t cmd; GRUB_MOD_INIT(blocklist) { cmd = grub_register_command ("blocklist", grub_cmd_blocklist, - "FILE", "Print a block list."); + N_("FILE"), N_("Print a block list.")); } GRUB_MOD_FINI(blocklist) diff --git a/commands/boot.c b/commands/boot.c index fe0453b8a..1ec1e6f77 100644 --- a/commands/boot.c +++ b/commands/boot.c @@ -23,6 +23,7 @@ #include #include #include +#include static grub_err_t (*grub_loader_boot_func) (void); static grub_err_t (*grub_loader_unload_func) (void); @@ -186,7 +187,7 @@ GRUB_MOD_INIT(boot) { cmd_boot = grub_register_command ("boot", grub_cmd_boot, - 0, "Boot an operating system."); + 0, N_("Boot an operating system.")); } GRUB_MOD_FINI(boot) diff --git a/commands/cat.c b/commands/cat.c index 9d0373b3a..844034777 100644 --- a/commands/cat.c +++ b/commands/cat.c @@ -24,6 +24,7 @@ #include #include #include +#include static grub_err_t grub_cmd_cat (grub_command_t cmd __attribute__ ((unused)), @@ -78,7 +79,7 @@ static grub_command_t cmd; GRUB_MOD_INIT(cat) { cmd = grub_register_command_p1 ("cat", grub_cmd_cat, - "FILE", "Show the contents of a file."); + N_("FILE"), N_("Show the contents of a file.")); } GRUB_MOD_FINI(cat) diff --git a/commands/cmp.c b/commands/cmp.c index bdd8ff82d..8fd939640 100644 --- a/commands/cmp.c +++ b/commands/cmp.c @@ -23,6 +23,7 @@ #include #include #include +#include #define BUFFER_SIZE 512 @@ -109,7 +110,7 @@ static grub_command_t cmd; GRUB_MOD_INIT(cmp) { cmd = grub_register_command ("cmp", grub_cmd_cmp, - "FILE1 FILE2", "Compare two files."); + N_("FILE1 FILE2"), N_("Compare two files.")); } GRUB_MOD_FINI(cmp) diff --git a/commands/configfile.c b/commands/configfile.c index d1fe9169e..469447711 100644 --- a/commands/configfile.c +++ b/commands/configfile.c @@ -22,6 +22,7 @@ #include #include #include +#include static grub_err_t grub_cmd_source (grub_command_t cmd, int argc, char **args) @@ -53,16 +54,16 @@ GRUB_MOD_INIT(configfile) { cmd_configfile = grub_register_command ("configfile", grub_cmd_source, - "FILE", "Load another config file."); + N_("FILE"), N_("Load another config file.")); cmd_source = grub_register_command ("source", grub_cmd_source, - "FILE", - "Load another config file without changing context." + N_("FILE"), + N_("Load another config file without changing context.") ); cmd_dot = grub_register_command (".", grub_cmd_source, - "FILE", - "Load another config file without changing context." + N_("FILE"), + N_("Load another config file without changing context.") ); } diff --git a/commands/crc.c b/commands/crc.c index a6c17caf0..dff9fd55c 100644 --- a/commands/crc.c +++ b/commands/crc.c @@ -23,6 +23,7 @@ #include #include #include +#include static grub_err_t grub_cmd_crc (grub_command_t cmd __attribute__ ((unused)), @@ -57,8 +58,8 @@ static grub_command_t cmd; GRUB_MOD_INIT(crc) { cmd = grub_register_command ("crc", grub_cmd_crc, - "FILE", - "Calculate the crc32 checksum of a file."); + N_("FILE"), + N_("Calculate the crc32 checksum of a file.")); } GRUB_MOD_FINI(crc) diff --git a/commands/date.c b/commands/date.c index 7197b066e..623db4943 100644 --- a/commands/date.c +++ b/commands/date.c @@ -22,6 +22,7 @@ #include #include #include +#include #define GRUB_DATETIME_SET_YEAR 1 #define GRUB_DATETIME_SET_MONTH 2 @@ -135,8 +136,8 @@ GRUB_MOD_INIT(date) { cmd = grub_register_command ("date", grub_cmd_date, - "[[year-]month-day] [hour:minute[:second]]", - "Command to display/set current datetime."); + N_("[[year-]month-day] [hour:minute[:second]]"), + N_("Command to display/set current datetime.")); } GRUB_MOD_FINI(date) diff --git a/commands/echo.c b/commands/echo.c index 4d5a59df3..4fea091cb 100644 --- a/commands/echo.c +++ b/commands/echo.c @@ -20,11 +20,12 @@ #include #include #include +#include static const struct grub_arg_option options[] = { - {0, 'n', 0, "Do not output the trailing newline.", 0, 0}, - {0, 'e', 0, "Enable interpretation of backslash escapes.", 0, 0}, + {0, 'n', 0, N_("Do not output the trailing newline."), 0, 0}, + {0, 'e', 0, N_("Enable interpretation of backslash escapes."), 0, 0}, {0, 0, 0, 0, 0, 0} }; @@ -113,7 +114,7 @@ static grub_extcmd_t cmd; GRUB_MOD_INIT(echo) { cmd = grub_register_extcmd ("echo", grub_cmd_echo, GRUB_COMMAND_FLAG_BOTH, - "[-e|-n] STRING", "Display a line of text.", + N_("[-e|-n] STRING"), N_("Display a line of text."), options); } diff --git a/commands/efi/fixvideo.c b/commands/efi/fixvideo.c index 685662237..0f821b7a2 100644 --- a/commands/efi/fixvideo.c +++ b/commands/efi/fixvideo.c @@ -22,6 +22,7 @@ #include #include #include +#include static struct grub_video_patch { @@ -99,7 +100,7 @@ static grub_command_t cmd_fixvideo; GRUB_MOD_INIT(fixvideo) { cmd_fixvideo = grub_register_command ("fix_video", grub_cmd_fixvideo, - 0, "Fix video problem."); + 0, N_("Fix video problem.")); } diff --git a/commands/efi/loadbios.c b/commands/efi/loadbios.c index de975c724..0f0d7bc10 100644 --- a/commands/efi/loadbios.c +++ b/commands/efi/loadbios.c @@ -23,6 +23,7 @@ #include #include #include +#include static grub_efi_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID; static grub_efi_guid_t acpi2_guid = GRUB_EFI_ACPI_20_TABLE_GUID; @@ -201,11 +202,11 @@ static grub_command_t cmd_fakebios, cmd_loadbios; GRUB_MOD_INIT(loadbios) { cmd_fakebios = grub_register_command ("fakebios", grub_cmd_fakebios, - 0, "Fake bios."); + 0, N_("Fake bios.")); cmd_loadbios = grub_register_command ("loadbios", grub_cmd_loadbios, "BIOS_DUMP [INT10_DUMP]", - "Load bios dump."); + N_("Load bios dump.")); } GRUB_MOD_FINI(loadbios) diff --git a/commands/gptsync.c b/commands/gptsync.c index b5fe0b8ed..d217b5d5c 100644 --- a/commands/gptsync.c +++ b/commands/gptsync.c @@ -27,6 +27,7 @@ #include #include #include +#include /* Convert a LBA address to a CHS address in the INT 13 format. */ /* Taken from grub1. */ @@ -240,13 +241,13 @@ GRUB_MOD_INIT(gptsync) { (void) mod; /* To stop warning. */ cmd = grub_register_command ("gptsync", grub_cmd_gptsync, - "DEVICE [PARTITION[+/-[TYPE]]] ...", - "Fill hybrid MBR of GPT drive DEVICE. " + N_("DEVICE [PARTITION[+/-[TYPE]]] ..."), + N_("Fill hybrid MBR of GPT drive DEVICE. " "specified partitions will be a part " "of hybrid mbr. Up to 3 partitions are " "allowed. TYPE is an MBR type. " "+ means that partition is active. " - "Only one partition can be active."); + "Only one partition can be active.")); } GRUB_MOD_FINI(gptsync) diff --git a/commands/halt.c b/commands/halt.c index 09431d3cb..3400115a0 100644 --- a/commands/halt.c +++ b/commands/halt.c @@ -20,6 +20,7 @@ #include #include #include +#include static grub_err_t grub_cmd_halt (grub_command_t cmd __attribute__ ((unused)), @@ -35,8 +36,8 @@ static grub_command_t cmd; GRUB_MOD_INIT(halt) { cmd = grub_register_command ("halt", grub_cmd_halt, - 0, "Halts the computer. This command does not" - " work on all firmware implementations."); + 0, N_("Halts the computer. This command does" + " not work on all firmware implementations.")); } GRUB_MOD_FINI(halt) diff --git a/commands/handler.c b/commands/handler.c index 09b8ff5d0..7316db304 100644 --- a/commands/handler.c +++ b/commands/handler.c @@ -23,6 +23,7 @@ #include #include #include +#include static grub_err_t grub_cmd_handler (struct grub_command *cmd, @@ -95,16 +96,16 @@ GRUB_MOD_INIT(handler) { cmd_handler = grub_register_command ("handler", grub_cmd_handler, - "[class [handler]]", - "List or select a handler."); + N_("[class [handler]]"), + N_("List or select a handler.")); cmd_terminal_input = grub_register_command ("terminal_input", grub_cmd_handler, - "[handler]", - "List or select an input terminal."); + N_("[handler]"), + N_("List or select an input terminal.")); cmd_terminal_output = grub_register_command ("terminal_output", grub_cmd_handler, - "[handler]", - "List or select an output terminal."); + N_("[handler]"), + N_("List or select an output terminal.")); } GRUB_MOD_FINI(handler) diff --git a/commands/hdparm.c b/commands/hdparm.c index fbcd7f6a8..a3f8bbff0 100644 --- a/commands/hdparm.c +++ b/commands/hdparm.c @@ -24,29 +24,30 @@ #include #include #include +#include static const struct grub_arg_option options[] = { - {"apm", 'B', 0, "Set Advanced Power Management\n" - "(1=low, ..., 254=high, 255=off).", + {"apm", 'B', 0, N_("Set Advanced Power Management\n" + "(1=low, ..., 254=high, 255=off)."), 0, ARG_TYPE_INT}, - {"power", 'C', 0, "Check power mode.", 0, ARG_TYPE_NONE}, - {"security-freeze", 'F', 0, "Freeze ATA security settings until reset.", + {"power", 'C', 0, N_("Check power mode."), 0, ARG_TYPE_NONE}, + {"security-freeze", 'F', 0, N_("Freeze ATA security settings until reset."), 0, ARG_TYPE_NONE}, - {"health", 'H', 0, "Check SMART health status.", 0, ARG_TYPE_NONE}, - {"aam", 'M', 0, "Set Automatic Acoustic Management\n" - "(0=off, 128=quiet, ..., 254=fast).", + {"health", 'H', 0, N_("Check SMART health status."), 0, ARG_TYPE_NONE}, + {"aam", 'M', 0, N_("Set Automatic Acoustic Management\n" + "(0=off, 128=quiet, ..., 254=fast)."), 0, ARG_TYPE_INT}, - {"standby-timeout", 'S', 0, "Set standby timeout\n" - "(0=off, 1=5s, 2=10s, ..., 240=20m, 241=30m, ...).", + {"standby-timeout", 'S', 0, N_("Set standby timeout\n" + "(0=off, 1=5s, 2=10s, ..., 240=20m, 241=30m, ...)."), 0, ARG_TYPE_INT}, - {"standby", 'y', 0, "Set drive to standby mode.", 0, ARG_TYPE_NONE}, - {"sleep", 'Y', 0, "Set drive to sleep mode.", 0, ARG_TYPE_NONE}, - {"identify", 'i', 0, "Print drive identity and settings.", + {"standby", 'y', 0, N_("Set drive to standby mode."), 0, ARG_TYPE_NONE}, + {"sleep", 'Y', 0, N_("Set drive to sleep mode."), 0, ARG_TYPE_NONE}, + {"identify", 'i', 0, N_("Print drive identity and settings."), 0, ARG_TYPE_NONE}, - {"dumpid", 'I', 0, "Dump contents of ATA IDENTIFY sector.", + {"dumpid", 'I', 0, N_("Dump contents of ATA IDENTIFY sector."), 0, ARG_TYPE_NONE}, - {"smart", -1, 0, "Disable/enable SMART (0/1).", 0, ARG_TYPE_INT}, - {"quiet", 'q', 0, "Do not print messages.", 0, ARG_TYPE_NONE}, + {"smart", -1, 0, N_("Disable/enable SMART (0/1)."), 0, ARG_TYPE_INT}, + {"quiet", 'q', 0, N_("Do not print messages."), 0, ARG_TYPE_NONE}, {0, 0, 0, 0, 0, 0} }; @@ -410,8 +411,8 @@ GRUB_MOD_INIT(hdparm) { cmd = grub_register_extcmd ("hdparm", grub_cmd_hdparm, GRUB_COMMAND_FLAG_BOTH, - "[OPTIONS] DISK", - "Get/set ATA disk parameters.", options); + N_("[OPTIONS] DISK"), + N_("Get/set ATA disk parameters."), options); } GRUB_MOD_FINI(hdparm) diff --git a/commands/hexdump.c b/commands/hexdump.c index 771cde34d..5bdbb1f76 100644 --- a/commands/hexdump.c +++ b/commands/hexdump.c @@ -24,11 +24,12 @@ #include #include #include +#include static const struct grub_arg_option options[] = { - {"skip", 's', 0, "Skip offset bytes from the beginning of file.", 0, + {"skip", 's', 0, N_("Skip offset bytes from the beginning of file."), 0, ARG_TYPE_INT}, - {"length", 'n', 0, "Read only LENGTH bytes.", 0, ARG_TYPE_INT}, + {"length", 'n', 0, N_("Read only LENGTH bytes."), 0, ARG_TYPE_INT}, {0, 0, 0, 0, 0, 0} }; @@ -121,8 +122,8 @@ GRUB_MOD_INIT (hexdump) { cmd = grub_register_extcmd ("hexdump", grub_cmd_hexdump, GRUB_COMMAND_FLAG_BOTH, - "[OPTIONS] FILE_OR_DEVICE", - "Dump the contents of a file or memory.", + N_("[OPTIONS] FILE_OR_DEVICE"), + N_("Dump the contents of a file or memory."), options); } diff --git a/commands/i386/cpuid.c b/commands/i386/cpuid.c index b1752ca89..6eebf91a1 100644 --- a/commands/i386/cpuid.c +++ b/commands/i386/cpuid.c @@ -25,6 +25,7 @@ #include #include #include +#include #define cpuid(num,a,b,c,d) \ asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" \ @@ -33,7 +34,7 @@ static const struct grub_arg_option options[] = { - {"long-mode", 'l', 0, "Check for long mode flag (default).", 0, 0}, + {"long-mode", 'l', 0, N_("Check for long mode flag (default)."), 0, 0}, {0, 0, 0, 0, 0, 0} }; @@ -88,7 +89,7 @@ done: #endif cmd = grub_register_extcmd ("cpuid", grub_cmd_cpuid, GRUB_COMMAND_FLAG_BOTH, - "[-l]", "Check for CPU features.", options); + "[-l]", N_("Check for CPU features."), options); } GRUB_MOD_FINI(cpuid) diff --git a/commands/i386/pc/drivemap.c b/commands/i386/pc/drivemap.c index adef57576..3d1dcf614 100644 --- a/commands/i386/pc/drivemap.c +++ b/commands/i386/pc/drivemap.c @@ -26,6 +26,7 @@ #include #include #include +#include /* Real mode IVT slot (seg:off far pointer) for interrupt 0x13. */ @@ -33,9 +34,9 @@ static grub_uint32_t *const int13slot = UINT_TO_PTR (4 * 0x13); /* Remember to update enum opt_idxs accordingly. */ static const struct grub_arg_option options[] = { - {"list", 'l', 0, "Show the current mappings.", 0, 0}, - {"reset", 'r', 0, "Reset all mappings to the default values.", 0, 0}, - {"swap", 's', 0, "Perform both direct and reverse mappings.", 0, 0}, + {"list", 'l', 0, N_("Show the current mappings."), 0, 0}, + {"reset", 'r', 0, N_("Reset all mappings to the default values."), 0, 0}, + {"swap", 's', 0, N_("Perform both direct and reverse mappings."), 0, 0}, {0, 0, 0, 0, 0, 0} }; @@ -403,8 +404,8 @@ GRUB_MOD_INIT (drivemap) cmd = grub_register_extcmd ("drivemap", grub_cmd_drivemap, GRUB_COMMAND_FLAG_BOTH, "drivemap" - " -l | -r | [-s] grubdev osdisk", - "Manage the BIOS drive mappings.", + N_(" -l | -r | [-s] grubdev osdisk"), + N_("Manage the BIOS drive mappings."), options); drivemap_hook = grub_loader_register_preboot_hook (&install_int13_handler, diff --git a/commands/i386/pc/halt.c b/commands/i386/pc/halt.c index c2e22882f..73c3a2e11 100644 --- a/commands/i386/pc/halt.c +++ b/commands/i386/pc/halt.c @@ -20,10 +20,11 @@ #include #include #include +#include static const struct grub_arg_option options[] = { - {"no-apm", 'n', 0, "Do not use APM to halt the computer.", 0, 0}, + {"no-apm", 'n', 0, N_("Do not use APM to halt the computer."), 0, 0}, {0, 0, 0, 0, 0, 0} }; @@ -47,7 +48,7 @@ GRUB_MOD_INIT(halt) { cmd = grub_register_extcmd ("halt", grub_cmd_halt, GRUB_COMMAND_FLAG_BOTH, "[-n]", - "Halt the system, if possible using APM.", + N_("Halt the system, if possible using APM."), options); } diff --git a/commands/i386/pc/pxecmd.c b/commands/i386/pc/pxecmd.c index 1d4fb6a4d..b576a8ea4 100644 --- a/commands/i386/pc/pxecmd.c +++ b/commands/i386/pc/pxecmd.c @@ -22,6 +22,7 @@ #include #include #include +#include static grub_err_t grub_cmd_pxe_unload (grub_command_t cmd __attribute__ ((unused)), @@ -42,7 +43,7 @@ GRUB_MOD_INIT(pxecmd) { cmd = grub_register_command ("pxe_unload", grub_cmd_pxe_unload, 0, - "Unload PXE environment."); + N_("Unload PXE environment.")); } GRUB_MOD_FINI(pxecmd) diff --git a/commands/i386/pc/vbeinfo.c b/commands/i386/pc/vbeinfo.c index ee9f3c186..14f03846e 100644 --- a/commands/i386/pc/vbeinfo.c +++ b/commands/i386/pc/vbeinfo.c @@ -24,6 +24,7 @@ #include #include #include +#include static void * real2pm (grub_vbe_farptr_t ptr) @@ -175,7 +176,7 @@ GRUB_MOD_INIT(vbeinfo) { cmd = grub_register_command ("vbeinfo", grub_cmd_vbeinfo, 0, - "List compatible VESA BIOS extension video modes."); + N_("List compatible VESA BIOS extension video modes.")); } GRUB_MOD_FINI(vbeinfo) diff --git a/commands/i386/pc/vbetest.c b/commands/i386/pc/vbetest.c index 4050c869e..d97323087 100644 --- a/commands/i386/pc/vbetest.c +++ b/commands/i386/pc/vbetest.c @@ -25,6 +25,7 @@ #include #include #include +#include static grub_err_t grub_cmd_vbetest (grub_command_t cmd __attribute__ ((unused)), @@ -168,7 +169,7 @@ static grub_command_t cmd; GRUB_MOD_INIT(vbetest) { cmd = grub_register_command ("vbetest", grub_cmd_vbetest, - 0, "Test VESA BIOS Extension 2.0+ support."); + 0, N_("Test VESA BIOS Extension 2.0+ support.")); } GRUB_MOD_FINI(vbetest) diff --git a/commands/ieee1275/suspend.c b/commands/ieee1275/suspend.c index fd538f8ea..f096cc9ba 100644 --- a/commands/ieee1275/suspend.c +++ b/commands/ieee1275/suspend.c @@ -22,6 +22,7 @@ #include #include #include +#include static grub_err_t grub_cmd_suspend (grub_command_t cmd __attribute__ ((unused)), @@ -39,7 +40,7 @@ static grub_command_t cmd; GRUB_MOD_INIT(ieee1275_suspend) { cmd = grub_register_command ("suspend", grub_cmd_suspend, - 0, "Return to Open Firmware prompt."); + 0, N_("Return to Open Firmware prompt.")); } GRUB_MOD_FINI(ieee1275_suspend) diff --git a/commands/keystatus.c b/commands/keystatus.c index 4f82550be..a0a429284 100644 --- a/commands/keystatus.c +++ b/commands/keystatus.c @@ -21,12 +21,13 @@ #include #include #include +#include static const struct grub_arg_option options[] = { - {"shift", 's', 0, "Check Shift key.", 0, 0}, - {"ctrl", 'c', 0, "Check Control key.", 0, 0}, - {"alt", 'a', 0, "Check Alt key.", 0, 0}, + {"shift", 's', 0, N_("Check Shift key."), 0, 0}, + {"ctrl", 'c', 0, N_("Check Control key."), 0, 0}, + {"alt", 'a', 0, N_("Check Alt key."), 0, 0}, {0, 0, 0, 0, 0, 0} }; @@ -70,8 +71,8 @@ GRUB_MOD_INIT(keystatus) { cmd = grub_register_extcmd ("keystatus", grub_cmd_keystatus, GRUB_COMMAND_FLAG_BOTH, - "[--shift] [--ctrl] [--alt]", - "Check key modifier status.", + N_("[--shift] [--ctrl] [--alt]"), + N_("Check key modifier status."), options); } diff --git a/commands/loadenv.c b/commands/loadenv.c index 6ee4d204a..6f8714411 100644 --- a/commands/loadenv.c +++ b/commands/loadenv.c @@ -26,10 +26,11 @@ #include #include #include +#include static const struct grub_arg_option options[] = { - {"file", 'f', 0, "Specify filename.", 0, ARG_TYPE_PATHNAME}, + {"file", 'f', 0, N_("Specify filename."), 0, ARG_TYPE_PATHNAME}, {0, 0, 0, 0, 0, 0} }; diff --git a/commands/ls.c b/commands/ls.c index 4b1500398..9afca7907 100644 --- a/commands/ls.c +++ b/commands/ls.c @@ -30,12 +30,13 @@ #include #include #include +#include static const struct grub_arg_option options[] = { - {"long", 'l', 0, "Show a long list with more detailed information.", 0, 0}, - {"human-readable", 'h', 0, "Print sizes in a human readable format.", 0, 0}, - {"all", 'a', 0, "List all files.", 0, 0}, + {"long", 'l', 0, N_("Show a long list with more detailed information."), 0, 0}, + {"human-readable", 'h', 0, N_("Print sizes in a human readable format."), 0, 0}, + {"all", 'a', 0, N_("List all files."), 0, 0}, {0, 0, 0, 0, 0, 0} }; @@ -260,8 +261,8 @@ static grub_extcmd_t cmd; GRUB_MOD_INIT(ls) { cmd = grub_register_extcmd ("ls", grub_cmd_ls, GRUB_COMMAND_FLAG_BOTH, - "[-l|-h|-a] [FILE]", - "List devices and files.", options); + N_("[-l|-h|-a] [FILE]"), + N_("List devices and files."), options); } GRUB_MOD_FINI(ls) diff --git a/commands/lsmmap.c b/commands/lsmmap.c index 09f141ea0..d5eef1ce9 100644 --- a/commands/lsmmap.c +++ b/commands/lsmmap.c @@ -20,6 +20,7 @@ #include #include #include +#include static grub_err_t grub_cmd_lsmmap (grub_command_t cmd __attribute__ ((unused)), @@ -43,7 +44,7 @@ static grub_command_t cmd; GRUB_MOD_INIT(lsmmap) { cmd = grub_register_command ("lsmmap", grub_cmd_lsmmap, - 0, "List memory map provided by firmware."); + 0, N_("List memory map provided by firmware.")); } GRUB_MOD_FINI(lsmmap) diff --git a/commands/lspci.c b/commands/lspci.c index 63e60abe0..c2abd8736 100644 --- a/commands/lspci.c +++ b/commands/lspci.c @@ -21,6 +21,7 @@ #include #include #include +#include struct grub_pci_classname { @@ -218,7 +219,7 @@ static grub_extcmd_t cmd; GRUB_MOD_INIT(lspci) { cmd = grub_register_extcmd ("lspci", grub_cmd_lspci, GRUB_COMMAND_FLAG_BOTH, - "[-i]", "List PCI devices.", options); + "[-i]", N_("List PCI devices."), options); } GRUB_MOD_FINI(lspci) diff --git a/commands/memrw.c b/commands/memrw.c index 8e9c3db11..d0908a237 100644 --- a/commands/memrw.c +++ b/commands/memrw.c @@ -21,13 +21,14 @@ #include #include #include +#include static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword; static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword; static const struct grub_arg_option options[] = { - {0, 'v', 0, "Save read value into variable VARNAME.", + {0, 'v', 0, N_("Save read value into variable VARNAME."), "VARNAME", ARG_TYPE_STRING}, {0, 0, 0, 0, 0, 0} }; @@ -119,22 +120,22 @@ GRUB_MOD_INIT(memrw) { cmd_read_byte = grub_register_extcmd ("read_byte", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH, - "ADDR", "Read byte from ADDR.", options); + N_("ADDR"), N_("Read byte from ADDR."), options); cmd_read_word = grub_register_extcmd ("read_word", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH, - "ADDR", "Read word from ADDR.", options); + N_("ADDR"), N_("Read word from ADDR."), options); cmd_read_dword = grub_register_extcmd ("read_dword", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH, - "ADDR", "Read dword from ADDR.", options); + N_("ADDR"), N_("Read dword from ADDR."), options); cmd_write_byte = grub_register_command ("write_byte", grub_cmd_write, - "ADDR VALUE [MASK]", "Write byte VALUE to ADDR."); + N_("ADDR VALUE [MASK]"), N_("Write byte VALUE to ADDR.")); cmd_write_word = grub_register_command ("write_word", grub_cmd_write, - "ADDR VALUE [MASK]", "Write word VALUE to ADDR."); + N_("ADDR VALUE [MASK]"), N_("Write word VALUE to ADDR.")); cmd_write_dword = grub_register_command ("write_dword", grub_cmd_write, - "ADDR VALUE [MASK]", "Write dword VALUE to ADDR."); + N_("ADDR VALUE [MASK]"), N_("Write dword VALUE to ADDR.")); } GRUB_MOD_FINI(memrw) diff --git a/commands/minicmd.c b/commands/minicmd.c index 47b57e3ed..72e855faf 100644 --- a/commands/minicmd.c +++ b/commands/minicmd.c @@ -27,6 +27,7 @@ #include #include #include +#include /* cat FILE */ static grub_err_t @@ -354,28 +355,28 @@ GRUB_MOD_INIT(minicmd) { cmd_cat = grub_register_command ("cat", grub_mini_cmd_cat, - "FILE", "Show the contents of a file."); + N_("FILE"), N_("Show the contents of a file.")); cmd_help = grub_register_command ("help", grub_mini_cmd_help, - 0, "Show this message."); + 0, N_("Show this message.")); cmd_root = grub_register_command ("root", grub_mini_cmd_root, - "[DEVICE]", "Set the root device."); + N_("[DEVICE]"), N_("Set the root device.")); cmd_dump = grub_register_command ("dump", grub_mini_cmd_dump, - "ADDR", "Dump memory."); + N_("ADDR"), N_("Dump memory.")); cmd_rmmod = grub_register_command ("rmmod", grub_mini_cmd_rmmod, - "MODULE", "Remove a module."); + N_("MODULE"), N_("Remove a module.")); cmd_lsmod = grub_register_command ("lsmod", grub_mini_cmd_lsmod, - 0, "Show loaded modules."); + 0, N_("Show loaded modules.")); cmd_exit = grub_register_command ("exit", grub_mini_cmd_exit, - 0, "Exit from GRUB."); + 0, N_("Exit from GRUB.")); cmd_clear = grub_register_command ("clear", grub_mini_cmd_clear, - 0, "Clear the screen."); + 0, N_("Clear the screen.")); } GRUB_MOD_FINI(minicmd) diff --git a/commands/parttool.c b/commands/parttool.c index 62fe5ad2b..3f69d5525 100644 --- a/commands/parttool.c +++ b/commands/parttool.c @@ -29,6 +29,7 @@ #include #include #include +#include static struct grub_parttool *parts = 0; static int curhandle = 0; @@ -322,7 +323,7 @@ GRUB_MOD_INIT(parttool) { mymod = mod; cmd = grub_register_command ("parttool", grub_cmd_parttool, - "PARTITION COMMANDS", + N_("PARTITION COMMANDS"), helpmsg); } diff --git a/commands/password.c b/commands/password.c index d9b31f962..2869ffc53 100644 --- a/commands/password.c +++ b/commands/password.c @@ -23,6 +23,7 @@ #include #include #include +#include static grub_dl_t my_mod; @@ -75,9 +76,9 @@ GRUB_MOD_INIT(password) { my_mod = mod; cmd = grub_register_command ("password", grub_cmd_password, - "USER PASSWORD", - "Set user password (plaintext). " - "Unrecommended and insecure."); + N_("USER PASSWORD"), + N_("Set user password (plaintext). " + "Unrecommended and insecure.")); } GRUB_MOD_FINI(password) diff --git a/commands/probe.c b/commands/probe.c index 7de1c1d34..c2cc599e9 100644 --- a/commands/probe.c +++ b/commands/probe.c @@ -30,16 +30,17 @@ #include #include #include +#include static const struct grub_arg_option options[] = { {"set", 's', GRUB_ARG_OPTION_OPTIONAL, - "Set a variable to return value.", "VAR", ARG_TYPE_STRING}, - {"driver", 'd', 0, "Determine driver.", 0, 0}, - {"partmap", 'p', 0, "Determine partition map type.", 0, 0}, - {"fs", 'f', 0, "Determine filesystem type.", 0, 0}, - {"fs-uuid", 'u', 0, "Determine filesystem UUID.", 0, 0}, - {"label", 'l', 0, "Determine filesystem label.", 0, 0}, + N_("Set a variable to return value."), "VAR", ARG_TYPE_STRING}, + {"driver", 'd', 0, N_("Determine driver."), 0, 0}, + {"partmap", 'p', 0, N_("Determine partition map type."), 0, 0}, + {"fs", 'f', 0, N_("Determine filesystem type."), 0, 0}, + {"fs-uuid", 'u', 0, N_("Determine filesystem UUID."), 0, 0}, + {"label", 'l', 0, N_("Determine filesystem label."), 0, 0}, {0, 0, 0, 0, 0, 0} }; @@ -150,8 +151,8 @@ static grub_extcmd_t cmd; GRUB_MOD_INIT (probe) { cmd = grub_register_extcmd ("probe", grub_cmd_probe, GRUB_COMMAND_FLAG_BOTH, - "[DEVICE]", - "Retrieve device info.", options); + N_("[DEVICE]"), + N_("Retrieve device info."), options); } GRUB_MOD_FINI (probe) diff --git a/commands/read.c b/commands/read.c index 5f4451a72..8a7c4a01f 100644 --- a/commands/read.c +++ b/commands/read.c @@ -24,6 +24,7 @@ #include #include #include +#include static char * grub_getline (void) @@ -79,8 +80,8 @@ static grub_command_t cmd; GRUB_MOD_INIT(read) { cmd = grub_register_command ("read", grub_cmd_read, - "[ENVVAR]", - "Set variable with user input."); + N_("[ENVVAR]"), + N_("Set variable with user input.")); } GRUB_MOD_FINI(read) diff --git a/commands/reboot.c b/commands/reboot.c index 2add295ef..eedd53c91 100644 --- a/commands/reboot.c +++ b/commands/reboot.c @@ -20,6 +20,7 @@ #include #include #include +#include static grub_err_t grub_cmd_reboot (grub_command_t cmd __attribute__ ((unused)), @@ -35,7 +36,7 @@ static grub_command_t cmd; GRUB_MOD_INIT(reboot) { cmd = grub_register_command ("reboot", grub_cmd_reboot, - 0, "Reboot the computer."); + 0, N_("Reboot the computer.")); } GRUB_MOD_FINI(reboot) diff --git a/commands/search.c b/commands/search.c index 01e83739b..2f0cef8aa 100644 --- a/commands/search.c +++ b/commands/search.c @@ -165,7 +165,7 @@ GRUB_MOD_INIT(search_fs_label) { cmd = grub_register_command (COMMAND_NAME, grub_cmd_do_search, - "NAME [VARIABLE]", + N_("NAME [VARIABLE]"), "Search devices by " SEARCH_TARGET "." " If VARIABLE is specified, " "the first device found is set to a variable."); diff --git a/commands/sleep.c b/commands/sleep.c index eb9aeb510..a2caad89a 100644 --- a/commands/sleep.c +++ b/commands/sleep.c @@ -24,11 +24,12 @@ #include #include #include +#include static const struct grub_arg_option options[] = { - {"verbose", 'v', 0, "Verbose countdown.", 0, 0}, - {"interruptible", 'i', 0, "Interruptible with ESC.", 0, 0}, + {"verbose", 'v', 0, N_("Verbose countdown."), 0, 0}, + {"interruptible", 'i', 0, N_("Interruptible with ESC."), 0, 0}, {0, 0, 0, 0, 0, 0} }; @@ -105,8 +106,8 @@ static grub_extcmd_t cmd; GRUB_MOD_INIT(sleep) { cmd = grub_register_extcmd ("sleep", grub_cmd_sleep, GRUB_COMMAND_FLAG_BOTH, - "NUMBER_OF_SECONDS", - "Wait for a specified number of seconds.", + N_("NUMBER_OF_SECONDS"), + N_("Wait for a specified number of seconds."), options); } diff --git a/commands/test.c b/commands/test.c index 8d1e24859..318a42264 100644 --- a/commands/test.c +++ b/commands/test.c @@ -25,6 +25,7 @@ #include #include #include +#include /* A simple implementation for signed numbers. */ static int @@ -420,9 +421,9 @@ static grub_command_t cmd_1, cmd_2; GRUB_MOD_INIT(test) { cmd_1 = grub_register_command ("[", grub_cmd_test, - "EXPRESSION ]", "Evaluate an expression."); + N_("EXPRESSION ]"), N_("Evaluate an expression.")); cmd_2 = grub_register_command ("test", grub_cmd_test, - "EXPRESSION", "Evaluate an expression."); + N_("EXPRESSION"), N_("Evaluate an expression.")); } GRUB_MOD_FINI(test) diff --git a/commands/true.c b/commands/true.c index ef9f65889..aa8125853 100644 --- a/commands/true.c +++ b/commands/true.c @@ -19,6 +19,7 @@ #include #include +#include static grub_err_t grub_cmd_true (struct grub_command *cmd __attribute__ ((unused)), @@ -43,10 +44,10 @@ GRUB_MOD_INIT(true) { cmd_true = grub_register_command ("true", grub_cmd_true, - 0, "Do nothing, successfully."); + 0, N_("Do nothing, successfully.")); cmd_false = grub_register_command ("false", grub_cmd_false, - 0, "Do nothing, unsuccessfully."); + 0, N_("Do nothing, unsuccessfully.")); } GRUB_MOD_FINI(true) diff --git a/commands/usbtest.c b/commands/usbtest.c index df124ca18..b884a93f1 100644 --- a/commands/usbtest.c +++ b/commands/usbtest.c @@ -25,6 +25,7 @@ #include #include #include +#include static const char *usb_classes[] = { @@ -195,7 +196,7 @@ static grub_command_t cmd; GRUB_MOD_INIT(usbtest) { cmd = grub_register_command ("usb", grub_cmd_usbtest, - 0, "Test USB support."); + 0, N_("Test USB support.")); } GRUB_MOD_FINI(usbtest) diff --git a/commands/videotest.c b/commands/videotest.c index e27552510..850639bd9 100644 --- a/commands/videotest.c +++ b/commands/videotest.c @@ -24,6 +24,7 @@ #include #include #include +#include static grub_err_t grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)), @@ -178,7 +179,7 @@ static grub_command_t cmd; GRUB_MOD_INIT(videotest) { cmd = grub_register_command ("videotest", grub_cmd_videotest, - 0, "Test video subsystem."); + 0, N_("Test video subsystem.")); } GRUB_MOD_FINI(videotest) diff --git a/commands/xnu_uuid.c b/commands/xnu_uuid.c index 31e69ad13..32288636b 100644 --- a/commands/xnu_uuid.c +++ b/commands/xnu_uuid.c @@ -31,6 +31,7 @@ #include #include #include +#include struct tohash { @@ -377,9 +378,9 @@ static grub_command_t cmd; GRUB_MOD_INIT (xnu_uuid) { cmd = grub_register_command ("xnu_uuid", grub_cmd_xnu_uuid, - "GRUBUUID [VARNAME]", - "Transform 64-bit UUID to format " - "suitable for xnu."); + N_("GRUBUUID [VARNAME]"), + N_("Transform 64-bit UUID to format " + "suitable for xnu.")); } GRUB_MOD_FINI (xnu_uuid) diff --git a/disk/loopback.c b/disk/loopback.c index c877dd8af..fbec0426f 100644 --- a/disk/loopback.c +++ b/disk/loopback.c @@ -23,6 +23,7 @@ #include #include #include +#include struct grub_loopback { @@ -36,8 +37,8 @@ static struct grub_loopback *loopback_list; static const struct grub_arg_option options[] = { - {"delete", 'd', 0, "delete the loopback device entry", 0, 0}, - {"partitions", 'p', 0, "simulate a hard drive with partitions", 0, 0}, + {"delete", 'd', 0, N_("delete the loopback device entry"), 0, 0}, + {"partitions", 'p', 0, N_("simulate a hard drive with partitions"), 0, 0}, {0, 0, 0, 0, 0, 0} }; @@ -245,8 +246,8 @@ GRUB_MOD_INIT(loop) { cmd = grub_register_extcmd ("loopback", grub_cmd_loopback, GRUB_COMMAND_FLAG_BOTH, - "loopback [-d|-p] DEVICENAME FILE", - "Make a device of a file.", options); + N_("loopback [-d|-p] DEVICENAME FILE"), + N_("Make a device of a file."), options); grub_disk_dev_register (&grub_loopback_dev); } diff --git a/hello/hello.c b/hello/hello.c index be60761ec..1e2a4ba7f 100644 --- a/hello/hello.c +++ b/hello/hello.c @@ -24,6 +24,7 @@ #include #include #include +#include static grub_err_t grub_cmd_hello (struct grub_extcmd *cmd __attribute__ ((unused)), @@ -39,7 +40,7 @@ static grub_extcmd_t cmd; GRUB_MOD_INIT(hello) { cmd = grub_register_extcmd ("hello", grub_cmd_hello, GRUB_COMMAND_FLAG_BOTH, - "hello", "Say hello", 0); + "hello", N_("Say hello"), 0); } GRUB_MOD_FINI(hello) diff --git a/loader/i386/bsd.c b/loader/i386/bsd.c index ca60b0be9..a7a860bb2 100644 --- a/loader/i386/bsd.c +++ b/loader/i386/bsd.c @@ -34,6 +34,7 @@ #include #include #include +#include #ifdef GRUB_MACHINE_PCBIOS #include @@ -61,20 +62,20 @@ static grub_uint32_t openbsd_root; static const struct grub_arg_option freebsd_opts[] = { - {"dual", 'D', 0, "Display output on all consoles.", 0, 0}, - {"serial", 'h', 0, "Use serial console.", 0, 0}, - {"askname", 'a', 0, "Ask for file name to reboot from.", 0, 0}, - {"cdrom", 'C', 0, "Use cdrom as root.", 0, 0}, - {"config", 'c', 0, "Invoke user configuration routing.", 0, 0}, - {"kdb", 'd', 0, "Enter in KDB on boot.", 0, 0}, - {"gdb", 'g', 0, "Use GDB remote debugger instead of DDB.", 0, 0}, - {"mute", 'm', 0, "Disable all boot output.", 0, 0}, + {"dual", 'D', 0, N_("Display output on all consoles."), 0, 0}, + {"serial", 'h', 0, N_("Use serial console."), 0, 0}, + {"askname", 'a', 0, N_("Ask for file name to reboot from."), 0, 0}, + {"cdrom", 'C', 0, N_("Use cdrom as root."), 0, 0}, + {"config", 'c', 0, N_("Invoke user configuration routing."), 0, 0}, + {"kdb", 'd', 0, N_("Enter in KDB on boot."), 0, 0}, + {"gdb", 'g', 0, N_("Use GDB remote debugger instead of DDB."), 0, 0}, + {"mute", 'm', 0, N_("Disable all boot output."), 0, 0}, {"nointr", 'n', 0, "", 0, 0}, - {"pause", 'p', 0, "Wait for keypress after every line of output.", 0, 0}, + {"pause", 'p', 0, N_("Wait for keypress after every line of output."), 0, 0}, {"quiet", 'q', 0, "", 0, 0}, - {"dfltroot", 'r', 0, "Use compiled-in rootdev.", 0, 0}, - {"single", 's', 0, "Boot into single mode.", 0, 0}, - {"verbose", 'v', 0, "Boot with verbose messages.", 0, 0}, + {"dfltroot", 'r', 0, N_("Use compiled-in rootdev."), 0, 0}, + {"single", 's', 0, N_("Boot into single mode."), 0, 0}, + {"verbose", 'v', 0, N_("Boot with verbose messages."), 0, 0}, {0, 0, 0, 0, 0, 0} }; @@ -89,12 +90,12 @@ static const grub_uint32_t freebsd_flags[] = static const struct grub_arg_option openbsd_opts[] = { - {"askname", 'a', 0, "Ask for file name to reboot from.", 0, 0}, - {"halt", 'b', 0, "Don't reboot, just halt.", 0, 0}, - {"config", 'c', 0, "Change configured devices.", 0, 0}, - {"single", 's', 0, "Boot into single mode.", 0, 0}, - {"kdb", 'd', 0, "Enter in KDB on boot.", 0, 0}, - {"root", 'r', 0, "Set root device.", "wdXY", ARG_TYPE_STRING}, + {"askname", 'a', 0, N_("Ask for file name to reboot from."), 0, 0}, + {"halt", 'b', 0, N_("Don't reboot, just halt."), 0, 0}, + {"config", 'c', 0, N_("Change configured devices."), 0, 0}, + {"single", 's', 0, N_("Boot into single mode."), 0, 0}, + {"kdb", 'd', 0, N_("Enter in KDB on boot."), 0, 0}, + {"root", 'r', 0, N_("Set root device."), "wdXY", ARG_TYPE_STRING}, {0, 0, 0, 0, 0, 0} }; @@ -108,19 +109,19 @@ static const grub_uint32_t openbsd_flags[] = static const struct grub_arg_option netbsd_opts[] = { - {"no-smp", '1', 0, "Disable SMP.", 0, 0}, - {"no-acpi", '2', 0, "Disable ACPI.", 0, 0}, - {"askname", 'a', 0, "Ask for file name to reboot from.", 0, 0}, - {"halt", 'b', 0, "Don't reboot, just halt.", 0, 0}, - {"config", 'c', 0, "Change configured devices.", 0, 0}, - {"kdb", 'd', 0, "Enter in KDB on boot.", 0, 0}, + {"no-smp", '1', 0, N_("Disable SMP."), 0, 0}, + {"no-acpi", '2', 0, N_("Disable ACPI."), 0, 0}, + {"askname", 'a', 0, N_("Ask for file name to reboot from."), 0, 0}, + {"halt", 'b', 0, N_("Don't reboot, just halt."), 0, 0}, + {"config", 'c', 0, N_("Change configured devices."), 0, 0}, + {"kdb", 'd', 0, N_("Enter in KDB on boot."), 0, 0}, {"miniroot", 'm', 0, "", 0, 0}, - {"quiet", 'q', 0, "Don't display boot diagnostic messages.", 0, 0}, - {"single", 's', 0, "Boot into single mode.", 0, 0}, - {"verbose", 'v', 0, "Boot with verbose messages.", 0, 0}, - {"debug", 'x', 0, "Boot with debug messages.", 0, 0}, - {"silent", 'z', 0, "Supress normal output (warnings remain).", 0, 0}, - {"root", 'r', 0, "Set root device.", "DEVICE", ARG_TYPE_STRING}, + {"quiet", 'q', 0, N_("Don't display boot diagnostic messages."), 0, 0}, + {"single", 's', 0, N_("Boot into single mode."), 0, 0}, + {"verbose", 'v', 0, N_("Boot with verbose messages."), 0, 0}, + {"debug", 'x', 0, N_("Boot with debug messages."), 0, 0}, + {"silent", 'z', 0, N_("Supress normal output (warnings remain)."), 0, 0}, + {"root", 'r', 0, N_("Set root device."), N_("DEVICE"), ARG_TYPE_STRING}, {0, 0, 0, 0, 0, 0} }; @@ -1280,25 +1281,25 @@ GRUB_MOD_INIT (bsd) { cmd_freebsd = grub_register_extcmd ("kfreebsd", grub_cmd_freebsd, GRUB_COMMAND_FLAG_BOTH, - "FILE", "Load kernel of FreeBSD.", + N_("FILE"), N_("Load kernel of FreeBSD."), freebsd_opts); cmd_openbsd = grub_register_extcmd ("kopenbsd", grub_cmd_openbsd, GRUB_COMMAND_FLAG_BOTH, - "FILE", "Load kernel of OpenBSD.", + N_("FILE"), N_("Load kernel of OpenBSD."), openbsd_opts); cmd_netbsd = grub_register_extcmd ("knetbsd", grub_cmd_netbsd, GRUB_COMMAND_FLAG_BOTH, - "FILE", "Load kernel of NetBSD.", + N_("FILE"), N_("Load kernel of NetBSD."), netbsd_opts); cmd_freebsd_loadenv = grub_register_command ("kfreebsd_loadenv", grub_cmd_freebsd_loadenv, - 0, "Load FreeBSD env."); + 0, N_("Load FreeBSD env.")); cmd_freebsd_module = grub_register_command ("kfreebsd_module", grub_cmd_freebsd_module, - 0, "Load FreeBSD kernel module."); + 0, N_("Load FreeBSD kernel module.")); cmd_freebsd_module_elf = grub_register_command ("kfreebsd_module_elf", grub_cmd_freebsd_module_elf, - 0, "Load FreeBSD kernel module (ELF)."); + 0, N_("Load FreeBSD kernel module (ELF).")); my_mod = mod; } diff --git a/po/POTFILES b/po/POTFILES index 6efa12219..4e7e032ec 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -1,13 +1,62 @@ # List of files which contain translatable strings. -commands/i386/pc/play.c -commands/loadenv.c -commands/search.c +commands/acpi.c +commands/blocklist.c +commands/boot.c +commands/cat.c +commands/cmp.c +commands/configfile.c +commands/crc.c +commands/date.c +commands/echo.c +commands/efi/fixvideo.c +commands/efi/loadbios.c +commands/gptsync.c +commands/halt.c +commands/handler.c +commands/hdparm.c commands/help.c +commands/hexdump.c +commands/i386/cpuid.c +commands/i386/pc/drivemap.c +commands/i386/pc/halt.c +commands/i386/pc/play.c +commands/i386/pc/pxecmd.c +commands/i386/pc/vbeinfo.c +commands/i386/pc/vbetest.c +commands/ieee1275/suspend.c +commands/keystatus.c +commands/loadenv.c +commands/ls.c +commands/lsmmap.c +commands/lspci.c +commands/memrw.c +commands/minicmd.c +commands/parttool.c +commands/password.c +commands/probe.c +commands/read.c +commands/reboot.c +commands/search.c +commands/search.c +commands/sleep.c +commands/test.c +commands/true.c +commands/usbtest.c +commands/videotest.c +commands/xnu_uuid.c + +disk/loopback.c + +hello/hello.c lib/arg.c +loader/i386/bsd.c + normal/dyncmd.c +term/i386/pc/serial.c + util/i386/pc/grub-mkimage.c util/i386/pc/grub-setup.c diff --git a/term/i386/pc/serial.c b/term/i386/pc/serial.c index 1c68f9bfc..e4e3c2755 100644 --- a/term/i386/pc/serial.c +++ b/term/i386/pc/serial.c @@ -26,6 +26,7 @@ #include #include #include +#include #define TEXT_WIDTH 80 #define TEXT_HEIGHT 25 @@ -41,12 +42,12 @@ static unsigned int npending = 0; /* Argument options. */ static const struct grub_arg_option options[] = { - {"unit", 'u', 0, "Set the serial unit", 0, ARG_TYPE_INT}, - {"port", 'p', 0, "Set the serial port address", 0, ARG_TYPE_STRING}, - {"speed", 's', 0, "Set the serial port speed", 0, ARG_TYPE_INT}, - {"word", 'w', 0, "Set the serial port word length", 0, ARG_TYPE_INT}, - {"parity", 'r', 0, "Set the serial port parity", 0, ARG_TYPE_STRING}, - {"stop", 't', 0, "Set the serial port stop bits", 0, ARG_TYPE_INT}, + {"unit", 'u', 0, N_("Set the serial unit"), 0, ARG_TYPE_INT}, + {"port", 'p', 0, N_("Set the serial port address"), 0, ARG_TYPE_STRING}, + {"speed", 's', 0, N_("Set the serial port speed"), 0, ARG_TYPE_INT}, + {"word", 'w', 0, N_("Set the serial port word length"), 0, ARG_TYPE_INT}, + {"parity", 'r', 0, N_("Set the serial port parity"), 0, ARG_TYPE_STRING}, + {"stop", 't', 0, N_("Set the serial port stop bits"), 0, ARG_TYPE_INT}, {0, 0, 0, 0, 0, 0} }; @@ -602,8 +603,8 @@ GRUB_MOD_INIT(serial) { cmd = grub_register_extcmd ("serial", grub_cmd_serial, GRUB_COMMAND_FLAG_BOTH, - "serial [OPTIONS...]", - "Configure serial port.", options); + N_("serial [OPTIONS...]"), + N_("Configure serial port."), options); /* Set default settings. */ serial_settings.port = serial_hw_get_port (0);