ratty-blush
ratty-blush11mo ago

Singular resource name

I'm looking for a way to set a resource name that is not pluralized, like dashboard singular. It should have singular names for menu item
4 Replies
kapa.ai
kapa.ai11mo ago
Hi @anewman15. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- You can use the textTransformers option in refine to customize the transformation of the resource name displayed on the user interface. By default, if you define a resource named posts, refine will display it as Posts. However, you can disable this transformation by setting the textTransformers option as shown in the example below:
const App: React.FC = () => (
<Refine
// ...
options={{
textTransformers: {
humanize: (text) => text,
plural: (text) => text,
singular: (text) => text,
},
}}
/>
);
const App: React.FC = () => (
<Refine
// ...
options={{
textTransformers: {
humanize: (text) => text,
plural: (text) => text,
singular: (text) => text,
},
}}
/>
);
In this example, the humanize, plural, and singular functions are set to return the input text as is, effectively disabling any transformation. You can adjust these functions to suit your needs. For more information, refer to the refine documentation (https://refine.dev/docs/api-reference/core/components/refine-config/). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai11mo ago
<@506108303659630602> kapa.ai is still learning and improving, please let us know how it did by reacting below
absent-sapphire
absent-sapphire11mo ago
Hey @anewman15 I don't quite understand what you are asking, can it be solved with label?
absent-sapphire
absent-sapphire11mo ago
| refine
`` component is the entry point of a refine app. It is where the highest level of configuration of the app occurs.