2009-12-20 Carles Pina i Estany <carles@pina.cat>
* include/grub/auth.h: Include `<grub/i18n.h>'. (GRUB_GET_PASSWORD): Gettextizze string. * include/grub/normal.h (STANDARD_MARGIN): New macro, moved from menu_text.c. (grub_utf8_to_ucs4_alloc): Fix indentation. (grub_print_ucs4): Likewise. (grub_getstringwidth): Likewise. (print_message_indented): New declaration. * normal/auth.c: Include `<grub/i18n.h>'. (grub_auth_check_authentication): Gettexttize string. * normal/cmdline.c: Include `<grub/i18n.h>'. (grub_cmdline_get): Gettextizze. * normal/color.c: Include `<grub/i18n.h>'. (grub_parse_color_name_pair): Gettexttize strings. * normal/main.c (grub_normal_reader_init): Cleanup gettexttized string (use `print_message_indented'). * normal/menu_text.c (STANDARD_MARGIN): Moved from here to `include/grub/normal.h'. (print_message_indented): Renamed to ... (grub_print_message_indented): ... this. Remove `static' qualifer (now used in normal/main.c). (print_message): Use `grub_print_message_indented' instead of `print_message_indented'. (print_timeout): Likewise. * normal/misc.c: Include `<grub/term.h>' and `<grub/i18n.h>'. (grub_normal_print_device_info): Gettexttize strings. * po/POTFILES: Add `auth.c', `color.c' and `misc.c'.
This commit is contained in:
parent
3041d8989c
commit
7f39d92f8d
10 changed files with 95 additions and 36 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -26,6 +26,7 @@
|
|||
#include <grub/disk.h>
|
||||
#include <grub/file.h>
|
||||
#include <grub/env.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
static char *kill_buf;
|
||||
|
||||
|
@ -193,6 +194,7 @@ grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
|
|||
auto void cl_delete (unsigned len);
|
||||
auto void cl_print (int pos, int c);
|
||||
auto void cl_set_pos (void);
|
||||
const char *prompt_translated = _(prompt);
|
||||
|
||||
void cl_set_pos (void)
|
||||
{
|
||||
|
@ -266,14 +268,14 @@ grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
|
|||
grub_refresh ();
|
||||
}
|
||||
|
||||
plen = grub_strlen (prompt);
|
||||
plen = grub_strlen (prompt_translated);
|
||||
lpos = llen = 0;
|
||||
buf[0] = '\0';
|
||||
|
||||
if ((grub_getxy () >> 8) != 0)
|
||||
grub_putchar ('\n');
|
||||
|
||||
grub_printf ("%s", prompt);
|
||||
grub_printf ("%s", prompt_translated);
|
||||
|
||||
xpos = plen;
|
||||
ystart = ypos = (grub_getxy () & 0xFF);
|
||||
|
@ -334,7 +336,7 @@ grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
|
|||
if (restore)
|
||||
{
|
||||
/* Restore the prompt. */
|
||||
grub_printf ("\n%s%s", prompt, buf);
|
||||
grub_printf ("\n%s %s", prompt_translated, buf);
|
||||
xpos = plen;
|
||||
ystart = ypos = (grub_getxy () & 0xFF);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue