ドロップダウンの名前を変更することは可能ですか?

このソリューションは素晴らしいですが、@Don、次のように実行することもできます。

api
  .modifySelectKit("category-drop")
  .replaceContent((component, content) => {
    let newContent = [];
    content.forEach((item) => {
      if (
        component.category?.slug === "general" &&
        item.id === "all-categories"
      ) {
        item.name = "jojo";
      }

      newContent.push(item);
    });
    return newContent;
  });

https://github.com/discourse/discourse/blob/main/app/assets/javascripts/select-kit/addon/mixins/plugin-api.js には、実行できるすべてのアクションがリストされています。

  • appendContent
  • prependContent
  • replaceContent
  • onChange

これを使用するのに問題がある場合はお知らせください。おそらく、より適切に文書化されるべきですが、質問があれば対応します。