Automatic translation (i18n) support for emptyText
See original GitHub issueIs your feature request related to a problem? Please describe.
The emptyText
prop value of field components is not automatically translated as it is done for the label
prop.
Describe the solution you’d like
Having the possibility to have the emptyText
prop value being translated when available for example:
<Tab
// The label prop is being automatically translated.
label="resources.rides.tabs.path"
path="path"
>
<DateField
source="startedAt"
showTime
// Expected to be translated too.
emptyText="resources.rides.emptyText.notStarted"
/>
</Tab>
Describe alternatives you’ve considered
I am using useTranslate
hooks with the result store in a variable like so: const t = useTranslate();
Then I translate the key manually:
<DateField
source="startedAt"
showTime
emptyText={t('resources.rides.emptyText.notStarted')}
/>
Additional context
N/A
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Extract messages with empty text · Issue #245 - GitHub
I wanted to extract a message which is an empty string in the default language, but has a valid translation in other languages....
Read more >Prefill and fallback languages - Learn the ins and outs of these ...
Prefill is one of LingoHub's powerful translation tools. It is a feature which fills empty text segments with content of matching texts from ......
Read more >Options | SimpleLocalize
By default, only not translated strings (empty text) are translated to speed up the auto-translation process. This option forces SimpleLocalize ...
Read more >How can I reuse i18n translation keys in Angular?
The <a> node shows up with empty text, not the translation target. (Further, by default there is no translation target in the auto-generated ......
Read more >Rails Internationalization (I18n) API - Ruby on Rails Guides
There are a few steps to get up and running with I18n support for a Rails ... the config/locales directory to the translations...
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
Please do it for all fields.
Indeed, thanks!