mirror of
https://github.com/glitch-soc/mastodon
synced 2025-04-24 17:44:50 +00:00
Fix grouped reaction notification text
This commit is contained in:
parent
ef4ba32a19
commit
52fe39457f
2 changed files with 22 additions and 7 deletions
|
@ -6,13 +6,27 @@ import type { NotificationGroupReaction } from 'flavours/glitch/models/notificat
|
|||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
import { NotificationGroupWithStatus } from './notification_group_with_status';
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
<FormattedMessage
|
||||
id='notification.reaction'
|
||||
defaultMessage='{name} reacted to your status'
|
||||
values={values}
|
||||
/>
|
||||
);
|
||||
const labelRenderer: LabelRenderer = (displayedName, total) => {
|
||||
if (total === 1)
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.reaction'
|
||||
defaultMessage='{name} reacted to your status'
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.reaction.name_and_others'
|
||||
defaultMessage='{name} and {count, plural, one {# other} other {# others}} reacted to your post'
|
||||
values={{
|
||||
name: displayedName,
|
||||
count: total - 1,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const NotificationReaction: React.FC<{
|
||||
notification: NotificationGroupReaction;
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
"navigation_bar.keyboard_shortcuts": "Keyboard shortcuts",
|
||||
"navigation_bar.misc": "Misc",
|
||||
"notification.reaction": "{name} reacted to your post",
|
||||
"notification.reaction.name_and_others": "{name} and {count, plural, one {# other} other {# others}} reacted to your post",
|
||||
"notifications.column_settings.filter_bar.show_bar": "Show filter bar",
|
||||
"notifications.column_settings.reaction": "Reactions:",
|
||||
"notifications.filter.reactions": "Reactions",
|
||||
|
|
Loading…
Add table
Reference in a new issue