0
0
Fork 0

Add lang attribute to media and poll options (#23891)

This commit is contained in:
Christian Schmidt 2023-02-26 20:13:27 +01:00 committed by GitHub
parent 730bb3e211
commit d3eefead30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 79 additions and 24 deletions

View file

@ -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}