Currently translating a section with templates is problematic in Section Translation. The template contents are loaded as part of the translation and users can select them piece by piece, but such translation effort is lost once published.
For example, [[ https://test.m.wikipedia.org/wiki/Special:ContentTranslation?page=Battleheart%20(video%20game)&from=en&to=es§ion=Reception&sx=true#/sx | translating the "reception" section ]] for "Battleheart (video game)" from English to Spanish ([[ https://sx.wmflabs.org/index.php/Special:ContentTranslation?page=Battleheart%20(video%20game)&from=en&to=es&sx=true#/sx | direct link ]]) the mobile editor let'the mobile editor lets you translate the different cells of the review tables (note below that "score" is selected below with a suggested translation you can apply for it). However, after publishing a template is added instead (it is shown in red because the template definition is missing in the test server where it was published):
|Translating|Published|
|---|---|
|{F34118523, width=50%}|{F34118525, width=50%}|
Looking at the source wikitext of the translated contents, the template was copied over form the source article:
```
{{Video game reviews
| MC = 81/100<ref name="Metacritic">{{cite web |url=https://www.metacritic.com/game/ios/battleheart |title=Battleheart for iPhone/iPad Reviews |website=[[Metacritic]] |publisher=[[CBS Interactive]] |accessdate=27 June 2018}}</ref>, whithout any adaptation to create the corresponding template in the target language.
| TA = {{rating|5|5}}<ref name="TouchArcade">{{cite web |url=https://toucharcade.com/2011/02/07/battleheart-review/ |title='Battleheart' Review – A Fabulous Real-Time RPG-Style Battle Game From the Creators of 'Zombieville USA' |last=Hodapp |first=Eli |date=7 February 2011 |website=[[TouchArcade]] |accessdate=27 June 2018}}</ref>
}}
```
This shows the following problems:
- Templates should be represented in the editor as a single unit. Users should be able to edit them with Visual Editor as a template. However, editing individual rendered contents should not be allowed since these may be generated from the template automatically and translating them has no effect (i.e., the "Score" header is not part of the parameters/information of the template).
- The template added to the translation should be the equivalent one from the target wiki not copying the source one. In this case the [[ https://en.wikipedia.org/wiki/Template:Video_game_reviews | Video game reviews template ]] in English should be converted to the [[ https://es.wikipedia.org/wiki/Plantilla:Cr%C3%ADtica_de_videojuego | Crítica de videojuego template ]] in Spanish.
Both aspects are supported by Content Translation (with their limitations and complexities: T102964), so we want to reuse the approaches.
**Types of templates**
- **For in-line templates** (those inside the content) we can proceed by selecting the sentence in the usual way and the templates inside would be converted automatically. In case the conversion is not possible, they can be added as "plain text". That is, removing any html styling elements and preserving the contents (it may contain bold, links and other styling elements that can be edited in VE).
- **For block templates** (presented as an independent paragraph, such as an infobox), we need to define how the suggested translation card looks like.