i18n-ally
i18n-ally copied to clipboard
Provide the key description to OpenAI and add additional context when translating for i18next
As title.
- Provide key name for attempting to translate plurals correctly
- Key description is now provided for all Translators to use (if they are capable to use it). Added it to the user prompt for OpenAI
- Added additional context for OpenAI when translating for
i18next
Additional notes:
-
gpt-4
is much better thangpt-3.5-turbo
. Better with longer prompts as well...it really should be the default. -
gpt-4-turbo-preview
is not in the OpenAI Api model list, it should be added - I can do that in this PR if you'd like to. - OpenAI users should be able to extend the system prompt - I could implement this too in this PR if you'd like to.
- OpenAI user should be able to make the "extend system prompt" to "override system prompt" with a checkbox - this might not be that desirable
I added a translation context per project in this fork : https://github.com/phcollignon/i18n-ally/tree/main.
The context can be added in the vscode plugin settings (one per workspace).
For example, you define there that your application is about "financial operations" and OpenAI is going to translate according to that context.
(Pull request 1130
This PR uses the description of each key to provide context instead. But it could be both.
Yes indeed, it's another option.