AI-Localization Visual Studio Code ExtensionVS Code extension for easily translating localization files using Chat GPT. RequirementsSetting OpenAI API key If you don't have an OpenAI API key, check the section below to see how to create one. Once when the extension is installed, open settings from the main menu: File -> Preferences -> Settings. Switch to the Workspace tab and type 'ai-localization' in the search bar. Paste your OpenAI API key in the field 'Ai-localization: Chat GPTApi Key'. Now the extension is ready.
File structure requirements In order for the extension to function properly, all localization files must fulfill the following requirements:
How to useOpen a localization file that will be used as a source for translation. If the file has a The The Extension SettingsMax Translations Per ResponseWhen translation is invoked, entries are split into separate requests for performance and limitation of maximal character number. This option controls how many translated phrases will be retrieved by one request. This option is correlated with the length of text that is being translated. If text entries are too long then this parameter should be a smaller number so responses could be generated properly.
ModelWhich Chat GPT model the extension will use for translation.
LimitationsAll double quotes are replaced with single quotes because they can cause JSON response to be invalid. If translated text is too long it might not be possible to be translated. In that situation the It is possible that Chat GPT API returns invalid JSON. Or a valid JSON that doesn't contain all translations, so in that case it's not reliable to apply translations. AppendixCreating an OpenAI API keyGo to https://platform.openai.com/ page and create an account. Once when you are logged in, select the Click the Copy and save the key that appears on the screen, because you won't be able to access it later anymore. DisclaimerThis extension uses content generated by third-party artificial intelligence (AI) services. The author of this extension is not responsible for any content generated by the AI nor any damage or losses caused by usage of this extension. |