When the "reuse reference" style, <ref name="name" /> is used, the reference details can be defined inside another template (infoboxes and reflist templates being common cases). Although the "reuse reference" style is supported (T206756), there is a limitation in Visual Editor that prevents accessing the details in this particular case
For example, when translating the Morton's toe article form English to Spanish, the reference in the first paragraph (which is defined inside the infobox, based on Infobox medical condition (new) template) is not included in the translation when the paragraph is added to the translation:
The following problems are illustrated in the image above:
- The reference was not added to the translation, without showing any warning.
- The reference in the source article is rendered normal as if there was no problem with it.
- Selecting the reference shows a misleading message suggesting the user to switch to "source mode" which does not exist in Content translation.
Until the underlying issues with Visual Editor (T52896) are solved, the fix for Content translation will communicate better that the reference could not be added to the translation and provide some guidance to the user.
Design details
The proposed solution involves the following:
- Show the source reference in gray to communicate that it is a missing reference (using the same style used for missing references in the translation, T203160).
- Show a missing reference warning for the translated paragraph to indicate that a reference got lost in translation (similar to T203160, but with custom message).
- When the source reference is selected, adjust the reference card to show a message that is not confusing in the context of Content translation.
These ideas are illustrated below:
Warning on the translation paragraph
- Warning message:
A reference could not be transferred to the translation since its details were defined inside a template or other complex element that cannot be inspected due to technical limitations.
Please, check the original page to access the reference details, and add a new reference in the translation.
- "Learn more" linking to the section of the documentation (T203152) about mapping references.
- "Add new citation" action
Reference details
- Reference in the source article rendered in gray when the details cannot be accessed (and only in that case!).
- Reference card message:
This reference is defined in a template or other generated block, and cannot be accessed due to technical limitations. Check the original article to access the reference details.
Related ticket: T52896: VisualEditor: Support editing citations defined within a template