When the extract format is set to minimal, the extract command is not correctly setting the default message for the source locale. It does however work fine when the format is set to lingui
Given:
<Trans id="userpage.tabs.items">Items</Trans>
Command:
Output (locale/en/messages.json):
{
"userpage.tabs.items": "userpage.tabs.items"
}
Expected:
{
"userpage.tabs.items": "Items"
}
Config including package versions (extract from my package.json):
{
"dependencies": {
"@lingui/react": "^2.0.8",
"react": "^16.4.0",
"react-dom": "^16.4.0"
},
"devDependencies": {
"@lingui/babel-preset-react": "^2.0.8",
"@lingui/cli": "^2.0.8",
},
"lingui": {
"fallbackLocale": "en",
"sourceLocale": "en",
"localeDir": "<rootDir>/locale",
"format": "minimal",
"srcPathIgnorePatterns": [
"/node_modules/",
"<rootDir>/\\.next/",
"<rootDir>/dist/",
"<rootDir>/geolite2-country/"
]
}
}
When the extract format is set to
minimal, the extract command is not correctly setting the default message for the source locale. It does however work fine when the format is set tolinguiGiven:
Command:
Output (
locale/en/messages.json):{ "userpage.tabs.items": "userpage.tabs.items" }Expected:
{ "userpage.tabs.items": "Items" }Config including package versions (extract from my package.json):
{ "dependencies": { "@lingui/react": "^2.0.8", "react": "^16.4.0", "react-dom": "^16.4.0" }, "devDependencies": { "@lingui/babel-preset-react": "^2.0.8", "@lingui/cli": "^2.0.8", }, "lingui": { "fallbackLocale": "en", "sourceLocale": "en", "localeDir": "<rootDir>/locale", "format": "minimal", "srcPathIgnorePatterns": [ "/node_modules/", "<rootDir>/\\.next/", "<rootDir>/dist/", "<rootDir>/geolite2-country/" ] } }