Closed prewk closed 8 years ago
Production build does not have that error. (npm run build && npm start) Server still renders Eng version first, then apply JP strings right away (it flickers a few ms). I'm trying to make it render with locale strings completely.
@prewk Hi, I've just committed a fix for this: https://github.com/ngduc/react-setup/commit/b039dcdb6b56eec2e9e7672f2cee56498103e2a1
Could you let me know if that works?
Confirmed!
react-intl
is complaining about having to use fallbacks in English:
[React Intl] Missing message: "home.welcome" for locale: "en-US", using default message as fallback.formatMessage
...
I have the same problem in another project. They changed the API so that it console.errors instead of just using the fallback, which IMO is unfortunate.
Thought you'd wanna know.
I think they'll fix it soon, or we have to patch console.log: https://github.com/yahoo/react-intl/issues/251
That's good news. I use it in another project and I hate those errors.
This is fixed by setting defaultLocale which I've just committed. https://github.com/ngduc/react-setup/commit/a3028754ad456fdc2d77152f3ee1f80b979ec8ad
It seems to be server-rendering in English and then client rendering in Japanese with the
?locale=ja-JP
param. This causes a console error.