Fixing translation behavior of download link labels
This commit is contained in:
parent
cda91cd3f5
commit
919612bc0d
@ -42,7 +42,7 @@ class App extends React.PureComponent {
|
|||||||
this.setState({
|
this.setState({
|
||||||
svgUrl: {
|
svgUrl: {
|
||||||
url: URL.createObjectURL(blob),
|
url: URL.createObjectURL(blob),
|
||||||
label: this.props.t('Download SVG'),
|
label: 'Download SVG',
|
||||||
filename: 'image.svg',
|
filename: 'image.svg',
|
||||||
type
|
type
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ class App extends React.PureComponent {
|
|||||||
this.setState({
|
this.setState({
|
||||||
pngUrl: {
|
pngUrl: {
|
||||||
url: URL.createObjectURL(blob),
|
url: URL.createObjectURL(blob),
|
||||||
label: this.props.t('Download PNG'),
|
label: 'Download PNG',
|
||||||
filename: 'image.png',
|
filename: 'image.png',
|
||||||
type
|
type
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,9 @@ exports[`Form rendering with download URLs 1`] = `
|
|||||||
type="image/svg+xml"
|
type="image/svg+xml"
|
||||||
>
|
>
|
||||||
<SvgMock />
|
<SvgMock />
|
||||||
Download SVG
|
<Trans>
|
||||||
|
Download SVG
|
||||||
|
</Trans>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
@ -119,7 +121,9 @@ exports[`Form rendering with download URLs 1`] = `
|
|||||||
type="image/png"
|
type="image/png"
|
||||||
>
|
>
|
||||||
<SvgMock />
|
<SvgMock />
|
||||||
Download PNG
|
<Trans>
|
||||||
|
Download PNG
|
||||||
|
</Trans>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -66,7 +66,7 @@ class Form extends React.PureComponent {
|
|||||||
|
|
||||||
return downloadUrls.map(({ url, filename, type, label }, i) => <li key={ i }>
|
return downloadUrls.map(({ url, filename, type, label }, i) => <li key={ i }>
|
||||||
<a href={ url } download={ filename } type={ type }>
|
<a href={ url } download={ filename } type={ type }>
|
||||||
<DownloadIcon/>{ label }
|
<DownloadIcon/><Trans>{ label }</Trans>
|
||||||
</a>
|
</a>
|
||||||
</li>);
|
</li>);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user