mirror of
https://github.com/mastodon/mastodon.git
synced 2025-11-28 18:40:47 +00:00
Fix "Post revoked" label & "Pending" tooltip text (#36090)
Some checks failed
Check i18n / check-i18n (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
Haml Linting / lint (push) Waiting to run
Ruby Linting / lint (push) Waiting to run
Historical data migration test / test (14-alpine) (push) Waiting to run
Historical data migration test / test (15-alpine) (push) Waiting to run
Historical data migration test / test (16-alpine) (push) Waiting to run
Historical data migration test / test (17-alpine) (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / test (3.3) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (.ruby-version) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (3.2) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (3.3) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.3) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.3, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Chromatic / Run Chromatic (push) Has been cancelled
Crowdin / Upload translations / upload-translations (push) Has been cancelled
JavaScript Linting / lint (push) Has been cancelled
JavaScript Testing / test (push) Has been cancelled
Some checks failed
Check i18n / check-i18n (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
Haml Linting / lint (push) Waiting to run
Ruby Linting / lint (push) Waiting to run
Historical data migration test / test (14-alpine) (push) Waiting to run
Historical data migration test / test (15-alpine) (push) Waiting to run
Historical data migration test / test (16-alpine) (push) Waiting to run
Historical data migration test / test (17-alpine) (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / test (3.3) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (.ruby-version) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (3.2) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (3.3) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.3) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.3, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Chromatic / Run Chromatic (push) Has been cancelled
Crowdin / Upload translations / upload-translations (push) Has been cancelled
JavaScript Linting / lint (push) Has been cancelled
JavaScript Testing / test (push) Has been cancelled
This commit is contained in:
parent
946721fd0b
commit
45a996f12b
|
|
@ -21,8 +21,10 @@ const MAX_QUOTE_POSTS_NESTING_LEVEL = 1;
|
||||||
|
|
||||||
const QuoteWrapper: React.FC<{
|
const QuoteWrapper: React.FC<{
|
||||||
isError?: boolean;
|
isError?: boolean;
|
||||||
|
contextType?: string;
|
||||||
|
onQuoteCancel?: () => void;
|
||||||
children: React.ReactElement;
|
children: React.ReactElement;
|
||||||
}> = ({ isError, children }) => {
|
}> = ({ isError, contextType, onQuoteCancel, children }) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={classNames('status__quote', {
|
className={classNames('status__quote', {
|
||||||
|
|
@ -30,6 +32,11 @@ const QuoteWrapper: React.FC<{
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
{contextType === 'composer' && (
|
||||||
|
<Button compact plain onClick={onQuoteCancel}>
|
||||||
|
<FormattedMessage id='status.remove_quote' defaultMessage='Remove' />
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
@ -146,49 +153,47 @@ export const QuotedStatus: React.FC<QuotedStatusProps> = ({
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<LearnMoreLink>
|
<LearnMoreLink>
|
||||||
<h6>
|
|
||||||
<FormattedMessage
|
|
||||||
id='status.quote_error.pending_approval_popout.title'
|
|
||||||
defaultMessage='Pending quote? Remain calm'
|
|
||||||
/>
|
|
||||||
</h6>
|
|
||||||
<p>
|
<p>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='status.quote_error.pending_approval_popout.body'
|
id='status.quote_error.pending_approval_popout.body'
|
||||||
defaultMessage='Quotes shared across the Fediverse may take time to display, as different servers have different protocols.'
|
defaultMessage="On Mastodon, you can control whether someone can quote you. This post is pending while we're getting the original author's approval."
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
</LearnMoreLink>
|
</LearnMoreLink>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
} else if (quoteState === 'revoked') {
|
||||||
|
quoteError = (
|
||||||
|
<FormattedMessage
|
||||||
|
id='status.quote_error.revoked'
|
||||||
|
defaultMessage='Post removed by author'
|
||||||
|
/>
|
||||||
|
);
|
||||||
} else if (
|
} else if (
|
||||||
!status ||
|
!status ||
|
||||||
!quotedStatusId ||
|
!quotedStatusId ||
|
||||||
quoteState === 'deleted' ||
|
quoteState === 'deleted' ||
|
||||||
quoteState === 'rejected' ||
|
quoteState === 'rejected' ||
|
||||||
quoteState === 'revoked' ||
|
|
||||||
quoteState === 'unauthorized'
|
quoteState === 'unauthorized'
|
||||||
) {
|
) {
|
||||||
quoteError = (
|
quoteError = (
|
||||||
<>
|
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='status.quote_error.not_available'
|
id='status.quote_error.not_available'
|
||||||
defaultMessage='Post unavailable'
|
defaultMessage='Post unavailable'
|
||||||
/>
|
/>
|
||||||
{contextType === 'composer' && (
|
|
||||||
<Button compact plain onClick={onQuoteCancel}>
|
|
||||||
<FormattedMessage
|
|
||||||
id='status.remove_quote'
|
|
||||||
defaultMessage='Remove'
|
|
||||||
/>
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quoteError) {
|
if (quoteError) {
|
||||||
return <QuoteWrapper isError>{quoteError}</QuoteWrapper>;
|
return (
|
||||||
|
<QuoteWrapper
|
||||||
|
isError
|
||||||
|
contextType={contextType}
|
||||||
|
onQuoteCancel={onQuoteCancel}
|
||||||
|
>
|
||||||
|
{quoteError}
|
||||||
|
</QuoteWrapper>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (variant === 'link' && status) {
|
if (variant === 'link' && status) {
|
||||||
|
|
|
||||||
|
|
@ -905,8 +905,8 @@
|
||||||
"status.quote_error.filtered": "Hidden due to one of your filters",
|
"status.quote_error.filtered": "Hidden due to one of your filters",
|
||||||
"status.quote_error.not_available": "Post unavailable",
|
"status.quote_error.not_available": "Post unavailable",
|
||||||
"status.quote_error.pending_approval": "Post pending",
|
"status.quote_error.pending_approval": "Post pending",
|
||||||
"status.quote_error.pending_approval_popout.body": "Quotes shared across the Fediverse may take time to display, as different servers have different protocols.",
|
"status.quote_error.pending_approval_popout.body": "On Mastodon, you can control whether someone can quote you. This post is pending while we're getting the original author's approval.",
|
||||||
"status.quote_error.pending_approval_popout.title": "Pending quote? Remain calm",
|
"status.quote_error.revoked": "Post removed by author",
|
||||||
"status.quote_followers_only": "Only followers can quote this post",
|
"status.quote_followers_only": "Only followers can quote this post",
|
||||||
"status.quote_manual_review": "Author will manually review",
|
"status.quote_manual_review": "Author will manually review",
|
||||||
"status.quote_policy_change": "Change who can quote",
|
"status.quote_policy_change": "Change who can quote",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user