mozilla/pontoon

LLM translations are not correctly attributed

Opened this issue · 2 comments

Click the AI button and select rephrase, then click to copy the text and submit the translation.

The UX action log is correctly recorded (first LLM dropdown select, then LLM dropdown copied).

The translation is incorrectly attributed to Google Translate in the UI, and this code doesn't return any match

from pontoon.base.models import Translation

# List Translation copied from the LLM suggestions
Translation.objects.filter(machinery_sources__contains=['gpt-transform']).values("locale__code", "date")

>>> <TranslationQuerySet []>

Fixed in #3230.

This isn't completely fixed yet, as the attribution is still wrong when the keyboard shortcut is used:

const { translation, sources } =
nextIdx < len
? machineryTranslations[nextIdx]
: concordanceSearchResults[nextIdx - len];
setEditorFromHelpers(translation, sources, true);