Page MenuHomePhabricator

CX2: Template adaptation
Closed, ResolvedPublic

Description

A problem with CX1 template adaptation is, the solution was not easily integratable to the references when reference definition is template.

There is also a consideration of VE template modeling and reusing it to model the CX template classes. Ofcourse we will require a pair of such models for source and target language.

Pending:

  • cxserver: Use the param mapping to build target template definition.
  • cxserver: Update tests for MWTemplate.js
  • cxserver: If template data not found, try to extract info from source code of template like we do in CX1 - ST working on.
  • The templates should be renderered in source and target language wikis instead of Localwiki. Customize ve.ce.MWTransclusionNode so that the api pointing to correct wikis
  • fetch the template data from correct wiki instead of localhost
  • T192271: CX2: Communicate template could not be adapted

Event Timeline

Change 375789 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/services/cxserver@master] Adapt template names if present in Wikidata

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

Per T150652: Content Translation feature parity checklist post VisualEditor integration I am currently working on template name adaptation (using Wikidata via interwiki links) and simple parameter mapping (exact & case insensitive matching using templatedata). This doesn't complete this ticket though.

Per T150652: Content Translation feature parity checklist post VisualEditor integration I am currently working on template name adaptation (using Wikidata via interwiki links) and simple parameter mapping (exact & case insensitive matching using templatedata). This doesn't complete this ticket though.

Additional note: This is expected to complete the immediate priority items as per T150652: Content Translation feature parity checklist post VisualEditor integration. Further follow-up on template adaptation will also be determined by a final confirmation on the UI design expected for translation view.

Change 381418 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/services/cxserver@master] Template adaptation: Implement template param name matching

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

This comment was removed by santhosh.

Change 381943 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/services/cxserver@master] Templates: If templatedata not found, try to extract info from source code

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

Change 381418 merged by jenkins-bot:
[mediawiki/services/cxserver@master] Template adaptation: Implement template param name matching

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

Change 381943 merged by Nikerabbit:
[mediawiki/services/cxserver@master] Templates: If templatedata not found, try to extract info from source code

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

Description of this ticket does not reflect what needs to be done in the future to resolve this. There are three bullet points, which are marked as checked.

Please update ticket description with required work for template adaption or create new ticket if this one doesn't suit the needs anymore. @Pginer-WMF, you may want to provide your inputs as well, just pinging you.

Change 424549 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] CX2: Render templates in correct wiki

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

After https://gerrit.wikimedia.org/r/424549, the adapted template having Tamil(target language) rendering

image.png (354×1 px, 55 KB)

Change 424983 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] ve.init.mw.CXTarget: Customize parsefragment

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

Change 424549 abandoned by Santhosh:
CX2: Render templates in correct wiki

Reason:
Abandoning in favor of https://gerrit.wikimedia.org/r/c/424983/

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

Change 424983 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] ve.init.mw.CXTarget: Customize parsefragment

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

https://gerrit.wikimedia.org/r/424983 was deployed to wmf.1 - checked there (used the same example as @santhosh):

Screen Shot 2018-04-30 at 5.22.16 PM.png (437×913 px, 87 KB)

@santhosh is something else needs to be done regarding three remaining items on the ticket?

The templates should be renderered in source and target language wikis instead of Localwiki. Customize ve.ce.MWTransclusionNode so that the api pointing to correct wikis
Use the cx adaptation information to inform user about the status of template adaptation
fetch the template data from correct wiki instead of localhost

Yes, this ticket is not finished. We are yet to actually work on template support in frontend.

santhosh moved this task from CX2 to Needs Triage on the ContentTranslation board.
Pginer-WMF claimed this task.
Pginer-WMF updated the task description. (Show Details)

Most of the infrastructure work for template adaptation has been completed, and the remaining task has now a separate follow-up ticket: T192271: CX2: Communicate template could not be adapted