v4: custom <Admin /> removes all labels (i18n?)
See original GitHub issueWhen using the AdminContext instead of <Admin />
all labels change into what I assume are keys.
Upon checking the code I think this is the issue:
Admin.defaultProps = {
i18nProvider: defaultI18nProvider,
store: localStorageStore(),
};
These aren’t mentioned in the docs. I think this should be added to the docs, or should be moved into <AdminContext />
.
What you were expecting:
I was expecting nothing to change and everything to look the same.
What happened instead:
After following this guide: https://marmelab.com/react-admin/doc/4.0/Admin.html#unplugging-the-admin-using-admincontext-and-adminui
I got the following result:
Related code:
My <App /> looks like this now (removed most resources and the irrelevant bits for brevity):
function App() {
return (
<AdminContext authProvider={authProvider} dataProvider={withUpload}>
<AsyncResources />
</AdminContext>
);
}
function AsyncResources() {
return (
<AdminUI layout={MyLayout} loginPage={SignIn} disableTelemetry={true}>
<Resource name="profiles" list={ProfileList} show={ProfileShow} edit={ProfileEdit} create={ProfileCreate} />
<Resource name="users" list={UserList} show={UserShow} edit={UserEdit} create={UserCreate} />
</AdminUI>
);
}
Environment
- React-admin version: 4.0.0-rc.1
- React version: 17.0.2
- Browser: Chrome
- Stack trace (in case of a JS error): N/A
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Admin panel customization - Strapi Developer Docs
The administration panel of Strapi can be customized according to your needs, so you can make it reflect your identity.
Read more >Activeadmin custom filter label is not registering I18n locale
When I remove the translation altogether and reload the page, the error tells me that activeadmin is indeed looking to the wrong translation ......
Read more >Field Label Translation not working - Drupal Answers
If I enter the English label under "admin/config/regional/translate" nothing is shown. Now for the interesting part:.
Read more >Translation - React-admin - Marmelab
React-admin components use translation keys for their labels, and rely on the i18nProvider to translate them. For instance:.
Read more >2576546 - Using the Manage Language Feature to Change ...
I'd like to set custom names in some specific system labels; ... Use the Manage Languages tool from within the Admin Center to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@fzaninotto https://github.com/marmelab/react-admin/pull/7524
You know I’ve been around for a while because of the fork name lol
Fixed by #7524