Skip to content

Commit

Permalink
Fix lang for UI texts in link preview (mastodon#26149)
Browse files Browse the repository at this point in the history
  • Loading branch information
c960657 authored Jul 24, 2023
1 parent 714a206 commit 4299208
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/javascript/mastodon/features/status/components/card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,12 @@ export default class Card extends PureComponent {
const language = card.get('language') || '';

const description = (
<div className='status-card__content' lang={language}>
<span className='status-card__host'>{provider}{card.get('published_at') && <> · <RelativeTimestamp timestamp={card.get('published_at')} /></>}</span>
<strong className='status-card__title' title={card.get('title')}>{card.get('title')}</strong>
<div className='status-card__content'>
<span className='status-card__host'>
<span lang={language}>{provider}</span>
{card.get('published_at') && <> · <RelativeTimestamp timestamp={card.get('published_at')} /></>}
</span>
<strong className='status-card__title' title={card.get('title')} lang={language}>{card.get('title')}</strong>
{card.get('author_name').length > 0 && <span className='status-card__author'><FormattedMessage id='link_preview.author' defaultMessage='By {name}' values={{ name: <strong>{card.get('author_name')}</strong> }} /></span>}
</div>
);
Expand Down

0 comments on commit 4299208

Please sign in to comment.