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
- 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
- When parameter names are translated/transliterated 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.
- 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.
- 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.
- 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
- A structured mapping between parameter names of a template in different languages.
- 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.
- Editing this data should be very easy for users.
- Use Extension:JsonConfig and define the template adaptation details, in meta.wikipedia.org. Details of the namespace, data format to be defined later)
- CXServer reads this data and use it for adapting templates
- CX UI provides an easy way for users to reach this data page and edit.
- The editing of data can be raw data edit or we can try to build a UI for that