* grub-core/commands/ls.c: Gettextize.
* grub-core/commands/setpci.c: Likewise. * grub-core/commands/videotest.c: Likewise. * grub-core/disk/geli.c: Likewise. * grub-core/kern/mm.c: Likewise. * grub-core/lib/relocator.c: Likewise. * grub-core/loader/efi/appleloader.c: Likewise. * grub-core/loader/i386/xnu.c: Likewise. * grub-core/loader/ia64/efi/linux.c: Likewise. * grub-core/loader/xnu.c: Likewise. * grub-core/net/dns.c: Likewise. * grub-core/net/net.c: Likewise. * grub-core/script/lexer.c: Likewise. * grub-core/script/parser.y: Likewise. * grub-core/script/yylex.l: Likewise. * util/getroot.c: Likewise. * util/grub-setup.c: Likewise.
This commit is contained in:
parent
a646a366bb
commit
4a9f8346c9
18 changed files with 68 additions and 45 deletions
20
ChangeLog
20
ChangeLog
|
@ -1,3 +1,23 @@
|
|||
2012-02-03 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/commands/ls.c: Gettextize.
|
||||
* grub-core/commands/setpci.c: Likewise.
|
||||
* grub-core/commands/videotest.c: Likewise.
|
||||
* grub-core/disk/geli.c: Likewise.
|
||||
* grub-core/kern/mm.c: Likewise.
|
||||
* grub-core/lib/relocator.c: Likewise.
|
||||
* grub-core/loader/efi/appleloader.c: Likewise.
|
||||
* grub-core/loader/i386/xnu.c: Likewise.
|
||||
* grub-core/loader/ia64/efi/linux.c: Likewise.
|
||||
* grub-core/loader/xnu.c: Likewise.
|
||||
* grub-core/net/dns.c: Likewise.
|
||||
* grub-core/net/net.c: Likewise.
|
||||
* grub-core/script/lexer.c: Likewise.
|
||||
* grub-core/script/parser.y: Likewise.
|
||||
* grub-core/script/yylex.l: Likewise.
|
||||
* util/getroot.c: Likewise.
|
||||
* util/grub-setup.c: Likewise.
|
||||
|
||||
2012-02-03 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/reiserfs.c (grub_reiserfs_get_item): Use proper error
|
||||
|
|
|
@ -168,7 +168,7 @@ grub_ls_list_files (char *dirname, int longlist, int all, int human)
|
|||
grub_free (pathname);
|
||||
}
|
||||
else
|
||||
grub_printf ("%-12s", "DIR");
|
||||
grub_printf ("%-12s", _("DIR"));
|
||||
|
||||
if (info->mtimeset)
|
||||
{
|
||||
|
|
|
@ -128,7 +128,7 @@ grub_setpci_iter (grub_pci_device_t dev, grub_pci_id_t pciid)
|
|||
|
||||
if (!write_mask)
|
||||
{
|
||||
grub_printf (N_("Register %x of %d:%d.%d is %x\n"), regaddr,
|
||||
grub_printf (_("Register %x of %d:%d.%d is %x\n"), regaddr,
|
||||
grub_pci_get_bus (dev),
|
||||
grub_pci_get_device (dev),
|
||||
grub_pci_get_function (dev),
|
||||
|
|
|
@ -208,7 +208,7 @@ static grub_command_t cmd_vbe;
|
|||
GRUB_MOD_INIT(videotest)
|
||||
{
|
||||
cmd = grub_register_command ("videotest", grub_cmd_videotest,
|
||||
"[WxH]",
|
||||
N_("[WxH]"),
|
||||
N_("Test video subsystem in mode WxH."));
|
||||
#ifdef GRUB_MACHINE_PCBIOS
|
||||
cmd_vbe = grub_register_command ("vbetest", grub_cmd_videotest,
|
||||
|
|
|
@ -72,7 +72,7 @@ grub_md_sha256_real (void)
|
|||
const gcry_md_spec_t *ret;
|
||||
ret = grub_crypto_lookup_md_by_name ("sha256");
|
||||
if (!ret)
|
||||
grub_util_error ("Coulnd't load sha256");
|
||||
grub_util_error (_("Coulnd't load sha256"));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ grub_md_sha512_real (void)
|
|||
const gcry_md_spec_t *ret;
|
||||
ret = grub_crypto_lookup_md_by_name ("sha512");
|
||||
if (!ret)
|
||||
grub_util_error ("Coulnd't load sha512");
|
||||
grub_util_error (_("Coulnd't load sha512"));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -324,7 +324,7 @@ grub_memalign (grub_size_t align, grub_size_t size)
|
|||
}
|
||||
|
||||
fail:
|
||||
grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
|
||||
grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1365,7 +1365,7 @@ grub_relocator_alloc_chunk_align (struct grub_relocator *rel,
|
|||
break;
|
||||
}
|
||||
|
||||
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
|
||||
return grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
|
||||
}
|
||||
while (0);
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ static grub_command_t cmd;
|
|||
GRUB_MOD_INIT(appleloader)
|
||||
{
|
||||
cmd = grub_register_command ("appleloader", grub_cmd_appleloader,
|
||||
"[OPTS]", N_("Boot legacy system."));
|
||||
N_("[OPTS]"), N_("Boot legacy system."));
|
||||
my_mod = mod;
|
||||
}
|
||||
|
||||
|
|
|
@ -1003,7 +1003,7 @@ grub_xnu_boot (void)
|
|||
|
||||
if (debug && (grub_strword (debug, "all") || grub_strword (debug, "xnu")))
|
||||
{
|
||||
grub_printf ("Press any key to launch xnu\n");
|
||||
grub_printf (_("Press any key to launch xnu\n"));
|
||||
grub_getkey ();
|
||||
}
|
||||
|
||||
|
|
|
@ -138,14 +138,14 @@ query_fpswa (void)
|
|||
NULL, &size, &fpswa_image);
|
||||
if (status != GRUB_EFI_SUCCESS)
|
||||
{
|
||||
grub_printf("Could not locate FPSWA driver\n");
|
||||
grub_printf (_("Could not locate FPSWA driver\n"));
|
||||
return;
|
||||
}
|
||||
status = bs->handle_protocol (fpswa_image,
|
||||
(void *)&fpswa_protocol, (void *)&fpswa);
|
||||
if (status != GRUB_EFI_SUCCESS)
|
||||
{
|
||||
grub_printf ("Fpswa protocol not able find the interface\n");
|
||||
grub_printf (_("Fpswa protocol not able find the interface\n"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -750,13 +750,13 @@ grub_cmd_relocate (grub_command_t cmd __attribute__ ((unused)),
|
|||
|
||||
if (argc == 0)
|
||||
{
|
||||
grub_printf ("relocate is %s\n", vals[relocate]);
|
||||
grub_printf (_("relocate is %s\n"), vals[relocate]);
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
else if (argc == 1)
|
||||
{
|
||||
if (kernel_mem != NULL)
|
||||
grub_printf ("Warning: kernel already loaded!\n");
|
||||
grub_printf (_("Warning: kernel already loaded!\n"));
|
||||
for (i = 0; i < sizeof (vals)/sizeof(vals[0]); i++)
|
||||
if (grub_strcmp (argv[0], vals[i]) == 0)
|
||||
{
|
||||
|
@ -778,14 +778,12 @@ grub_cmd_fpswa (grub_command_t cmd __attribute__ ((unused)),
|
|||
int argc, char *argv[] __attribute__((unused)))
|
||||
{
|
||||
if (argc != 0)
|
||||
{
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Arguments not expected");
|
||||
}
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Arguments not expected");
|
||||
query_fpswa ();
|
||||
if (fpswa == NULL)
|
||||
grub_printf ("No FPSWA loaded\n");
|
||||
grub_printf (_("No FPSWA loaded\n"));
|
||||
else
|
||||
grub_printf ("FPSWA revision: %x\n", fpswa->revision);
|
||||
grub_printf (_("FPSWA revision: %x\n"), fpswa->revision);
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
|
@ -794,21 +792,21 @@ static grub_command_t cmd_linux, cmd_initrd, cmd_payload, cmd_relocate, cmd_fpsw
|
|||
GRUB_MOD_INIT(linux)
|
||||
{
|
||||
cmd_linux = grub_register_command ("linux", grub_cmd_linux,
|
||||
"FILE [ARGS...]", "Load Linux.");
|
||||
N_("FILE [ARGS...]"), N_("Load Linux."));
|
||||
|
||||
cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd,
|
||||
"FILE", "Load initrd.");
|
||||
N_("FILE"), N_("Load initrd."));
|
||||
|
||||
cmd_payload = grub_register_command ("payload", grub_cmd_payload,
|
||||
"FILE [ARGS...]",
|
||||
"Load an additional file.");
|
||||
N_("FILE [ARGS...]"),
|
||||
N_("Load an additional file."));
|
||||
|
||||
cmd_relocate = grub_register_command ("relocate", grub_cmd_relocate,
|
||||
"[on|off|force]",
|
||||
"Set relocate feature.");
|
||||
N_("[on|off|force]"),
|
||||
N_("Set relocate feature."));
|
||||
|
||||
cmd_fpswa = grub_register_command ("fpswa", grub_cmd_fpswa,
|
||||
"", "Display FPSWA version.");
|
||||
"", N_("Display FPSWA version."));
|
||||
|
||||
my_mod = mod;
|
||||
}
|
||||
|
|
|
@ -1383,7 +1383,7 @@ grub_xnu_bitmap_mode_t grub_xnu_bitmap_mode;
|
|||
|
||||
static const struct grub_arg_option xnu_splash_cmd_options[] =
|
||||
{
|
||||
{"mode", 'm', 0, "Background image mode.", "stretch|normal",
|
||||
{"mode", 'm', 0, N_("Background image mode."), N_("stretch|normal"),
|
||||
ARG_TYPE_STRING},
|
||||
{0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
@ -1460,8 +1460,8 @@ GRUB_MOD_INIT(xnu)
|
|||
N_("DIRECTORY [OSBundleRequired]"),
|
||||
N_("Load XNU extension directory."));
|
||||
cmd_ramdisk = grub_register_command ("xnu_ramdisk", grub_cmd_xnu_ramdisk, 0,
|
||||
"Load XNU ramdisk. "
|
||||
"It will be seen as md0.");
|
||||
N_("Load XNU ramdisk. "
|
||||
"It will be seen as md0."));
|
||||
cmd_splash = grub_register_extcmd ("xnu_splash",
|
||||
grub_cmd_xnu_splash, 0, 0,
|
||||
N_("Load a splash image for XNU."),
|
||||
|
|
|
@ -673,13 +673,13 @@ void
|
|||
grub_dns_init (void)
|
||||
{
|
||||
cmd = grub_register_command ("net_nslookup", grub_cmd_nslookup,
|
||||
"ADDRESS DNSSERVER",
|
||||
N_("ADDRESS DNSSERVER"),
|
||||
N_("Perform a DNS lookup"));
|
||||
cmd_add = grub_register_command ("net_add_dns", grub_cmd_add_dns,
|
||||
"DNSSERVER",
|
||||
N_("DNSSERVER"),
|
||||
N_("Add a DNS server"));
|
||||
cmd_del = grub_register_command ("net_del_dns", grub_cmd_del_dns,
|
||||
"DNSSERVER",
|
||||
N_("DNSSERVER"),
|
||||
N_("Remove a DNS server"));
|
||||
cmd_list = grub_register_command ("net_ls_dns", grub_cmd_list_dns,
|
||||
NULL, N_("List DNS servers"));
|
||||
|
|
|
@ -676,7 +676,8 @@ grub_net_addr_to_str (const grub_net_network_level_address_t *target, char *buf)
|
|||
switch (target->type)
|
||||
{
|
||||
case GRUB_NET_NETWORK_LEVEL_PROTOCOL_DHCP_RECV:
|
||||
grub_strcpy (buf, "temporary");
|
||||
/* TRANSLATORS: it refers to the network address. */
|
||||
grub_strcpy (buf, _("temporary"));
|
||||
return;
|
||||
case GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6:
|
||||
{
|
||||
|
@ -732,7 +733,7 @@ grub_net_hwaddr_to_str (const grub_net_link_level_address_t *addr, char *str)
|
|||
return;
|
||||
}
|
||||
}
|
||||
grub_printf ("Unsupported hw address type %d\n", addr->type);
|
||||
grub_printf (_("Unsupported hw address type %d\n"), addr->type);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -748,7 +749,7 @@ grub_net_hwaddr_cmp (const grub_net_link_level_address_t *a,
|
|||
case GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET:
|
||||
return grub_memcmp (a->mac, b->mac, sizeof (a->mac));
|
||||
}
|
||||
grub_printf ("Unsupported hw address type %d\n", a->type);
|
||||
grub_printf (_("Unsupported hw address type %d\n"), a->type);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -769,7 +770,7 @@ grub_net_addr_cmp (const grub_net_network_level_address_t *a,
|
|||
case GRUB_NET_NETWORK_LEVEL_PROTOCOL_DHCP_RECV:
|
||||
return 0;
|
||||
}
|
||||
grub_printf ("Unsupported address type %d\n", a->type);
|
||||
grub_printf (_("Unsupported address type %d\n"), a->type);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1036,7 +1037,8 @@ print_net_address (const grub_net_network_level_netaddress_t *target)
|
|||
switch (target->type)
|
||||
{
|
||||
case GRUB_NET_NETWORK_LEVEL_PROTOCOL_DHCP_RECV:
|
||||
grub_printf ("temporary\n");
|
||||
/* TRANSLATORS: it refers to the network address. */
|
||||
grub_printf ("%s\n", _("temporary"));
|
||||
return;
|
||||
case GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4:
|
||||
{
|
||||
|
@ -1059,7 +1061,7 @@ print_net_address (const grub_net_network_level_netaddress_t *target)
|
|||
}
|
||||
return;
|
||||
}
|
||||
grub_printf ("Unknown address type %d\n", target->type);
|
||||
grub_printf (_("Unknown address type %d\n"), target->type);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <grub/misc.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/script_sh.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
#define yytext_ptr char *
|
||||
#include "grub_script.tab.h"
|
||||
|
@ -140,7 +141,7 @@ grub_script_lexer_yywrap (struct grub_parser_param *parserstate,
|
|||
|
||||
if (! lexerstate->getline && ! input)
|
||||
{
|
||||
grub_script_yyerror (parserstate, "unexpected end of file");
|
||||
grub_script_yyerror (parserstate, N_("unexpected end of file"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -170,7 +171,7 @@ grub_script_lexer_yywrap (struct grub_parser_param *parserstate,
|
|||
|
||||
if (! line)
|
||||
{
|
||||
grub_script_yyerror (parserstate, "out of memory");
|
||||
grub_script_yyerror (parserstate, N_("out of memory"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <grub/script_sh.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
#define YYFREE grub_free
|
||||
#define YYMALLOC grub_malloc
|
||||
|
@ -107,7 +108,7 @@ script: newlines0
|
|||
| error
|
||||
{
|
||||
$$ = 0;
|
||||
yyerror (state, "Incorrect command");
|
||||
yyerror (state, N_("Incorrect command"));
|
||||
yyerrok;
|
||||
}
|
||||
;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <grub/misc.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/script_sh.h>
|
||||
#include <grub/i18n.h>
|
||||
#include "grub_script.tab.h"
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
|
@ -37,7 +38,7 @@
|
|||
*/
|
||||
#define YY_FATAL_ERROR(msg) \
|
||||
do { \
|
||||
grub_printf ("fatal error: %s\n", msg); \
|
||||
grub_printf (_("fatal error: %s\n"), _(msg)); \
|
||||
} while (0)
|
||||
|
||||
#define COPY(str, hint) \
|
||||
|
@ -364,7 +365,7 @@ grub_lexer_unput (const char *text, yyscan_t yyscanner)
|
|||
lexerstate->prefix = grub_strdup (text);
|
||||
if (! lexerstate->prefix)
|
||||
{
|
||||
grub_script_yyerror (yyget_extra (yyscanner), "out of memory");
|
||||
grub_script_yyerror (yyget_extra (yyscanner), N_("out of memory"));
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -611,7 +611,7 @@ grub_find_device (const char *dir, dev_t dev)
|
|||
if (res)
|
||||
{
|
||||
if (chdir (saved_cwd) < 0)
|
||||
grub_util_error ("cannot restore the original directory");
|
||||
grub_util_error (_("cannot restore the original directory"));
|
||||
|
||||
free (saved_cwd);
|
||||
closedir (dp);
|
||||
|
@ -1991,7 +1991,7 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev)
|
|||
if (grub_errno == GRUB_ERR_UNKNOWN_DEVICE)
|
||||
{
|
||||
grub_util_warn
|
||||
("disk does not exist, so falling back to partition device %s",
|
||||
(_("disk does not exist, so falling back to partition device %s"),
|
||||
os_dev);
|
||||
|
||||
drive = find_system_device (os_dev, &st, 0, 1);
|
||||
|
|
|
@ -511,7 +511,7 @@ setup (const char *dir,
|
|||
+ GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_LENGTH));
|
||||
|
||||
if (no_rs_length == 0xffff)
|
||||
grub_util_error ("core.img version mismatch");
|
||||
grub_util_error (_("core.img version mismatch"));
|
||||
|
||||
void *tmp = xmalloc (core_size);
|
||||
grub_memcpy (tmp, core_img, core_size);
|
||||
|
|
Loading…
Reference in a new issue