Page MenuHomePhabricator

When editing a section of a translateable page in VE, "[edit]" is included in default edit summary
Closed, ResolvedPublic1 Estimated Story Points

Description

When editing a section in VE, "[edit]" is now included in default edit summary. Example edit: https://www.mediawiki.org/w/index.php?title=MediaWiki_1.23&diff=2427063&oldid=2285796 (it's vandalism, but nevermind that, I can reproduce on that page too).

Event Timeline

matmarex created this task.Mar 20 2017, 2:03 PM
Restricted Application added a project: VisualEditor. · View Herald TranscriptMar 20 2017, 2:03 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
DLynch added a subscriber: DLynch.Mar 20 2017, 4:57 PM

I can't reproduce this happening. All I get for the VE section message is the correct /* Section title */. More details?

Oh, actually, I see it for that specific page. It's because the translate stuff is deeply confusing our expectations:

So it's building the summary of the section-heading... which as far as it can tell legitimately has some text saying "[edit]" within it.

matmarex renamed this task from [Regression] When editing a section in VE, "[edit]" is included in default edit summary to When editing a section of a translateable page in VE, "[edit]" is included in default edit summary.Mar 20 2017, 5:08 PM
matmarex removed a project: Regression.

Not a regression I guess.

Jdforrester-WMF triaged this task as High priority.Mar 20 2017, 6:32 PM
Nikerabbit added a subscriber: Nikerabbit.

There is nothing to fix in Translate as far as I can see (other than T131516).

Yes, this is user mis-action by writing <translate>== Foo ==</translate> instead of == <translate>Foo</translate> == like they're meant to, but we need to work around it (until a DOM-based system for Translate comes along in the magical future).

A fairly easy fix would be to strip links from the section-heading when building the summary.

Change 343901 had a related patch set uploaded (by DLynch):
[mediawiki/extensions/VisualEditor] Section editing: strip links from heading text used for edit summary

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

Change 343901 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Section editing: strip links from heading text used for edit summary

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

Jdforrester-WMF closed this task as Resolved.Mar 24 2017, 12:52 AM
Jdforrester-WMF assigned this task to DLynch.
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF removed a project: Patch-For-Review.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptMar 24 2017, 12:52 AM