From b632c5a55a1180f4e30a5e396e90944546d87190 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Fri, 24 Feb 2023 20:04:38 +0100 Subject: [PATCH] [Glitch] Add `lang` attribute to preview card Port 8000a8f2309d428c2ce72fe5ffba940754d55339 to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/features/status/components/card.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/features/status/components/card.jsx b/app/javascript/flavours/glitch/features/status/components/card.jsx index 6a306ed148..359dbbc207 100644 --- a/app/javascript/flavours/glitch/features/status/components/card.jsx +++ b/app/javascript/flavours/glitch/features/status/components/card.jsx @@ -188,11 +188,12 @@ export default class Card extends React.PureComponent { const interactive = card.get('type') !== 'link'; const className = classnames('status-card', { horizontal, compact, interactive }); const title = interactive ? {card.get('title')} : {card.get('title')}; + const language = card.get('language') || ''; const ratio = card.get('width') / card.get('height'); const height = (compact && !embedded) ? (width / (16 / 9)) : (width / ratio); const description = ( -
+
{title} {!(horizontal || compact) &&

{trim(card.get('description') || '', maxDescription)}

} {provider}