about summary refs log tree commit diff
path: root/app/javascript/flavours
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-03-26 01:23:59 +0100
committerThibaut Girka <thib@sitedethib.com>2019-03-26 16:09:59 +0100
commit614bd3f8d4bd52d3b9e7de8ac9611023760674dd (patch)
tree5b3918edaed567a6db602dae295db28ce267b79b /app/javascript/flavours
parentd680c6199395534881fe61d18c23c3b40df3f53c (diff)
[Glitch] Add `lang` attribute to statuses in web UI
Port JS changes from e6cfa7ab897ac4fd6bf9bbcafe09fc42c4cc2c5d to glitch-soc
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r--app/javascript/flavours/glitch/components/status_content.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/components/status_content.js b/app/javascript/flavours/glitch/components/status_content.js
index 98a34ebaf..a62844185 100644
--- a/app/javascript/flavours/glitch/components/status_content.js
+++ b/app/javascript/flavours/glitch/components/status_content.js
@@ -198,7 +198,7 @@ export default class StatusContent extends React.PureComponent {
           <p
             style={{ marginBottom: hidden && status.get('mentions').isEmpty() ? '0px' : null }}
           >
-            <span dangerouslySetInnerHTML={spoilerContent} />
+            <span dangerouslySetInnerHTML={spoilerContent} lang={status.get('language')} />
             {' '}
             <button tabIndex='0' className='status__content__spoiler-link' onClick={this.handleSpoilerClick}>
               {toggleText}
@@ -213,6 +213,7 @@ export default class StatusContent extends React.PureComponent {
               style={directionStyle}
               tabIndex={!hidden ? 0 : null}
               dangerouslySetInnerHTML={content}
+              lang={status.get('language')}
             />
             {media}
           </div>
@@ -231,6 +232,7 @@ export default class StatusContent extends React.PureComponent {
           <div
             ref={this.setRef}
             dangerouslySetInnerHTML={content}
+            lang={status.get('language')}
             tabIndex='0'
           />
           {media}
@@ -243,7 +245,7 @@ export default class StatusContent extends React.PureComponent {
           style={directionStyle}
           tabIndex='0'
         >
-          <div ref={this.setRef} dangerouslySetInnerHTML={content} tabIndex='0' />
+          <div ref={this.setRef} dangerouslySetInnerHTML={content} lang={status.get('language')} tabIndex='0' />
           {media}
         </div>
       );