Page MenuHomePhabricator

Support for manual mappings in template translation
Open, NormalPublic

Description

As part of template translation (T139332), users may find situations where there is not an automating mapping between the source and target templates. Users should be able to indicate the mapping manually when there is not existing mapping between the fields in the source and the target templates.

Proposed solution

When there is no mapping between the source and the target template, users can define such mapping. Similarly to what is done with paragraphs in a translation, users will add fields one by one and indicate the corresponding mapping with the target template.

  • Initially no fields are added.
  • Users are invited to add the field they hover (or the initial one if none has been added.
  • Corresponding fields are highlighted.

  • Once a field is added, the content is adapted by following the usual approach (which users can change).
  • Users need to select the target field.

  • Selection aids are provided to easily select the mapping.
  • Field names are shown with one line of the description to show additional context.
  • Unassigned fields are shown on top.

  • Once the mapping is established, users are able to change it to another field.

Event Timeline

Pginer-WMF updated the task description. (Show Details)Sep 19 2016, 1:09 PM
santhosh updated the task description. (Show Details)Sep 29 2016, 4:06 AM

Initially no fields are added.

In many cases, we can automatically find mappings and prefill the values(using template data or even with the proposed stored param mapping as JSONConfig). In such cases, dont we want to automattically add those fields and provide options to add the rest?

For example, A common template like {{Convert}} has nameless params and hence params are names as 1,2,3... We can easily map them to a target language automatically and provide the translator as initial form values.

Initially no fields are added.

In many cases, we can automatically find mappings and prefill the values(using template data or even with the proposed stored param mapping as JSONConfig). In such cases, dont we want to automattically add those fields and provide options to add the rest?

The "manual mapping" strategy is proposed as a fallback for the cases when automatic mapping is not possible. If we know which parameter in the translation corresponds to the source one, we should provide it already filled. If we do not know, we let the user decide which parameters are needed.

Pginer-WMF updated the task description. (Show Details)Oct 5 2016, 2:21 PM
  • Recursive template editing. Templates may contain fields which contain a template. It should be possible to edit those.

I created a separate ticket for recursive templates:

T147428: Support translation of recursive templates

(I'll do the same for "Compact unused fields" and leave the current ticket for "manual mapping" which already seems big enough to fit a singe ticket)

Amire80 assigned this task to Pginer-WMF.Nov 9 2016, 6:47 AM
Amire80 claimed this task.Nov 9 2016, 6:49 AM

Assigning to myself for review.

Pginer-WMF renamed this task from Designs for editing complex mappings in template translation to Designs for manual mappings in template translation.Nov 10 2016, 2:02 PM
Pginer-WMF updated the task description. (Show Details)

Change 320971 had a related patch set uploaded (by Santhosh):
Manual template param adaptation using placeholder

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

Screenshot fom above patch

Change 320971 merged by jenkins-bot:
Manual template param adaptation using placeholder

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

Amire80 removed Amire80 as the assignee of this task.Dec 5 2016, 7:33 PM
Amire80 updated the task description. (Show Details)

"Unassigned fields are shown on top." — this makes sense, but most of them will probably be unassigned, at least initially, so it should be more like "assigned fields are shown at the bottom" (or maybe not shown at all).

Other than that it sounds right.

Arrbee added a subscriber: Arrbee.Dec 6 2016, 6:55 AM

Design part completed in current sprint. Moving to backlog for later implementation.

Arrbee renamed this task from Designs for manual mappings in template translation to Support for manual mappings in template translation.Dec 6 2016, 6:56 AM