Skip to main content

Lingui-generated files in version control

The lingui extract command extracts a message catalog (usually a po file) for each locale. Also, lingui compile command generates minified JavaScript files from the po files. All these files can be ignored from your version control system (VCS).

Every time you deploy to production, the JavaScript files need to be available and up-to-date: your app will get the translated strings from there. It follows that the files produced by lingui extract need to be up-to-date as well, otherwise some strings might be missing.

We encourage you to use CI to extract and compile the catalogs.

It's also possible to keep the po files checked in your vcs, but you'll have to deal with potential merge conflicts.

Git

To ignore the message catalogs, as well as compiled JavaScript files (as discusses above), add following lines to your .gitignore:

.gitignore
locales/**/*.po
locales/**/*.js

ESLint

You should not need to configure anything, because a compiled message catalog has an /*eslint-disable*/ comment embedded in itself and ESLint will therefore ignore it.

If you need to customize what files are ignored by ESLint, read .eslintignore docs.