Translate custom textarea button label

The docs for textarea buttons have an example toolbar button:

panel.plugin("getkirby/custom-textarea-buttons", {
  textareaButtons: {
    highlight: {
      label: "Highlight",
      icon: "wand",
      click: function () {
        this.command("toggle", "<mark>", "</mark>")
      },
      shortcut: "m",
    },
  }
});

I’d like to translate the label, “Highlight”. Using label: panel.$t('foo') does not work. panel.$t() is not defined.

However, when I log panel.$t('foo') inside the click handler I get my translated string in the console.

How can I translate the button label?

Found the solution: [v4] Plugin label cannot translatable for `textareaButtons` extension · Issue #5738 · getkirby/kirby · GitHub

panel.plugin("my/textarea-buttons", {
  textareaButtons: {
    smile: {
      get label() {
        return panel.$t('avatar')
      },
      icon: "smile"
    }
  }
});

Created a PR to add this to the docs: Document button label translation by fschroiff · Pull Request #2538 · getkirby/getkirby.com · GitHub