Update copy for empty featured tabs (#34483)

This commit is contained in:
Echo 2025-04-17 12:27:44 +02:00 committed by GitHub
parent 8489f6c8fc
commit 64d94f9e57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 4 deletions

View file

@ -1,6 +1,9 @@
import { FormattedMessage } from 'react-intl';
import { useParams } from 'react-router';
import { LimitedAccountHint } from 'mastodon/features/account_timeline/components/limited_account_hint';
import { me } from 'mastodon/initial_state';
interface EmptyMessageProps {
suspended: boolean;
@ -15,13 +18,21 @@ export const EmptyMessage: React.FC<EmptyMessageProps> = ({
hidden,
blockedBy,
}) => {
const { acct } = useParams<{ acct?: string }>();
if (!accountId) {
return null;
}
let message: React.ReactNode = null;
if (suspended) {
if (me === accountId) {
message = (
<FormattedMessage
id='empty_column.account_featured.me'
defaultMessage='You have not featured anything yet. Did you know that you can feature your posts, hashtags you use the most, and even your friends accounts on your profile?'
/>
);
} else if (suspended) {
message = (
<FormattedMessage
id='empty_column.account_suspended'
@ -37,11 +48,19 @@ export const EmptyMessage: React.FC<EmptyMessageProps> = ({
defaultMessage='Profile unavailable'
/>
);
} else if (acct) {
message = (
<FormattedMessage
id='empty_column.account_featured.other'
defaultMessage='{acct} has not featured anything yet. Did you know that you can feature your posts, hashtags you use the most, and even your friends accounts on your profile?'
values={{ acct }}
/>
);
} else {
message = (
<FormattedMessage
id='empty_column.account_featured'
defaultMessage='This list is empty'
id='empty_column.account_featured_other.unknown'
defaultMessage='This account has not featured anything yet.'
/>
);
}