DEV Community

Discussion on: i18n of React with Lingui.js #1

Collapse
 
stereobooster profile image
stereobooster • Edited

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

Collapse
 
siiidzej profile image
Václav Nosek

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).

Thread Thread
 
stereobooster profile image
stereobooster

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

Thread Thread
 
siiidzej profile image
Václav Nosek • Edited

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)

Thread Thread
 
stereobooster profile image
stereobooster

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