Improve string. Gettextize.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-12 15:25:25 +01:00
parent 78dde88e8c
commit d61386e21d
64 changed files with 219 additions and 131 deletions

View file

@ -24,6 +24,7 @@
#include <grub/cpu/io.h>
#include <grub/mm.h>
#include <grub/time.h>
#include <grub/i18n.h>
#ifdef GRUB_MACHINE_PCBIOS
#include <grub/machine/memory.h>
@ -194,19 +195,23 @@ serial_hw_configure (struct grub_serial_port *port,
divisor = serial_get_divisor (port, config);
if (divisor == 0)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad speed");
return grub_error (GRUB_ERR_BAD_ARGUMENT,
N_("unsupported serial port speed"));
if (config->parity != GRUB_SERIAL_PARITY_NONE
&& config->parity != GRUB_SERIAL_PARITY_ODD
&& config->parity != GRUB_SERIAL_PARITY_EVEN)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported parity");
return grub_error (GRUB_ERR_BAD_ARGUMENT,
N_("unsupported serial port parity"));
if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1
&& config->stop_bits != GRUB_SERIAL_STOP_BITS_2)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported stop bits");
return grub_error (GRUB_ERR_BAD_ARGUMENT,
N_("unsupported serial port stop bits number"));
if (config->word_len < 5 || config->word_len > 8)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported word length");
return grub_error (GRUB_ERR_BAD_ARGUMENT,
N_("unsupported serial port word length"));
port->config = *config;
port->configured = 0;

View file

@ -184,7 +184,9 @@ grub_cmd_serial (grub_extcmd_context_t ctxt, int argc, char **args)
port = grub_serial_find (name);
if (!port)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown serial port");
return grub_error (GRUB_ERR_BAD_ARGUMENT,
N_("serial port `%s' isn't found"),
name);
config = port->config;
@ -203,7 +205,8 @@ grub_cmd_serial (grub_extcmd_context_t ctxt, int argc, char **args)
else if (! grub_strcmp (state[4].arg, "even"))
config.parity = GRUB_SERIAL_PARITY_EVEN;
else
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad parity");
return grub_error (GRUB_ERR_BAD_ARGUMENT,
N_("unsupported serial port parity"));
}
if (state[5].set)
@ -213,7 +216,8 @@ grub_cmd_serial (grub_extcmd_context_t ctxt, int argc, char **args)
else if (! grub_strcmp (state[5].arg, "2"))
config.stop_bits = GRUB_SERIAL_STOP_BITS_2;
else
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad number of stop bits");
return grub_error (GRUB_ERR_BAD_ARGUMENT,
N_("unsupported serial port stop bits number"));
}
/* Initialize with new settings. */

View file

@ -169,7 +169,8 @@ grub_terminfo_set_current (struct grub_term_output *term,
return grub_errno;
}
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown terminfo type");
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("unknown terminfo type `%s'"),
str);
}
grub_err_t
@ -664,7 +665,7 @@ grub_cmd_terminfo (grub_extcmd_context_t ctxt, int argc, char **args)
return grub_errno;
if (*ptr != 'x')
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"incorrect geometry specification");
N_("incorrect terminal dimensions specification"));
ptr++;
h = grub_strtoul (ptr, &ptr, 0);
if (grub_errno)
@ -694,7 +695,7 @@ grub_cmd_terminfo (grub_extcmd_context_t ctxt, int argc, char **args)
}
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"no terminal %s found or it's not handled by terminfo",
N_("terminal %s isn't found or it's not handled by terminfo"),
args[0]);
}