[Pkg-gnupg-commit] [gnupg2] 63/185: indent: Always use "_(" and not "_ (" to mark translatable strings.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Aug 7 11:55:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit 6cc4702767eec5506a974aa942868066a40cf54c
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Jun 19 17:42:50 2017 +0200

    indent: Always use "_(" and not "_ (" to mark translatable strings.
    
    --
    
    This makes greping much easier and we have done that since ever.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 common/compliance.c |  9 +++++----
 g10/decrypt-data.c  |  4 ++--
 g10/encrypt.c       |  4 ++--
 g10/gpg.c           |  8 ++++----
 g10/sig-check.c     |  4 ++--
 g10/sign.c          |  4 ++--
 sm/decrypt.c        |  4 ++--
 sm/encrypt.c        |  4 ++--
 sm/gpgsm.c          | 12 ++++++------
 sm/sign.c           |  4 ++--
 sm/verify.c         |  4 ++--
 11 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/common/compliance.c b/common/compliance.c
index 5702471..3c43fd8 100644
--- a/common/compliance.c
+++ b/common/compliance.c
@@ -397,7 +397,8 @@ gnupg_cipher_is_allowed (enum gnupg_compliance_mode compliance, int producer,
 
 /* Return true if DIGEST is compliant to the given COMPLIANCE mode.  */
 int
-gnupg_digest_is_compliant (enum gnupg_compliance_mode compliance, digest_algo_t digest)
+gnupg_digest_is_compliant (enum gnupg_compliance_mode compliance,
+                           digest_algo_t digest)
 {
   if (! initialized)
     return 0;
@@ -499,7 +500,7 @@ gnupg_parse_compliance_option (const char *string,
 
   if (! ascii_strcasecmp (string, "help"))
     {
-      log_info (_ ("valid values for option '%s':\n"), "--compliance");
+      log_info (_("valid values for option '%s':\n"), "--compliance");
       for (i = 0; i < length; i++)
         log_info ("  %s\n", options[i].keyword);
       return -1;
@@ -509,9 +510,9 @@ gnupg_parse_compliance_option (const char *string,
     if (! ascii_strcasecmp (string, options[i].keyword))
       return options[i].value;
 
-  log_error (_ ("invalid value for option '%s'\n"), "--compliance");
+  log_error (_("invalid value for option '%s'\n"), "--compliance");
   if (! quiet)
-    log_info (_ ("(use \"help\" to list choices)\n"));
+    log_info (_("(use \"help\" to list choices)\n"));
   return -1;
 }
 
diff --git a/g10/decrypt-data.c b/g10/decrypt-data.c
index 7023301..77681d1 100644
--- a/g10/decrypt-data.c
+++ b/g10/decrypt-data.c
@@ -101,8 +101,8 @@ decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek)
   /* Check compliance.  */
   if (! gnupg_cipher_is_allowed (opt.compliance, 0, dek->algo, GCRY_CIPHER_MODE_CFB))
     {
-      log_error (_ ("you may not use cipher algorithm '%s'"
-		    " while in %s mode\n"),
+      log_error (_("you may not use cipher algorithm '%s'"
+                   " while in %s mode\n"),
 		 openpgp_cipher_algo_name (dek->algo),
 		 gnupg_compliance_option_string (opt.compliance));
       rc = gpg_error (GPG_ERR_CIPHER_ALGO);
diff --git a/g10/encrypt.c b/g10/encrypt.c
index ee2f078..b92a4f0 100644
--- a/g10/encrypt.c
+++ b/g10/encrypt.c
@@ -617,8 +617,8 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename,
   if (! gnupg_cipher_is_allowed (opt.compliance, 1, cfx.dek->algo,
                                  GCRY_CIPHER_MODE_CFB))
     {
-      log_error (_ ("you may not use cipher algorithm '%s'"
-		    " while in %s mode\n"),
+      log_error (_("you may not use cipher algorithm '%s'"
+		   " while in %s mode\n"),
 		 openpgp_cipher_algo_name (cfx.dek->algo),
 		 gnupg_compliance_option_string (opt.compliance));
       rc = gpg_error (GPG_ERR_CIPHER_ALGO);
diff --git a/g10/gpg.c b/g10/gpg.c
index d129769..3e15373 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -3883,8 +3883,8 @@ main (int argc, char **argv)
 				      || cmd == aSignEncrSym,
 				      opt.def_cipher_algo,
 				      GCRY_CIPHER_MODE_NONE))
-      log_error (_ ("you may not use cipher algorithm '%s'"
-		    " while in %s mode\n"),
+      log_error (_("you may not use cipher algorithm '%s'"
+		   " while in %s mode\n"),
 		 openpgp_cipher_algo_name (opt.def_cipher_algo),
 		 gnupg_compliance_option_string (opt.compliance));
 
@@ -3896,8 +3896,8 @@ main (int argc, char **argv)
 				      || cmd == aSignSym
 				      || cmd == aClearsign,
 				      opt.def_digest_algo))
-      log_error (_ ("you may not use digest algorithm '%s'"
-		    " while in %s mode\n"),
+      log_error (_("you may not use digest algorithm '%s'"
+		   " while in %s mode\n"),
 		 gcry_md_algo_name (opt.def_digest_algo),
 		 gnupg_compliance_option_string (opt.compliance));
 
diff --git a/g10/sig-check.c b/g10/sig-check.c
index d0e27ea..9123179 100644
--- a/g10/sig-check.c
+++ b/g10/sig-check.c
@@ -136,8 +136,8 @@ check_signature2 (ctrl_t ctrl,
     else if (! gnupg_digest_is_allowed (opt.compliance, 0, sig->digest_algo))
       {
 	/* Compliance failure.  */
-	log_info (_ ("you may not use digest algorithm '%s'"
-		     " while in %s mode\n"),
+	log_info (_("you may not use digest algorithm '%s'"
+		    " while in %s mode\n"),
 		  gcry_md_algo_name (sig->digest_algo),
 		  gnupg_compliance_option_string (opt.compliance));
 	rc = gpg_error (GPG_ERR_DIGEST_ALGO);
diff --git a/g10/sign.c b/g10/sign.c
index 024dd06..71b0408 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -281,8 +281,8 @@ do_sign (ctrl_t ctrl, PKT_public_key *pksk, PKT_signature *sig,
   /* Check compliance.  */
   if (! gnupg_digest_is_allowed (opt.compliance, 1, mdalgo))
     {
-      log_error (_ ("you may not use digest algorithm '%s'"
-		    " while in %s mode\n"),
+      log_error (_("you may not use digest algorithm '%s'"
+		   " while in %s mode\n"),
 		 gcry_md_algo_name (mdalgo),
 		 gnupg_compliance_option_string (opt.compliance));
       err = gpg_error (GPG_ERR_DIGEST_ALGO);
diff --git a/sm/decrypt.c b/sm/decrypt.c
index 6909b15..7d43405 100644
--- a/sm/decrypt.c
+++ b/sm/decrypt.c
@@ -361,8 +361,8 @@ gpgsm_decrypt (ctrl_t ctrl, int in_fd, estream_t out_fp)
           /* Check compliance.  */
           if (! gnupg_cipher_is_allowed (opt.compliance, 0, algo, mode))
             {
-              log_error (_ ("you may not use cipher algorithm '%s'"
-                            " while in %s mode\n"),
+              log_error (_("you may not use cipher algorithm '%s'"
+                           " while in %s mode\n"),
                          gcry_cipher_algo_name (algo),
                          gnupg_compliance_option_string (opt.compliance));
               rc = gpg_error (GPG_ERR_CIPHER_ALGO);
diff --git a/sm/encrypt.c b/sm/encrypt.c
index 45860a8..9957bb9 100644
--- a/sm/encrypt.c
+++ b/sm/encrypt.c
@@ -411,8 +411,8 @@ gpgsm_encrypt (ctrl_t ctrl, certlist_t recplist, int data_fd, estream_t out_fp)
                                  gcry_cipher_map_name (opt.def_cipher_algoid),
                                  gcry_cipher_mode_from_oid (opt.def_cipher_algoid)))
     {
-      log_error (_ ("you may not use cipher algorithm '%s'"
-		    " while in %s mode\n"),
+      log_error (_("you may not use cipher algorithm '%s'"
+		   " while in %s mode\n"),
 		 opt.def_cipher_algoid,
 		 gnupg_compliance_option_string (opt.compliance));
       rc = gpg_error (GPG_ERR_CIPHER_ALGO);
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index c462544..5277140 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -1627,8 +1627,8 @@ main ( int argc, char **argv)
                                     cmd == aEncr || cmd == aSignEncr,
                                     gcry_cipher_mode_from_oid (opt.def_cipher_algoid),
                                     GCRY_CIPHER_MODE_NONE))
-    log_error (_ ("you may not use cipher algorithm '%s'"
-                  " while in %s mode\n"),
+    log_error (_("you may not use cipher algorithm '%s'"
+                 " while in %s mode\n"),
                opt.def_cipher_algoid, gnupg_compliance_option_string (opt.compliance));
 
   if (forced_digest_algo
@@ -1637,8 +1637,8 @@ main ( int argc, char **argv)
                                      || cmd == aSignEncr
                                      || cmd == aClearsign,
                                      opt.forced_digest_algo))
-    log_error (_ ("you may not use digest algorithm '%s'"
-                  " while in %s mode\n"),
+    log_error (_("you may not use digest algorithm '%s'"
+                 " while in %s mode\n"),
                forced_digest_algo, gnupg_compliance_option_string (opt.compliance));
 
   if (extra_digest_algo
@@ -1647,8 +1647,8 @@ main ( int argc, char **argv)
                                      || cmd == aSignEncr
                                      || cmd == aClearsign,
                                      opt.extra_digest_algo))
-    log_error (_ ("you may not use digest algorithm '%s'"
-                  " while in %s mode\n"),
+    log_error (_("you may not use digest algorithm '%s'"
+                 " while in %s mode\n"),
                forced_digest_algo, gnupg_compliance_option_string (opt.compliance));
 
   if (log_get_errorcount(0))
diff --git a/sm/sign.c b/sm/sign.c
index 2fbee75..7ba2319 100644
--- a/sm/sign.c
+++ b/sm/sign.c
@@ -464,8 +464,8 @@ gpgsm_sign (ctrl_t ctrl, certlist_t signerlist,
       /* Check compliance.  */
       if (! gnupg_digest_is_allowed (opt.compliance, 1, cl->hash_algo))
         {
-          log_error (_ ("you may not use digest algorithm '%s'"
-                        " while in %s mode\n"),
+          log_error (_("you may not use digest algorithm '%s'"
+                       " while in %s mode\n"),
                      gcry_md_algo_name (cl->hash_algo),
                      gnupg_compliance_option_string (opt.compliance));
           err = gpg_error (GPG_ERR_DIGEST_ALGO);
diff --git a/sm/verify.c b/sm/verify.c
index 89f06ef..f79c0ae 100644
--- a/sm/verify.c
+++ b/sm/verify.c
@@ -467,8 +467,8 @@ gpgsm_verify (ctrl_t ctrl, int in_fd, int data_fd, estream_t out_fp)
 
         if (! gnupg_digest_is_allowed (opt.compliance, 0, sigval_hash_algo))
           {
-            log_error (_ ("you may not use digest algorithm '%s'"
-                          " while in %s mode\n"),
+            log_error (_("you may not use digest algorithm '%s'"
+                         " while in %s mode\n"),
                        gcry_md_algo_name (sigval_hash_algo),
                        gnupg_compliance_option_string (opt.compliance));
             goto next_signer;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list