]> granicus.if.org Git - neomutt/commitdiff
Fix mark-message translation and keybind menu.
authorKevin McCarthy <kevin@8t8.us>
Fri, 18 Nov 2016 23:54:27 +0000 (15:54 -0800)
committerKevin McCarthy <kevin@8t8.us>
Fri, 18 Nov 2016 23:54:27 +0000 (15:54 -0800)
Move the OP_MARK_MESSAGE and hotkey macro from MENU_GENERIC to the
MENU_MAIN keymap.  Putting the macro under generic prevents it from
overriding a keybinding in the index (even if the function is bound to
noop).  Additionally, the macro can only be executed from the index,
so it doesn't make sense as a generic keybinding.

Use the term "hotkey" in both the OPS and km_bind description.

Mark the km_bind description translatable.

Add L10N messages for the new translation strings.

OPS
curs_main.c
functions.h

diff --git a/OPS b/OPS
index 25506118bf0474d7bdf3dec59fb4cdcc7e12f1f0..66c838e7052727a89911d14d05b940a0fd704f9a 100644 (file)
--- a/OPS
+++ b/OPS
@@ -131,7 +131,7 @@ OP_MAIN_SYNC_FOLDER "save changes to mailbox"
 OP_MAIN_TAG_PATTERN "tag messages matching a pattern"
 OP_MAIN_UNDELETE_PATTERN "undelete messages matching a pattern"
 OP_MAIN_UNTAG_PATTERN "untag messages matching a pattern"
-OP_MARK_MSG "create a hot-key macro for the current message"
+OP_MARK_MSG "create a hotkey macro for the current message"
 OP_MIDDLE_PAGE "move to the middle of the page"
 OP_NEXT_ENTRY "move to the next entry"
 OP_NEXT_LINE "scroll down one line"
index 7a1fd2786ca1eeed2c85301b6df62eb156034de1..a097705785020b097a7615c6416074f54eabf80d 100644 (file)
@@ -2215,20 +2215,30 @@ int mutt_index_menu (void)
          char buf[128];
 
          buf[0] = '\0';
+          /* L10N: This is the prompt for <mark-message>.  Whatever they
+             enter will be prefixed by $mark_macro_prefix and will become
+             a macro hotkey to jump to the currently selected message. */
          if (!mutt_get_field (_("Enter macro stroke: "), buf, sizeof(buf),
                               MUTT_CLEAR) && buf[0])
          {
            snprintf(str, sizeof(str), "%s%s", MarkMacroPrefix, buf);
            snprintf(macro, sizeof(macro),
                     "<search>~i \"%s\"\n", CURHDR->env->message_id);
-           km_bind(str, MENU_GENERIC, OP_MACRO, macro, "Message hotkey");
+            /* L10N: "message hotkey" is the key bindings menu description of a
+               macro created by <mark-message>. */
+           km_bind(str, MENU_MAIN, OP_MACRO, macro, _("message hotkey"));
 
+            /* L10N: This is echoed after <mark-message> creates a new hotkey
+               macro.  %s is the hotkey string ($mark_macro_prefix followed
+               by whatever they typed at the prompt.) */
            snprintf(buf, sizeof(buf), _("Message bound to %s."), str);
            mutt_message(buf);
            dprint (1, (debugfile, "Mark: %s => %s\n", str, macro));
          }
        }
        else
+          /* L10N: This error is printed if <mark-message> cannot find a
+             Message-ID for the currently selected message in the index. */
          mutt_error _("No message ID to macro.");
        break;
 
index 6f4b6b48231d380c41586bd4e919cbb3cebebdf8..b5033a841183f4a246bb51adbce425bcd42a0557 100644 (file)
@@ -65,7 +65,6 @@ const struct binding_t OpGeneric[] = { /* map: generic */
   { "previous-line",   OP_PREV_LINE,           "<" },
   { "half-up",         OP_HALF_UP,             "[" },
   { "half-down",       OP_HALF_DOWN,           "]" },
-  { "mark-message",    OP_MARK_MSG,            "~" },
   { "help",            OP_HELP,                "?" },
   { "tag-prefix",      OP_TAG_PREFIX,          ";" },
   { "tag-prefix-cond", OP_TAG_PREFIX_COND,     NULL },
@@ -150,6 +149,7 @@ const struct binding_t OpMain[] = { /* map: index */
   { "set-flag",                        OP_MAIN_SET_FLAG,               "w" },
   { "clear-flag",              OP_MAIN_CLEAR_FLAG,             "W" },
   { "display-message",         OP_DISPLAY_MESSAGE,             MUTT_ENTER_S },
+  { "mark-message",            OP_MARK_MSG,                    "~" },
   { "buffy-list",              OP_BUFFY_LIST,                  "." },
   { "sync-mailbox",            OP_MAIN_SYNC_FOLDER,            "$" },
   { "display-address",         OP_DISPLAY_ADDRESS,             "@" },