This extension allows you to move all text nodes from your React component to a JSON file.
Features
- Extracts all text nodes from your React component
- Moves the extracted text nodes to a JSON file
- Customizable function name, JSON file path, and key naming
Usage
To enable the extension, open the Command Palette (Ctrl + Shift + P ) and run Translate Extractor Helper: From File .
Configuration
The extension allows the following configuration options:
Type: string
Default: t
Description: The function name used to replace the extracted string. The default is t function.
Type: string
Default: en.json
Description: The path of the JSON file where the extracted strings will be moved to.
Type: string
Default: kebabCase
Description: The replacement for spaces in the extracted string keys. Options are kebabCase or snakeCase .
| |