Notification update - translation not working properly %{fname}
See original GitHub issueAccording to this answer, the setState
won’t change the function immediately, thus we can see that in the notification, the translation does not work, because the state remains null.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Email Notification Translation Issue - wpDiscuz
Problem : I've started traslating wpDiscuz, using Loco Translate, .mo/.po setting enabled and all that. Everything on the front-end seems to work ...
Read more >Error messages in Dynamic Translation
Error messages are displayed when the text cannot be dynamically translated on forms activity streams. Table 1. Forms and activity streams ...
Read more >How to Change Notification with English Translation When ...
Step-by-step guide · Locate the first file: · Open the JAR file to locate the following file: · Find and copy the desired...
Read more >Translation Considerations for Flows - Salesforce Help
When a flow label isn't translated for a language, Salesforce uses the translation for the appropriate fallback language. If the fallback language has...
Read more >Create multilingual SharePoint sites, pages, and news
Pages are not translated automatically. · Changes to the original, source page or to other translation pages are not automatically synced with all...
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 FreeTop 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
Top GitHub Comments
Well done! The issue is fixed. Thank you very much.
Ahhh, okay I think I understand the issue now.
${fname}
is empty in certain conditions right?. Well, I think it’s finally fixed!You were correct it was due to the
setState
being used in an asynchronous function. This kind of breaks the rules of react hooks, and is better suited to theuseEffect
hook. The implementation has been changed to use theFile
object as the trigger to cause the rest of the effects, viasetFile(file)
.https://github.com/benwinding/react-admin-import-csv/blob/a07aec59d258a9652061ab662df8b665f54b4743/src/main-csv-button.tsx#L157-L160
https://github.com/benwinding/react-admin-import-csv/blob/a07aec59d258a9652061ab662df8b665f54b4743/src/main-csv-button.tsx#L56-L116
Let me know if this works! Cheers, Ben