mozilla / pontoon

Mozilla's Localization Platform
https://pontoon.mozilla.org
BSD 3-Clause "New" or "Revised" License
1.44k stars 522 forks source link

LLM translations are not correctly attributed #3204

Open flodolo opened 2 months ago

flodolo commented 2 months ago

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 []>
mathjazz commented 2 months ago

Fixed in #3230.

eemeli commented 2 months ago

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