Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

Commit 5fcac81

Browse files
Add “translate” class to other user strings (mastodon#15611)
* Add “translate” class to other user strings Follow-up to mastodon#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 <[email protected]>
1 parent eb51e43 commit 5fcac81

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

app/javascript/mastodon/components/poll.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class Poll extends ImmutablePureComponent {
153153
</span>}
154154

155155
<span
156-
className='poll__option__text'
156+
className='poll__option__text translate'
157157
dangerouslySetInnerHTML={{ __html: titleEmojified }}
158158
/>
159159

app/javascript/mastodon/features/account/components/header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ class Header extends ImmutablePureComponent {
340340

341341
{account.get('id') !== me && !suspended && <AccountNoteContainer account={account} />}
342342

343-
{account.get('note').length > 0 && account.get('note') !== '<p></p>' && <div className='account__header__content' dangerouslySetInnerHTML={content} className='translate' />}
343+
{account.get('note').length > 0 && account.get('note') !== '<p></p>' && <div className='account__header__content translate' dangerouslySetInnerHTML={content} />}
344344
</div>
345345

346346
{!suspended && (

app/javascript/mastodon/features/compose/components/reply_indicator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ReplyIndicator extends ImmutablePureComponent {
5656
</a>
5757
</div>
5858

59-
<div className='reply-indicator__content' dangerouslySetInnerHTML={content} />
59+
<div className='reply-indicator__content translate' dangerouslySetInnerHTML={content} />
6060

6161
{status.get('media_attachments').size > 0 && (
6262
<AttachmentList

app/javascript/mastodon/features/directory/components/account_card.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ class AccountCard extends ImmutablePureComponent {
241241

242242
<div className='directory__card__extra' ref={this.setRef}>
243243
<div
244-
className='account__header__content'
244+
className='account__header__content translate'
245245
dangerouslySetInnerHTML={{ __html: account.get('note_emojified') }}
246246
/>
247247
</div>

app/javascript/mastodon/features/follow_requests/components/account_authorize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class AccountAuthorize extends ImmutablePureComponent {
3535
<DisplayName account={account} />
3636
</Permalink>
3737

38-
<div className='account__header__content' dangerouslySetInnerHTML={content} />
38+
<div className='account__header__content translate' dangerouslySetInnerHTML={content} />
3939
</div>
4040

4141
<div className='account--panel'>

0 commit comments

Comments
 (0)