Adds gettext support in Grub. Building system needs to be improved and maybe userland utilites improved.

YYYY-MM-DD  Carles Pina i Estany <carles@pina.cat>

	* Makefile.in: Add uptrans target to help to update .pot file
	* conf/common.rmk: Add grub-gettext_lib target, dependency and SOURCES, CFLAGS, LDFLAGS
	* kern/misc.c: Define grub_gettext symbol and add implement grub_gettext_dummy function
	* po/TODO: Temporary file with instructions of what Makefile.in will do
	* po/ca.po: Catalan translation stub
	* include/grub/misc.h: Define macro _(char *s). Declare grub_gettext_dummy and grub_gettext
	* gettext/gettext.c: New file with gettext implementation
	* normal/menu.c (print_message): add _( ) to some strings
	* util/grub.d/10_linux.in: include grub-gettext_lib file. For the Linux menuentry, call eval_gettext
	* util/grub.d/00_header.in: add locale_prefix and gettext locale detection and setting up the access to the mo directory
	* util/grub-mkconfig_lib.in: add get_locale_lang
	* util/grub-gettext_lib.in: new file
This commit is contained in:
Carles Pina i Estany 2009-11-13 20:39:33 +00:00
parent 2e035eb9ba
commit 203ffbfa31
9 changed files with 368 additions and 8 deletions

View file

@ -30,6 +30,8 @@ grub_iswordseparator (int c)
return (grub_isspace (c) || c == ',' || c == ';' || c == '|' || c == '&');
}
const char* (*grub_gettext) (const char *s) = grub_gettext_dummy;
void *
grub_memmove (void *dest, const void *src, grub_size_t n)
{
@ -984,6 +986,13 @@ grub_utf8_to_ucs4 (grub_uint32_t *dest, grub_size_t destsize,
return p - dest;
}
/* grub_gettext_dummy is not translating anything. */
const char *
grub_gettext_dummy (const char *s)
{
return s;
}
/* Abort GRUB. This function does not return. */
void
grub_abort (void)