add a friendly localized error message helper #6099
Draft
+42
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Supports #3384
I realized that while we have support to show localized console messages, there isn't an easy way to use it in the codebase outside of the fes core code. This new helper would make it so someone can add a new console message with
when
messageKey
is also added a key into our localization json files. And then it could be translated into other languages.Open to ideas on ways to make this simpler to use! I'd love to have more localized console messages, there's a lot outside of the fes folder that we could add!
Changes:
friendlyLocalizedError()
helper so its easier to add new localized console messagesPR Checklist
npm run lint
passes