Page MenuHomePhabricator

Visual diffs on translateable pages highlight unchanged translation markers as added and removed
Closed, ResolvedPublic

Description

Visual diffs on translateable pages highlight unchanged translation markers as added and removed.

Example: https://www.mediawiki.org/w/index.php?title=API:Options&curid=87841&diff=5643034&oldid=5643033&diffmode=visual

Visual diffWikitext diff
image.png (2×3 px, 519 KB)
image.png (2×3 px, 382 KB)

The expected behavior is that only the markers around "Anonymous users cannot change preferences" should be highlighted as added. There should be no red or green highlights below. (Ideally the highlighted markers also wouldn't be invisible, but that doesn't seem that important.)

Event Timeline

Change #1070966 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/Translate@master] Consider all translate tags as equal for diffing

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

Change #1070966 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Consider all translate tags as equal for diffing

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

matmarex assigned this task to Esanders.

This fix makes me happy.

Worth noting that as a result, changes to translation markers (other than addition/removal) will not be shown in visual diffs. I don't think that would be very valuable for anyone, since those changes show up prominently in the custom interface when marking the page for translation, but if you'd like to see that feature, feel free to file a task about it. We had a discussion about pros and cons on the patch (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Translate/+/1070966/comments/a8d80e08_5cde8b67).