From 5eaad2ae5ba7f7cbc2fe9c563791feb5dfd26b2b 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 e56145661c418f75dbf321b8d3096ebbc2d9f6b0 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}