* grub-core/gettext/gettext.c (GRUB_MOD_INIT): Handle errors.
This commit is contained in:
parent
b6cf74c901
commit
3c0eae66fa
2 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
2012-03-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/gettext/gettext.c (GRUB_MOD_INIT): Handle errors.
|
||||
|
||||
2012-03-19 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* util/getroot.c (grub_make_system_path_relative_to_its_root): Fix
|
||||
|
|
|
@ -451,13 +451,18 @@ grub_cmd_translate (grub_command_t cmd __attribute__ ((unused)),
|
|||
GRUB_MOD_INIT (gettext)
|
||||
{
|
||||
const char *lang;
|
||||
grub_err_t err;
|
||||
|
||||
lang = grub_env_get ("lang");
|
||||
|
||||
grub_gettext_init_ext (&main_context, lang, grub_env_get ("locale_dir"),
|
||||
grub_env_get ("prefix"));
|
||||
grub_gettext_init_ext (&secondary_context, lang,
|
||||
grub_env_get ("secondary_locale_dir"), 0);
|
||||
err = grub_gettext_init_ext (&main_context, lang, grub_env_get ("locale_dir"),
|
||||
grub_env_get ("prefix"));
|
||||
if (err)
|
||||
grub_print_error ();
|
||||
err = grub_gettext_init_ext (&secondary_context, lang,
|
||||
grub_env_get ("secondary_locale_dir"), 0);
|
||||
if (err)
|
||||
grub_print_error ();
|
||||
|
||||
grub_register_variable_hook ("locale_dir", NULL, read_main);
|
||||
grub_register_variable_hook ("secondary_locale_dir", NULL, read_secondary);
|
||||
|
|
Loading…
Reference in a new issue