summaryrefslogtreecommitdiffabout
path: root/src/gpg.c
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-23 08:03:37 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2009-02-23 08:03:37 (GMT)
commit337a06f32fb530e0e0884fef2f5f630cca9911a1 (patch) (side-by-side diff)
treed0687ccd3e9ff527d9c5613fd052cbe0f79bb40a /src/gpg.c
parent7543ff5973d1afe75b0f4226a3a02cc8d375ad3e (diff)
downloadwydawca-337a06f32fb530e0e0884fef2f5f630cca9911a1.tar.gz
wydawca-337a06f32fb530e0e0884fef2f5f630cca9911a1.tar.bz2
Add missing i18n markers
Diffstat (limited to 'src/gpg.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/gpg.c52
1 files changed, 27 insertions, 25 deletions
diff --git a/src/gpg.c b/src/gpg.c
index 453a908..d6e2301 100644
--- a/src/gpg.c
+++ b/src/gpg.c
@@ -26,7 +26,8 @@
int a = expr; \
if (a) \
{ \
- logmsg (LOG_ERR, "%s: GPGME error: %s", #expr, gpgme_strerror (a)); \
+ logmsg (LOG_ERR, _("%s: GPGME error: %s"), #expr, \
+ gpgme_strerror (a)); \
return 1; \
} \
} \
@@ -47,7 +48,7 @@ recursive_rmdir (const char *name)
if (chdir (name))
{
- logmsg (LOG_ERR, "cannot change to directory %s: %s",
+ logmsg (LOG_ERR, _("cannot change to directory %s: %s"),
name, strerror (errno));
return 1;
}
@@ -55,7 +56,7 @@ recursive_rmdir (const char *name)
dir = opendir (".");
if (!dir)
{
- logmsg (LOG_ERR, "cannot open directory %s: %s",
+ logmsg (LOG_ERR, _("cannot open directory %s: %s"),
name, strerror (errno));
return 1;
}
@@ -70,14 +71,14 @@ recursive_rmdir (const char *name)
if (stat (ent->d_name, &st) && errno != ENOENT)
{
- logmsg (LOG_ERR, "cannot stat file `%s': %s",
+ logmsg (LOG_ERR, _("cannot stat file `%s': %s"),
name, strerror (errno));
rc = 1;
}
else if (S_ISDIR (st.st_mode))
rc = rmdir_r (ent->d_name);
else if ((rc = unlink (ent->d_name)) != 0 && errno != ENOENT)
- logmsg (LOG_ERR, "cannot unlink %s: %s",
+ logmsg (LOG_ERR, _("cannot unlink %s: %s"),
ent->d_name, strerror (errno));
}
closedir (dir);
@@ -94,21 +95,21 @@ rmdir_r (const char *name)
if (save_cwd (&cwd))
{
- logmsg (LOG_ERR, "cannot save current directory: %s",
+ logmsg (LOG_ERR, _("cannot save current directory: %s"),
strerror (errno));
return 1;
}
rc = recursive_rmdir (name);
if (restore_cwd (&cwd))
{
- logmsg (LOG_ERR, "cannot restore current directory: %s",
+ logmsg (LOG_ERR, _("cannot restore current directory: %s"),
strerror (errno));
rc = 1;
}
if (rc == 0 && rmdir (name))
{
- logmsg (LOG_ERR, "cannot remove directory %s: %s",
+ logmsg (LOG_ERR, _("cannot remove directory %s: %s"),
name, strerror (errno));
return 1;
}
@@ -121,9 +122,9 @@ static void
remove_homedir ()
{
if (debug_level > 1)
- logmsg (LOG_DEBUG, "Removing GNUPG home directory: %s", homedir);
+ logmsg (LOG_DEBUG, _("removing GNUPG home directory: %s"), homedir);
if (rmdir_r (homedir))
- logmsg (LOG_CRIT, "Failed to remove GPG directory %s", homedir);
+ logmsg (LOG_CRIT, _("failed to remove GPG directory %s"), homedir);
}
/* Create a temporary GPG home directory */
@@ -136,13 +137,13 @@ wydawca_gpg_homedir ()
homedir = xstrdup ("/tmp/wydawca-XXXXXX");
if (!mkdtemp (homedir))
{
- logmsg (LOG_CRIT, "cannot create GPG home directory (%s): %s",
+ logmsg (LOG_CRIT, _("cannot create GPG home directory (%s): %s"),
homedir, strerror (errno));
return 1;
}
atexit (remove_homedir);
if (debug_level > 1)
- logmsg (LOG_DEBUG, "GNUPG home directory: %s", homedir);
+ logmsg (LOG_DEBUG, _("GNUPG home directory: %s"), homedir);
setenv ("GNUPGHOME", homedir, 1);
return 0;
}
@@ -167,31 +168,31 @@ gpg_sig_ok_p (gpgme_ctx_t ctx, gpgme_signature_t sig)
{
case GPG_ERR_NO_ERROR:
if (debug_level)
- logmsg (LOG_NOTICE, "Good signature from %s", uid);
+ logmsg (LOG_NOTICE, _("Good signature from %s"), uid);
break;
case GPG_ERR_BAD_SIGNATURE:
- logmsg (LOG_ERR, "BAD signature from %s", uid);
+ logmsg (LOG_ERR, _("BAD signature from %s"), uid);
return 0;
case GPG_ERR_NO_PUBKEY:
- logmsg (LOG_ERR, "No public key");
+ logmsg (LOG_ERR, _("No public key"));
return 0;
case GPG_ERR_NO_DATA:
- logmsg (LOG_ERR, "No signature");
+ logmsg (LOG_ERR, _("No signature"));
return 0;
case GPG_ERR_SIG_EXPIRED:
- logmsg (LOG_ERR, "Expired signature from %s", uid);
+ logmsg (LOG_ERR, _("Expired signature from %s"), uid);
return 0;
case GPG_ERR_KEY_EXPIRED:
- logmsg (LOG_ERR, "Key expired (%s)", uid);
+ logmsg (LOG_ERR, _("Key expired (%s)"), uid);
return 0;
default:
- logmsg (LOG_ERR, "Unknown signature error");
+ logmsg (LOG_ERR, _("Unknown signature error"));
return 0;
}
}
@@ -245,7 +246,7 @@ verify_directive_signature (struct file_triplet *trp,
{
rc = 1;
UPDATE_STATS (STAT_BAD_SIGNATURE);
- logmsg (LOG_ERR, "%s: directive verification failed: %s",
+ logmsg (LOG_ERR, _("%s: directive verification failed: %s"),
trp->name, gpgme_strerror (ec));
}
@@ -271,8 +272,8 @@ verify_detached_signature (struct file_triplet *trp,
if (!info)
{
logmsg (LOG_CRIT,
- "cannot find path to gpg binary (attempting to verify "
- "the detached signature for %s", trp->name);
+ _("cannot find path to gpg binary (attempting to verify "
+ "the detached signature for %s"), trp->name);
return 1;
}
@@ -287,17 +288,18 @@ verify_detached_signature (struct file_triplet *trp,
{
case exec_success:
if (debug_level)
- logmsg (LOG_DEBUG, "good detached signature for %s", trp->name);
+ logmsg (LOG_DEBUG, _("good detached signature for %s"), trp->name);
return 0;
case exec_fail:
UPDATE_STATS (STAT_BAD_SIGNATURE);
- logmsg (LOG_ERR, "BAD detached signature for %s", trp->name);
+ logmsg (LOG_ERR, _("BAD detached signature for %s"), trp->name);
notify (spool->notification, trp, ev_bad_detached_signature);
break;
case exec_error:
- logmsg (LOG_CRIT, "cannot verify detached signature for %s", trp->name);
+ logmsg (LOG_CRIT, _("cannot verify detached signature for %s"),
+ trp->name);
break;
}

Return to:

Send suggestions and report system problems to the System administrator.