Improve string. Gettextize.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-12 15:25:25 +01:00
parent 78dde88e8c
commit d61386e21d
64 changed files with 219 additions and 131 deletions

View file

@ -68,7 +68,7 @@ grub_core_cmd_unset (struct grub_command *cmd __attribute__ ((unused)),
{
if (argc < 1)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"no environment variable specified");
N_("one argument expected"));
grub_env_unset (argv[0]);
return 0;
@ -83,7 +83,7 @@ grub_core_cmd_insmod (struct grub_command *cmd __attribute__ ((unused)),
grub_dl_t mod;
if (argc == 0)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("one argument expected"));
p = grub_strchr (argv[0], '/');
if (! p)

View file

@ -284,7 +284,7 @@ grub_disk_open (const char *name)
disk->partition = grub_partition_probe (disk, p + 1);
if (! disk->partition)
{
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such partition");
grub_error (GRUB_ERR_UNKNOWN_DEVICE, N_("no such partition"));
goto fail;
}
}

View file

@ -373,7 +373,7 @@ grub_strtoul (const char *str, char **end, int base)
#if GRUB_CPU_SIZEOF_LONG != 8
if (num > ~0UL)
{
grub_error (GRUB_ERR_OUT_OF_RANGE, "overflow is detected");
grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected"));
return ~0UL;
}
#endif
@ -427,7 +427,8 @@ grub_strtoull (const char *str, char **end, int base)
/* NUM * BASE + DIGIT > ~0ULL */
if (num > grub_divmod64 (~0ULL - digit, base, 0))
{
grub_error (GRUB_ERR_OUT_OF_RANGE, "overflow is detected");
grub_error (GRUB_ERR_OUT_OF_RANGE,
N_("overflow is detected"));
return ~0ULL;
}
@ -437,7 +438,8 @@ grub_strtoull (const char *str, char **end, int base)
if (! found)
{
grub_error (GRUB_ERR_BAD_NUMBER, "unrecognized number");
grub_error (GRUB_ERR_BAD_NUMBER,
N_("unrecognized number"));
return 0;
}

View file

@ -23,6 +23,7 @@
#include <grub/parser.h>
#include <grub/misc.h>
#include <grub/command.h>
#include <grub/i18n.h>
grub_err_t
grub_rescue_parse_line (char *line, grub_reader_getline_t getline)
@ -63,7 +64,7 @@ grub_rescue_parse_line (char *line, grub_reader_getline_t getline)
}
else
{
grub_printf ("Unknown command `%s'\n", name);
grub_printf_ (N_("Unknown command `%s'.\n"), name);
if (grub_command_find ("help"))
grub_printf ("Try `help' for usage\n");
}