react-intl tries to translate grommet components
See original GitHub issueIn my grommet app, I am using react-intl for internationalisation. Things are working as expected and I can change the language on the fly.
But when I change to a non-english language, a ton of react-intl errors are thrown, looking like this:
[React Intl] Missing message: "Tab Contents" for locale: "es", using default message as fallback.
[React Intl] Missing message: "location-pin" for locale: "es", using default message as fallback.
[React Intl] Missing message: "Skip to" for locale: "es", using default message as fallback.
I never use anything of those words (‘Tab Contents’, ‘location-pin’, ‘Skip’) as Ids for my react-intl messages.
I though there might be something going on in grommet behind the scenes related to internationalisation, that causes these Errors.
Would appreciate any input.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
no 😦 we have Intl.getMessage all over our source code.
We will be removing this in grommet 2.0. I understand that forcing you to translate content is bad, but in this case it is for a good cause. It is important that folks with disabilities have content in spanish too 😃
Yeah. We are currently re-evaluating how we do messages for Grommet 2.0.
Currently Grommet 1.x uses react-intl also. We don’t have the resources to provide the translations for every language. I would recommend adding the spanish support for all the keys that are in this file:
https://github.com/grommet/grommet/blob/master/src/js/messages/en-US.js
They are used mainly for accessibility reasons. For example
Skip To
will be there if you presstab
in your app. Blind users will rely on screen readers to read the content in the screen.Hope it helps.
I’m closing this issue since I believe there is nothing to be changed in grommet but feel free to continue the discussion here.