A tool to easily search texts in html and generate i18n json files.
Features
Context menu i18n-crawler avaliable on HTML documents
Generate i18n JSON file to the current folder
Execute command "i18n-crawler.createI18nJson" to search text resources which need to be translated in multi-languages from the current text editor. Then put them into .json files as dictionaries for the i18n feature. This command scans the HTML content, extracts text nodes, and generates a JSON file with key-value pairs where the keys are unique identifiers and the values are the extracted texts.
i18n-crawler/Replace texts with I18n Expression
Execute command "i18n-crawler.insertI18nExpression" to replace texts in the current text editor with translation keys using the configured format. This command reads the generated JSON file and replaces the text nodes in the HTML content with the corresponding translation keys, formatted according to the configuration.
Merge JSON to Locale Folder
Execute command "i18n-crawler.mergeJsonToLocaleFolder" to merge the generated JSON file with existing locale files in the configured locale folder. This ensures that the new translations are added to the existing translations, overwriting if the translation key exists. The command reads the existing locale files, merges the new translations, and saves the updated files back to the locale folder.
Clear temp files in the current folder
Execute command "i18n-crawler.clearCurrentFolder" to clear JSON and log files created by the "i18n-crawler.createI18nJson" and "i18n-crawler.insertI18nExpression" commands. It specifically targets files in the current folder that match the JSON file name or the log file name pattern. This helps in cleaning up the directory by removing these generated files, ensuring that the workspace remains tidy.
Known Issues
Nothing yet.
Release Notes
1.2.6
Fixed some issues.
1.2.5
Fixed some issues.
1.2.4
Fixed some issues of generating the json file.
1.2.3
Fixed some issues.
1.2.2
Add log output and fixed some issues.
1.2.1
Change the icon.
1.2.0
Add context menus.
1.1.2
Fixed some issues.
1.1.1
Fixed some issues.
1.1.0
Changed the commands' names, and added two new commands.
1.0.1
Fixes an issue of the node type is comment node.
1.0.0
Add command "i18n-crawler.html2i18n" and "i18n-crawler.replaceWithDict"