aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-10-20 16:15:38 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2009-10-20 16:15:38 +0300
commit216237423f9d418b3dabe8492fee9e58e46db48a (patch)
treeec4ed6164037f7d3e1b66113d3c718e9b9e05f09
parentcb7a69e5410daf65c669b6b2bb12b7fa81830440 (diff)
downloadpies-216237423f9d418b3dabe8492fee9e58e46db48a.tar.gz
pies-216237423f9d418b3dabe8492fee9e58e46db48a.tar.bz2
Fix diagnostics.
* po/POTFILES.in: Add missing files. * src/acl.c, src/meta1lex.l, src/pies.c, src/progman.c, src/socket.c, src/userprivs.c: Fix diagnostic messages.
-rw-r--r--po/POTFILES.in15
-rw-r--r--src/acl.c4
-rw-r--r--src/meta1lex.l14
-rw-r--r--src/pies.c3
-rw-r--r--src/progman.c2
-rw-r--r--src/socket.c8
-rw-r--r--src/userprivs.c12
7 files changed, 40 insertions, 18 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 32b939c..79d7f03 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -15,5 +15,20 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+src/acl.c
+src/addrfmt.c
+src/depmap.c
+src/diag.c
+src/limits.c
+src/meta.c
+src/meta1gram.y
+src/meta1lex.l
src/pies.c
src/progman.c
+src/socket.c
+src/url.c
+src/userprivs.c
+
+lib/parsetime.c
+lib/proctitle.c
+lib/strtotok.c
diff --git a/src/acl.c b/src/acl.c
index c82447c..968d93c 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -493,10 +493,12 @@ deny_cb (enum grecs_callback_command cmd,
}
struct grecs_keyword acl_keywords[] = {
+ /* TRANSLATORS: only words within angle brackets are translatable */
{ "allow", N_("[all|authenticated|group <grp: list>] [from <addr: list>]"),
N_("Allow access"),
grecs_type_string, NULL, 0,
allow_cb },
+ /* TRANSLATORS: only words within angle brackets are translatable */
{ "deny", N_("[all|authenticated|group <grp: list>] [from <addr: list>]"),
N_("Deny access"),
grecs_type_string, NULL, 0,
@@ -603,7 +605,7 @@ _acl_check_cb (struct acl_entry *ent, struct acl_input *input, int *pres)
{
int result = _acl_check (ent, input);
debug (1, ("%s:%d: %s", ent->locus.file, ent->locus.line,
- /* TRANSLATIONS: `MATCHES' is the verb `match' in 2nd person.
+ /* TRANSLATORS: `MATCHES' is the verb `match' in 2nd person.
E.g., in French: CONCORD AVEC */
result ? _("MATCHES") : _("does not match")));
diff --git a/src/meta1lex.l b/src/meta1lex.l
index a05c854..2b606ef 100644
--- a/src/meta1lex.l
+++ b/src/meta1lex.l
@@ -1,9 +1,5 @@
+/* MeTA1 configuration lexer for Pies. -*- c -*- */
%top {
-#ifndef HAVE_CONFIG_H
-# include <config.h>
-#endif
-}
-%{
/* MeTA1 configuration lexer for Pies.
Copyright (C) 2008, 2009 Sergey Poznyakoff
@@ -22,7 +18,13 @@
/* This file implements a lexical analyzer for MeTA1 main configuration file.
*/
-
+
+#ifndef HAVE_CONFIG_H
+# include <config.h>
+#endif
+}
+
+%{
#include "pies.h"
#include "meta1gram.h"
#include "meta1lex.h"
diff --git a/src/pies.c b/src/pies.c
index 110bbfe..0fe354b 100644
--- a/src/pies.c
+++ b/src/pies.c
@@ -119,7 +119,7 @@ assert_scalar_stmt (grecs_locus_t * locus, enum grecs_callback_command cmd)
{
if (cmd != grecs_callback_set_value)
{
- grecs_error (locus, 0, _("Unexpected block statement"));
+ grecs_error (locus, 0, _("unexpected block statement"));
return 1;
}
return 0;
@@ -1248,6 +1248,7 @@ void
config_help ()
{
static char docstring[] =
+ /* TRANSLATORS: do not translate words between ` and ' */
N_("Configuration file structure for pies.\n"
"For more information, use `info pies configuration'.");
grecs_format_docstring (stdout, docstring, 0);
diff --git a/src/progman.c b/src/progman.c
index 570e31e..98f87e7 100644
--- a/src/progman.c
+++ b/src/progman.c
@@ -1523,11 +1523,13 @@ notify (const char *tag, int status, struct action *act)
mdef[COMPONENT_IDX].value = (char*) tag;
if (WIFEXITED (status))
{
+ /* TRANSLATORS: The subject of this statement is 'component' */
mdef[TERMINATION_IDX].value = (char*) _("exited with code");
mdef[RETCODE_IDX].value = umaxtostr (WEXITSTATUS (status), buf);
}
else if (WIFSIGNALED (status))
{
+ /* TRANSLATORS: The subject of this statement is 'component' */
mdef[TERMINATION_IDX].value = (char*) _("terminated on signal");
mdef[RETCODE_IDX].value = umaxtostr (WTERMSIG (status), buf);
}
diff --git a/src/socket.c b/src/socket.c
index 1aa1256..be0c5c2 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -38,10 +38,10 @@ switch_eids (uid_t *puid, gid_t *pgid, mode_t *pumask)
mode_t omask = umask (*pumask);
if (setegid (*pgid))
- logmsg (LOG_ERR, _("Cannot switch to EGID %lu: %s"),
+ logmsg (LOG_ERR, _("cannot switch to EGID %lu: %s"),
(unsigned long) *pgid, strerror (errno));
if (seteuid (*puid))
- logmsg (LOG_ERR, _("Cannot switch to EUID %lu: %s"),
+ logmsg (LOG_ERR, _("cannot switch to EUID %lu: %s"),
(unsigned long) *puid, strerror (errno));
*puid = ouid;
*pgid = ogid;
@@ -184,7 +184,7 @@ create_socket (struct pies_url *url, const char *user, mode_t umaskval)
struct hostent *hp = gethostbyname (host);
if (!hp)
{
- logmsg (LOG_ERR, _("%s: Unknown host name %s"),
+ logmsg (LOG_ERR, _("%s: unknown host name %s"),
url->string, host);
return -1;
}
@@ -413,7 +413,7 @@ register_listener (int fd)
{
if (listen (fd, 8) == -1)
{
- logmsg (LOG_ERR, _("listen: %s"), strerror (errno));
+ logmsg (LOG_ERR, "listen: %s", strerror (errno));
return 1;
}
FD_SET (fd, &listenset);
diff --git a/src/userprivs.c b/src/userprivs.c
index 3abb001..f8c54de 100644
--- a/src/userprivs.c
+++ b/src/userprivs.c
@@ -91,7 +91,7 @@ switch_to_privs (uid_t uid, gid_t gid, gl_list_t retain_groups)
if (uid == 0)
{
- logmsg (LOG_ERR, _("Refusing to run as root"));
+ logmsg (LOG_ERR, _("refusing to run as root"));
return 1;
}
@@ -152,7 +152,7 @@ switch_to_privs (uid_t uid, gid_t gid, gl_list_t retain_groups)
(unsigned long) gid, strerror (errno));
if (rc == 0 && getegid () != gid)
{
- logmsg (LOG_ERR, _("Cannot set effective gid to %lu"),
+ logmsg (LOG_ERR, _("cannot set effective gid to %lu"),
(unsigned long) gid);
rc = 1;
}
@@ -201,7 +201,7 @@ switch_to_privs (uid_t uid, gid_t gid, gl_list_t retain_groups)
}
else if (uid != euid && setuid (euid) == 0)
{
- logmsg (LOG_ERR, _("Cannot drop non-root setuid privileges"));
+ logmsg (LOG_ERR, _("cannot drop non-root setuid privileges"));
rc = 1;
}
@@ -252,7 +252,7 @@ pies_epriv_setup (struct pies_privs *privs)
pw = getpwnam (privs->user);
if (!pw)
{
- logmsg (LOG_ERR, _("No such user: %s"), privs->user);
+ logmsg (LOG_ERR, _("no such user: %s"), privs->user);
exit (EX_CONFIG);
}
uid = pw->pw_uid;
@@ -266,13 +266,13 @@ pies_epriv_setup (struct pies_privs *privs)
if (setegid (gid))
{
- logmsg (LOG_ERR, _("Cannot switch to EGID %lu: %s"),
+ logmsg (LOG_ERR, _("cannot switch to EGID %lu: %s"),
(unsigned long) gid, strerror (errno));
exit (EX_USAGE);
}
if (seteuid (uid))
{
- logmsg (LOG_ERR, _("Cannot switch to EUID %lu: %s"),
+ logmsg (LOG_ERR, _("cannot switch to EUID %lu: %s"),
(unsigned long) uid, strerror (errno));
exit (EX_USAGE);
}

Return to:

Send suggestions and report system problems to the System administrator.