Repository: vscode
Issue: Submenu should use `shortTitle` or be configurable to do so
Labels: feature-request,menus

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

My extension takes a string from the clipboard, transforms that string to the programming language of the current editor and then "pastes" the modified result into the current editor. When the editor's language isn't set (i.e. `editorLangId == plaintext`), I want to show a dropdown and let the user manually select the language.

The first issue I ran into is that I'm forced to add the command I want to refer to in the drop down as a menu item to cmd+P, otherwise I got this error: 
```
Menu item references a command `curlconverter.toBrowser` which is not defined in the 'commands' section
```
This is annoying because I don't want to pollute the user's cmd+P menu with an item for each language my extension supports, but whatever. Maybe I'll open a separate issue for that, I bet someone has already asked about that.

Anyway, my issue in the title is that I put this in my `package.json` to get a dropdown of the languages

```jsonc
    "commands": [
      {
        "command": "curlconverter.toBrowser",
        "title": "Paste cURL As JavaScript",
        "category": "curlconverter"
      },
      {
        "command": "curlconverter.toPython",
        "title": "Paste cURL As Python",
        "category": "curlconverter"
      },
    ],
    "menus": {
      "editor/context": [
        {
          "submenu": "curlconverter.pasteAs",
          "group": "9_cutcopypaste@5",
          "when": "editorLangId == plaintext"
        }
      ],
      "curlconverter.pasteAs": [
        {
          "command": "curlconverter.toBrowser",
          // neither of these have an effect
          "label": "JavaScript",
          "title": "JavaScript"
        },
        {
          "command": "curlconverter.toPython",
          "label": "Python",
          "title": "Python"
        },
      ]
    },
    "submenus": [
      {
        "id": "curlconverter.pasteAs",
        "label": "Paste cURL As"
      }
    ]
```

but the `"label": "Python"` has no effect and I just see the `commands`' `title` property in my dropdown:

<img width="432" alt="Screen Shot 2022-08-30 at 21 40 06" src="https://user-images.githubusercontent.com/5687998/187587624-585d47ba-b173-4504-b690-f7c7caee5669.png">

What I expected to happen is for the `label` of the items in `menus` would have precedence over the `commands`' `title` property, like this:

<img width="341" alt="Screen Shot 2022-08-30 at 21 40 23" src="https://user-images.githubusercontent.com/5687998/187587642-5140ca03-8454-4f62-8cf4-2f1276980c19.png">

I can't rename the command because when the user does cmd+P I would rather they see "curlconverter: Paste cURL As Python" instead of "curlconverter: Python", which they wouldn't know what that means. As I mentioned earlier, ideally I would actually like them to not see any languages, and just see one "curlconverter: Paste cURL As Code" which would use the current editor's language, which is what I have now, but if adding all the language-specific commands to cmd+P is necessary then whatever.

I ended up working around this by defining each command twice as `toPython` and `toPythonShort` and hiding both from the cmd+P menu like this

```jsonc
    "commands": [
      {
        "command": "curlconverter.toBrowser",
        "title": "Paste cURL As JavaScript",
        "category": "curlconverter"
      },
      {
        "command": "curlconverter.toPython",
        "title": "Paste cURL As Python",
        "category": "curlconverter"
      },
      {
        "command": "curlconverter.toBrowserShort",
        "title": "JavaScript",
        "category": "curlconverter"
      },
      {
        "command": "curlconverter.toPythonShort",
        "title": "Python",
        "category": "curlconverter"
      },
    ],
    "menus": {
      "editor/context": [
        {
          "submenu": "curlconverter.toPython",
          "group": "9_cutcopypaste@5",
          "when": "editorLangId == python"
        },
        {
          "submenu": "curlconverter.pasteAs",
          "group": "9_cutcopypaste@5",
          "when": "editorLangId == plaintext"
        }
      ],
      "curlconverter.pasteAs": [
        {
          "command": "curlconverter.toBrowserShort",
        },
        {
          "command": "curlconverter.toPythonShort",
        },
      ],
      "commandPalette": [
        {
          "command": "curlconverter.toBrowser",
          "when": "false"
        },
        {
          "command": "curlconverter.toBrowserShort",
          "when": "false"
        },
        {
          "command": "curlconverter.toPython",
          "when": "false"
        },
        {
          "command": "curlconverter.toPythonShort",
          "when": "false"
        },
      ]
    },
    "submenus": [
      {
        "id": "curlconverter.pasteAs",
        "label": "Paste cURL As"
      }
    ]
```

https://github.com/curlconverter/curlconverter-vscode/pull/4