]> granicus.if.org Git - neomutt/commitdiff
I18N: Combine split translatable strings into one translatable string
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:56 +0000 (21:23 +0100)
Translatable strings should not be split in the middle but be one
self-contained and complete unit of thought. In particular do not split
them arbitrary at the end of a sentence.

Replace

  s1 = _("sentence 1.");
  printf("%s sentence2.", s1);

with

  s = _("sentence 1. sentence 2.");
  printf("%s", s);

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

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