merge mainline into asprintf

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-01-20 07:36:17 +01:00
commit 2d49abe9e7
342 changed files with 14569 additions and 4699 deletions

View file

@ -148,14 +148,24 @@ grub_gettext_translate (const char *orig)
struct grub_gettext_msg *cur;
/* Make sure we can use grub_gettext_translate for error messages. Push
active error message to error stack and reset error message. */
grub_error_push ();
cur = grub_named_list_find (GRUB_AS_NAMED_LIST (grub_gettext_msg_list),
orig);
if (cur)
return cur->translated;
{
grub_error_pop ();
return cur->translated;
}
if (fd_mo == 0)
return orig;
{
grub_error_pop ();
return orig;
}
min = 0;
max = grub_gettext_max;
@ -205,6 +215,7 @@ grub_gettext_translate (const char *orig)
grub_errno = GRUB_ERR_NONE;
}
grub_error_pop ();
return ret;
}
@ -313,7 +324,7 @@ grub_gettext_delete_list (void)
char *original = (char *) ((struct grub_gettext_msg *) item)->name;
grub_free (original);
// Don't delete the translated message because could be in use.
/* Don't delete the translated message because could be in use. */
}
}
@ -352,8 +363,8 @@ GRUB_MOD_INIT (gettext)
grub_gettext_init_ext (lang);
grub_register_command_p1 ("gettext", grub_cmd_translate,
"STRING",
"Translates the string with the current settings.");
N_("STRING"),
N_("Translates the string with the current settings."));
/* Reload .mo file information if lang changes. */
grub_register_variable_hook ("lang", NULL, grub_gettext_env_write_lang);