calypso-extractor extracts and syncs i18n keys from code base
yarn add calypso-extractor
Add following line as script
"calypso-extractor": "calypso-extractor -c calypso-extractor-config.js"
calypso-extractor-config.js
module.exports = {
root: 'src',
languages: {
base: 'i18n/en.json',
list: [
'i18n/en.json',
'i18n/tr.json',
'i18n/fr.json',
]
}
};
root
: The project root path.languages
: This option must be set. Collected keys will be extracted asbase
option.
In memory of Captain Cousteau