]> cat aescling's git repositories - mastodon.git/commitdiff
Add “translate” class to other user strings (#15611)
authorThibG <thib@sitedethib.com>
Fri, 22 Jan 2021 09:09:23 +0000 (10:09 +0100)
committerGitHub <noreply@github.com>
Fri, 22 Jan 2021 09:09:23 +0000 (10:09 +0100)
* Add “translate” class to other user strings

Follow-up to #15610.

Allow Google Translate to work on more user content:
- poll options
- reply indicator (contents of the status being replied to)
- directory account cards
- account note in follow requests list

* Fix incorrect styling of account bio

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
app/javascript/mastodon/components/poll.js
app/javascript/mastodon/features/account/components/header.js
app/javascript/mastodon/features/compose/components/reply_indicator.js
app/javascript/mastodon/features/directory/components/account_card.js
app/javascript/mastodon/features/follow_requests/components/account_authorize.js

index 41c99710fc79da42e29f26ba8f325646226a9ab0..477f56e1300ffe10b61410b21239a7f2f1e5484a 100644 (file)
@@ -153,7 +153,7 @@ class Poll extends ImmutablePureComponent {
           </span>}
 
           <span
-            className='poll__option__text'
+            className='poll__option__text translate'
             dangerouslySetInnerHTML={{ __html: titleEmojified }}
           />
 
index 0b4431d625b4dc7b632b5990e0b03fa4e4dda80c..4647b98b21a3372d9b7475ab591e45ca46fdbc1a 100644 (file)
@@ -340,7 +340,7 @@ class Header extends ImmutablePureComponent {
 
               {account.get('id') !== me && !suspended && <AccountNoteContainer account={account} />}
 
-              {account.get('note').length > 0 && account.get('note') !== '<p></p>' && <div className='account__header__content' dangerouslySetInnerHTML={content} className='translate' />}
+              {account.get('note').length > 0 && account.get('note') !== '<p></p>' && <div className='account__header__content translate' dangerouslySetInnerHTML={content} />}
             </div>
 
             {!suspended && (
index 85638389324e26c4ca2caa8e40edbe31a515a342..a1d5c420cb6187e37e897f4143a016ff7699a842 100644 (file)
@@ -56,7 +56,7 @@ class ReplyIndicator extends ImmutablePureComponent {
           </a>
         </div>
 
-        <div className='reply-indicator__content' dangerouslySetInnerHTML={content} />
+        <div className='reply-indicator__content translate' dangerouslySetInnerHTML={content} />
 
         {status.get('media_attachments').size > 0 && (
           <AttachmentList
index 419ab9e11447fa19e80c826947746cc1feca8c92..e3773382803dbc1ae5589a81fa62cc1cf5e3ba0a 100644 (file)
@@ -241,7 +241,7 @@ class AccountCard extends ImmutablePureComponent {
 
         <div className='directory__card__extra' ref={this.setRef}>
           <div
-            className='account__header__content'
+            className='account__header__content translate'
             dangerouslySetInnerHTML={{ __html: account.get('note_emojified') }}
           />
         </div>
index a3b524db1d4398dbc3a394d354568185dc2c2b98..8269f5ae43f5778ecadc257b8977c7ad9c367d8d 100644 (file)
@@ -35,7 +35,7 @@ class AccountAuthorize extends ImmutablePureComponent {
             <DisplayName account={account} />
           </Permalink>
 
-          <div className='account__header__content' dangerouslySetInnerHTML={content} />
+          <div className='account__header__content translate' dangerouslySetInnerHTML={content} />
         </div>
 
         <div className='account--panel'>
This page took 0.040506 seconds and 3 git commands to generate.