From d19d7a283e2e309e9dc5490d758136537b3be13c Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 4 Nov 2024 12:08:19 +0100 Subject: [PATCH] [Glitch] Fix alt-text pop-in not using the translated description Port 0a1b5df2024fcf8454638da80a47c336b69e659b to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/components/media_gallery.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/javascript/flavours/glitch/components/media_gallery.jsx b/app/javascript/flavours/glitch/components/media_gallery.jsx index f2f8b21e3b..46ff875ab6 100644 --- a/app/javascript/flavours/glitch/components/media_gallery.jsx +++ b/app/javascript/flavours/glitch/components/media_gallery.jsx @@ -98,12 +98,12 @@ class Item extends PureComponent { height = 50; } - if (attachment.get('description')?.length > 0) { - badges.push(); - } - const description = attachment.getIn(['translation', 'description']) || attachment.get('description'); + if (description?.length > 0) { + badges.push(); + } + if (attachment.get('type') === 'unknown') { return (