Page MenuHomePhabricator

Parts of text where language variant conversion is disabled are missing in VE
Closed, ResolvedPublic

Description

I was doing some cleanup of the translation made with CX1 on srwiki, removed some junk HTML added by it, and disabled variant conversion for some parts of the text.
When I switched to VE from source editing, it revealed that VE seems to completely skip the parts which have variant conversion disabled.

I am really sorry that gif which captures the problem has text in Serbian. To try helping, while recording the gif, I mark the parts in question.
If there is anything else I might help with to understand the problem, please ask.

ve-no-invariant.gif (915×1 px, 1 MB)

Event Timeline

Looks like we're not loading the code… ve.dm.MWLanguageVariantInlineNode is undefined. Must have been dropped during some cleanup.

Change 463821 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] ext.visualEditor.mwlanguage: Actually load all of the code

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

It is a bit interesting though that they are invisible, though. I would expect this issue to just make the variant annotations non-editable. Apparently Parsoid represents these nodes as empty <span> tags: https://sr.wikipedia.org/api/rest_v1/page/html/Papirus_1

<span typeof="mw:LanguageVariant" data-mw-variant="{&quot;disabled&quot;:{&quot;t&quot;:&quot;I&quot;}}" id="mwHQ"></span>

Change 463821 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ext.visualEditor.mwlanguage: Actually load all of the code

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

Change 463842 had a related patch set uploaded (by Jforrester; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@wmf/1.32.0-wmf.23] ext.visualEditor.mwlanguage: Actually load all of the code

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

Change 463842 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@wmf/1.32.0-wmf.23] ext.visualEditor.mwlanguage: Actually load all of the code

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

Stashbot subscribed.

Mentioned in SAL (#wikimedia-operations) [2018-10-03T23:44:57Z] <catrope@deploy1001> Synchronized php-1.32.0-wmf.23/extensions/VisualEditor/: Require Parsoid HTML 2.0.0, and handle its <audio> tags (T201081); ext.visualEditor.mwlanguage: Actually load all of the code (T205834) (duration: 00m 57s)

It is a bit interesting though that they are invisible, though. I would expect this issue to just make the variant annotations non-editable. Apparently Parsoid represents these nodes as empty <span> tags: https://sr.wikipedia.org/api/rest_v1/page/html/Papirus_1

<span typeof="mw:LanguageVariant" data-mw-variant="{&quot;disabled&quot;:{&quot;t&quot;:&quot;I&quot;}}" id="mwHQ"></span>

The idea is that post-processing fills in the <span> with the appropriate text for your language. Parsoid has an implementation it uses for read-views; VE has it's own implementation used for editing -- because VE wants to surface all the possible variants and make them editable, whereas for read views we want to select and present only one.

Petar.petkovic removed subscribers: Stashbot, gerritbot.

@Petar.petkovic or @cscott , could you verify this is fixed?

Sure. I checked and the problem is fixed.