diff options
author | Christian Schmidt <github@chsc.dk> | 2023-02-26 20:13:27 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2023-03-05 17:52:53 +0100 |
commit | 0e476f3c4fbbcab9b4895b8abff93075dfd2bf0c (patch) | |
tree | ae50a1c4344476421eb36fc254ec9bbcfcfc6f8a /app/javascript/flavours/glitch/features/ui/components/zoomable_image.jsx | |
parent | 276c1d32d6fc857a768244c3f5d835c9c5da1747 (diff) |
[Glitch] Add `lang` attribute to media and poll options
Port d3eefead3014175b264cb56f6f4cb552cbaaeac6 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui/components/zoomable_image.jsx')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/zoomable_image.jsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/zoomable_image.jsx b/app/javascript/flavours/glitch/features/ui/components/zoomable_image.jsx index 50b36b478..82ba6e692 100644 --- a/app/javascript/flavours/glitch/features/ui/components/zoomable_image.jsx +++ b/app/javascript/flavours/glitch/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} |