From 91ab94ab53bbfc89a093bf29d4e909452b187d0a Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Sun, 13 Sep 2015 11:47:09 +0800 Subject: [PATCH] Add translation comments and improvements. These were suggested by TAKAHASHI Tamotsu. --- compose.c | 2 ++ crypt-gpgme.c | 38 ++++++++++++++++++++++++++++++------ curs_main.c | 52 ++++++++++++++++++++++++++++++++++++-------------- edit.c | 5 +++++ editmsg.c | 1 + imap/message.c | 2 ++ mutt_ssl.c | 4 ++++ muttlib.c | 6 ++++++ pgp.c | 6 +++--- send.c | 3 +++ smime.c | 6 +++--- 11 files changed, 99 insertions(+), 26 deletions(-) diff --git a/compose.c b/compose.c index 9d870608f..a89f6d169 100644 --- a/compose.c +++ b/compose.c @@ -1023,6 +1023,8 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ { if (stat(idx[menu->current]->content->filename, &st) == -1) { + /* L10N: + "stat" is a system call. Do "man 2 stat" for more information. */ mutt_error (_("Can't stat %s: %s"), fname, strerror (errno)); break; } diff --git a/crypt-gpgme.c b/crypt-gpgme.c index a0d2026c7..830d4c167 100644 --- a/crypt-gpgme.c +++ b/crypt-gpgme.c @@ -1493,9 +1493,9 @@ static int show_one_sig_status (gpgme_ctx_t ctx, int idx, STATE *s) /* 0 indicates no expiration */ if (sig->exp_timestamp) { - /* L10N: This is trying to match the width of the - * "Problem signature from:" translation just above. - */ + /* L10N: + This is trying to match the width of the + "Problem signature from:" translation just above. */ state_attach_puts (_(" expires: "), s); print_time (sig->exp_timestamp, s); state_attach_puts ("\n", s); @@ -3373,6 +3373,10 @@ static void print_key_info (gpgme_key_t key, FILE *fp) continue; s = uid->uid; + /* L10N: + Fill dots to make the DOTFILL entries the same length. + In English, msgid "Fingerprint: " is the longest entry for this menu. + Your language may vary. */ fputs (idx ? _(" aka ......: ") :_("Name ......: "), fp); if (uid->invalid) { @@ -3396,6 +3400,7 @@ static void print_key_info (gpgme_key_t key, FILE *fp) #else strftime (shortbuf, sizeof shortbuf, "%c", tm); #endif + /* L10N: DOTFILL */ fprintf (fp, _("Valid From : %s\n"), shortbuf); } @@ -3409,6 +3414,7 @@ static void print_key_info (gpgme_key_t key, FILE *fp) #else strftime (shortbuf, sizeof shortbuf, "%c", tm); #endif + /* L10N: DOTFILL */ fprintf (fp, _("Valid To ..: %s\n"), shortbuf); } @@ -3422,8 +3428,10 @@ static void print_key_info (gpgme_key_t key, FILE *fp) if (key->subkeys) aval = key->subkeys->length; + /* L10N: DOTFILL */ fprintf (fp, _("Key Type ..: %s, %lu bit %s\n"), s2, aval, s); + /* L10N: DOTFILL */ fprintf (fp, _("Key Usage .: ")); delim = ""; @@ -3447,6 +3455,7 @@ static void print_key_info (gpgme_key_t key, FILE *fp) if (key->subkeys) { s = key->subkeys->fpr; + /* L10N: DOTFILL */ fputs (_("Fingerprint: "), fp); if (is_pgp && strlen (s) == 40) { @@ -3479,6 +3488,7 @@ static void print_key_info (gpgme_key_t key, FILE *fp) { s = key->issuer_serial; if (s) + /* L10N: DOTFILL */ fprintf (fp, _("Serial-No .: 0x%s\n"), s); } @@ -3487,6 +3497,7 @@ static void print_key_info (gpgme_key_t key, FILE *fp) s = key->issuer_name; if (s) { + /* L10N: DOTFILL */ fprintf (fp, _("Issued By .: ")); parse_and_print_user_id (fp, s); putc ('\n', fp); @@ -3506,6 +3517,7 @@ static void print_key_info (gpgme_key_t key, FILE *fp) putc ('\n', fp); if ( strlen (s) == 16) s += 8; /* display only the short keyID */ + /* L10N: DOTFILL */ fprintf (fp, _("Subkey ....: 0x%s"), s); if (subkey->revoked) { @@ -3539,6 +3551,7 @@ static void print_key_info (gpgme_key_t key, FILE *fp) #else strftime (shortbuf, sizeof shortbuf, "%c", tm); #endif + /* L10N: DOTFILL */ fprintf (fp, _("Valid From : %s\n"), shortbuf); } @@ -3552,6 +3565,7 @@ static void print_key_info (gpgme_key_t key, FILE *fp) #else strftime (shortbuf, sizeof shortbuf, "%c", tm); #endif + /* L10N: DOTFILL */ fprintf (fp, _("Valid To ..: %s\n"), shortbuf); } @@ -3565,8 +3579,10 @@ static void print_key_info (gpgme_key_t key, FILE *fp) else aval = 0; + /* L10N: DOTFILL */ fprintf (fp, _("Key Type ..: %s, %lu bit %s\n"), "PGP", aval, s); + /* L10N: DOTFILL */ fprintf (fp, _("Key Usage .: ")); delim = ""; @@ -4017,8 +4033,14 @@ static crypt_key_t *crypt_select_key (crypt_key_t *keys, ts = _("keys matching"); if (p) + /* L10N: + %1$s is one of the previous four entries. + %2$s is an address. + e.g. "S/MIME keys matching ." */ snprintf (buf, sizeof (buf), _("%s <%s>."), ts, p->mailbox); else + /* L10N: + e.g. 'S/MIME keys matching "Michael Elkins".' */ snprintf (buf, sizeof (buf), _("%s \"%s\"."), ts, s); menu->title = buf; } @@ -4597,6 +4619,10 @@ BODY *pgp_gpgme_make_key_attachment (char *tempf) att->use_disp = 0; att->type = TYPEAPPLICATION; att->subtype = safe_strdup ("pgp-keys"); + /* L10N: + MIME description for exported (attached) keys. + You can translate this entry to a non-ASCII string (it will be encoded), + but it may be safer to keep it untranslated. */ snprintf (buff, sizeof (buff), _("PGP Key 0x%s."), crypt_keyid (key)); att->description = safe_strdup (buff); mutt_update_encoding (att); @@ -4686,9 +4712,9 @@ static int gpgme_send_menu (HEADER *msg, int *redraw, int is_smime) { prompt = _("S/MIME (s)ign, sign (a)s, (p)gp, (c)lear, or (o)ppenc mode off? "); /* L10N: The 'f' is from "forget it", an old undocumented synonym of - * 'clear'. Please use a corresponding letter in your language. - * Alternatively, you may duplicate the letter 'c' is translated to. - * This comment also applies to the five following letter sequences. */ + 'clear'. Please use a corresponding letter in your language. + Alternatively, you may duplicate the letter 'c' is translated to. + This comment also applies to the five following letter sequences. */ letters = _("sapfco"); choices = "SapFCo"; } diff --git a/curs_main.c b/curs_main.c index d20028efa..425bd9aec 100644 --- a/curs_main.c +++ b/curs_main.c @@ -93,7 +93,8 @@ static const char *No_visible = N_("No visible messages."); #define CHECK_ACL(aclbit,action) \ if (!mutt_bit_isset(Context->rights,aclbit)) { \ mutt_flushinp(); \ - mutt_error (_("Cannot %s: Operation not permitted by ACL"), action); \ + /* L10N: %s is one of the CHECK_ACL entries below. */ \ + mutt_error (_("%s: Operation not permitted by ACL"), action); \ break; \ } @@ -874,7 +875,8 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; - CHECK_ACL(M_ACL_DELETE, _("delete message(s)")); + /* L10N: CHECK_ACL */ + CHECK_ACL(M_ACL_DELETE, _("Cannot delete message(s)")); CHECK_ATTACH; mutt_pattern_func (M_DELETE, _("Delete messages matching: ")); @@ -1047,7 +1049,8 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; - CHECK_ACL(M_ACL_DELETE, _("undelete message(s)")); + /* L10N: CHECK_ACL */ + CHECK_ACL(M_ACL_DELETE, _("Cannot undelete message(s)")); if (mutt_pattern_func (M_UNDELETE, _("Undelete messages matching: ")) == 0) menu->redraw = REDRAW_INDEX | REDRAW_STATUS; @@ -1354,7 +1357,8 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; - CHECK_ACL(M_ACL_DELETE, _("link threads")); + /* L10N: CHECK_ACL */ + CHECK_ACL(M_ACL_DELETE, _("Cannot link threads")); if ((Sort & SORT_MASK) != SORT_THREADS) mutt_error _("Threading is not enabled."); @@ -1605,8 +1609,20 @@ int mutt_index_menu (void) if (menu->current == -1) { menu->current = menu->oldcurrent; - mutt_error ("%s%s.", (op == OP_MAIN_NEXT_NEW || op == OP_MAIN_PREV_NEW) ? _("No new messages") : _("No unread messages"), - Context->pattern ? _(" in this limited view") : ""); + if (op == OP_MAIN_NEXT_NEW || op == OP_MAIN_PREV_NEW) + { + if (Context->pattern) + mutt_error (_("No new messages in this limited view.")); + else + mutt_error (_("No new messages.")); + } + else + { + if (Context->pattern) + mutt_error (_("No unread messages in this limited view.")); + else + mutt_error (_("No unread messages.")); + } } else if (menu->menu == MENU_PAGER) { @@ -1622,7 +1638,8 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; - CHECK_ACL(M_ACL_WRITE, _("flag message")); + /* L10N: CHECK_ACL */ + CHECK_ACL(M_ACL_WRITE, _("Cannot flag message")); if (tag) { @@ -1659,7 +1676,8 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; - CHECK_ACL(M_ACL_SEEN, _("toggle new")); + /* L10N: CHECK_ACL */ + CHECK_ACL(M_ACL_SEEN, _("Cannot toggle new")); if (tag) { @@ -1913,7 +1931,8 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; - CHECK_ACL(M_ACL_DELETE, _("delete message")); + /* L10N: CHECK_ACL */ + CHECK_ACL(M_ACL_DELETE, _("Cannot delete message")); if (tag) { @@ -1954,7 +1973,8 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; - CHECK_ACL(M_ACL_DELETE, _("delete message(s)")); + /* L10N: CHECK_ACL */ + CHECK_ACL(M_ACL_DELETE, _("Cannot delete message(s)")); rc = mutt_thread_set_flag (CURHDR, M_DELETE, 1, op == OP_DELETE_THREAD ? 0 : 1); @@ -1995,7 +2015,8 @@ int mutt_index_menu (void) CHECK_VISIBLE; CHECK_READONLY; CHECK_ATTACH; - CHECK_ACL(M_ACL_INSERT, _("edit message")); + /* L10N: CHECK_ACL */ + CHECK_ACL(M_ACL_INSERT, _("Cannot edit message")); if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); @@ -2126,7 +2147,8 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; - CHECK_ACL(M_ACL_SEEN, _("mark message(s) as read")); + /* L10N: CHECK_ACL */ + CHECK_ACL(M_ACL_SEEN, _("Cannot mark message(s) as read")); rc = mutt_thread_set_flag (CURHDR, M_READ, 1, op == OP_MAIN_READ_THREAD ? 0 : 1); @@ -2221,7 +2243,8 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; - CHECK_ACL(M_ACL_DELETE, _("undelete message")); + /* L10N: CHECK_ACL */ + CHECK_ACL(M_ACL_DELETE, _("Cannot undelete message")); if (tag) { @@ -2248,7 +2271,8 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; - CHECK_ACL(M_ACL_DELETE, _("undelete message(s)")); + /* L10N: CHECK_ACL */ + CHECK_ACL(M_ACL_DELETE, _("Cannot undelete message(s)")); rc = mutt_thread_set_flag (CURHDR, M_DELETE, 0, op == OP_UNDELETE_THREAD ? 0 : 1); diff --git a/edit.c b/edit.c index bb9fb5c48..d0cab09f5 100644 --- a/edit.c +++ b/edit.c @@ -393,6 +393,11 @@ int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur) be_print_header (msg->env); for (i = 0; i < buflen; i++) addstr (buf[i]); + /* L10N: + This entry is shown AFTER the message content, + not IN the middle of the content. + So it doesn't mean "(message will continue)" + but means "(press any key to continue using mutt)". */ addstr (_("(continue)\n")); break; case 'q': diff --git a/editmsg.c b/editmsg.c index 2d916a0d4..8ba310522 100644 --- a/editmsg.c +++ b/editmsg.c @@ -146,6 +146,7 @@ static int edit_one_message (CONTEXT *ctx, HEADER *cur) if (mx_open_mailbox (ctx->path, M_APPEND, &tmpctx) == NULL) { rc = -1; + /* L10N: %s is from strerror(errno) */ mutt_error (_("Can't append to folder: %s"), strerror (errno)); goto bail; } diff --git a/imap/message.c b/imap/message.c index 3972f60f5..bf14b85a3 100644 --- a/imap/message.c +++ b/imap/message.c @@ -137,6 +137,8 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend) } if (evalhc) { + /* L10N: + Comparing the cached data with the IMAP server's data */ mutt_progress_init (&progress, _("Evaluating cache..."), M_PROGRESS_MSG, ReadInc, msgend + 1); diff --git a/mutt_ssl.c b/mutt_ssl.c index 0dd0b2585..4fdceb72f 100644 --- a/mutt_ssl.c +++ b/mutt_ssl.c @@ -432,6 +432,10 @@ static int ssl_negotiate (CONNECTION *conn, sslsockdata* ssldata) if (!ssl_check_certificate (conn, ssldata)) return -1; + /* L10N: + %1$s is version (e.g. "TLSv1.2") + %2$s is cipher_version (e.g. "TLSv1/SSLv3") + %3$s is cipher_name (e.g. "ECDHE-RSA-AES128-GCM-SHA256") */ mutt_message (_("%s connection using %s (%s)"), SSL_get_version(ssldata->ssl), SSL_get_cipher_version (ssldata->ssl), SSL_get_cipher_name (ssldata->ssl)); mutt_sleep (0); diff --git a/muttlib.c b/muttlib.c index 02067cce2..0e8aeb0ff 100644 --- a/muttlib.c +++ b/muttlib.c @@ -968,6 +968,9 @@ int mutt_check_overwrite (const char *attname, const char *path, if (directory) { switch (mutt_multi_choice + /* L10N: + Means "The path you specified as the destination file is a directory." + See the msgid "Save to file: " (alias.c, recvattach.c) */ (_("File is a directory, save under it? [(y)es, (n)o, (a)ll]"), _("yna"))) { case 3: /* all */ @@ -984,6 +987,9 @@ int mutt_check_overwrite (const char *attname, const char *path, return 1; } } + /* L10N: + Means "The path you specified as the destination file is a directory." + See the msgid "Save to file: " (alias.c, recvattach.c) */ else if ((rc = mutt_yesorno (_("File is a directory, save under it?"), M_YES)) != M_YES) return (rc == M_NO) ? 1 : -1; diff --git a/pgp.c b/pgp.c index 1bac6d010..0396969fd 100644 --- a/pgp.c +++ b/pgp.c @@ -1683,9 +1683,9 @@ int pgp_send_menu (HEADER *msg, int *redraw) (msg->security & INLINE) ? _("PGP/M(i)ME") : _("(i)nline")); prompt = promptbuf; /* L10N: The 'f' is from "forget it", an old undocumented synonym of - * 'clear'. Please use a corresponding letter in your language. - * Alternatively, you may duplicate the letter 'c' is translated to. - * This comment also applies to the five following letter sequences. */ + 'clear'. Please use a corresponding letter in your language. + Alternatively, you may duplicate the letter 'c' is translated to. + This comment also applies to the five following letter sequences. */ letters = _("safcoi"); choices = "SaFCoi"; } diff --git a/send.c b/send.c index d4e2a7974..0c8714d9a 100644 --- a/send.c +++ b/send.c @@ -497,6 +497,9 @@ static int default_to (ADDRESS **to, ENVELOPE *env, int flags, int hmfupto) * to send a message to only the sender of the message. This * provides a way to do that. */ + /* L10N: + Asks whether the user respects the reply-to header. + If she says no, mutt will reply to the from header's address instead. */ snprintf (prompt, sizeof (prompt), _("Reply to %s%s?"), env->reply_to->mailbox, env->reply_to->next?",...":""); diff --git a/smime.c b/smime.c index 1d0095b2b..bd959a50e 100644 --- a/smime.c +++ b/smime.c @@ -2053,9 +2053,9 @@ int smime_send_menu (HEADER *msg, int *redraw) { prompt = _("S/MIME (s)ign, encrypt (w)ith, sign (a)s, (c)lear, or (o)ppenc mode off? "); /* L10N: The 'f' is from "forget it", an old undocumented synonym of - * 'clear'. Please use a corresponding letter in your language. - * Alternatively, you may duplicate the letter 'c' is translated to. - * This comment also applies to the two following letter sequences. */ + 'clear'. Please use a corresponding letter in your language. + Alternatively, you may duplicate the letter 'c' is translated to. + This comment also applies to the two following letter sequences. */ letters = _("swafco"); choices = "SwaFCo"; } -- 2.40.0