mirror of
https://github.com/glitch-soc/mastodon
synced 2025-04-24 21:14:51 +00:00
Update copy for empty featured tabs (#34483)
This commit is contained in:
parent
8489f6c8fc
commit
64d94f9e57
2 changed files with 25 additions and 4 deletions
|
@ -1,6 +1,9 @@
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
|
import { useParams } from 'react-router';
|
||||||
|
|
||||||
import { LimitedAccountHint } from 'mastodon/features/account_timeline/components/limited_account_hint';
|
import { LimitedAccountHint } from 'mastodon/features/account_timeline/components/limited_account_hint';
|
||||||
|
import { me } from 'mastodon/initial_state';
|
||||||
|
|
||||||
interface EmptyMessageProps {
|
interface EmptyMessageProps {
|
||||||
suspended: boolean;
|
suspended: boolean;
|
||||||
|
@ -15,13 +18,21 @@ export const EmptyMessage: React.FC<EmptyMessageProps> = ({
|
||||||
hidden,
|
hidden,
|
||||||
blockedBy,
|
blockedBy,
|
||||||
}) => {
|
}) => {
|
||||||
|
const { acct } = useParams<{ acct?: string }>();
|
||||||
if (!accountId) {
|
if (!accountId) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
let message: React.ReactNode = 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 friend’s accounts on your profile?'
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
} else if (suspended) {
|
||||||
message = (
|
message = (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='empty_column.account_suspended'
|
id='empty_column.account_suspended'
|
||||||
|
@ -37,11 +48,19 @@ export const EmptyMessage: React.FC<EmptyMessageProps> = ({
|
||||||
defaultMessage='Profile unavailable'
|
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 friend’s accounts on your profile?'
|
||||||
|
values={{ acct }}
|
||||||
|
/>
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
message = (
|
message = (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='empty_column.account_featured'
|
id='empty_column.account_featured_other.unknown'
|
||||||
defaultMessage='This list is empty'
|
defaultMessage='This account has not featured anything yet.'
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -300,7 +300,9 @@
|
||||||
"emoji_button.search_results": "Search results",
|
"emoji_button.search_results": "Search results",
|
||||||
"emoji_button.symbols": "Symbols",
|
"emoji_button.symbols": "Symbols",
|
||||||
"emoji_button.travel": "Travel & Places",
|
"emoji_button.travel": "Travel & Places",
|
||||||
"empty_column.account_featured": "This list is empty",
|
"empty_column.account_featured.me": "You have not featured anything yet. Did you know that you can feature your posts, hashtags you use the most, and even your friend’s accounts on your profile?",
|
||||||
|
"empty_column.account_featured.other": "{acct} has not featured anything yet. Did you know that you can feature your posts, hashtags you use the most, and even your friend’s accounts on your profile?",
|
||||||
|
"empty_column.account_featured_other.unknown": "This account has not featured anything yet.",
|
||||||
"empty_column.account_hides_collections": "This user has chosen to not make this information available",
|
"empty_column.account_hides_collections": "This user has chosen to not make this information available",
|
||||||
"empty_column.account_suspended": "Account suspended",
|
"empty_column.account_suspended": "Account suspended",
|
||||||
"empty_column.account_timeline": "No posts here!",
|
"empty_column.account_timeline": "No posts here!",
|
||||||
|
|
Loading…
Add table
Reference in a new issue