Content translation/Templates support rewrite 2016

We will use a whitelist approach for elements. Moving this kind of elements from source wiki to target with or without edits is generally difficult because of lack of template standardisation. That is a larger problem. But for CX, for a specific language pairs, instead of disabling and disallowing all of them, we can selectively enable some of them and live with that.

For the first iteration of the project, our priority language pair is Spanish-Catalan. The top used templates in these wikis were analysed. With in the scope of our first iteration the template mapping is not possible. So by default, all templates will be removed from the source article before presenting to the translator. This is not an optimal solution, but for the first iteration this is what can be done.

But it is found that templates like Ficha de taxón in spanish wiki can be mapped to Taxocaixa without much effort because the template fields match. But still it wont be perfect mapping because the parameter values can contain templates that are not present in cawiki. In a best try approach Template:Ficha de taxón is whitelisted for eswiki. Template editing will not be possible, it will be just copy from eswiki with template name translated.

The whitelisting is driven by a configuration file per language pair. It is a json file and a sample entry for the above mentioned case for es-ca is given below

Another template that can be copied readonly but by translating name is List of references or eswiki's Template:listaref. This can be safely translated to Template:Referències in cawiki.

Future plans
Instead of removing all the templates, the source article will be presented as it is. HTML expansions from templates will be present. These sections will be visually indicated as templates and non-editable. These templates can be copied to translation. Machine translation might also work on these section. Editing support can also be supported. But editing happens as if the section is a HTML DOM. The section cease to exist as template. This HTML will be converted to wikitext when published. In a subsequent edit, an editor can change this wikitext to a template if needed.

Where ever possible, automatic template mapping will still be applied.