v2.6.0
Parse Trans component with Acorn-JSX parser (a18c743, closes #72, #73, #75)
jsx:
<Trans>
multiline
text
string
</Trans>
<Trans>This is a <strong>test</strong></Trans>
<Trans>This is a <strong>{{test}}</strong></Trans>
<Trans>
2 + 2 = {{ result: 2 + 2 }}
</Trans>
<Trans>
Go to <Anchor href="/administration/tools">Administration > Tools</Anchor> to download administrative tools.
</Trans>
<Trans>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
<p>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</p>
</Trans>
<Trans>
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
<p>
{'Lorem Ipsum is simply dummy text of the printing and typesetting industry.'}
</p>
</p>
<p>
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s
</p>
</Trans>
results in strings:
"multiline text string"
"This is a <1>test</1>"
"This is a <1><0>{{test}}</0></1>"
"2 + 2 = <1>{{result}}</1>"
"Go to <1>Administration > Tools</1> to download administrative tools."
"<0>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</0>Lorem Ipsum is simply dummy text of the printing and typesetting industry.<2>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</2>"
"Lorem Ipsum is simply dummy text of the printing and typesetting industry.<1>Lorem Ipsum is simply dummy text of the printing and typesetting industry.<1>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</1></1><2>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</2>"