aboutsummaryrefslogtreecommitdiff
path: root/src/piesctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/piesctl.c')
-rw-r--r--src/piesctl.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/piesctl.c b/src/piesctl.c
index 310dcc3..f4ea514 100644
--- a/src/piesctl.c
+++ b/src/piesctl.c
@@ -226,9 +226,10 @@ parse_config ()
static void
config_help (void)
{
+ /* TRANSLATORS: do not translate words in quotes */
static char docstring[] =
N_("Configuration file structure for piesctl.\n"
- "For more information, use `info piesctl configuration'.");
+ "For more information, use command \"info piesctl configuration\".");
grecs_print_docstring (docstring, 0, stdout);
grecs_print_statement_array (piesctl_keywords, 1, 0, stdout);
}
@@ -446,10 +447,7 @@ shttp_connect (struct pies_url *url, struct grecs_sockaddr *source_addr)
{
if (errno != ENOENT)
{
- grecs_error (NULL, 0,
- _("%s: cannot stat socket: %s"),
- url->path,
- strerror (errno));
+ grecs_error (NULL, errno, _("%s: %s failed"), url->path, "stat");
return NULL;
}
}
@@ -457,9 +455,7 @@ shttp_connect (struct pies_url *url, struct grecs_sockaddr *source_addr)
{
if (!S_ISSOCK (st.st_mode))
{
- grecs_error (NULL, 0,
- _("%s: not a socket"),
- url->path);
+ grecs_error (NULL, 0, _("%s: not a socket"), url->path);
return NULL;
}
}
@@ -499,21 +495,19 @@ shttp_connect (struct pies_url *url, struct grecs_sockaddr *source_addr)
}
else
{
- grecs_error (NULL, 0, _("%s: unsupported protocol"),
- url->string);
+ grecs_error (NULL, 0, _("%s: unsupported protocol"), url->string);
return NULL;
}
fd = socket (addr.s.sa_family, SOCK_STREAM, 0);
if (fd == -1)
{
- grecs_error (NULL, 0, _("%s: unable to create socket: %s"),
- url->string, strerror(errno));
+ grecs_error (NULL, errno, _("%s: %s failed"), url->string, "socket");
return NULL;
}
if ((flags = fcntl (fd, F_GETFD, 0)) == -1
- || fcntl (fd, F_SETFD, flags | FD_CLOEXEC) == -1)
+ || fcntl (fd, F_SETFD, flags | FD_CLOEXEC) == -1)
grecs_error (NULL, 0, _("%s: cannot set close-on-exec: %s"),
url->string, strerror (errno));
@@ -524,15 +518,14 @@ shttp_connect (struct pies_url *url, struct grecs_sockaddr *source_addr)
_("source and destination address family differ"));
else if (bind (fd, source_addr->sa, source_addr->len) < 0)
{
- grecs_error (NULL, errno, _("failed to bind"));
+ grecs_error (NULL, errno, _("%s: %s failed"), url->string, "bind");
exit (EX_UNAVAILABLE);
}
}
if (connect (fd, &addr.s, socklen))
{
- grecs_error (NULL, 0, _("%s: cannot connect: %s"),
- url->string, strerror (errno));
+ grecs_error (NULL, errno, _("%s: %s failed"), url->string, "connect");
close (fd);
return NULL;
}
@@ -540,7 +533,7 @@ shttp_connect (struct pies_url *url, struct grecs_sockaddr *source_addr)
fp = fdopen (fd, "w+");
if (!fp)
{
- grecs_error (NULL, 0, "fdopen: %s", strerror (errno));
+ grecs_error (NULL, errno, _("%s: %s failed"), url->string, "fdopen");
close (fd);
return NULL;
}
@@ -2154,6 +2147,9 @@ static struct comtab comtab[] = {
{ "restart", N_("CONDITION"),
N_("restart components"), com_restart },
{ NULL, NULL,
+ /* TRANSLATORS: You can leave the BNF below untranslated. If you
+ chose to translate it, please do not translate words in double
+ quotes. */
N_("CONDITION is defined as follows:\
\n\
<condition> ::= <disjunction>\n\
@@ -2175,6 +2171,7 @@ static struct comtab comtab[] = {
N_("show info about the running GNU Pies instance"),
com_id },
{ NULL, NULL,
+ /* TRANSLATORS: Please don't translate the keywords. */
N_("Available KEYWORDS are: package, version, instance, binary, argv, PID"), NULL },
{ "shutdown", "",
N_("stop running pies instance"), com_shutdown },
@@ -2185,7 +2182,8 @@ static struct comtab comtab[] = {
N_("reload configuration"), com_config },
{ NULL, "file clear",
N_("clear configuration file list"), NULL },
- { NULL, "file add SYNTAX FILE",
+ /* TRANSLATORS: Translate only words in upper case */
+ { NULL, N_("file add SYNTAX FILE"),
N_("add FILE of given SYNTAX to the list of configuration files"), NULL },
{ NULL, "file del[ete] NAME [NAME...]",
N_("remove listed names from the list of configuration files"), NULL },

Return to:

Send suggestions and report system problems to the System administrator.