Skip to content
loading...

re: i18n of React with Lingui.js #1 VIEW POST

FULL DISCUSSION
 

Hi
Thanks for simple yet powerful tutorial!

I have one question about how it works;
If you define default value (for default locale - en here) why would you also add-locale for the same language you define in Trans component?

 

I didn't understand your question. Can you provide code example, because it seems you use different terminology

 

I am trying your example code (github.com/stereobooster/react-lin...).

The point is; If I run npm run extract the language which is default(en) has all messages "Missing" (because it is non-sense to give translation to these as well if that is the source-of-truth).

Yes they missing, because there is no"sourceLocale": "en", otherwise they would be there. What is your question?

Catalog statistics is used to determine whether there are some non-translated messages therefore if You use it for any kind of automation (as a test) it wouldn't pass unless you translate the source messages as well.

I am asking if according to your opinion is this good practice or I am missing some point where you simply set "sourceLocale": "en" and problem solves? (because this isn't included in your, nor official example)

No "sourceLocale": "en" is not a solution. You can ask author for this feature

code of conduct - report abuse