Page MenuHomePhabricator

Sentence pair highlighting no longer works
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue

Start an article translation, click on some paragraphs to get both source and target sections has text. Then hover the mouse over a sentence in source paragraph.

What happens?:

The source sentence gets a highlight as expected. But the corresponding target sentence does not have highlight. The whole point of sentence highlight is to highlight the pairs.

What should have happened instead?:

Target sentence should get highlight.

QA Plan:
After deployment, follow the issue's reproduction steps to verify that the problem no longer occurs.

Event Timeline

Bugreporter2 renamed this task from Sentence pair highligting no longer works to Sentence pair highlighting no longer works.Nov 18 2025, 5:41 AM
Bugreporter2 updated the task description. (Show Details)
Nikerabbit triaged this task as Medium priority.Nov 27 2025, 8:18 AM
Nikerabbit moved this task from Needs Triage to Translation editor on the ContentTranslation board.

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

[mediawiki/extensions/ContentTranslation@master] fix: Sentence pair highlighting no longer works

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

Root cause:
VE core refactored ve.dm.Converter into a facade that delegates DM→DOM conversion to a separate internal ve.dm.DomFromModelConverter instance (this.domFromModelConverter). (change: https://github.com/wikimedia/VisualEditor/commit/1e0c83ecbf97b307b52a4fe8a215f4a4b6c5d643 dated July 9 2025)

The converter argument that ve.dm.CXSentenceSegmentAnnotation.static.toDomElements receives is now that delegate — but CX sets its custom isForTranslation/isForSaving flags on the ve.dm.converter facade. The flags were invisible to the annotation, so it took the clipboard-mode branch (added for T220495) and returned [], unwrapping every cx-segment span while keeping the text. Thats why the /translate payload had bare paragraphs. If translate request does not have sentence segments, translation output also misses it.

So this was broken for almost a year.

After the fix:

image.png (904×328 px, 160 KB)

Change #1311396 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] fix: Sentence pair highlighting no longer works

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

Nikerabbit set the point value for this task to 2.Jul 23 2026, 8:01 AM

Verified on Spanish Wikipedia that parallel sentence highlighting works as expected

Screenshot 2026-07-28 at 9.44.10 AM.png (1,794×1,058 px, 382 KB)