diff options
-rw-r--r-- | commands.c | 4 | ||||
-rw-r--r-- | copy.c | 4 | ||||
-rw-r--r-- | curs_main.c | 7 | ||||
-rw-r--r-- | functions.h | 4 | ||||
-rw-r--r-- | headers.c | 12 | ||||
-rw-r--r-- | pager.c | 2 |
6 files changed, 17 insertions, 16 deletions
@@ -533,6 +533,10 @@ int mutt_select_sort (int reverse) int method = Sort; /* save the current method in case of abort */ switch (mutt_multi_choice (reverse ? + /* L10N: The following three are the sort/reverse sort prompts. + * Capital letters must match the order of the characters in the third + * string. + */ _("Rev-Sort Date/Frm/Recv/Subj/tO/Thread/Unsort/siZe/sCore/sPam/Label?: ") : _("Sort Date/Frm/Recv/Subj/tO/Thread/Unsort/siZe/sCore/sPam/Label?: "), _("dfrsotuzcpl"))) @@ -112,7 +112,7 @@ mutt_copy_hdr (FILE *in, FILE *out, LOFF_T off_start, LOFF_T off_end, int flags, } if (flags & CH_UPDATE_LABEL && - mutt_strncasecmp ("X-Label:", buf, 8) == 0) + ascii_strncasecmp ("X-Label:", buf, 8) == 0) continue; if (!ignore && fputs (buf, out) == EOF) @@ -418,7 +418,7 @@ mutt_copy_header (FILE *in, HEADER *h, FILE *out, int flags, const char *prefix) fprintf (out, "Lines: %d\n", h->lines); } - if (flags & CH_UPDATE_LABEL && h->xlabel_changed) + if (flags & CH_UPDATE_LABEL) { h->xlabel_changed = 0; if (h->env->x_label != NULL) diff --git a/curs_main.c b/curs_main.c index 6362073b..43417188 100644 --- a/curs_main.c +++ b/curs_main.c @@ -2101,9 +2101,14 @@ int mutt_index_menu (void) if (rc > 0) { Context->changed = 1; menu->redraw = REDRAW_FULL; - mutt_message ("%d label%s changed.", rc, rc == 1 ? "" : "s"); + /* L10N: This is displayed when the x-label on one or more + * messages is edited. */ + mutt_message (_("%d labels changed."), rc); } else { + /* L10N: This is displayed when editing an x-label, but no messages + * were updated. Possibly due to canceling at the prompt or if the new + * label is the same as the old label. */ mutt_message _("No labels changed."); } break; diff --git a/functions.h b/functions.h index 25a1306f..1f7ca592 100644 --- a/functions.h +++ b/functions.h @@ -99,7 +99,7 @@ const struct binding_t OpMain[] = { /* map: index */ { "delete-thread", OP_DELETE_THREAD, "\004" }, { "delete-subthread", OP_DELETE_SUBTHREAD, "\033d" }, { "edit", OP_EDIT_MESSAGE, "e" }, - { "edit-label", OP_EDIT_LABEL, "y" }, + { "edit-label", OP_EDIT_LABEL, "Y" }, { "edit-type", OP_EDIT_TYPE, "\005" }, { "forward-message", OP_FORWARD_MESSAGE, "f" }, { "flag-message", OP_FLAG_MESSAGE, "F" }, @@ -201,7 +201,7 @@ const struct binding_t OpPager[] = { /* map: pager */ { "set-flag", OP_MAIN_SET_FLAG, "w" }, { "clear-flag", OP_MAIN_CLEAR_FLAG, "W" }, { "edit", OP_EDIT_MESSAGE, "e" }, - { "edit-label", OP_EDIT_LABEL, "y" }, + { "edit-label", OP_EDIT_LABEL, "Y" }, { "edit-type", OP_EDIT_TYPE, "\005" }, { "forward-message", OP_FORWARD_MESSAGE, "f" }, { "flag-message", OP_FLAG_MESSAGE, "F" }, @@ -219,17 +219,9 @@ static int label_message(HEADER *hdr, char *new) { if (hdr == NULL) return 0; - if (hdr->env->x_label == NULL && new == NULL) + if (mutt_strcmp (hdr->env->x_label, new) == 0) return 0; - if (hdr->env->x_label != NULL && new != NULL && - strcmp(hdr->env->x_label, new) == 0) - return 0; - if (hdr->env->x_label != NULL) - FREE(&hdr->env->x_label); - if (new == NULL) - hdr->env->x_label = NULL; - else - hdr->env->x_label = safe_strdup(new); + mutt_str_replace (&hdr->env->x_label, new); return hdr->changed = hdr->xlabel_changed = 1; } @@ -2820,7 +2820,7 @@ search_next: if (rc > 0) { Context->changed = 1; redraw = REDRAW_FULL; - mutt_message ("%d label%s changed.", rc, rc == 1 ? "" : "s"); + mutt_message (_("%d labels changed."), rc); } else { mutt_message _("No labels changed."); |