Page MenuHomePhabricator

Much content is missing when editing a translatable page
Closed, ResolvedPublic

Description

Related Objects

StatusSubtypeAssignedTask
Resolvedihurbain
Openihurbain
ResolvedNikerabbit
ResolvedNikerabbit
OpenNone
Resolvedihurbain
Resolvedihurbain
Openihurbain
Openihurbain
Resolvedihurbain
Openihurbain
OpenBUG REPORTihurbain
ResolvedBUG REPORTihurbain
Resolvedssastry
Resolvedihurbain
ResolvedBUG REPORTihurbain
OpenBUG REPORTihurbain
OpenBUG REPORTihurbain
OpenBUG REPORTihurbain
OpenBUG REPORTihurbain
OpenBUG REPORTNone

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

about attributes in the Parsoid output are messed up.

Looking at this fragment in https://www.mediawiki.org/api/rest_v1/page/html/Manual%3ACoding_conventions/4054714?redirect=false&stash=true:

image.png (2×3 px, 767 KB)

There are two siblings with about="#mwt105" and data-mw. This doesn't look right to me; out of all siblings with the same about attribute, only the first sibling should have a data-mw attribute, that describes that content of all siblings. VisualEditor assumes that is the case, and "merges" all the siblings together, losing the data-mw on the second one.

Also, wonder if this is another instance of what we saw in T260550#6393525

Thank you @Krinkle for getting this and T261181 documented! I think addressing these would be tremendously helpful for a lot of translation and documentation efforts by the Foundation, affiliates, and others on Meta-Wiki. I have heard from several folks that the lack of VE support for Translate makes them less likely to use it and nervous when editing pages that utilize Translate.

I think this work helps support both MTP (increasing documentation to ten languages) and Movement strategy goals - and appreciate the progress being made by the various teams involved! :)

ssastry triaged this task as Medium priority.Nov 5 2020, 4:26 AM

Another example, without involving indentations or list items, perhaps helps to narrow down the relevant bug(s), unless it happens to be a separate cause:

  • Text loss in parenthesis.
  • Text became code/pre-formatted.

Screenshot 2021-08-24 at 20.32.58.png (1×1 px, 328 KB)

https://www.mediawiki.org/wiki/Manual:Preventing_access

The preformatted text is because content of <translate>…</translate> tags is parsed in isolation, and the Translate extension forces them to start with a space.

We expect T261181: Make Translate extension compatible with Parsoid will take care of much of these issues. There, we are taking the approach of treating translate tag as a transparent annotation tag.

matmarex assigned this task to ihurbain.

This seems fixed by the new Translate extension support in Parsoid. All of the content appears, and can be edited with only minor inconvenience caused by the extra markup.

image.png (2×3 px, 601 KB)