Page MenuHomePhabricator

Explore options for hiding the page translation mark-up in Visual Editor
Open, HighPublic4 Estimated Story Points

Description

Rough plan:

  1. Discuss within Language team a proposal or two how we could make editing translatable pages in Visual Editor less daunting, starting from the idea of allowing to hide all translation mark-up to focus just on editing the content
  2. Meet with relevant folks from the Editing team to discuss these proposals
    1. What options there are and how much effort (and what skills) they require?
    2. What support can we get and when?
  3. Create task(s) to capture work we can do later this quarter

Event Timeline

Nikerabbit set the point value for this task to 4.Oct 10 2023, 11:07 AM

What about introducing DOM-based translation? The current system would probably need to remain, as DOM doesn’t cover everything (the cases it doesn’t cover are basically the cases where <translate nowrap> is used), but most cases could be covered in a very Parsoid-friendly way (and actually cases it wouldn’t cover are mostly cases where translation directly using VE is not daunting, but impossible: template parameters, extension tag content, HTML attributes etc.). For example, changes could be:

Old:

<translate><!--T:1--> Some.</translate> <translate><!--T:2--> Content.</translate>

New:

<span data-translate-id="1">Some.</span> <span data-translate-id="2">Content.</span>

Old:

<translate>
<!--T:1-->
Some. Content.
</translate>

New:

<p data-translate-id="1">Some. Content.</p> <!-- or <div>? -->

Old:

* <translate><!--T:1--> Item</translate>
* <translate><!--T:2--> Item</translate>
* <translate><!--T:2--> Item</translate>

New:

<ul>
<li data-translate-id="1">Item</li>
<li data-translate-id="2">Item</li>
<li data-translate-id="2">Item</li>
</ul>

Old (before marking for translation):

<translate>
Some. Content.
</translate>

New (before marking for translation):

<p data-translate-id>Some. Content.</p>