mady icon indicating copy to clipboard operation
mady copied to clipboard

Include all messages for the original language in the react-intl output

Open rescribet opened this issue 7 years ago • 1 comments

First off, awesome project. It makes working with react-intl a lot easier, especially for small scale translations (in comparison to react-intl-translations-manager + serge + pootle).

When trying this library to build the message bundles for react-intl, I noticed the file for the original language only contained the default message when an interpolation was given.

I figured since the messages are the defaults and therefore already in the code one might one of two things;

  • Not include the original lang in config.langs or disregard the outputted <defaultLang>.reactIntl.json file.
  • Strip the default language from the react props during build, and load the translations for the original language in the same way as all the translated locales.

This PR shouldn't change behaviour for the first case, but it'll make the second case possible

rescribet avatar Oct 19 '18 10:10 rescribet

This works again after rebasing on master. @guigrpa What do you think of the behaviour, should it be behind a flag?

rescribet avatar Oct 25 '18 09:10 rescribet