deepl-node icon indicating copy to clipboard operation
deepl-node copied to clipboard

Translation w/ glossary entries are only partially translated and include sourceLang string

Open AltanS opened this issue 2 years ago • 1 comments

Describe the bug After creating a glossary and running a test translation, the glossary entry provided was partially translated and the source entry is sometimes included in the translation.

To Reproduce Steps to reproduce the behavior:

  1. I have created a glossary from EN to DE
  2. I have added some entries to test the functionality
  3. Results as seen in the screenshot below are not sticking to the terms set in the glossary.

image

This is the code I'm calling the translations with:

  const testTranslation3 = await translator.translateText('test1', 'en', 'de', {
    glossary: glossaryId,
  })

Expected behavior I'm uncertain if I misunderstood how glossaries work, but I thought they would always take precedence over default translations. Also, the source language string should never show up in the translation.

AltanS avatar Feb 28 '23 13:02 AltanS

I have experienced the same behaviour and just tried with a normal fetch with the same test glossary_id of a glossary I created. It seems to be related to the package as the vanilla fetch call behaves as expected with the glossary. As a workaround for now the vanilla fetch call will have to suffice.

STR1234 avatar Apr 24 '24 15:04 STR1234