mirror of
https://github.com/mastodon/mastodon.git
synced 2026-09-27 15:28:21 -05:00
Status redesign: Update visibility display (#40633)
This commit is contained in:
@@ -19,7 +19,7 @@ import { statusLink } from './utils';
|
||||
interface StatusRedesignHeaderProps {
|
||||
status: Pick<
|
||||
AccountStatusShape,
|
||||
'id' | 'account' | 'created_at' | 'visibility'
|
||||
'id' | 'account' | 'created_at' | 'visibility' | 'mentions'
|
||||
>;
|
||||
children?: React.ReactNode;
|
||||
className?: string;
|
||||
@@ -58,9 +58,20 @@ export const StatusRedesignHeader: React.FC<StatusRedesignHeaderProps> = ({
|
||||
displayName = (
|
||||
<FormattedMessage
|
||||
id='status.header.to_followers'
|
||||
defaultMessage='{displayName} to Followers'
|
||||
defaultMessage='{author} to Followers {count, plural, =0 {} one {+ # other} other {+ # others}}'
|
||||
description='Count is # of other people mentioned in the post'
|
||||
tagName='span'
|
||||
values={{ displayName }}
|
||||
values={{ author: displayName, count: status.mentions.length }}
|
||||
/>
|
||||
);
|
||||
} else if (status.visibility === 'direct') {
|
||||
displayName = (
|
||||
<FormattedMessage
|
||||
id='status.header.message_to_me'
|
||||
defaultMessage='{author} to You {count, plural, =0 {} one {+ # other} other {+ # others}}'
|
||||
description='DisplayName is the author, count is # of other people mentioned in the post'
|
||||
tagName='span'
|
||||
values={{ author: displayName, count: status.mentions.length - 1 }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1390,7 +1390,8 @@
|
||||
"status.favourite": "Favorite",
|
||||
"status.favourites_count": "{count, plural, one {{counter} favorite} other {{counter} favorites}}",
|
||||
"status.filter": "Filter this post",
|
||||
"status.header.to_followers": "{displayName} to Followers",
|
||||
"status.header.message_to_me": "{author} to You {count, plural, =0 {} one {+ # other} other {+ # others}}",
|
||||
"status.header.to_followers": "{author} to Followers {count, plural, =0 {} one {+ # other} other {+ # others}}",
|
||||
"status.history.created": "{name} created {date}",
|
||||
"status.history.edited": "{name} edited {date}",
|
||||
"status.likes_count": "{count, plural, one {{counter} like} other {{counter} likes}}",
|
||||
|
||||
Reference in New Issue
Block a user