From 7d0031a515a9ccd552fab9ad55b6edb7e0e5ba32 Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 21 Jan 2021 14:29:54 +0100 Subject: Fix Google Translate breaking web interface (#15610) - marks the page as a whole as untranslatable - still marks user text as translatable Co-authored-by: Claire --- app/javascript/mastodon/components/status_content.js | 8 ++++---- app/javascript/mastodon/features/account/components/header.js | 6 +++--- .../mastodon/features/getting_started/components/announcements.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/mastodon/components/status_content.js b/app/javascript/mastodon/components/status_content.js index 185a2a663..190ced1a8 100644 --- a/app/javascript/mastodon/components/status_content.js +++ b/app/javascript/mastodon/components/status_content.js @@ -221,14 +221,14 @@ export default class StatusContent extends React.PureComponent { return (
{mentionsPlaceholder} -
+
{!hidden && !!status.get('poll') && } @@ -238,7 +238,7 @@ export default class StatusContent extends React.PureComponent { } else if (this.props.onClick) { const output = [
-
+
{!!status.get('poll') && } @@ -254,7 +254,7 @@ export default class StatusContent extends React.PureComponent { } else { return (
-
+
{!!status.get('poll') && } diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index b47ebed62..0b4431d62 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -328,9 +328,9 @@ class Header extends ImmutablePureComponent { ))} {fields.map((pair, i) => (
-
+
-
+
{pair.get('verified_at') && }
@@ -340,7 +340,7 @@ class Header extends ImmutablePureComponent { {account.get('id') !== me && !suspended && } - {account.get('note').length > 0 && account.get('note') !== '

' &&
} + {account.get('note').length > 0 && account.get('note') !== '

' &&
}
{!suspended && ( diff --git a/app/javascript/mastodon/features/getting_started/components/announcements.js b/app/javascript/mastodon/features/getting_started/components/announcements.js index 5bc3abac6..4534f7121 100644 --- a/app/javascript/mastodon/features/getting_started/components/announcements.js +++ b/app/javascript/mastodon/features/getting_started/components/announcements.js @@ -145,7 +145,7 @@ class Content extends ImmutablePureComponent { return (
-- cgit From c48e2a48ba9a5e873be0deb506aaef4d5bc2426b Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 21 Jan 2021 14:29:54 +0100 Subject: [Glitch] Fix Google Translate breaking web interface Port 7d0031a515a9ccd552fab9ad55b6edb7e0e5ba32 to glitch-soc Co-authored-by: Claire Signed-off-by: Claire --- app/javascript/flavours/glitch/components/status_content.js | 8 ++++---- .../flavours/glitch/features/account/components/header.js | 8 ++++---- .../glitch/features/getting_started/components/announcements.js | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'app/javascript') 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 {
@@ -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} > -
+
{media}
); diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index 15515a99a..6a572862d 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -320,13 +320,13 @@ class Header extends ImmutablePureComponent {
{identity_proofs.map((proof, i) => (
-
+
- +
))} @@ -335,14 +335,14 @@ class Header extends ImmutablePureComponent {
- {pair.get('verified_at') && } + {pair.get('verified_at') && }
))}
)} - {account.get('note').length > 0 && account.get('note') !== '

' &&
} + {account.get('note').length > 0 && account.get('note') !== '

' &&
}
)} diff --git a/app/javascript/flavours/glitch/features/getting_started/components/announcements.js b/app/javascript/flavours/glitch/features/getting_started/components/announcements.js index cd81d07de..1ab5d9ba6 100644 --- a/app/javascript/flavours/glitch/features/getting_started/components/announcements.js +++ b/app/javascript/flavours/glitch/features/getting_started/components/announcements.js @@ -145,7 +145,7 @@ class Content extends ImmutablePureComponent { return (
-- cgit From 5fcac81302ad323a86ab43243c242c4a10cd338a Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 22 Jan 2021 10:09:23 +0100 Subject: Add “translate” class to other user strings (#15611) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- app/javascript/mastodon/components/poll.js | 2 +- app/javascript/mastodon/features/account/components/header.js | 2 +- app/javascript/mastodon/features/compose/components/reply_indicator.js | 2 +- app/javascript/mastodon/features/directory/components/account_card.js | 2 +- .../mastodon/features/follow_requests/components/account_authorize.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/mastodon/components/poll.js b/app/javascript/mastodon/components/poll.js index 41c99710f..477f56e13 100644 --- a/app/javascript/mastodon/components/poll.js +++ b/app/javascript/mastodon/components/poll.js @@ -153,7 +153,7 @@ class Poll extends ImmutablePureComponent { } diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index 0b4431d62..4647b98b2 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -340,7 +340,7 @@ class Header extends ImmutablePureComponent { {account.get('id') !== me && !suspended && } - {account.get('note').length > 0 && account.get('note') !== '

' &&
} + {account.get('note').length > 0 && account.get('note') !== '

' &&
}
{!suspended && ( diff --git a/app/javascript/mastodon/features/compose/components/reply_indicator.js b/app/javascript/mastodon/features/compose/components/reply_indicator.js index 856383893..a1d5c420c 100644 --- a/app/javascript/mastodon/features/compose/components/reply_indicator.js +++ b/app/javascript/mastodon/features/compose/components/reply_indicator.js @@ -56,7 +56,7 @@ class ReplyIndicator extends ImmutablePureComponent {
-
+
{status.get('media_attachments').size > 0 && (
diff --git a/app/javascript/mastodon/features/follow_requests/components/account_authorize.js b/app/javascript/mastodon/features/follow_requests/components/account_authorize.js index a3b524db1..8269f5ae4 100644 --- a/app/javascript/mastodon/features/follow_requests/components/account_authorize.js +++ b/app/javascript/mastodon/features/follow_requests/components/account_authorize.js @@ -35,7 +35,7 @@ class AccountAuthorize extends ImmutablePureComponent { -
+
-- cgit From 00e55445b9aa5a399a9f8b76e42fde9da2c399fd Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 22 Jan 2021 10:09:23 +0100 Subject: [Glitch] Add “translate” class to other user strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port 5fcac81302ad323a86ab43243c242c4a10cd338a to glitch-soc Co-authored-by: Claire Signed-off-by: Claire --- app/javascript/flavours/glitch/components/poll.js | 2 +- .../flavours/glitch/features/compose/components/reply_indicator.js | 2 +- .../flavours/glitch/features/directory/components/account_card.js | 2 +- .../glitch/features/follow_requests/components/account_authorize.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/components/poll.js b/app/javascript/flavours/glitch/components/poll.js index 6f57c1950..f230823cc 100644 --- a/app/javascript/flavours/glitch/components/poll.js +++ b/app/javascript/flavours/glitch/components/poll.js @@ -153,7 +153,7 @@ class Poll extends ImmutablePureComponent { } diff --git a/app/javascript/flavours/glitch/features/compose/components/reply_indicator.js b/app/javascript/flavours/glitch/features/compose/components/reply_indicator.js index 0fd07c282..37ae9cab9 100644 --- a/app/javascript/flavours/glitch/features/compose/components/reply_indicator.js +++ b/app/javascript/flavours/glitch/features/compose/components/reply_indicator.js @@ -66,7 +66,7 @@ class ReplyIndicator extends ImmutablePureComponent { )}
{attachments.size > 0 && ( diff --git a/app/javascript/flavours/glitch/features/directory/components/account_card.js b/app/javascript/flavours/glitch/features/directory/components/account_card.js index 2ef9d5ba4..5f952b382 100644 --- a/app/javascript/flavours/glitch/features/directory/components/account_card.js +++ b/app/javascript/flavours/glitch/features/directory/components/account_card.js @@ -241,7 +241,7 @@ class AccountCard extends ImmutablePureComponent {
diff --git a/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.js b/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.js index bf145cb67..eb9f3db7e 100644 --- a/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.js +++ b/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.js @@ -35,7 +35,7 @@ class AccountAuthorize extends ImmutablePureComponent { -
+
-- cgit