Skip to content
Snippets Groups Projects
Commit 2d8ce9e1 authored by Claire's avatar Claire
Browse files

Fix alt-text pop-in not using the translated description (#32766)

parent 1ddf1aed
No related branches found
No related tags found
No related merge requests found
...@@ -97,12 +97,12 @@ class Item extends PureComponent { ...@@ -97,12 +97,12 @@ class Item extends PureComponent {
height = 50; height = 50;
} }
if (attachment.get('description')?.length > 0) {
badges.push(<AltTextBadge key='alt' description={attachment.get('description')} />);
}
const description = attachment.getIn(['translation', 'description']) || attachment.get('description'); const description = attachment.getIn(['translation', 'description']) || attachment.get('description');
if (description?.length > 0) {
badges.push(<AltTextBadge key='alt' description={description} />);
}
if (attachment.get('type') === 'unknown') { if (attachment.get('type') === 'unknown') {
return ( return (
<div className={classNames('media-gallery__item', { standalone, 'media-gallery__item--tall': height === 100, 'media-gallery__item--wide': width === 100 })} key={attachment.get('id')}> <div className={classNames('media-gallery__item', { standalone, 'media-gallery__item--tall': height === 100, 'media-gallery__item--wide': width === 100 })} key={attachment.get('id')}>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment