When a template (block or in-line) is adapted, sometimes it is possible to find the equivalent one in the target wiki (thanks to Wikidata), but it may not be possible to map their parameters (because of the lack of templateData, or parameter aliases/names not matching). As part of the effort to communicate adaptation problems with templates (T192271), we want to communicate this better.
For cases where it is not possible to map the parameters, we want to let the user know that the adaptation process was completed only partially.
For example, when translating Tokyo from English to Spanish, adding the infobox with the city information (based on Infobox settlement template) results in an empty template (using Ficha de localidad template), with no warning or further explanation of what went wrong.
Proposed solution
We want to show a warning when:
- The target template is found, and no parameter could be transferred to the target template.
- The target template is found and some parameters could be transferred but there are still empty fields which are marked as mandatory in the target template.
Each case will have a slightly different message:
Empty template
The target template gets added, and a warning encourage the user to complete the missing parameters:
Incomplete template
The information on the original template could not be transferred to the template in the translation since their structure is a bit different.
Please, edit the template in the translation to fill the missing information.
- "Learn more" will direct the user to the corresponding point of the user documentation.
- "Edit template" will open the template editing dialog (in the same way as the "edit" button on the template card would do)
Missing mandatory parameters
Incomplete template
A template was added without some required information.
The missing details could not be obtained automatically from the original template since their structure is a bit different.
Please, edit the template in the translation to fill the missing information.
- "Learn more" will direct the user to the corresponding point of the user documentation.
- "Edit template" will open the template editing dialog (in the same way as the "edit" button on the template card would do)