From: Reis Radomil Date: Sun, 22 Apr 2018 04:15:57 +0000 (+0000) Subject: I18N: Combine split translatable strings into one translatable string X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c4648894fe72e4e63121868c8f02a3e48c3c1dd;p=neomutt I18N: Combine split translatable strings into one translatable string 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); --- diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index ec0f6c99e..7be7fa5f5 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -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) { diff --git a/ncrypt/pgpkey.c b/ncrypt/pgpkey.c index 4c69f5b1b..bd96f303d 100644 --- a/ncrypt/pgpkey.c +++ b/ncrypt/pgpkey.c @@ -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) { diff --git a/ncrypt/smime.c b/ncrypt/smime.c index 48486e9df..b98501435 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -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) {