Files
discourse/app
Kris 930eeb1890 DEV: add create-topic-label value transformer (#32621)
On mobile we remove the create topic button label:


![image](https://github.com/user-attachments/assets/18dfb2e1-c7fc-4253-b24e-ba95d8533855)

and we don't have a great way to add it back
(https://meta.discourse.org/t/new-topic-button-hidden-text/364902)

this will allow the translation to be set for both mobile and desktop
like this:

```js
import { apiInitializer } from "discourse/lib/api";

export default apiInitializer((api) => {
  api.registerValueTransformer("create-topic-label", ({ value, context }) => {
    return context.defaultKey;
  });
});
```


![image](https://github.com/user-attachments/assets/7e1200f0-e8fc-4966-9693-310b3fad3682)


and also grants the flexibility to have a custom labels for mobile and
desktop
2025-05-07 12:01:44 -04:00
..