RepoHelper is a VS Code extension that assists in extracting, translating, and replacing strings in your Dart projects. This extension is especially useful for managing localization in Flutter applications.
Features
Extract Strings: Extracts all strings from the selected folder and saves them into a JSON file.
Extract and Replace Strings: Extracts all strings from the selected folder, replaces them with translation keys, and saves the translations into a JSON file.
Handle Exceptions: Skips specific lines, strings, or folders during extraction based on an exception.json file.
Installation
Clone this repository.
Open the cloned repository in VS Code.
Run npm install to install the dependencies.
Press F5 to launch the extension.
Usage
Extract Strings
Right-click on any folder in the VS Code Explorer.
Select RepoHelper: Extract Strings.
The strings will be extracted and saved in assets/translations/en2.json in the project root.
Extract and Replace Strings
Right-click on any folder in the VS Code Explorer.
Select RepoHelper: Extract and Replace Strings.
The strings will be extracted, replaced with translation keys, and saved in assets/translations/en3.json in the project root.
Handling Exceptions
Create an exception.json file in src/Exceptions/ with the following structure: