Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Missing translation" console error when the dataProvider fails #5655

Merged
merged 2 commits into from
Dec 11, 2020

Conversation

fzaninotto
Copy link
Member

Problem

Server error messages are seldom translated. And the useNotify hook logs a warning in the console for every missing translation. This pollutes the console a great deal and harms developer experience.

Solution

Provide default translation for dataProvider error notifications (the untranslated message). This will remove the warnings for untranslated server errors.

We do this in every call to useNotify in return to dataProvider errors instead of in useNotify itself, because useNotify is often called with error codes that need to be identified as mission transltions.

Before

image

After

image

@fzaninotto fzaninotto added the RFR Ready For Review label Dec 11, 2020
Copy link
Collaborator

@djhi djhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@djhi djhi added this to the 3.11 milestone Dec 11, 2020
@djhi djhi merged commit be749b7 into master Dec 11, 2020
@djhi djhi deleted the fix-notify-missing-translation branch December 11, 2020 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants