question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Notification update - translation not working properly %{fname}

See original GitHub issue

According 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. 截屏2020-11-20 下午3 59 02

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
peter-jerry-yecommented, Nov 23, 2020

Well done! The issue is fixed. Thank you very much.

1reaction
benwindingcommented, Nov 22, 2020

Ahhh, okay I think I understand the issue now. ${fname} is empty in certain conditions right?. Well, I think it’s finally fixed!

Peek 2020-11-22 22-59

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 the useEffect hook. The implementation has been changed to use the File object as the trigger to cause the rest of the effects, via setFile(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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found