<Resource options={{ label: 'resource.myResource.myKey' }} /> does not get translated
See original GitHub issueI have tried the following:
<Resource
options={{ label: 'resource.myResource.myKey' }}
/>
According to documentation: https://marmelab.com/react-admin/Resource.html
options.label
allows to customize the display name of a given resource in the menu.
and https://marmelab.com/react-admin/Translation.html
// don't do this <TextField source="first_name" label={translate('myroot.first_name')} /> // do this instead <TextField source="first_name" label="myroot.first_name" />
I don’t know if it’s a bug but it looks like it.
React-admin 3.3.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Issue with asp.net expression builder - Stack Overflow
I made a dummy skeleton project too with only a few lines of code, there I have 2 resource files in the App_GlobalResources...
Read more >Translating by way of english text but not resource key's?
Hi, I write everything that needs to be translated in english ( static text, text on labels and buttons and data coming up...
Read more >Script Language: Function Reference - Appway Community
Returns an indexed collection of all object names in the application cache. This function does not check if the cache entries have expired....
Read more >Developing Oracle JET Apps Using MVVM Architecture
Lazy loading of localized resource strings at run time ... To begin using Oracle JET, you do not need to understand more than...
Read more >Custom pluggable types for ... - The Checker Framework Manual
jar files can be used for pluggable type-checking of client code. If you compile code without the -processor command-line option, no checking of ......
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
That’s right, there are 2 options to customize the label. If you use both, one will be ignored. We should probably throw an exception in that case so that the problem isn’t considered as a bug.
I found someting. If your language file contains a
resources.myResource.name
entry, then this is always used and youroptions={{ label: 'something' }}
isn’t used But when you removeresources.myResource.name
from your language file, then theopen.label
you setted is used and correctly translated.Does it fit with your case @kopax ?