about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/ui/components/zoomable_image.jsx
diff options
context:
space:
mode:
authorChristian Schmidt <github@chsc.dk>2023-02-26 20:13:27 +0100
committerGitHub <noreply@github.com>2023-02-26 20:13:27 +0100
commitd3eefead3014175b264cb56f6f4cb552cbaaeac6 (patch)
tree5a74d33a8995f738870b7c713bf875889f7199de /app/javascript/mastodon/features/ui/components/zoomable_image.jsx
parent730bb3e211a84a2f30e3e2bbeae3f77149824a68 (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.jsx5
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}