Page MenuHomePhabricator

SX: MT modification percentages are calculated wrongly
Closed, ResolvedPublic

Description

The percentages of machine translation modifications displayed inside "Pick a sentence" and "Preview & Publish" step do not match their actual values in some cases. More specifically:

a. When a block template exists inside the translated contents, the score of the unmodified MT validation is lower than the actual one. This happens because the "getProposedTranslation" method of the subSection model doesn't take into account block templates, but only sentences.

As demonstrated in the screencast, the unmodified MT percentage should be 100%, since the MT was not modified at all, but it's only 92%.

b. When different MT providers are used for the same subsection (i.e. paragraph), the MT modification percentage displayed inside the translated segment card is wrong, since the applied translation of the sentence is compared with the machine translation of the currently selected MT provider instead of the one actually used for this sentence.

As demonstrated in the screencast, the modified MT percentage is calculated correctly for the sentences that have used the same MT provider as the currently selected one, but wrongfully for the sentences that used a different MT provider and the whole subsection (paragraph).

Event Timeline

ngkountas changed the task status from Open to In Progress.Jun 2 2022, 6:44 PM
ngkountas claimed this task.
ngkountas triaged this task as Medium priority.
ngkountas added a project: SectionTranslation.

Change 803230 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX: Fix MT modification rate calculation

https://gerrit.wikimedia.org/r/803230

@ngkountas FYI, if webm format is used for videos in phabricator, they can be embedded and viewed directly in ticket. mp4 videos need to be downloaded to local computer before watching.

Change 803230 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Fix MT modification rate calculation

https://gerrit.wikimedia.org/r/803230

Change 809523 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20220629

https://gerrit.wikimedia.org/r/809523

Change 809523 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20220629

https://gerrit.wikimedia.org/r/809523

Test status: QA PASS

  • Able to check that sentence percentages are updated when edited
  • Able to check that paragraph change percentages are updated when edited
  • Able to see that that translated sentences reflect blue colour
  • Able to check that the percentages do not change when not edits are made for both the sentence and paragraphs