Releases: i18next/i18next-scanner
Releases · i18next/i18next-scanner
v2.6.1
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>"
v2.5.0
Adds support for react-i18next Trans' defaults (PR #83, 31c9e59, by @beheh)
react-i18n v7.7.0 introduced the defaults
prop, see i18next/react-i18next#439 (comment).
The following code:
<Trans
defaults="Hello <0>{val}</0>!"
tOptions={{val: "World"}}
components=[<strong>foo</strong>]
/>
will lead to the output:
{
"Hello <0>{val}</0>!": "Hello <0>{val}</0>!"
}