Improve string. Gettextize.
This commit is contained in:
parent
78dde88e8c
commit
d61386e21d
64 changed files with 219 additions and 131 deletions
|
@ -302,7 +302,8 @@ grub_cmd_dhcpopt (struct grub_command *cmd __attribute__ ((unused)),
|
|||
grub_uint8_t taglength;
|
||||
|
||||
if (argc < 4)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "4 arguments expected");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("four arguments expected"));
|
||||
|
||||
FOR_NET_NETWORK_LEVEL_INTERFACES (inter)
|
||||
if (grub_strcmp (inter->name, args[1]) == 0)
|
||||
|
@ -405,7 +406,8 @@ grub_cmd_dhcpopt (struct grub_command *cmd __attribute__ ((unused)),
|
|||
}
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"unrecognised format specification %s", args[3]);
|
||||
N_("unrecognised DHCP option format specification `%s'"),
|
||||
args[3]);
|
||||
}
|
||||
|
||||
/* FIXME: allow to specify mac address. */
|
||||
|
@ -546,7 +548,8 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)),
|
|||
continue;
|
||||
grub_error_push ();
|
||||
grub_net_network_level_interface_unregister (&ifaces[j]);
|
||||
err = grub_error (GRUB_ERR_FILE_NOT_FOUND, "couldn't configure %s",
|
||||
err = grub_error (GRUB_ERR_FILE_NOT_FOUND,
|
||||
N_("couldn't autoconfigure %s"),
|
||||
ifaces[j].card->name);
|
||||
}
|
||||
|
||||
|
|
|
@ -436,7 +436,8 @@ grub_net_dns_lookup (const char *name,
|
|||
}
|
||||
|
||||
if (!n_servers)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "no DNS servers");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("no DNS servers configured"));
|
||||
|
||||
*naddresses = 0;
|
||||
if (cache)
|
||||
|
@ -491,7 +492,7 @@ grub_net_dns_lookup (const char *name,
|
|||
{
|
||||
grub_free (data.name);
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"domain component is too long");
|
||||
N_("domain name component is too long"));
|
||||
}
|
||||
*optr = (dot - iptr);
|
||||
optr++;
|
||||
|
@ -583,14 +584,16 @@ grub_net_dns_lookup (const char *name,
|
|||
if (*data.naddresses)
|
||||
return GRUB_ERR_NONE;
|
||||
if (data.dns_err)
|
||||
return grub_error (GRUB_ERR_NET_NO_DOMAIN, "no DNS domain found");
|
||||
return grub_error (GRUB_ERR_NET_NO_DOMAIN,
|
||||
N_("no DNS record found"));
|
||||
|
||||
if (err)
|
||||
{
|
||||
grub_errno = err;
|
||||
return err;
|
||||
}
|
||||
return grub_error (GRUB_ERR_TIMEOUT, "no DNS reply received");
|
||||
return grub_error (GRUB_ERR_TIMEOUT,
|
||||
N_("no DNS reply received"));
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
|
|
@ -101,7 +101,7 @@ parse_line (grub_file_t file, http_data_t data, char *ptr, grub_size_t len)
|
|||
int code;
|
||||
if (grub_memcmp (ptr, "HTTP/1.1 ", sizeof ("HTTP/1.1 ") - 1) != 0)
|
||||
return grub_error (GRUB_ERR_NET_INVALID_RESPONSE,
|
||||
"unsupported HTTP response");
|
||||
N_("unsupported HTTP response"));
|
||||
ptr += sizeof ("HTTP/1.1 ") - 1;
|
||||
code = grub_strtoul (ptr, &ptr, 10);
|
||||
if (grub_errno)
|
||||
|
@ -112,11 +112,11 @@ parse_line (grub_file_t file, http_data_t data, char *ptr, grub_size_t len)
|
|||
break;
|
||||
case 404:
|
||||
data->err = GRUB_ERR_FILE_NOT_FOUND;
|
||||
data->errmsg = grub_xasprintf ("file `%s' not found", data->filename);
|
||||
data->errmsg = grub_xasprintf (_("file `%s' not found"), data->filename);
|
||||
return GRUB_ERR_NONE;
|
||||
default:
|
||||
data->err = GRUB_ERR_NET_UNKNOWN_ERROR;
|
||||
data->errmsg = grub_xasprintf ("unsupported HTTP error %d: %s",
|
||||
data->errmsg = grub_xasprintf (_("unsupported HTTP error %d: %s"),
|
||||
code, ptr);
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ grub_net_link_layer_resolve (struct grub_net_network_level_interface *inf,
|
|||
return GRUB_ERR_NONE;
|
||||
}
|
||||
return grub_error (GRUB_ERR_TIMEOUT,
|
||||
"timeout: could not resolve hardware address");
|
||||
N_("timeout: could not resolve hardware address"));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -347,7 +347,8 @@ grub_cmd_ipv6_autoconf (struct grub_command *cmd __attribute__ ((unused)),
|
|||
{
|
||||
if (slaacs[j]->slaac_counter)
|
||||
continue;
|
||||
err = grub_error (GRUB_ERR_FILE_NOT_FOUND, "couldn't configure %s",
|
||||
err = grub_error (GRUB_ERR_FILE_NOT_FOUND,
|
||||
N_("couldn't autoconfigure %s"),
|
||||
ifaces[j]->card->name);
|
||||
}
|
||||
|
||||
|
@ -630,7 +631,8 @@ grub_net_route_address (grub_net_network_level_address_t addr,
|
|||
bestroute = route;
|
||||
}
|
||||
if (bestroute == NULL)
|
||||
return grub_error (GRUB_ERR_NET_NO_ROUTE, "destination unreachable");
|
||||
return grub_error (GRUB_ERR_NET_NO_ROUTE,
|
||||
N_("destination unreachable"));
|
||||
|
||||
if (!bestroute->is_gateway)
|
||||
{
|
||||
|
@ -642,7 +644,8 @@ grub_net_route_address (grub_net_network_level_address_t addr,
|
|||
curtarget = bestroute->gw;
|
||||
}
|
||||
|
||||
return grub_error (GRUB_ERR_NET_ROUTE_LOOP, "route loop detected");
|
||||
return grub_error (GRUB_ERR_NET_ROUTE_LOOP,
|
||||
N_("route loop detected"));
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
@ -1168,7 +1171,8 @@ grub_net_open_real (const char *name)
|
|||
}
|
||||
if (!server)
|
||||
{
|
||||
grub_error (GRUB_ERR_NET_BAD_ADDRESS, "no server");
|
||||
grub_error (GRUB_ERR_NET_BAD_ADDRESS,
|
||||
N_("no server is specified"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1198,7 +1202,10 @@ grub_net_open_real (const char *name)
|
|||
return ret;
|
||||
}
|
||||
}
|
||||
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such device");
|
||||
|
||||
/* Restore original error. */
|
||||
grub_error (GRUB_ERR_UNKNOWN_DEVICE, N_("disk `%s' not found"),
|
||||
name);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1375,7 +1382,7 @@ grub_net_fs_read_real (grub_file_t file, char *buf, grub_size_t len)
|
|||
else
|
||||
return total;
|
||||
}
|
||||
grub_error (GRUB_ERR_TIMEOUT, "timeout reading '%s'", net->name);
|
||||
grub_error (GRUB_ERR_TIMEOUT, N_("timeout reading '%s'"), net->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -1488,7 +1495,7 @@ GRUB_MOD_INIT(net)
|
|||
N_("Add a network address."));
|
||||
cmd_slaac = grub_register_command ("net_ipv6_autoconf",
|
||||
grub_cmd_ipv6_autoconf,
|
||||
"[CARD [HWADDRESS]]",
|
||||
N_("[CARD [HWADDRESS]]"),
|
||||
N_("Perform an IPV6 autoconfiguration"));
|
||||
|
||||
cmd_deladdr = grub_register_command ("net_del_addr", grub_cmd_deladdr,
|
||||
|
|
|
@ -657,9 +657,11 @@ grub_net_tcp_open (char *server,
|
|||
{
|
||||
grub_list_remove (GRUB_AS_LIST (socket));
|
||||
if (socket->they_reseted)
|
||||
grub_error (GRUB_ERR_NET_PORT_CLOSED, "port closed");
|
||||
grub_error (GRUB_ERR_NET_PORT_CLOSED,
|
||||
N_("connection refused"));
|
||||
else
|
||||
grub_error (GRUB_ERR_NET_NO_ANSWER, "no answer");
|
||||
grub_error (GRUB_ERR_NET_NO_ANSWER,
|
||||
N_("connection timeout"));
|
||||
|
||||
grub_netbuff_free (nb);
|
||||
destroy_pq (socket);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue