mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-27 23:55:52 +00:00
[Glitch] Add lang html attr to each posts
Port dc7e2985e6
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
25a46d9e59
commit
1db92b510d
|
@ -267,6 +267,7 @@ export default class StatusContent extends React.PureComponent {
|
||||||
|
|
||||||
const content = { __html: status.get('contentHtml') };
|
const content = { __html: status.get('contentHtml') };
|
||||||
const spoilerContent = { __html: status.get('spoilerHtml') };
|
const spoilerContent = { __html: status.get('spoilerHtml') };
|
||||||
|
const lang = status.get('language');
|
||||||
const classNames = classnames('status__content', {
|
const classNames = classnames('status__content', {
|
||||||
'status__content--with-action': parseClick && !disabled,
|
'status__content--with-action': parseClick && !disabled,
|
||||||
'status__content--with-spoiler': status.get('spoiler_text').length > 0,
|
'status__content--with-spoiler': status.get('spoiler_text').length > 0,
|
||||||
|
@ -327,7 +328,7 @@ export default class StatusContent extends React.PureComponent {
|
||||||
<p
|
<p
|
||||||
style={{ marginBottom: hidden && status.get('mentions').isEmpty() ? '0px' : null }}
|
style={{ marginBottom: hidden && status.get('mentions').isEmpty() ? '0px' : null }}
|
||||||
>
|
>
|
||||||
<span dangerouslySetInnerHTML={spoilerContent} className='translate' />
|
<span dangerouslySetInnerHTML={spoilerContent} className='translate' lang={lang} />
|
||||||
{' '}
|
{' '}
|
||||||
<button tabIndex='0' className='status__content__spoiler-link' onClick={this.handleSpoilerClick}>
|
<button tabIndex='0' className='status__content__spoiler-link' onClick={this.handleSpoilerClick}>
|
||||||
{toggleText}
|
{toggleText}
|
||||||
|
@ -345,6 +346,7 @@ export default class StatusContent extends React.PureComponent {
|
||||||
className='status__content__text translate'
|
className='status__content__text translate'
|
||||||
onMouseEnter={this.handleMouseEnter}
|
onMouseEnter={this.handleMouseEnter}
|
||||||
onMouseLeave={this.handleMouseLeave}
|
onMouseLeave={this.handleMouseLeave}
|
||||||
|
lang={lang}
|
||||||
/>
|
/>
|
||||||
{media}
|
{media}
|
||||||
</div>
|
</div>
|
||||||
|
@ -367,6 +369,7 @@ export default class StatusContent extends React.PureComponent {
|
||||||
tabIndex='0'
|
tabIndex='0'
|
||||||
onMouseEnter={this.handleMouseEnter}
|
onMouseEnter={this.handleMouseEnter}
|
||||||
onMouseLeave={this.handleMouseLeave}
|
onMouseLeave={this.handleMouseLeave}
|
||||||
|
lang={lang}
|
||||||
/>
|
/>
|
||||||
{media}
|
{media}
|
||||||
</div>
|
</div>
|
||||||
|
@ -385,6 +388,7 @@ export default class StatusContent extends React.PureComponent {
|
||||||
tabIndex='0'
|
tabIndex='0'
|
||||||
onMouseEnter={this.handleMouseEnter}
|
onMouseEnter={this.handleMouseEnter}
|
||||||
onMouseLeave={this.handleMouseLeave}
|
onMouseLeave={this.handleMouseLeave}
|
||||||
|
lang={lang}
|
||||||
/>
|
/>
|
||||||
{media}
|
{media}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue