Talk:Content translation/Templates

About this board

Mapping templates between languages

4
Adamw (talkcontribs)

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?
Alex42 (talkcontribs)
Adamw (talkcontribs)

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!

Alex42 (talkcontribs)

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.

Reply to "Mapping templates between languages"
Lee Vilenski (talkcontribs)

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? ~~~~

Reply to "Cite web template"
There are no older topics
Return to "Content translation/Templates" page.