[Glitch] Add lang attribute to media and poll options

Port d3eefead30 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Christian Schmidt
2023-02-26 20:13:27 +01:00
committed by Claire
parent 276c1d32d6
commit 0e476f3c4f
15 changed files with 80 additions and 24 deletions

View File

@ -8,6 +8,7 @@ export default class ImageLoader extends PureComponent {
static propTypes = {
alt: PropTypes.string,
lang: PropTypes.string,
src: PropTypes.string.isRequired,
previewSrc: PropTypes.string,
width: PropTypes.number,
@ -18,6 +19,7 @@ export default class ImageLoader extends PureComponent {
static defaultProps = {
alt: '',
lang: '',
width: null,
height: null,
};
@ -129,7 +131,7 @@ export default class ImageLoader extends PureComponent {
};
render () {
const { alt, src, width, height, onClick } = this.props;
const { alt, lang, src, width, height, onClick } = this.props;
const { loading } = this.state;
const className = classNames('image-loader', {
@ -154,6 +156,7 @@ export default class ImageLoader extends PureComponent {
) : (
<ZoomableImage
alt={alt}
lang={lang}
src={src}
onClick={onClick}
width={width}