about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/components
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2021-01-21 14:29:54 +0100
committerClaire <claire.github-309c@sitedethib.com>2021-01-21 16:59:47 +0100
commitc48e2a48ba9a5e873be0deb506aaef4d5bc2426b (patch)
treeb1fdf7512106985fa90cb7a7ffda134440e399af /app/javascript/flavours/glitch/components
parentf90fa11db5935521f662ce0d9c608a1037e40da8 (diff)
[Glitch] Fix Google Translate breaking web interface
Port 7d0031a515a9ccd552fab9ad55b6edb7e0e5ba32 to glitch-soc

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/components')
-rw-r--r--app/javascript/flavours/glitch/components/status_content.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/javascript/flavours/glitch/components/status_content.js b/app/javascript/flavours/glitch/components/status_content.js
index 76e2d79a5..61a28e9a7 100644
--- a/app/javascript/flavours/glitch/components/status_content.js
+++ b/app/javascript/flavours/glitch/components/status_content.js
@@ -327,7 +327,7 @@ export default class StatusContent extends React.PureComponent {
           <p
             style={{ marginBottom: hidden && status.get('mentions').isEmpty() ? '0px' : null }}
           >
-            <span dangerouslySetInnerHTML={spoilerContent} />
+            <span dangerouslySetInnerHTML={spoilerContent} className='translate' />
             {' '}
             <button tabIndex='0' className='status__content__spoiler-link' onClick={this.handleSpoilerClick}>
               {toggleText}
@@ -342,7 +342,7 @@ export default class StatusContent extends React.PureComponent {
               key={`contents-${tagLinks}`}
               tabIndex={!hidden ? 0 : null}
               dangerouslySetInnerHTML={content}
-              className='status__content__text'
+              className='status__content__text translate'
             />
             {media}
           </div>
@@ -362,7 +362,7 @@ export default class StatusContent extends React.PureComponent {
             ref={this.setContentsRef}
             key={`contents-${tagLinks}-${rewriteMentions}`}
             dangerouslySetInnerHTML={content}
-            className='status__content__text'
+            className='status__content__text translate'
             tabIndex='0'
           />
           {media}
@@ -375,7 +375,7 @@ export default class StatusContent extends React.PureComponent {
           tabIndex='0'
           ref={this.setRef}
         >
-          <div ref={this.setContentsRef} key={`contents-${tagLinks}`} className='status__content__text' dangerouslySetInnerHTML={content} tabIndex='0' />
+          <div ref={this.setContentsRef} key={`contents-${tagLinks}`} className='status__content__text translate' dangerouslySetInnerHTML={content} tabIndex='0' />
           {media}
         </div>
       );