Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-22165

keyboard-shortcut plugin type works incorrectly

    XMLWordPrintable

Details

    Description

      I have created a keyboard-shortcut plugin module type. I have trouble with some of its behaviour.

      First of all, the description element seems to absolutely require the key attribute, even though the documentation seems to claim this is optional. Without the attribute, the module fails to load.

      Second, the key attribute is supposed to be the i18n key of the shortcut key's description visible in the "Keyboard Shortcuts" dialog. But even though I included and i18n resource with the plugin, and it works for other plugin modules, only the key is displayed (verbatim) in the dialog, and not its corresponding text. I have to resort to cheating to make this work (well, sort of work, the plugin is not internationalisable now). In effect, I have to use this ugly code:

      <keyboard-shortcut key="newkwikshortcut" name="New Kwik shortcut">
              <order>60</order>
              <!--<description key="kwik.new.keyboard.shortcut.description">New Kwik keyboard shortcut</description>-->
              <!-- hack alert - Confluence does not seem to be able to retrieve key descriptions from our i18n. At lest not in version 3.4 -->
              <description key="New Kwik:">New Kwik</description>
              <shortcut>o</shortcut>
              <operation type="execute">kwik_newKwikFromKeyboardShortcut()</operation>
              <context>viewcontent</context>
      </keyboard-shortcut>
      

      Attachments

        Issue Links

          Activity

            People

              jgorycki Janusz Gorycki (Inactive)
              jgorycki Janusz Gorycki (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: