AI Translation VS Code Extension This VS Code extension enhances coding and internationalization (i18n) using the Gemini API. The extension can extract all translatable text from your code and generate i18n JSON files for the specified languages. It also helps with code checking and general coding tasks. Features Code Analysis and Checking: Checks your code for string literals that are not translated with the t() function and lists the errors. Translation Extraction: Extracts translatable text from your code and creates i18n JSON files for the specified languages. Custom Queries: Allows you to ask custom questions about your code to the Gemini AI (e.g., "fix the bugs", "explain this code"). Prerequisites To use this extension, you will need a Google Gemini API key. Create it in Google AI Studio. Add the key to your VS Code settings: Go to File > Preferences > Settings (or use the Ctrl+, shortcut). Search for "Gemini Code Helper Settings". Paste your key into the gemini-code-helper.apiKey field. Installation The easiest way to install the extension is from the VS Code Marketplace. Search for and install the ViktorBozzay.ai-translation extension. Usage The extension can be found in the sidebar under the "Gemini Code Helper" icon . I18n Tools Click the "Start Extraction" button to extract text and generate translation files for the languages specified in the settings. Code Check Click the "Code Check" button to analyze your code and identify i18n errors, such as untranslated string literals. The errors will appear in the tree view, and clicking on them will navigate you to the corresponding line in VS Code. Custom Query Click the "Custom Code Query" button and enter your question for the AI. The response will appear in a new, temporary file. The complete source code can be viewed on GitHub: https://github.com/exphoenee/AI_Transltion_Plugin |