2010-01-14 Carles Pina i Estany <carles@pina.cat>

* gettext/gettext.c (grub_gettext_translate): Push and pop
	grub_errno.
	(grub_gettext_delete_list): Change comment style.
	* kern/err.c (grub_error): Gettextizze.
	(grub_fatal): Gettextizze.
This commit is contained in:
carles 2010-01-14 22:31:06 +00:00
parent 0a46429a55
commit ba2f6848e0
3 changed files with 24 additions and 5 deletions

View file

@ -1,3 +1,11 @@
2010-01-14 Carles Pina i Estany <carles@pina.cat>
* gettext/gettext.c (grub_gettext_translate): Push and pop
grub_errno.
(grub_gettext_delete_list): Change comment style.
* kern/err.c (grub_error): Gettextizze.
(grub_fatal): Gettextizze.
2010-01-14 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/i386/loader.h (grub_linux16_boot): Renamed to ...

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;
}
@ -308,7 +319,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. */
}
}

View file

@ -45,7 +45,7 @@ grub_error (grub_err_t n, const char *fmt, ...)
grub_errno = n;
va_start (ap, fmt);
grub_vsprintf (grub_errmsg, fmt, ap);
grub_vsprintf (grub_errmsg, _(fmt), ap);
va_end (ap);
return n;
@ -57,7 +57,7 @@ grub_fatal (const char *fmt, ...)
va_list ap;
va_start (ap, fmt);
grub_vprintf (fmt, ap);
grub_vprintf (_(fmt), ap);
va_end (ap);
grub_abort ();