i18n-ally
i18n-ally copied to clipboard
Add translation context for OpenAI
OpenAI give more accurate translations if we describe the translation context into the prompt.
This pull request adds a text area settings for the OpenAI translation engine where you can describe the context of your application. It is then passed to the OpenAI API prompt for a more accurate translation.
I tested it with OpenAI GPT4 API key and it works quite good : in example "I have some shares for you" gives two different translations in french depending of the context :
- file sharing application context : "J'ai quelques partages pour toi"
- financial application : "J'ai quelques actions pour toi"
Regards