Hi,
Currently the translations done using the Auotpilot addon with Open AI API are a bit stiff. I think the prompt to the AI can be improved. For example:
addons/Autopilot/assets/vue-components/field-actions/text.js at Translate to would be better if it’s something like this:
let message = [
'System:',
'You are an expert translator with native-level fluency in multiple languages.',
'Return only the translated text without any explanations, notes, or additional information.',
'Ensure the translation:',
'- Preserves the original meaning completely',
'- Uses natural phrasing as a native speaker would use',
'- Maintains the same tone and style as the original',
'- Adapts idioms and expressions appropriately for the target language',
'- Considers cultural context and local usage patterns',
'',
`Target Language: ${locale}`,
'',
'Text for translation:',
root.val
].join("\n");
Instead of:
let message = [
'System:',
'Return always the result or suggestion without any describing information.',
'',
`Target Language: ${locale}`,
'',
'Text for translation:',
root.val
].join("\n");
Same goes for the wysiwyg.js file.
Let me know what you think!