This stopped working. A new way to rename the button depending on the category is posted here:
How to:
- Clone or download and unzip theme component from GitHub - VaperinaDEV/category-btn-name
- Edit file
category-btn-name/locales/en.yml
and enter the various button texts you want to use, e.g.
en:
new_event: New Event
new_deadline: New Deadline
- Edit file
category-btn-name/javascripts/discourse/api-initializers/initialize-btn-names.js
to define which button text to use for what categories:
const TRANSLATION_KEYS = {
"Events": "new_event",
"Calendar": "new_event",
"Deadlines": "new_dealine",
};
- Install theme component