]> granicus.if.org Git - neomutt/commitdiff
I18N: Use _() instead of N_() for marking strings for translation
authorReis Radomil <reisradomil@fake-box.com>
Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)
committerRichard Russon <rich@flatcap.org>
Tue, 24 Apr 2018 20:23:26 +0000 (21:23 +0100)
Use _() directly instead of N_() followed by _() for strings where
this is applicable, i.e.

   s = N_("string");
   printf("...", _(s));

becomes

   s = _("string")
   printf("...", s);

ncrypt/crypt_gpgme.c
ncrypt/pgpkey.c
ncrypt/smime.c

index c25add136221d9240d80cea9ee788b0cd19ad93c..ec0f6c99e4dc3e3f02efe91b78b9f808bcaa2211 100644 (file)
@@ -4285,30 +4285,30 @@ static struct CryptKeyInfo *crypt_select_key(struct CryptKeyInfo *keys,
           char buf2[LONG_STRING];
 
           if (key_table[menu->current]->flags & KEYFLAG_CANTUSE)
-            warn_s = N_("ID is expired/disabled/revoked.");
+            warn_s = _("ID is expired/disabled/revoked.");
           else
           {
             warn_s = "??";
             switch (key_table[menu->current]->validity)
             {
               case GPGME_VALIDITY_NEVER:
-                warn_s = N_("ID is not valid.");
+                warn_s = _("ID is not valid.");
                 break;
               case GPGME_VALIDITY_MARGINAL:
-                warn_s = N_("ID is only marginally valid.");
+                warn_s = _("ID is only marginally valid.");
                 break;
               case GPGME_VALIDITY_FULL:
               case GPGME_VALIDITY_ULTIMATE:
                 break;
               case GPGME_VALIDITY_UNKNOWN:
               case GPGME_VALIDITY_UNDEFINED:
-                warn_s = N_("ID has undefined validity.");
+                warn_s = _("ID has undefined validity.");
                 break;
             }
           }
 
           snprintf(buf2, sizeof(buf2),
-                   _("%s Do you really want to use the key?"), _(warn_s));
+                   _("%s Do you really want to use the key?"), warn_s);
 
           if (mutt_yesorno(buf2, 0) != MUTT_YES)
           {
index 5a635412a877f58d96444b6e77922e3369397768..4c69f5b1b4cf82107ea18cbe59377bf924e7a216 100644 (file)
@@ -637,22 +637,22 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys,
           char buf2[LONG_STRING];
 
           if (KeyTable[menu->current]->flags & KEYFLAG_CANTUSE)
-            str = N_("ID is expired/disabled/revoked.");
+            str = _("ID is expired/disabled/revoked.");
           else
             switch (KeyTable[menu->current]->trust & 0x03)
             {
               case 0:
-                str = N_("ID has undefined validity.");
+                str = _("ID has undefined validity.");
                 break;
               case 1:
-                str = N_("ID is not valid.");
+                str = _("ID is not valid.");
                 break;
               case 2:
-                str = N_("ID is only marginally valid.");
+                str = _("ID is only marginally valid.");
                 break;
             }
 
-          snprintf(buf2, sizeof(buf2), _("%s Do you really want to use the key?"), _(str));
+          snprintf(buf2, sizeof(buf2), _("%s Do you really want to use the key?"), str);
 
           if (mutt_yesorno(buf2, MUTT_NO) != MUTT_YES)
           {
index 71d25339e61c15fe983fbaf4720c7cfdb0b3c76e..48486e9df38690c8d0fd0a245a669d5a853d6082 100644 (file)
@@ -453,17 +453,17 @@ static struct SmimeKey *smime_select_key(struct SmimeKey *keys, char *query)
             case 'e':
             case 'i':
             case 'r':
-              s = N_("ID is expired/disabled/revoked.");
+              s = _("ID is expired/disabled/revoked.");
               break;
             case 'u':
-              s = N_("ID has undefined validity.");
+              s = _("ID has undefined validity.");
               break;
             case 'v':
-              s = N_("ID is not trusted.");
+              s = _("ID is not trusted.");
               break;
           }
 
-          snprintf(buf, sizeof(buf), _("%s Do you really want to use the key?"), _(s));
+          snprintf(buf, sizeof(buf), _("%s Do you really want to use the key?"), s);
 
           if (mutt_yesorno(buf, MUTT_NO) != MUTT_YES)
           {