Adapting Template parameter mapping between languages is one of the toughest problem #contenttranslation attempted to solve. We used templatedata extensively to find out corresponding parameters in target language. This was done using a relaxed parameter name matching.
But this approach has the following limitations
1. Does not work when templatedata is missing or incomplete. If template data is missing, we tried to parse the template code in wikitext and extract parameters. This is very tricky and does not work always
2. When parameter names are translated/translitarted in a language, our parameter matching will not work. A simple example is translated_title in one language, and transtitle in another language. The param name may be in another script too.
3. If the template data defines aliases with one being same as English param name can help, but if the actual template does not support that alias, it is a problem.
Considering all these issues, we need to think about a more reliable and long term solution.
1. Global templates can be a solution. But:
- it is not there yet
- When Global templates is a thing, it is not clear about the migration time
- It is possible that wikis decide to have a local variant of the template for various reasons, such as culturaly appropirate variant.
2. We can explore more sophisticated solutions to find template parameter mapping - such as predictor based on statistical learning
We see that the above solutions are not enough to meet our immediate goals
1. A structured mapping between parameter names of a template in different languages.
2. A way to extend this data easily so that we can cover more and more languages and templates. Ideally, a one time edit of this data should be enough for supporting a template between a language pair for ever.
3. Editing this data should be very easy for users.
1. Use Extension:JsonConfig and define the template adaptation details, in meta.wikipedia.org. Details of the namespace, data format to be defined later)
2. CXServer reads this data and use it for adapting templates
3. CX UI provides an easy way for users to reach this data page and edit.
4. The editing of data can be raw data edit or we can try to build a UI for that