I am using babel-plugin-react-intl to automatically extract all the labels in my React application.
I'd point as main advantages the following two:
- Using the plugin, all the labels from my application are automatically extracted to json files. Instead of having to manually update the json files that will be translated. This way, I don't need to worry about this file, as the plugin will push the labels to it.
- If I accidentally create a duplicated ID for a label, the plugin tells me that by throwing an error on webpack.
Extra: I am not using, but, if you want to force developers to add a context description for each label, this plugin also has an option to force this behavior so that, if the developer forgets it, an error is thrown on webpack.