=== modified file 'commands/blocklist.c' --- commands/blocklist.c 2009-06-10 21:04:23 +0000 +++ commands/blocklist.c 2009-12-06 16:40:29 +0000 @@ -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, - "blocklist FILE", "Print a block list."); + N_("blocklist FILE"), N_("Print a block list.")); } GRUB_MOD_FINI(blocklist) === modified file 'commands/boot.c' --- commands/boot.c 2009-06-10 21:04:23 +0000 +++ commands/boot.c 2009-12-06 16:39:59 +0000 @@ -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) === modified file 'commands/cat.c' --- commands/cat.c 2009-06-10 21:04:23 +0000 +++ commands/cat.c 2009-12-06 16:39:59 +0000 @@ -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, - "cat FILE", "Show the contents of a file."); + N_("cat FILE"), N_("Show the contents of a file.")); } GRUB_MOD_FINI(cat) === modified file 'commands/cmp.c' --- commands/cmp.c 2009-06-10 21:04:23 +0000 +++ commands/cmp.c 2009-12-06 17:43:37 +0000 @@ -23,6 +23,7 @@ #include #include #include +#include #define BUFFER_SIZE 512 @@ -40,7 +41,7 @@ grub_cmd_cmp (grub_command_t cmd __attri if (argc != 2) return grub_error (GRUB_ERR_BAD_ARGUMENT, "two arguments required"); - grub_printf ("Compare `%s' and `%s':\n", args[0], + grub_printf (_("Compare `%s' and `%s':\n"), args[0], args[1]); file1 = grub_gzfile_open (args[0], 1); @@ -49,7 +50,7 @@ grub_cmd_cmp (grub_command_t cmd __attri goto cleanup; if (grub_file_size (file1) != grub_file_size (file2)) - grub_printf ("Differ in size: %llu [%s], %llu [%s]\n", + grub_printf (_("Differ in size: %llu [%s], %llu [%s]\n"), (unsigned long long) grub_file_size (file1), args[0], (unsigned long long) grub_file_size (file2), args[1]); else @@ -76,7 +77,7 @@ grub_cmd_cmp (grub_command_t cmd __attri { if (buf1[i] != buf2[i]) { - grub_printf ("Differ at the offset %llu: 0x%x [%s], 0x%x [%s]\n", + grub_printf (_("Differ at the offset %llu: 0x%x [%s], 0x%x [%s]\n"), (unsigned long long) (i + pos), buf1[i], args[0], buf2[i], args[1]); goto cleanup; @@ -87,7 +88,7 @@ grub_cmd_cmp (grub_command_t cmd __attri } while (rd2); - grub_printf ("The files are identical.\n"); + grub_printf (_("The files are identical.\n")); } cleanup: @@ -109,7 +110,7 @@ static grub_command_t cmd; GRUB_MOD_INIT(cmp) { cmd = grub_register_command ("cmp", grub_cmd_cmp, - "cmp FILE1 FILE2", "Compare two files."); + N_("cmp FILE1 FILE2"), N_("Compare two files.")); } GRUB_MOD_FINI(cmp) === modified file 'commands/configfile.c' --- commands/configfile.c 2009-05-04 03:49:08 +0000 +++ commands/configfile.c 2009-12-06 16:59:23 +0000 @@ -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, - "configfile FILE", "Load another config file."); + N_("configfile FILE"), N_("Load another config file.")); cmd_source = grub_register_command ("source", grub_cmd_source, - "source FILE", - "Load another config file without changing context." + N_("source 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.") ); } === modified file 'commands/crc.c' --- commands/crc.c 2009-05-04 03:49:08 +0000 +++ commands/crc.c 2009-12-06 16:59:51 +0000 @@ -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, - "crc FILE", - "Calculate the crc32 checksum of a file."); + N_("crc FILE"), + N_("Calculate the crc32 checksum of a file.")); } GRUB_MOD_FINI(crc) === modified file 'commands/date.c' --- commands/date.c 2009-05-04 03:49:08 +0000 +++ commands/date.c 2009-12-06 17:02:39 +0000 @@ -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, - "date [[year-]month-day] [hour:minute[:second]]", - "Command to display/set current datetime."); + N_("date [[year-]month-day] [hour:minute[:second]]"), + N_("Command to display/set current datetime.")); } GRUB_MOD_FINI(date) === modified file 'commands/efi/fixvideo.c' --- commands/efi/fixvideo.c 2009-05-04 03:49:08 +0000 +++ commands/efi/fixvideo.c 2009-12-06 16:39:59 +0000 @@ -22,6 +22,7 @@ #include #include #include +#include static struct grub_video_patch { @@ -53,24 +54,24 @@ scan_card (int bus, int dev, int func, g { grub_target_addr_t base; - grub_printf ("Found graphic card: %s\n", p->name); + grub_printf (_("Found graphic card: %s\n"), p->name); addr += 8 + p->mmio_bar * 4; base = grub_pci_read (addr); if ((! base) || (base & GRUB_PCI_ADDR_SPACE_IO) || (base & GRUB_PCI_ADDR_MEM_PREFETCH)) - grub_printf ("Invalid MMIO bar %d\n", p->mmio_bar); + grub_printf (_("Invalid MMIO bar %d\n"), p->mmio_bar); else { base &= GRUB_PCI_ADDR_MEM_MASK; base += p->mmio_reg; if (*((volatile grub_uint32_t *) base) != p->mmio_old) - grub_printf ("Old value don't match\n"); + grub_printf (_("Old value don't match\n")); else { *((volatile grub_uint32_t *) base) = 0; if (*((volatile grub_uint32_t *) base)) - grub_printf ("Set MMIO fails\n"); + grub_printf (_("Set MMIO fails\n")); } } @@ -79,7 +80,7 @@ scan_card (int bus, int dev, int func, g p++; } - grub_printf ("Unknown graphic card: %x\n", pciid); + grub_printf (_("Unknown graphic card: %x\n"), pciid); } return 0; @@ -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.")); } === modified file 'commands/efi/loadbios.c' --- commands/efi/loadbios.c 2009-06-10 23:47:49 +0000 +++ commands/efi/loadbios.c 2009-12-06 16:43:12 +0000 @@ -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; @@ -45,7 +46,7 @@ enable_rom_area (void) rom_ptr = (grub_uint32_t *) VBIOS_ADDR; if (*rom_ptr != BLANK_MEM) { - grub_printf ("ROM image present.\n"); + grub_printf (_("ROM image present.\n")); return 0; } @@ -62,7 +63,7 @@ enable_rom_area (void) *rom_ptr = 0; if (*rom_ptr != 0) { - grub_printf ("Can\'t enable rom area.\n"); + grub_printf (_("Can\'t enable rom area.\n")); return 0; } @@ -199,11 +200,11 @@ static grub_command_t cmd_fakebios, cmd_ 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, - "loadbios BIOS_DUMP [INT10_DUMP]", - "Load bios dump."); + _N("loadbios BIOS_DUMP [INT10_DUMP]"), + _N("Load bios dump.")); } GRUB_MOD_FINI(loadbios) === modified file 'commands/gptsync.c' --- commands/gptsync.c 2009-08-23 12:00:57 +0000 +++ commands/gptsync.c 2009-12-06 17:10:54 +0000 @@ -27,6 +27,7 @@ #include #include #include +#include /* Convert a LBA address to a CHS address in the INT 13 format. */ /* Taken from grub1. */ @@ -228,7 +229,7 @@ grub_cmd_gptsync (grub_command_t cmd __a return grub_errno; } - grub_printf ("New MBR is written to '%s'\n", args[0]); + grub_printf (_("New MBR is written to '%s'\n"), args[0]); return GRUB_ERR_NONE; } @@ -240,13 +241,13 @@ GRUB_MOD_INIT(gptsync) { (void) mod; /* To stop warning. */ cmd = grub_register_command ("gptsync", grub_cmd_gptsync, - "gptsync DEVICE [PARTITION[+/-[TYPE]]] ...", - "Fill hybrid MBR of GPT drive DEVICE. " + N_("gptsync 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) === modified file 'commands/halt.c' --- commands/halt.c 2009-12-03 23:07:29 +0000 +++ commands/halt.c 2009-12-06 17:13:33 +0000 @@ -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."); + 0, N_("halts the computer. This command does " + "not work on all firmware.")); } GRUB_MOD_FINI(halt) === modified file 'commands/handler.c' --- commands/handler.c 2009-05-04 03:49:08 +0000 +++ commands/handler.c 2009-12-06 17:17:28 +0000 @@ -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, - "handler [class [handler]]", - "List or select a handler"); + N_("handler [class [handler]]"), + N_("List or select a handler")); cmd_terminal_input = grub_register_command ("terminal_input", grub_cmd_handler, - "terminal_input [handler]", - "List or select a handler"); + N_("terminal_input [handler]"), + N_("List or select a handler")); cmd_terminal_output = grub_register_command ("terminal_output", grub_cmd_handler, - "terminal_output [handler]", - "List or select a handler"); + N_("terminal_output [handler]"), + N_("List or select a handler")); } GRUB_MOD_FINI(handler) === modified file 'commands/help.c' --- commands/help.c 2009-06-10 21:04:23 +0000 +++ commands/help.c 2009-12-06 17:54:48 +0000 @@ -21,6 +21,7 @@ #include #include #include +#include static grub_err_t grub_cmd_help (grub_extcmd_t ext __attribute__ ((unused)), int argc, @@ -44,11 +45,11 @@ grub_cmd_help (grub_extcmd_t ext __attri with the description followed by spaces. */ grub_memset (description, ' ', GRUB_TERM_WIDTH / 2 - 1); description[GRUB_TERM_WIDTH / 2 - 1] = '\0'; - grub_memcpy (description, cmd->summary, + grub_memcpy (description, _(cmd->summary), (desclen < GRUB_TERM_WIDTH / 2 - 1 ? desclen : GRUB_TERM_WIDTH / 2 - 1)); - grub_printf ("%s%s", description, (cnt++) % 2 ? "\n" : " "); + grub_printf ("%s%s", _(description), (cnt++) % 2 ? "\n" : " "); } return 0; } @@ -65,8 +66,8 @@ grub_cmd_help (grub_extcmd_t ext __attri if (cmd->flags & GRUB_COMMAND_FLAG_EXTCMD) grub_arg_show_help ((grub_extcmd_t) cmd->data); else - grub_printf ("Usage: %s\n%s\b", cmd->summary, - cmd->description); + grub_printf (_("Usage: %s\n%s\b"), _(cmd->summary), + _(cmd->description)); } } return 0; @@ -94,8 +95,8 @@ GRUB_MOD_INIT(help) { cmd = grub_register_extcmd ("help", grub_cmd_help, GRUB_COMMAND_FLAG_CMDLINE, - "help [PATTERN ...]", - "Show a help message.", 0); + N_("help [PATTERN ...]"), + N_("Show a help message."), 0); } GRUB_MOD_FINI(help) === modified file 'commands/i386/pc/play.c' --- commands/i386/pc/play.c 2009-06-10 23:47:49 +0000 +++ commands/i386/pc/play.c 2009-12-06 16:43:46 +0000 @@ -27,6 +27,7 @@ #include #include #include +#include #define BASE_TEMPO 120 @@ -207,7 +208,7 @@ static grub_command_t cmd; GRUB_MOD_INIT(play) { cmd = grub_register_command ("play", grub_cmd_play, - "play FILE", "Play a tune"); + N_("play FILE"), N_("Play a tune")); } GRUB_MOD_FINI(play) === modified file 'commands/i386/pc/vbeinfo.c' --- commands/i386/pc/vbeinfo.c 2009-06-10 21:04:23 +0000 +++ commands/i386/pc/vbeinfo.c 2009-12-06 17:17:52 +0000 @@ -24,6 +24,7 @@ #include #include #include +#include static void * real2pm (grub_vbe_farptr_t ptr) @@ -51,14 +52,15 @@ grub_cmd_vbeinfo (grub_command_t cmd __a if (err != GRUB_ERR_NONE) return err; - grub_printf ("VBE info: version: %d.%d OEM software rev: %d.%d\n", + grub_printf (_("VBE info: version: %d.%d OEM software rev: %d.%d\n"), controller_info.version >> 8, controller_info.version & 0xFF, controller_info.oem_software_rev >> 8, controller_info.oem_software_rev & 0xFF); /* The total_memory field is in 64 KiB units. */ - grub_printf (" total memory: %d KiB\n", + grub_printf (" "); + grub_printf (_("total memory: %d KiB\n"), (controller_info.total_memory << 16) / 1024); /* Because the information on video modes is stored in a temporary place, @@ -74,9 +76,9 @@ grub_cmd_vbeinfo (grub_command_t cmd __a grub_memcpy (saved_video_mode_list, video_mode_list, video_mode_list_size); - grub_printf ("List of compatible video modes:\n"); - grub_printf ("Legend: P=Packed pixel, D=Direct color, " - "mask/pos=R/G/B/reserved\n"); + grub_printf (_("List of compatible video modes:\n")); + grub_printf (_("Legend: P=Packed pixel, D=Direct color, " + "mask/pos=R/G/B/reserved\n")); /* Walk through all video modes listed. */ for (p = saved_video_mode_list; *p != 0xFFFF; p++) @@ -136,7 +138,7 @@ grub_cmd_vbeinfo (grub_command_t cmd __a /* Show mask and position details for direct color modes. */ if (mode_info_tmp.memory_model == GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR) - grub_printf (", mask: %d/%d/%d/%d pos: %d/%d/%d/%d", + grub_printf (_(", mask: %d/%d/%d/%d pos: %d/%d/%d/%d"), mode_info_tmp.red_mask_size, mode_info_tmp.green_mask_size, mode_info_tmp.blue_mask_size, @@ -164,7 +166,7 @@ grub_cmd_vbeinfo (grub_command_t cmd __a grub_errno = GRUB_ERR_NONE; } - grub_printf ("Configured VBE mode (vbe_mode) = 0x%03x\n", use_mode); + grub_printf (_("Configured VBE mode (vbe_mode) = 0x%03x\n"), use_mode); return 0; } @@ -175,7 +177,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) === modified file 'commands/i386/pc/vbetest.c' --- commands/i386/pc/vbetest.c 2009-08-14 12:41:58 +0000 +++ commands/i386/pc/vbetest.c 2009-12-06 17:17:59 +0000 @@ -25,6 +25,7 @@ #include #include #include +#include static grub_err_t grub_cmd_vbetest (grub_command_t cmd __attribute__ ((unused)), @@ -42,14 +43,14 @@ grub_cmd_vbetest (grub_command_t cmd __a unsigned char *ptr; int i; - grub_printf ("Probing for VESA BIOS Extension ... "); + grub_printf (_("Probing for VESA BIOS Extension ... ")); /* Check if VESA BIOS exists. */ err = grub_vbe_probe (&controller_info); if (err != GRUB_ERR_NONE) return err; - grub_printf ("found!\n"); + grub_printf (_("found!\n")); /* Dump out controller information. */ grub_printf ("VBE signature = %c%c%c%c\n", @@ -116,7 +117,7 @@ grub_cmd_vbetest (grub_command_t cmd __a mode_info.blue_mask_size, mode_info.blue_field_position); - grub_printf ("Press any key to continue.\n"); + grub_printf (_("Press any key to continue.\n")); grub_getkey (); @@ -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) === modified file 'commands/ieee1275/suspend.c' --- commands/ieee1275/suspend.c 2009-05-04 03:49:08 +0000 +++ commands/ieee1275/suspend.c 2009-12-06 17:18:04 +0000 @@ -22,13 +22,14 @@ #include #include #include +#include static grub_err_t grub_cmd_suspend (grub_command_t cmd __attribute__ ((unused)), int argc __attribute__ ((unused)), char **args __attribute__ ((unused))) { - grub_printf ("Run 'go' to resume GRUB.\n"); + grub_printf (_("Run 'go' to resume GRUB.\n")); grub_ieee1275_enter (); grub_cls (); return 0; @@ -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) === modified file 'commands/lsmmap.c' --- commands/lsmmap.c 2009-05-04 03:49:08 +0000 +++ commands/lsmmap.c 2009-12-06 17:18:09 +0000 @@ -20,6 +20,7 @@ #include #include #include +#include static grub_err_t grub_cmd_lsmmap (grub_command_t cmd __attribute__ ((unused)), @@ -29,7 +30,7 @@ grub_cmd_lsmmap (grub_command_t cmd __at auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t, grub_uint32_t); int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size, grub_uint32_t type) { - grub_printf ("base_addr = 0x%llx, length = 0x%llx, type = 0x%x\n", + grub_printf (_("base_addr = 0x%llx, length = 0x%llx, type = 0x%x\n"), (long long) addr, (long long) size, type); return 0; } @@ -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, _("List memory map provided by firmware.")); } GRUB_MOD_FINI(lsmmap) === modified file 'commands/lspci.c' --- commands/lspci.c 2009-05-04 03:49:08 +0000 +++ commands/lspci.c 2009-12-06 17:18:20 +0000 @@ -21,6 +21,7 @@ #include #include #include +#include struct grub_pci_classname { @@ -159,7 +160,7 @@ static grub_command_t cmd; GRUB_MOD_INIT(pci) { cmd = grub_register_command ("lspci", grub_cmd_lspci, - 0, "List PCI devices"); + 0, _("List PCI devices")); } GRUB_MOD_FINI(pci) === modified file 'commands/memrw.c' --- commands/memrw.c 2009-05-04 03:49:08 +0000 +++ commands/memrw.c 2009-12-06 17:18:32 +0000 @@ -20,6 +20,7 @@ #include #include #include +#include static grub_command_t cmd_read_byte, cmd_read_word, cmd_read_dword; static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword; @@ -71,22 +72,22 @@ GRUB_MOD_INIT(memrw) { cmd_read_byte = grub_register_command ("read_byte", grub_cmd_read, - "read_byte ADDR", "read byte."); + _("read_byte ADDR"), _("read byte.")); cmd_read_word = grub_register_command ("read_word", grub_cmd_read, - "read_word ADDR", "read word."); + _("read_word ADDR"), _("read word.")); cmd_read_dword = grub_register_command ("read_dword", grub_cmd_read, - "read_dword ADDR", "read dword."); + _("read_dword ADDR"), _("read dword.")); cmd_write_byte = grub_register_command ("write_byte", grub_cmd_write, - "write_byte ADDR VALUE", "write byte."); + _("write_byte ADDR VALUE"), _("write byte.")); cmd_write_word = grub_register_command ("write_word", grub_cmd_write, - "write_word ADDR VALUE", "write word."); + _("write_word ADDR VALUE"), _("write word.")); cmd_write_dword = grub_register_command ("write_dword", grub_cmd_write, - "write_dword ADDR VALUE", "write dword."); + _("write_dword ADDR VALUE"), _("write dword.")); } GRUB_MOD_FINI(memrw) === modified file 'commands/minicmd.c' --- commands/minicmd.c 2009-11-19 10:39:14 +0000 +++ commands/minicmd.c 2009-12-06 17:55:39 +0000 @@ -27,6 +27,7 @@ #include #include #include +#include /* cat FILE */ static grub_err_t @@ -133,7 +134,7 @@ grub_mini_cmd_root (struct grub_command if (grub_errno == GRUB_ERR_UNKNOWN_FS) grub_errno = GRUB_ERR_NONE; - grub_printf ("(%s): Filesystem is %s.\n", + grub_printf (_("((%s): Filesystem is %s.\n"), grub_env_get ("root"), fs ? fs->name : "unknown"); grub_device_close (dev); @@ -320,7 +321,7 @@ grub_mini_cmd_lsmod (struct grub_command return 0; } - grub_printf ("Name\tRef Count\tDependencies\n"); + grub_printf (_("Name\tRef Count\tDependencies\n")); grub_dl_iterate (print_module); return 0; @@ -354,28 +355,28 @@ GRUB_MOD_INIT(minicmd) { cmd_cat = grub_register_command ("cat", grub_mini_cmd_cat, - "cat FILE", "show the contents of a file"); + N_("cat 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, - "root [DEVICE]", "set the root device"); + N_("root [DEVICE]"), N_("set the root device")); cmd_dump = grub_register_command ("dump", grub_mini_cmd_dump, - "dump ADDR", "dump memory"); + N_("dump ADDR"), N_("dump memory")); cmd_rmmod = grub_register_command ("rmmod", grub_mini_cmd_rmmod, - "rmmod MODULE", "remove a module"); + N_("rmmod 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) === modified file 'commands/parttool.c' --- commands/parttool.c 2009-07-16 22:14:09 +0000 +++ commands/parttool.c 2009-12-06 17:19:44 +0000 @@ -29,14 +29,15 @@ #include #include #include +#include static struct grub_parttool *parts = 0; static int curhandle = 0; static grub_dl_t mymod; static char helpmsg[] = - "perform COMMANDS on partition.\n" + N_("perform COMMANDS on partition.\n" "Use \"parttool PARTITION help\" for the list " - "of available commands"; + "of available commands"); int grub_parttool_register(const char *part_name, @@ -138,14 +139,14 @@ grub_cmd_parttool (grub_command_t cmd __ } } if (! found) - grub_printf ("Sorry no parttool is available for %s\n", + grub_printf (_("Sorry no parttool is available for %s\n"), dev->disk->partition->partmap->name); return GRUB_ERR_NONE; } if (argc < 1) { - grub_printf ("%s\n", helpmsg); + grub_printf ("%s\n", _(helpmsg)); return grub_error (GRUB_ERR_BAD_ARGUMENT, "too few arguments"); } @@ -322,7 +323,7 @@ GRUB_MOD_INIT(parttool) { mymod = mod; cmd = grub_register_command ("parttool", grub_cmd_parttool, - "parttool PARTITION COMMANDS", + N_("parttool PARTITION COMMANDS"), helpmsg); } === modified file 'commands/password.c' --- commands/password.c 2009-08-24 23:55:06 +0000 +++ commands/password.c 2009-12-06 17:20:22 +0000 @@ -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, - "password USER PASSWORD", - "Set user password (plaintext). " - "Unrecommended and insecure."); + N_("password USER PASSWORD"), + N_("Set user password (plaintext). " + "Unrecommended and insecure.")); } GRUB_MOD_FINI(password) === modified file 'commands/read.c' --- commands/read.c 2009-03-21 08:39:59 +0000 +++ commands/read.c 2009-12-06 17:20:47 +0000 @@ -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, - "read [ENVVAR]", - "Set variable with user input"); + N_("read [ENVVAR]"), + N_("Set variable with user input")); } GRUB_MOD_FINI(read) === modified file 'commands/reboot.c' --- commands/reboot.c 2009-12-03 23:07:29 +0000 +++ commands/reboot.c 2009-12-06 17:21:03 +0000 @@ -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) === modified file 'commands/test.c' --- commands/test.c 2009-09-14 19:57:45 +0000 +++ commands/test.c 2009-12-06 17:33:19 +0000 @@ -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, - "test EXPRESSION", "Evaluate an expression"); + N_("test EXPRESSION"), N_("Evaluate an expression")); } GRUB_MOD_FINI(test) === modified file 'commands/true.c' --- commands/true.c 2009-06-08 07:32:14 +0000 +++ commands/true.c 2009-12-06 17:33:42 +0000 @@ -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) === modified file 'commands/usbtest.c' --- commands/usbtest.c 2009-06-10 21:04:23 +0000 +++ commands/usbtest.c 2009-12-06 17:33:53 +0000 @@ -24,6 +24,7 @@ #include #include #include +#include static const char *usb_classes[] = { @@ -86,14 +87,14 @@ usb_iterate (grub_usb_device_t dev) usb_print_str ("Serial", dev, descdev->strserial); if (descdev->class > 0 && descdev->class <= 0x0E) - grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n", + grub_printf (_("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n"), descdev->class, usb_classes[descdev->class], descdev->subclass, descdev->protocol); - grub_printf ("USB version %d.%d, VendorID: 0x%02x, ProductID: 0x%02x, #conf: %d\n", + grub_printf (_("USB version %d.%d, VendorID: 0x%02x, ProductID: 0x%02x, #conf: %d\n"), descdev->usbrel >> 8, (descdev->usbrel >> 4) & 0x0F, descdev->vendorid, descdev->prodid, descdev->configcnt); - grub_printf ("%s speed device\n", usb_devspeed[dev->speed]); + grub_printf (_("%s speed device\n"), usb_devspeed[dev->speed]); for (i = 0; i < descdev->configcnt; i++) { @@ -109,10 +110,11 @@ usb_iterate (grub_usb_device_t dev) struct grub_usb_desc_if *interf; interf = dev->config[0].interf[i].descif; - grub_printf ("Interface #%d: #Endpoints: %d ", + grub_printf (_("Interface #%d: #Endpoints: %d"), i, interf->endpointcnt); + grub_printf (" "); if (interf->class > 0 && interf->class <= 0x0E) - grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n", + grub_printf (_("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n"), interf->class, usb_classes[interf->class], interf->subclass, interf->protocol); @@ -123,7 +125,7 @@ usb_iterate (grub_usb_device_t dev) struct grub_usb_desc_endp *endp; endp = &dev->config[0].interf[i].descendp[j]; - grub_printf ("Endpoint #%d: %s, max packed size: %d, transfer type: %s, latency: %d\n", + grub_printf (_("Endpoint #%d: %s, max packed size: %d, transfer type: %s, latency: %d\n"), endp->endp_addr & 15, (endp->endp_addr & 128) ? "IN" : "OUT", endp->maxpacket, usb_endp_type[endp->attrib & 3], @@ -141,7 +143,7 @@ grub_cmd_usbtest (grub_command_t cmd __a int argc __attribute__ ((unused)), char **args __attribute__ ((unused))) { - grub_printf ("USB devices:\n\n"); + grub_printf (_("USB devices:\n\n")); grub_usb_iterate (usb_iterate); return 0; @@ -152,7 +154,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) === modified file 'commands/videotest.c' --- commands/videotest.c 2009-06-04 18:22:45 +0000 +++ commands/videotest.c 2009-12-06 17:36:54 +0000 @@ -24,6 +24,7 @@ #include #include #include +#include static grub_err_t grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)), @@ -86,12 +87,12 @@ grub_cmd_videotest (grub_command_t cmd _ color = grub_video_map_rgb (255, 255, 255); texty = 32; - grub_font_draw_string ("The quick brown fox jumped over the lazy dog.", + grub_font_draw_string (_("The quick brown fox jumped over the lazy dog."), sans, color, 16, texty); texty += grub_font_get_descent (sans) + grub_font_get_leading (sans); texty += grub_font_get_ascent (fixed); - grub_font_draw_string ("The quick brown fox jumped over the lazy dog.", + grub_font_draw_string (_("The quick brown fox jumped over the lazy dog."), fixed, color, 16, texty); texty += grub_font_get_descent (fixed) + grub_font_get_leading (fixed); @@ -167,7 +168,7 @@ grub_cmd_videotest (grub_command_t cmd _ grub_video_restore (); for (i = 0; i < 16; i++) - grub_printf("color %d: %08x\n", i, palette[i]); + grub_printf(_("color %d: %08x\n"), i, palette[i]); grub_errno = GRUB_ERR_NONE; return grub_errno; @@ -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) === modified file 'commands/xnu_uuid.c' --- commands/xnu_uuid.c 2009-10-15 12:26:30 +0000 +++ commands/xnu_uuid.c 2009-12-06 17:36:43 +0000 @@ -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, - "xnu_uuid GRUBUUID [VARNAME]", - "Transform 64-bit UUID to format " - "suitable for xnu."); + N_("xnu_uuid GRUBUUID [VARNAME]"), + N_("Transform 64-bit UUID to format " + "suitable for xnu.")); } GRUB_MOD_FINI (xnu_uuid) === modified file 'po/POTFILES' --- po/POTFILES 2009-12-05 11:25:07 +0000 +++ po/POTFILES 2009-12-06 18:01:30 +0000 @@ -13,3 +13,45 @@ util/mkisofs/write.c normal/menu_entry.c normal/menu_text.c + +commands/blocklist.c +commands/boot.c +commands/boot.c +commands/cat.c +commands/cat.c +commands/cmp.c +commands/cmp.c +commands/configfile.c +commands/crc.c +commands/date.c +commands/efi/fixvideo.c +commands/efi/fixvideo.c +commands/efi/loadbios.c +commands/efi/loadbios.c +commands/gptsync.c +commands/halt.c +commands/handler.c +commands/help.c +commands/help.c +commands/i386/pc/play.c +commands/i386/pc/play.c +commands/i386/pc/vbeinfo.c +commands/i386/pc/vbeinfo.c +commands/i386/pc/vbetest.c +commands/i386/pc/vbetest.c +commands/ieee1275/suspend.c +commands/ieee1275/suspend.c +commands/lsmmap.c +commands/lspci.c +commands/memrw.c +commands/minicmd.c +commands/parttool.c +commands/password.c +commands/read.c +commands/reboot.c +commands/test.c +commands/true.c +commands/true.c +commands/usbtest.c +commands/videotest.c +commands/xnu_uuid.c