Page MenuHomePhabricator

CX2: Should not substitute citation templates when publishing
Open, MediumPublic

Description

CX2 should properly handle templates for reference citing rather than creating a complex syntax (div, cite, Special/BookSources for ISBN...)

Example on frwiki "Clara Viebig" : original translation

  • Original citation : <ref name=chambers2007>{{cite book | first=Helen | last=Chambers | year=2007 | title=Humor and irony in nineteenth-century German women's writing: studies in prose fiction, 1840–1900 | series=Studies in German literature, linguistics, and culture | publisher=Camden House | isbn=1-57113-304-6 | chapter=Clara Viebig (1860–1952) | pages=137–138 | url=https://books.google.com/books?hl=en&lr=&id=AbcOBKPPaswC&oi=fnd&pg=PA137 | accessdate=2 April 2011 }}</ref>
  • Mess in the translation (repeated several times...) : ref name="chambers2007"><div> <cite class="citation book">Chambers, Helen (2007). "Clara Viebig (1860-1952)". [https://books.google.com/books?hl=en&lr=&id=AbcOBKPPaswC&oi=fnd&pg=PA137 ''Humour et ironie dans l'écriture de femmes allemandes du XIXe siècle: études de fiction en prose, 1840-1900''] . Études de littérature, linguistique et culture allemandes. Camden House. pp. &nbsp; 137–138. [[International Standard Book Number|ISBN]] &nbsp; [[Special:BookSources/1-57113-304-6|1-57113-304-6]] <span class="reference-accessdate">. Récupéré le <span class="nowrap">2 avril</span> 2011</span> .</cite> </div></ref>

Event Timeline

It seems the underlying problem here is that the reference definition is inside a template (Template Reflist in this case), and Visual Editor does not provide support for those yet (T52896):

Screenshot 2019-04-22 at 18.35.24.png (700×1 px, 398 KB)

In Content translation we can consider marking this as a missing reference when transferred to the translation if there is a way to detect this case.

Framawiki renamed this task from CX2: Should not convert {{cite book}} templates to a complex syntax to CX2: Should not convert {{cite book}} templates to a complex syntax (template substitution?).Dec 13 2023, 4:19 PM

This bug is really the worst of the ones opened on ContentTranslation in my opinion, given the time spent by all the volunteer contributors who have to go back behind a translation to try and reformat the translations that have been substituted. It literally freezes the citation in a version that can't be edited later, except if somebody spend some time to fill a template. Not good to have such non-editable stuff in our wikis !

It still happens regularly in 2023, I have a script that at least removes unnecessary categories added when substituting citation templates. Check out "untranslated category" ("catégorie non traduite") in my bot's list of recent contributions, ie https://fr.wikipedia.org/w/index.php?title=Rowland_Prothero&diff=prev&oldid=210406768. I can just remove the category shown in red in the article, there is no automatic way to reverse the template substitution (except spend some days with regexes for low success..)

Framawiki renamed this task from CX2: Should not convert {{cite book}} templates to a complex syntax (template substitution?) to CX2: Should not substitute citation templates when publishing.Dec 13 2023, 4:39 PM

This bug is really the worst of the ones opened on ContentTranslation in my opinion [...]

Thanks for sharing your feedback, @Framawiki. As I mentioned above, this issue is caused by a limitation of the editing surface of Visual Editor, which Content Translation is using. I copied your feedback in the ticket where the Visual Editor issue is captured: T52896: VisualEditor: Support editing citations defined within a template