=== modified file 'ChangeLog' --- ChangeLog 2010-01-06 22:00:57 +0000 +++ ChangeLog 2010-01-06 22:32:35 +0000 @@ -1,5 +1,24 @@ 2010-01-06 Carles Pina i Estany + * kern/err.c (grub_print_error): Gettextizze error message. + * commands/boot.c: Gettextizze grub_error calls, grub_register_command + calls, include `' if needed. + * loader/i386/bsd.c: Likewise. + * loader/i386/efi/linux.c: Likewise. + * loader/i386/ieee1275/linux.c: Likewise. + * loader/i386/linux.c: Likewise. + * loader/i386/multiboot.c: Likewise. + * loader/i386/pc/linux.c: Likewise. + * loader/multiboot2.c: Likewise. + * loader/powerpc/ieee1275/linux.c: Likewise. + * loader/sparc64/ieee1275/linux.c: Likewise. + * po/POTFILES: Add `kern/err.c', `loader/i386/efi/linux.c', + `loader/i386/ieee1275/linux.c', `loader/i386/linux.c', + `loader/i386/multiboot.c', `loader/i386/pc/linux.c', + `loader/multiboot2.c' and `loader/powerpc/ieee1275/linux.c' files. + +2010-01-06 Carles Pina i Estany + * kern/err.c: Include `'. (grub_print_error): Add full stop. Gettextizze. * loader/i386/bsd.c (grub_netbsd_boot): Change grub_error description. === modified file 'commands/boot.c' --- commands/boot.c 2010-01-03 18:24:22 +0000 +++ commands/boot.c 2010-01-06 22:07:04 +0000 @@ -144,7 +144,7 @@ grub_loader_boot (void) struct grub_preboot_t *cur; if (! grub_loader_loaded) - return grub_error (GRUB_ERR_NO_KERNEL, "no loaded kernel"); + return grub_error (GRUB_ERR_NO_KERNEL, N_("no loaded kernel")); if (grub_loader_noreturn) grub_machine_fini (); === modified file 'kern/err.c' --- kern/err.c 2010-01-06 22:00:57 +0000 +++ kern/err.c 2010-01-06 22:07:27 +0000 @@ -122,7 +122,7 @@ grub_print_error (void) do { if (grub_errno != GRUB_ERR_NONE) - grub_err_printf (_("error: %s.\n"), grub_errmsg); + grub_err_printf (_("error: %s.\n"), _(grub_errmsg)); } while (grub_error_pop ()); === modified file 'loader/i386/bsd.c' --- loader/i386/bsd.c 2010-01-06 22:00:57 +0000 +++ loader/i386/bsd.c 2010-01-06 22:42:49 +0000 @@ -680,7 +680,7 @@ grub_netbsd_boot (void) + sizeof (struct grub_netbsd_btinfo_mmap_header) + count * sizeof (struct grub_netbsd_btinfo_mmap_entry) > grub_os_area_addr + grub_os_area_size) - return grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory"); + return grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory")); curarg = mmap = (struct grub_netbsd_btinfo_mmap_header *) kern_end; pm = (struct grub_netbsd_btinfo_mmap_entry *) (mmap + 1); @@ -751,10 +751,10 @@ grub_bsd_load_aout (grub_file_t file) return grub_errno; if (grub_file_read (file, &ah, sizeof (ah)) != sizeof (ah)) - return grub_error (GRUB_ERR_READ_ERROR, "cannot read the a.out header"); + return grub_error (GRUB_ERR_READ_ERROR, N_("cannot read the a.out header")); if (grub_aout_get_type (&ah) != AOUT_TYPE_AOUT32) - return grub_error (GRUB_ERR_BAD_OS, "invalid a.out header"); + return grub_error (GRUB_ERR_BAD_OS, N_("invalid a.out header")); entry = ah.aout32.a_entry & 0xFFFFFF; @@ -772,7 +772,7 @@ grub_bsd_load_aout (grub_file_t file) } if (load_addr < 0x100000) - return grub_error (GRUB_ERR_BAD_OS, "load address below 1M"); + return grub_error (GRUB_ERR_BAD_OS, N_("load address below 1M")); kern_start = load_addr; kern_end = load_addr + ah.aout32.a_text + ah.aout32.a_data; @@ -812,7 +812,7 @@ grub_bsd_elf32_hook (Elf32_Phdr * phdr, if ((paddr < grub_os_area_addr) || (paddr + phdr->p_memsz > grub_os_area_addr + grub_os_area_size)) - return grub_error (GRUB_ERR_OUT_OF_RANGE, "address 0x%x is out of range", + return grub_error (GRUB_ERR_OUT_OF_RANGE, N_("address 0x%x is out of range"), paddr); if ((!kern_start) || (paddr < kern_start)) @@ -843,7 +843,7 @@ grub_bsd_elf64_hook (Elf64_Phdr * phdr, if ((paddr < grub_os_area_addr) || (paddr + phdr->p_memsz > grub_os_area_addr + grub_os_area_size)) - return grub_error (GRUB_ERR_OUT_OF_RANGE, "address 0x%x is out of range", + return grub_error (GRUB_ERR_OUT_OF_RANGE, N_("address 0x%x is out of range"), paddr); if ((!kern_start) || (paddr < kern_start)) @@ -872,7 +872,7 @@ grub_bsd_load_elf (grub_elf_t elf) is_64bit = 1; if (! grub_cpuid_has_longmode) - return grub_error (GRUB_ERR_BAD_OS, "your CPU does not implement AMD64 architecture"); + return grub_error (GRUB_ERR_BAD_OS, N_("your CPU does not implement AMD64 architecture")); /* FreeBSD has 64-bit entry point. */ if (kernel_type == KERNEL_TYPE_FREEBSD) @@ -888,7 +888,7 @@ grub_bsd_load_elf (grub_elf_t elf) return grub_elf64_load (elf, grub_bsd_elf64_hook, 0, 0); } else - return grub_error (GRUB_ERR_BAD_OS, "invalid ELF"); + return grub_error (GRUB_ERR_BAD_OS, N_("invalid ELF")); } static grub_err_t @@ -903,7 +903,7 @@ grub_bsd_load (int argc, char *argv[]) if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no kernel specified")); goto fail; } @@ -1025,14 +1025,14 @@ grub_cmd_openbsd (grub_extcmd_t cmd, int int unit, part; if (*(arg++) != 'w' || *(arg++) != 'd') return grub_error (GRUB_ERR_BAD_ARGUMENT, - "only device specifications of form " - "wd are supported"); + N_("only device specifications of form " + "wd are supported")); unit = grub_strtoul (arg, (char **) &arg, 10); if (! (arg && *arg >= 'a' && *arg <= 'z')) return grub_error (GRUB_ERR_BAD_ARGUMENT, - "only device specifications of form " - "wd are supported"); + N_("only device specifications of form " + "wd are supported")); part = *arg - 'a'; @@ -1077,15 +1077,15 @@ grub_cmd_freebsd_loadenv (grub_command_t if (kernel_type == KERNEL_TYPE_NONE) return grub_error (GRUB_ERR_BAD_ARGUMENT, - "you need to load the kernel first"); + N_("you need to load the kernel first")); if (kernel_type != KERNEL_TYPE_FREEBSD) return grub_error (GRUB_ERR_BAD_ARGUMENT, - "only FreeBSD supports environment"); + N_("only FreeBSD supports environment")); if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no filename"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no filename")); goto fail; } @@ -1171,15 +1171,15 @@ grub_cmd_freebsd_module (grub_command_t if (kernel_type == KERNEL_TYPE_NONE) return grub_error (GRUB_ERR_BAD_ARGUMENT, - "you need to load the kernel first"); + N_("you need to load the kernel first")); if (kernel_type != KERNEL_TYPE_FREEBSD) return grub_error (GRUB_ERR_BAD_ARGUMENT, - "only FreeBSD supports module"); + N_("only FreeBSD supports module")); if (!is_elf_kernel) return grub_error (GRUB_ERR_BAD_ARGUMENT, - "only ELF kernel supports module"); + N_("only ELF kernel supports module")); /* List the current modules if no parameter. */ if (!argc) @@ -1194,7 +1194,7 @@ grub_cmd_freebsd_module (grub_command_t if (kern_end + file->size > grub_os_area_addr + grub_os_area_size) { - grub_error (GRUB_ERR_OUT_OF_RANGE, "not enough memory for the module"); + grub_error (GRUB_ERR_OUT_OF_RANGE, N_("not enough memory for the module")); goto fail; } @@ -1237,15 +1237,15 @@ grub_cmd_freebsd_module_elf (grub_comman if (kernel_type == KERNEL_TYPE_NONE) return grub_error (GRUB_ERR_BAD_ARGUMENT, - "you need to load the kernel first"); + N_("you need to load the kernel first")); if (kernel_type != KERNEL_TYPE_FREEBSD) return grub_error (GRUB_ERR_BAD_ARGUMENT, - "only FreeBSD supports module"); + N_("only FreeBSD supports module")); if (! is_elf_kernel) return grub_error (GRUB_ERR_BAD_ARGUMENT, - "only ELF kernel supports module"); + N_("only ELF kernel supports module")); /* List the current modules if no parameter. */ if (! argc) === modified file 'loader/i386/efi/linux.c' --- loader/i386/efi/linux.c 2009-12-26 23:36:59 +0000 +++ loader/i386/efi/linux.c 2010-01-06 22:12:11 +0000 @@ -33,6 +33,7 @@ #include #include #include +#include #define GRUB_LINUX_CL_OFFSET 0x1000 #define GRUB_LINUX_CL_END_OFFSET 0x2000 @@ -233,7 +234,7 @@ allocate_pages (grub_size_t prot_size) if (! real_mode_mem) { - grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot allocate real mode pages"); + grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("cannot allocate real mode pages")); goto fail; } @@ -245,7 +246,7 @@ allocate_pages (grub_size_t prot_size) if (! prot_mode_mem) { grub_error (GRUB_ERR_OUT_OF_MEMORY, - "cannot allocate protected mode pages"); + N_("cannot allocate protected mode pages")); goto fail; } @@ -609,7 +610,7 @@ grub_cmd_linux (grub_command_t cmd __att if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no kernel specified")); goto fail; } @@ -619,19 +620,19 @@ grub_cmd_linux (grub_command_t cmd __att if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh)) { - grub_error (GRUB_ERR_READ_ERROR, "cannot read the linux header"); + grub_error (GRUB_ERR_READ_ERROR, N_("cannot read the linux header")); goto fail; } if (lh.boot_flag != grub_cpu_to_le16 (0xaa55)) { - grub_error (GRUB_ERR_BAD_OS, "invalid magic number"); + grub_error (GRUB_ERR_BAD_OS, N_("invalid magic number")); goto fail; } if (lh.setup_sects > GRUB_LINUX_MAX_SETUP_SECTS) { - grub_error (GRUB_ERR_BAD_OS, "too many setup sectors"); + grub_error (GRUB_ERR_BAD_OS, N_("too many setup sectors")); goto fail; } @@ -639,14 +640,14 @@ grub_cmd_linux (grub_command_t cmd __att if (lh.header != grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE) || grub_le_to_cpu16 (lh.version) < 0x0203) { - grub_error (GRUB_ERR_BAD_OS, "too old version"); + grub_error (GRUB_ERR_BAD_OS, N_("too old version")); goto fail; } /* I'm not sure how to support zImage on EFI. */ if (! (lh.loadflags & GRUB_LINUX_FLAG_BIG_KERNEL)) { - grub_error (GRUB_ERR_BAD_OS, "zImage is not supported"); + grub_error (GRUB_ERR_BAD_OS, N_("zImage is not supported")); goto fail; } @@ -671,7 +672,7 @@ grub_cmd_linux (grub_command_t cmd __att len = 0x400 - sizeof (lh); if (grub_file_read (file, (char *) real_mode_mem + sizeof (lh), len) != len) { - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); goto fail; } @@ -853,7 +854,7 @@ grub_cmd_linux (grub_command_t cmd __att len = prot_size; if (grub_file_read (file, (void *) GRUB_LINUX_BZIMAGE_ADDR, len) != len) - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); if (grub_errno == GRUB_ERR_NONE) { @@ -890,13 +891,13 @@ grub_cmd_initrd (grub_command_t cmd __at if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no module specified")); goto fail; } if (! loaded) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("you need to load the kernel first")); goto fail; } @@ -956,7 +957,7 @@ grub_cmd_initrd (grub_command_t cmd __at if (addr == 0) { - grub_error (GRUB_ERR_OUT_OF_MEMORY, "no free pages available"); + grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("no free pages available")); goto fail; } @@ -966,7 +967,7 @@ grub_cmd_initrd (grub_command_t cmd __at if (grub_file_read (file, initrd_mem, size) != size) { - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); goto fail; } @@ -989,9 +990,9 @@ static grub_command_t cmd_linux, cmd_ini GRUB_MOD_INIT(linux) { cmd_linux = grub_register_command ("linux", grub_cmd_linux, - 0, "Load Linux."); + 0, N_("Load Linux.")); cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd, - 0, "Load initrd."); + 0, N_("Load initrd.")); my_mod = mod; } === modified file 'loader/i386/ieee1275/linux.c' --- loader/i386/ieee1275/linux.c 2010-01-03 22:05:07 +0000 +++ loader/i386/ieee1275/linux.c 2010-01-06 22:13:16 +0000 @@ -32,6 +32,7 @@ #include #include #include +#include #define GRUB_OFW_LINUX_PARAMS_ADDR 0x90000 #define GRUB_OFW_LINUX_KERNEL_ADDR 0x100000 @@ -155,7 +156,7 @@ grub_cmd_linux (grub_command_t cmd __att if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no kernel specified")); goto fail; } @@ -165,14 +166,14 @@ grub_cmd_linux (grub_command_t cmd __att if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh)) { - grub_error (GRUB_ERR_READ_ERROR, "cannot read the linux header"); + grub_error (GRUB_ERR_READ_ERROR, N_("cannot read the linux header")); goto fail; } if ((lh.boot_flag != grub_cpu_to_le16 (0xaa55)) || (lh.header != grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE))) { - grub_error (GRUB_ERR_BAD_OS, "invalid magic number"); + grub_error (GRUB_ERR_BAD_OS, N_("invalid magic number")); goto fail; } @@ -211,7 +212,7 @@ grub_cmd_linux (grub_command_t cmd __att kernel_size = prot_size; if (grub_file_read (file, kernel_addr, prot_size) != (int) prot_size) - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); if (grub_errno == GRUB_ERR_NONE) grub_loader_set (grub_linux_boot, grub_linux_unload, 1); @@ -242,13 +243,13 @@ grub_cmd_initrd (grub_command_t cmd __at if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no module specified")); goto fail; } if (! kernel_addr) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("you need to load the kernel first")); goto fail; } @@ -260,7 +261,7 @@ grub_cmd_initrd (grub_command_t cmd __at if (grub_file_read (file, (void *) GRUB_OFW_LINUX_INITRD_ADDR, initrd_size) != (int) initrd_size) { - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); goto fail; } @@ -276,9 +277,9 @@ static grub_command_t cmd_linux, cmd_ini GRUB_MOD_INIT(linux) { cmd_linux = grub_register_command ("linux", grub_cmd_linux, - 0, "Load Linux."); + 0, N_("Load Linux.")); cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd, - 0, "Load initrd."); + 0, N_("Load initrd.")); my_mod = mod; } === modified file 'loader/i386/linux.c' --- loader/i386/linux.c 2009-12-26 23:36:59 +0000 +++ loader/i386/linux.c 2010-01-06 22:15:32 +0000 @@ -33,6 +33,7 @@ #include #include #include +#include #define GRUB_LINUX_CL_OFFSET 0x1000 #define GRUB_LINUX_CL_END_OFFSET 0x2000 @@ -347,7 +348,7 @@ allocate_pages (grub_size_t prot_size) grub_mmap_iterate (hook); if (! real_mode_mem) { - grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot allocate real mode pages"); + grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("cannot allocate real mode pages")); goto fail; } @@ -603,7 +604,7 @@ grub_cmd_linux (grub_command_t cmd __att if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no kernel specified")); goto fail; } @@ -613,19 +614,19 @@ grub_cmd_linux (grub_command_t cmd __att if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh)) { - grub_error (GRUB_ERR_READ_ERROR, "cannot read the linux header"); + grub_error (GRUB_ERR_READ_ERROR, N_("cannot read the linux header")); goto fail; } if (lh.boot_flag != grub_cpu_to_le16 (0xaa55)) { - grub_error (GRUB_ERR_BAD_OS, "invalid magic number"); + grub_error (GRUB_ERR_BAD_OS, N_("invalid magic number")); goto fail; } if (lh.setup_sects > GRUB_LINUX_MAX_SETUP_SECTS) { - grub_error (GRUB_ERR_BAD_OS, "too many setup sectors"); + grub_error (GRUB_ERR_BAD_OS, N_("too many setup sectors")); goto fail; } @@ -673,7 +674,7 @@ grub_cmd_linux (grub_command_t cmd __att len = 0x400 - sizeof (lh); if (grub_file_read (file, (char *) real_mode_mem + sizeof (lh), len) != len) { - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); goto fail; } @@ -862,7 +863,7 @@ grub_cmd_linux (grub_command_t cmd __att len = prot_size; if (grub_file_read (file, (void *) GRUB_LINUX_BZIMAGE_ADDR, len) != len) - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); if (grub_errno == GRUB_ERR_NONE) { @@ -897,13 +898,13 @@ grub_cmd_initrd (grub_command_t cmd __at if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no module specified")); goto fail; } if (! loaded) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("you need to load the kernel first")); goto fail; } @@ -951,7 +952,7 @@ grub_cmd_initrd (grub_command_t cmd __at if (addr < addr_min) { - grub_error (GRUB_ERR_OUT_OF_RANGE, "the initrd is too big"); + grub_error (GRUB_ERR_OUT_OF_RANGE, N_("the initrd is too big")); goto fail; } @@ -959,7 +960,7 @@ grub_cmd_initrd (grub_command_t cmd __at if (grub_file_read (file, initrd_mem, size) != size) { - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); goto fail; } @@ -982,9 +983,9 @@ static grub_command_t cmd_linux, cmd_ini GRUB_MOD_INIT(linux) { cmd_linux = grub_register_command ("linux", grub_cmd_linux, - 0, "Load Linux."); + 0, N_("Load Linux.")); cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd, - 0, "Load initrd."); + 0, N_("Load initrd.")); my_mod = mod; } === modified file 'loader/i386/multiboot.c' --- loader/i386/multiboot.c 2009-12-25 11:43:20 +0000 +++ loader/i386/multiboot.c 2010-01-06 22:17:46 +0000 @@ -49,6 +49,7 @@ #include #endif #include +#include extern grub_dl_t my_mod; static struct multiboot_info *mbi, *mbi_dest; @@ -166,7 +167,7 @@ grub_multiboot_load_elf (grub_file_t fil else if (grub_multiboot_is_elf64 (buffer)) return grub_multiboot_load_elf64 (file, buffer); - return grub_error (GRUB_ERR_UNKNOWN_OS, "unknown ELF class"); + return grub_error (GRUB_ERR_UNKNOWN_OS, N_("unknown ELF class")); } static int @@ -226,21 +227,21 @@ grub_multiboot (int argc, char *argv[]) if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no kernel specified")); goto fail; } file = grub_gzfile_open (argv[0], 1); if (! file) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "couldn't open file"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("couldn't open file")); goto fail; } len = grub_file_read (file, buffer, MULTIBOOT_SEARCH); if (len < 32) { - grub_error (GRUB_ERR_BAD_OS, "file too small"); + grub_error (GRUB_ERR_BAD_OS, N_("file too small")); goto fail; } @@ -257,14 +258,14 @@ grub_multiboot (int argc, char *argv[]) if (header == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no multiboot header found"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no multiboot header found")); goto fail; } if (header->flags & MULTIBOOT_UNSUPPORTED) { grub_error (GRUB_ERR_UNKNOWN_OS, - "unsupported flag: 0x%x", header->flags); + N_("unsupported flag: 0x%x"), header->flags); goto fail; } @@ -408,14 +409,14 @@ grub_module (int argc, char *argv[]) if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no module specified")); goto fail; } if (!mbi) { grub_error (GRUB_ERR_BAD_ARGUMENT, - "you need to load the multiboot kernel first"); + N_("you need to load the multiboot kernel first")); goto fail; } @@ -430,7 +431,7 @@ grub_module (int argc, char *argv[]) if (grub_file_read (file, module, size) != size) { - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); goto fail; } === modified file 'loader/i386/pc/linux.c' --- loader/i386/pc/linux.c 2010-01-03 22:05:07 +0000 +++ loader/i386/pc/linux.c 2010-01-06 22:19:37 +0000 @@ -30,6 +30,7 @@ #include #include #include +#include #define GRUB_LINUX_CL_OFFSET 0x9000 #define GRUB_LINUX_CL_END_OFFSET 0x90FF @@ -63,7 +64,7 @@ grub_cmd_linux (grub_command_t cmd __att if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no kernel specified")); goto fail; } @@ -73,7 +74,7 @@ grub_cmd_linux (grub_command_t cmd __att if ((grub_size_t) grub_file_size (file) > grub_os_area_size) { - grub_error (GRUB_ERR_OUT_OF_RANGE, "too big kernel (0x%x > 0x%x)", + grub_error (GRUB_ERR_OUT_OF_RANGE, N_("too big kernel (0x%x > 0x%x)"), (grub_size_t) grub_file_size (file), grub_os_area_size); goto fail; @@ -81,19 +82,19 @@ grub_cmd_linux (grub_command_t cmd __att if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh)) { - grub_error (GRUB_ERR_READ_ERROR, "cannot read the linux header"); + grub_error (GRUB_ERR_READ_ERROR, N_("cannot read the Linux header")); goto fail; } if (lh.boot_flag != grub_cpu_to_le16 (0xaa55)) { - grub_error (GRUB_ERR_BAD_OS, "invalid magic number"); + grub_error (GRUB_ERR_BAD_OS, N_("invalid magic number")); goto fail; } if (lh.setup_sects > GRUB_LINUX_MAX_SETUP_SECTS) { - grub_error (GRUB_ERR_BAD_OS, "too many setup sectors"); + grub_error (GRUB_ERR_BAD_OS, N_("too many setup sectors")); goto fail; } @@ -153,7 +154,7 @@ grub_cmd_linux (grub_command_t cmd __att if (! grub_linux_is_bzimage && ((char *) GRUB_LINUX_ZIMAGE_ADDR + prot_size > grub_linux_real_addr)) { - grub_error (GRUB_ERR_BAD_OS, "too big zImage (0x%x > 0x%x), use bzImage instead", + grub_error (GRUB_ERR_BAD_OS, N_("too big zImage (0x%x > 0x%x), use bzImage instead"), (char *) GRUB_LINUX_ZIMAGE_ADDR + prot_size, (grub_size_t) grub_linux_real_addr); goto fail; @@ -163,7 +164,7 @@ grub_cmd_linux (grub_command_t cmd __att > (char *) UINT_TO_PTR (grub_mmap_get_lower ())) { grub_error (GRUB_ERR_OUT_OF_RANGE, - "too small lower memory (0x%x > 0x%x)", + N_("too small lower memory (0x%x > 0x%x)"), grub_linux_real_addr + GRUB_LINUX_SETUP_MOVE_SIZE, (int) grub_mmap_get_lower ()); goto fail; @@ -234,7 +235,7 @@ grub_cmd_linux (grub_command_t cmd __att len = real_size + GRUB_DISK_SECTOR_SIZE - sizeof (lh); if (grub_file_read (file, grub_linux_tmp_addr + sizeof (lh), len) != len) { - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); goto fail; } @@ -265,7 +266,7 @@ grub_cmd_linux (grub_command_t cmd __att len = prot_size; if (grub_file_read (file, (void *) GRUB_LINUX_BZIMAGE_ADDR, len) != len) - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); if (grub_errno == GRUB_ERR_NONE) { @@ -299,13 +300,13 @@ grub_cmd_initrd (grub_command_t cmd __at if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no module specified")); goto fail; } if (!loaded) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("you need to load the kernel first")); goto fail; } @@ -314,7 +315,7 @@ grub_cmd_initrd (grub_command_t cmd __at if (!(lh->header == grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE) && grub_le_to_cpu16 (lh->version) >= 0x0200)) { - grub_error (GRUB_ERR_BAD_OS, "the kernel is too old for initrd"); + grub_error (GRUB_ERR_BAD_OS, N_("the kernel is too old for initrd")); goto fail; } @@ -357,13 +358,13 @@ grub_cmd_initrd (grub_command_t cmd __at if (addr < addr_min) { - grub_error (GRUB_ERR_OUT_OF_RANGE, "the initrd is too big"); + grub_error (GRUB_ERR_OUT_OF_RANGE, N_("the initrd is too big")); goto fail; } if (grub_file_read (file, (void *) addr, size) != size) { - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); goto fail; } @@ -383,10 +384,10 @@ GRUB_MOD_INIT(linux16) { cmd_linux = grub_register_command ("linux16", grub_cmd_linux, - 0, "Load Linux."); + 0, N_("Load Linux.")); cmd_initrd = grub_register_command ("initrd16", grub_cmd_initrd, - 0, "Load initrd."); + 0, N_("Load initrd.")); my_mod = mod; } === modified file 'loader/multiboot2.c' --- loader/multiboot2.c 2010-01-03 22:05:07 +0000 +++ loader/multiboot2.c 2010-01-06 22:20:52 +0000 @@ -28,6 +28,7 @@ #include #include #include +#include static grub_addr_t entry; extern grub_dl_t my_mod; @@ -226,7 +227,7 @@ grub_mb2_load_other (grub_file_t file __ void *buffer __attribute__ ((unused))) { /* XXX Create module tag here. */ - return grub_error (GRUB_ERR_UNKNOWN_OS, "currently only ELF is supported"); + return grub_error (GRUB_ERR_UNKNOWN_OS, N_("currently only ELF is supported")); } /* Create the tag containing the cmdline and the address of the module data. */ @@ -289,7 +290,7 @@ grub_mb2_load_elf (grub_elf_t elf, int a &kern_size); } else - err = grub_error (GRUB_ERR_UNKNOWN_OS, "unknown ELF class"); + err = grub_error (GRUB_ERR_UNKNOWN_OS, N_("unknown ELF class")); if (err) goto fail; @@ -319,14 +320,14 @@ grub_multiboot2 (int argc, char *argv[]) if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no kernel specified")); goto fail; } file = grub_gzfile_open (argv[0], 1); if (! file) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "couldn't open file"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("couldn't open file")); goto fail; } @@ -337,7 +338,7 @@ grub_multiboot2 (int argc, char *argv[]) len = grub_file_read (file, buffer, MULTIBOOT2_HEADER_SEARCH); if (len < 32) { - grub_error (GRUB_ERR_BAD_OS, "file too small"); + grub_error (GRUB_ERR_BAD_OS, N_("file too small")); goto fail; } @@ -378,7 +379,7 @@ grub_multiboot2 (int argc, char *argv[]) err = grub_mb2_load_other (file, header); else err = grub_error (GRUB_ERR_BAD_OS, - "need multiboot 2 header to load non-ELF files"); + N_("need multiboot 2 header to load non-ELF files")); grub_file_close (file); } @@ -406,20 +407,20 @@ grub_module2 (int argc, char *argv[]) if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no module specified")); return; } if (argc == 1) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no module type specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no module type specified")); return; } if (entry == 0) { grub_error (GRUB_ERR_BAD_ARGUMENT, - "you need to load the multiboot kernel first"); + N_("you need to load the multiboot kernel first")); return; } @@ -437,7 +438,7 @@ grub_module2 (int argc, char *argv[]) modaddr + modsize); if (grub_file_read (file, (void *) modaddr, modsize) != modsize) { - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); goto out; } === modified file 'loader/powerpc/ieee1275/linux.c' --- loader/powerpc/ieee1275/linux.c 2010-01-03 22:05:07 +0000 +++ loader/powerpc/ieee1275/linux.c 2010-01-06 22:22:15 +0000 @@ -26,6 +26,7 @@ #include #include #include +#include #define ELF32_LOADMASK (0xc0000000UL) #define ELF64_LOADMASK (0xc000000000000000ULL) @@ -75,10 +76,10 @@ grub_linux_release_mem (void) linux_args = 0; if (linux_addr && grub_ieee1275_release (linux_addr, linux_size)) - return grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot release memory"); + return grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("cannot release memory")); if (initrd_addr && grub_ieee1275_release (initrd_addr, initrd_size)) - return grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot release memory"); + return grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("cannot release memory")); linux_addr = 0; initrd_addr = 0; @@ -128,7 +129,7 @@ grub_linux_load32 (grub_elf_t elf) break; } if (found_addr == -1) - return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't claim memory"); + return grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("couldn't claim memory")); /* Now load the segments into the area we claimed. */ auto grub_err_t offset_phdr (Elf32_Phdr *phdr, grub_addr_t *addr, int *do_load); @@ -178,7 +179,7 @@ grub_linux_load64 (grub_elf_t elf) break; } if (found_addr == -1) - return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't claim memory"); + return grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("couldn't claim memory")); /* Now load the segments into the area we claimed. */ auto grub_err_t offset_phdr (Elf64_Phdr *phdr, grub_addr_t *addr, int *do_load); @@ -211,7 +212,7 @@ grub_cmd_linux (grub_command_t cmd __att if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no kernel specified")); goto out; } @@ -222,7 +223,7 @@ grub_cmd_linux (grub_command_t cmd __att if (elf->ehdr.ehdr32.e_type != ET_EXEC) { grub_error (GRUB_ERR_UNKNOWN_OS, - "this ELF file is not of the right type"); + N_("this ELF file is not of the right type")); goto out; } @@ -236,7 +237,7 @@ grub_cmd_linux (grub_command_t cmd __att grub_linux_load64 (elf); else { - grub_error (GRUB_ERR_BAD_FILE_TYPE, "unknown ELF class"); + grub_error (GRUB_ERR_BAD_FILE_TYPE, N_("unknown ELF class")); goto out; } @@ -291,13 +292,13 @@ grub_cmd_initrd (grub_command_t cmd __at if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no initrd specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no initrd specified")); goto fail; } if (!loaded) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("you need to load the kernel first")); goto fail; } @@ -321,7 +322,7 @@ grub_cmd_initrd (grub_command_t cmd __at if (found_addr == -1) { - grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot claim memory"); + grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("cannot claim memory")); goto fail; } @@ -330,7 +331,7 @@ grub_cmd_initrd (grub_command_t cmd __at if (grub_file_read (file, (void *) addr, size) != size) { grub_ieee1275_release (addr, size); - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); goto fail; } @@ -349,9 +350,9 @@ static grub_command_t cmd_linux, cmd_ini GRUB_MOD_INIT(linux) { cmd_linux = grub_register_command ("linux", grub_cmd_linux, - 0, "Load Linux."); + 0, N_("Load Linux.")); cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd, - 0, "Load initrd."); + 0, N_("Load initrd.")); my_mod = mod; } === modified file 'loader/sparc64/ieee1275/linux.c' --- loader/sparc64/ieee1275/linux.c 2009-12-29 18:06:04 +0000 +++ loader/sparc64/ieee1275/linux.c 2010-01-06 22:23:23 +0000 @@ -27,6 +27,7 @@ #include #include #include +#include static grub_dl_t my_mod; @@ -256,12 +257,12 @@ grub_linux_load64 (grub_elf_t elf) paddr = alloc_phys (linux_size + off); if (paddr == (grub_addr_t) -1) return grub_error (GRUB_ERR_OUT_OF_MEMORY, - "couldn't allocate physical memory"); + N_("couldn't allocate physical memory")); ret = grub_ieee1275_map_physical (paddr, linux_addr - off, linux_size + off, IEEE1275_MAP_DEFAULT); if (ret) return grub_error (GRUB_ERR_OUT_OF_MEMORY, - "couldn't map physical memory"); + N_("couldn't map physical memory")); grub_dprintf ("loader", "Loading linux at vaddr 0x%lx, paddr 0x%lx, size 0x%lx\n", linux_addr, paddr, linux_size); @@ -302,7 +303,7 @@ grub_cmd_linux (grub_command_t cmd __att if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no kernel specified")); goto out; } @@ -317,7 +318,7 @@ grub_cmd_linux (grub_command_t cmd __att if (elf->ehdr.ehdr32.e_type != ET_EXEC) { grub_error (GRUB_ERR_UNKNOWN_OS, - "this ELF file is not of the right type"); + N_("this ELF file is not of the right type")); goto out; } @@ -328,7 +329,7 @@ grub_cmd_linux (grub_command_t cmd __att grub_linux_load64 (elf); else { - grub_error (GRUB_ERR_BAD_FILE_TYPE, "unknown ELF class"); + grub_error (GRUB_ERR_BAD_FILE_TYPE, N_("unknown ELF class")); goto out; } @@ -384,13 +385,13 @@ grub_cmd_initrd (grub_command_t cmd __at if (argc == 0) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "no initrd specified"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no initrd specified")); goto fail; } if (!loaded) { - grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first"); + grub_error (GRUB_ERR_BAD_ARGUMENT, N_("you need to load the kernel first")); goto fail; } @@ -405,14 +406,14 @@ grub_cmd_initrd (grub_command_t cmd __at if (paddr == (grub_addr_t) -1) { grub_error (GRUB_ERR_OUT_OF_MEMORY, - "couldn't allocate physical memory"); + N_("couldn't allocate physical memory")); goto fail; } ret = grub_ieee1275_map_physical (paddr, addr, size, IEEE1275_MAP_DEFAULT); if (ret) { grub_error (GRUB_ERR_OUT_OF_MEMORY, - "couldn't map physical memory"); + N_("couldn't map physical memory")); goto fail; } @@ -421,7 +422,7 @@ grub_cmd_initrd (grub_command_t cmd __at if (grub_file_read (file, (void *) addr, size) != size) { - grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file"); + grub_error (GRUB_ERR_FILE_READ_ERROR, N_("couldn't read file")); goto fail; } @@ -516,9 +517,9 @@ GRUB_MOD_INIT(linux) fetch_translations (); cmd_linux = grub_register_command ("linux", grub_cmd_linux, - 0, "Load Linux."); + 0, N_("Load Linux.")); cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd, - 0, "Load initrd."); + 0, N_("Load initrd.")); my_mod = mod; } === modified file 'po/POTFILES' --- po/POTFILES 2010-01-06 21:36:34 +0000 +++ po/POTFILES 2010-01-06 22:23:58 +0000 @@ -51,9 +51,18 @@ disk/loopback.c hello/hello.c +kern/err.c + lib/arg.c loader/i386/bsd.c +loader/i386/efi/linux.c +loader/i386/ieee1275/linux.c +loader/i386/linux.c +loader/i386/multiboot.c +loader/i386/pc/linux.c +loader/multiboot2.c +loader/powerpc/ieee1275/linux.c normal/auth.c normal/color.c