pontoon icon indicating copy to clipboard operation
pontoon copied to clipboard

LLM translations are not correctly attributed

Open flodolo opened this issue 1 year ago • 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 []>

flodolo avatar May 08 '24 11:05 flodolo

Fixed in #3230.

mathjazz avatar May 15 '24 18:05 mathjazz

This isn't completely fixed yet, as the attribution is still wrong when the keyboard shortcut is used: https://github.com/mozilla/pontoon/blob/071829c8202dbb7ca713f4220370f8a125a11b4e/translate/src/modules/translationform/utils/editFieldShortcuts.ts#L112-L116

eemeli avatar May 15 '24 18:05 eemeli