summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands.c4
-rw-r--r--copy.c4
-rw-r--r--curs_main.c7
-rw-r--r--functions.h4
-rw-r--r--headers.c12
-rw-r--r--pager.c2
6 files changed, 17 insertions, 16 deletions
diff --git a/commands.c b/commands.c
index e734bbfe..8b0162b3 100644
--- a/commands.c
+++ b/commands.c
@@ -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")))
diff --git a/copy.c b/copy.c
index 3ba0bad0..f4dbba3e 100644
--- a/copy.c
+++ b/copy.c
@@ -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" },
diff --git a/headers.c b/headers.c
index 48195bd4..ada4aad4 100644
--- a/headers.c
+++ b/headers.c
@@ -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;
}
diff --git a/pager.c b/pager.c
index 96f0d2c6..8a0e36d6 100644
--- a/pager.c
+++ b/pager.c
@@ -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.");