Talk:Content translation/Templates

Mapping templates between languages

edit

I'm currently working on Extension:FileImporter, and interested in how the TemplateData approach here might be used to help us convert templates and parameters when moving files to commonswiki. Two questions jump out so far,

  • How are templates mapped to one another when the names are different? Are you using Wikidata, e.g. [[d:Q5611625]]?
  • What has your experience been with the "aliases" field for mapping parameters? Has there been discussion about increasing the amount of structure? Are many exceptions encountered? Adamw (talk) 10:13, 29 May 2019 (UTC)Reply
I have basically the same question.
e.g.: en:Template:Distinguish should be translated to de:Vorlage:Dieser Artikel {{Dieser Artikel|1=beschreibt nicht %1.}}
Where to put these sort of mappings? Alex42 (talk) 16:20, 19 July 2022 (UTC)Reply
Not an official answer, but I found some interesting documentation about the topic: Content translation/Templates. I think that templates are mapped through Wikidata, but parameter mapping is a complex and heuristic feature. Template parameter mappings are done with help from a machine learning model which does automatic translation of parameter names, estimates how likely it is that parameters are aligned, for example see https://phabricator.wikimedia.org/T221211 .
To create a mapping for your case, I went to en:Template:Distinguish, clicked "Wikidata item" to find wikidata:Q6458914. I tried to add a site link to de:Vorlage:Dieser Artikel, but ran into an issue: this template is already connected to item wikidata:Q5766677. It seems like a fundamental problem that templates can't have a many-to-one relationship because each wikidata item is intended to be unique, and site links aren't really designed for something like template mapping.
Sorry that my answer just leads to a new technical obstacle! Adamw (talk) 12:15, 20 July 2022 (UTC)Reply
Nevertheless thanks for your endeavour.
Wikidata not handling many-to-one relations is even a problem for articles, because sometimes one English article has two German counterparts or vice versa. Alex42 (talk) 18:55, 28 July 2022 (UTC)Reply

Cite web template

edit

Hi! I do a lot of translation from en.wiki to sco.wiki. When I do this, Template:Cite web doesn't translate as it should (I've also seen this on translations from de.wiki show up all sorts of errors). It gives an error:


"A reference could not be transferred to this translation since it uses a template with a different structure". Is there a way of editing this (potentially through template data)? I see both templates are identical on both wikis, so surely there is something more that needs doing? ~ Lee Vilenski (talk) 10:27, 16 February 2020 (UTC)Reply

Return to "Content translation/Templates" page.