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