diff options
author | Christian Schmidt <github@chsc.dk> | 2023-02-26 20:13:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-26 20:13:27 +0100 |
commit | d3eefead3014175b264cb56f6f4cb552cbaaeac6 (patch) | |
tree | 5a74d33a8995f738870b7c713bf875889f7199de /app/javascript/mastodon/features/ui/components/zoomable_image.jsx | |
parent | 730bb3e211a84a2f30e3e2bbeae3f77149824a68 (diff) |
Add `lang` attribute to media and poll options (#23891)
Diffstat (limited to 'app/javascript/mastodon/features/ui/components/zoomable_image.jsx')
-rw-r--r-- | app/javascript/mastodon/features/ui/components/zoomable_image.jsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/ui/components/zoomable_image.jsx b/app/javascript/mastodon/features/ui/components/zoomable_image.jsx index 3b2bb0286..7faba4c10 100644 --- a/app/javascript/mastodon/features/ui/components/zoomable_image.jsx +++ b/app/javascript/mastodon/features/ui/components/zoomable_image.jsx @@ -96,6 +96,7 @@ class ZoomableImage extends React.PureComponent { static propTypes = { alt: PropTypes.string, + lang: PropTypes.string, src: PropTypes.string.isRequired, width: PropTypes.number, height: PropTypes.number, @@ -106,6 +107,7 @@ class ZoomableImage extends React.PureComponent { static defaultProps = { alt: '', + lang: '', width: null, height: null, }; @@ -403,7 +405,7 @@ class ZoomableImage extends React.PureComponent { }; render () { - const { alt, src, width, height, intl } = this.props; + const { alt, lang, src, width, height, intl } = this.props; const { scale, lockTranslate } = this.state; const overflow = scale === MIN_SCALE ? 'hidden' : 'scroll'; const zoomButtonShouldHide = this.state.navigationHidden || this.props.zoomButtonHidden || this.state.zoomMatrix.rate <= MIN_SCALE ? 'media-modal__zoom-button--hidden' : ''; @@ -431,6 +433,7 @@ class ZoomableImage extends React.PureComponent { ref={this.setImageRef} alt={alt} title={alt} + lang={lang} src={src} width={width} height={height} |