Page MenuHomePhabricator

CX2: Improve support for references that are reused in multiple places
Open, MediumPublic


References are often used in more than one paragraph. The common way to support this scenario is for one reference to include all the information and a name, while the rest just reference such name but contain no content.

Currently when dealing with such repeated references, Content Translation seems to create references that share the same name but all of them contain the reference details.

This results in the following issue on the references list (view in article):

This issue was found when translating Extreme ironing from English to Spanish. In the wikitext for the published article captured below you can notice the two references named "Jazz", both containing the reference details.

Fixing the issue required to manually remove the details from one of the instances.

It is worth noting that it does not seem to be possible to fix this issue from Visual Editor, where both references appear with the usual inspector, no information is show on the name used, and the list of references shows no errors:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 7 2018, 10:00 AM
Pginer-WMF triaged this task as Medium priority.Sep 7 2018, 10:00 AM

This was mentioned in this comment:

Pel que he observat (però és que no sempre és igual), té tendència a repetir tot el text de la referència quan només hi hauria de fer una menció.

Which translates into English roughly as:

From my observations (not consistently repeated), the whole text of the reference tends to be repeated when it should just make a mention.

With the latest code, it is not possible to have different content for references with same name:

Editing one will cause the same changes propagated to the second. Because of this the issue that shows red color error about "multiple times with different content" was not able to reproduce to me. The published content looked like as follows:

But the issue of reference content repeated in wikitext remains.
@Esanders is there a way we can reconcile the reference content so that before publishing reference body is only in one reference and others are just reference by name?

santhosh edited subscribers, added: JTannerWMF; removed: marcella.Jul 3 2019, 6:01 AM
Pginer-WMF raised the priority of this task from Medium to High.Jul 29 2019, 8:55 AM

I think when importing new content to the page you could check any references against the internal list for conflicting keys ( I don't think we've solved this problem before so it could be quite fiddly to fix, as most things to do with references are...