You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I try to translate Hello darkness my old friend Ive come to talk with you again to Spanish gives Hello darkness my old friend Ive come to talk with you again.
However with French and Italian it works correctly
To Reproduce
Steps to reproduce the behavior:
Use the API To Translate English to Spanish
Hello darkness my old friend Ive come to talk with you again to Spanish gives Hello darkness my old friend Ive come to talk with you again.
Expected behavior
It should translate to Spanish
Timestamp: 2024-06-25 22:15:42
Error Spanish
Correct Spanish No Typo
Working French
The text was updated successfully, but these errors were encountered:
I cant reproduce this (using our python CLI to hit the API):
$ poetry run python -m deepl text --to "ES" "Hello darkness my old friend Ive come to talk with you again"
Hola oscuridad mi viejo amigo he venido a hablar con usted otra vez
Hi,
I realized I was using a context prompt which was correct the problem when I removed the prompt it got resolved.
Thanks for your help!
async function translateText(text, targetLang) {
try {
const systemPrompt = "You are a skilled translator. Correct any typos in the English while translating it into Spanish, ensuring the translation is accurate and natural."
const result = await translator.translateText(text, null, targetLang,{context:systemPrompt});
console.log("Translated text:", result.text);
} catch (error) {
console.error("Error during translation:", error.message);
}
}
// Example usage
console.log(translateText("Hello darkness my old friend Ive come to talk with you again", "ES"));
Describe the bug
I try to translate Hello darkness my old friend Ive come to talk with you again to Spanish gives Hello darkness my old friend Ive come to talk with you again.
However with French and Italian it works correctly
To Reproduce
Steps to reproduce the behavior:
Use the API To Translate English to Spanish
Hello darkness my old friend Ive come to talk with you again to Spanish gives Hello darkness my old friend Ive come to talk with you again.
Expected behavior
It should translate to Spanish
Timestamp: 2024-06-25 22:15:42
Error Spanish
Correct Spanish No Typo
Working French
The text was updated successfully, but these errors were encountered: