From f93dbec9d3ec2861799a16249a8cccb9dfd3068f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KMY=EF=BC=88=E9=9B=AA=E3=81=82=E3=81=99=E3=81=8B=EF=BC=89?= Date: Fri, 6 Sep 2024 08:40:17 +0900 Subject: [PATCH 1/3] Bump version to 15.0-dev (#836) --- lib/mastodon/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 522c092f81..abf317b81c 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -5,7 +5,7 @@ module Mastodon module_function def kmyblue_major - 14 + 15 end def kmyblue_minor From 1b4edeefae8b933930f2b2a1d1341b38e5f8b1f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KMY=EF=BC=88=E9=9B=AA=E3=81=82=E3=81=99=E3=81=8B=EF=BC=89?= Date: Fri, 6 Sep 2024 08:48:32 +0900 Subject: [PATCH 2/3] =?UTF-8?q?Refactor:=20=E3=83=87=E3=82=B9=E3=82=AF?= =?UTF-8?q?=E3=83=88=E3=83=83=E3=83=97=E9=80=9A=E7=9F=A5=E7=94=A8=E3=81=AE?= =?UTF-8?q?=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB=E3=83=88=E3=83=A1=E3=83=83?= =?UTF-8?q?=E3=82=BB=E3=83=BC=E3=82=B8=E3=81=AE=E3=82=B3=E3=83=BC=E3=83=89?= =?UTF-8?q?=20(#833)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor: デスクトップ通知用のデフォルトメッセージのコード * Fix lint --- .../mastodon/actions/notifications.js | 33 +++++++++---------- .../notifications/components/notification.jsx | 12 +++---- .../notification_emoji_reaction.tsx | 2 +- .../components/notification_favourite.tsx | 2 +- .../components/notification_reblog.tsx | 2 +- 5 files changed, 24 insertions(+), 27 deletions(-) diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js index daf95f934a..b2da6ce6e9 100644 --- a/app/javascript/mastodon/actions/notifications.js +++ b/app/javascript/mastodon/actions/notifications.js @@ -81,24 +81,21 @@ export const NOTIFICATIONS_FOR_REQUEST_EXPAND_REQUEST = 'NOTIFICATIONS_FOR_REQUE export const NOTIFICATIONS_FOR_REQUEST_EXPAND_SUCCESS = 'NOTIFICATIONS_FOR_REQUEST_EXPAND_SUCCESS'; export const NOTIFICATIONS_FOR_REQUEST_EXPAND_FAIL = 'NOTIFICATIONS_FOR_REQUEST_EXPAND_FAIL'; -const DEFAULT_NOTIFICATION_MESSAGES = { - 'notification.admin.report': '{name} reported {target}', - 'notification.admin.sign_up': '{name} signed up', - 'notification.emoji_reaction': '{name} reacted your post with emoji', - 'notification.favourite': '{name} favorited your post', - 'notification.follow': '{name} followed you', - 'notification.list_status': '{name} post is added to {listName}', - 'notification.mention': 'Mention', - 'notification.poll': 'A poll you voted in has ended', - 'notification.reblog': '{name} boosted your post', - 'notification.status': '{name} just posted', - 'notification.status_reference': '{name} quoted your post', - 'notification.update': '{name} edited a post', -}; - -defineMessages({ - mention: { id: 'notification.mention', defaultMessage: '{name} mentioned you' }, +const messages = defineMessages({ + // mention: { id: 'notification.mention', defaultMessage: '{name} mentioned you' }, group: { id: 'notifications.group', defaultMessage: '{count} notifications' }, + 'message_admin.report': { id: 'notification.admin.report', defaultMessage: '{name} reported {target}' }, + 'message_admin.sign_up': { id: 'notification.admin.sign_up', defaultMessage: '{name} signed up' }, + message_emoji_reaction: { id: 'notification.emoji_reaction', defaultMessage: '{name} reacted your post with emoji' }, + message_favourite: { id: 'notification.favourite', defaultMessage: '{name} favorited your post' }, + message_follow: { id: 'notification.follow', defaultMessage: '{name} followed you' }, + message_list_status: { id: 'notification.list_status', defaultMessage: '{name} post is added to {listName}' }, + message_mention: { id: 'notification.mention', defaultMessage: 'Mention' }, + message_poll: { id: 'notification.poll', defaultMessage: 'A poll you voted in has ended' }, + message_reblog: { id: 'notification.reblog', defaultMessage: '{name} boosted your post' }, + message_status: { id: 'notification.status', defaultMessage: '{name} just posted' }, + message_status_reference: { id: 'notification.status_reference', defaultMessage: '{name} quoted your post' }, + message_update: { id: 'notification.update', defaultMessage: '{name} edited a post' }, }); const fetchRelatedRelationships = (dispatch, notifications) => { @@ -176,7 +173,7 @@ export function updateNotifications(notification, intlMessages, intlLocale) { // Desktop notifications if (typeof window.Notification !== 'undefined' && showAlert && !filtered) { - const messageTemplate = intlMessages[`notification.${notification.type}`] || DEFAULT_NOTIFICATION_MESSAGES[`notification.${notification.type}`]; + const messageTemplate = intlMessages[`notification.${notification.type}`] || messages[`message_${notification.type}`] || '[NO MESSAGE DEFINITION]'; const title = new IntlMessageFormat(messageTemplate, intlLocale).format({ name: notification.account.display_name.length > 0 ? notification.account.display_name : notification.account.username, listName: notification.list && notification.list.title, diff --git a/app/javascript/mastodon/features/notifications/components/notification.jsx b/app/javascript/mastodon/features/notifications/components/notification.jsx index a4bb98331c..7683176c1e 100644 --- a/app/javascript/mastodon/features/notifications/components/notification.jsx +++ b/app/javascript/mastodon/features/notifications/components/notification.jsx @@ -34,12 +34,12 @@ import { RelationshipsSeveranceEvent } from './relationships_severance_event'; import Report from './report'; const messages = defineMessages({ - favourite: { id: 'notification.favourite', defaultMessage: '{name} favorited your status' }, - emojiReaction: { id: 'notification.emoji_reaction', defaultMessage: '{name} reacted your status with emoji' }, + favourite: { id: 'notification.favourite', defaultMessage: '{name} favorited your post' }, + emojiReaction: { id: 'notification.emoji_reaction', defaultMessage: '{name} reacted your post with emoji' }, follow: { id: 'notification.follow', defaultMessage: '{name} followed you' }, ownPoll: { id: 'notification.own_poll', defaultMessage: 'Your poll has ended' }, poll: { id: 'notification.poll', defaultMessage: 'A poll you voted in has ended' }, - reblog: { id: 'notification.reblog', defaultMessage: '{name} boosted your status' }, + reblog: { id: 'notification.reblog', defaultMessage: '{name} boosted your post' }, status: { id: 'notification.status', defaultMessage: '{name} just posted' }, listStatus: { id: 'notification.list_status', defaultMessage: '{name} post is added to {listName}' }, statusReference: { id: 'notification.status_reference', defaultMessage: '{name} quoted your post' }, @@ -207,7 +207,7 @@ class Notification extends ImmutablePureComponent { - + @@ -241,7 +241,7 @@ class Notification extends ImmutablePureComponent { - + @@ -272,7 +272,7 @@ class Notification extends ImmutablePureComponent { - + diff --git a/app/javascript/mastodon/features/notifications_v2/components/notification_emoji_reaction.tsx b/app/javascript/mastodon/features/notifications_v2/components/notification_emoji_reaction.tsx index c0f09fd67e..dbc85e6036 100644 --- a/app/javascript/mastodon/features/notifications_v2/components/notification_emoji_reaction.tsx +++ b/app/javascript/mastodon/features/notifications_v2/components/notification_emoji_reaction.tsx @@ -14,7 +14,7 @@ const labelRenderer: LabelRenderer = (displayedName, total, seeMoreHref) => { return ( ); diff --git a/app/javascript/mastodon/features/notifications_v2/components/notification_favourite.tsx b/app/javascript/mastodon/features/notifications_v2/components/notification_favourite.tsx index eba37fe937..49866540e5 100644 --- a/app/javascript/mastodon/features/notifications_v2/components/notification_favourite.tsx +++ b/app/javascript/mastodon/features/notifications_v2/components/notification_favourite.tsx @@ -14,7 +14,7 @@ const labelRenderer: LabelRenderer = (displayedName, total, seeMoreHref) => { return ( ); diff --git a/app/javascript/mastodon/features/notifications_v2/components/notification_reblog.tsx b/app/javascript/mastodon/features/notifications_v2/components/notification_reblog.tsx index 7b3bda85e5..36a798032b 100644 --- a/app/javascript/mastodon/features/notifications_v2/components/notification_reblog.tsx +++ b/app/javascript/mastodon/features/notifications_v2/components/notification_reblog.tsx @@ -14,7 +14,7 @@ const labelRenderer: LabelRenderer = (displayedName, total, seeMoreHref) => { return ( ); From 087ee0adf2691a0449ecb7803a5f0642d56a18a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KMY=EF=BC=88=E9=9B=AA=E3=81=82=E3=81=99=E3=81=8B=EF=BC=89?= Date: Fri, 6 Sep 2024 08:48:45 +0900 Subject: [PATCH 3/3] =?UTF-8?q?Change:=20#831=20=E6=8A=95=E7=A8=BF?= =?UTF-8?q?=E8=A9=B3=E7=B4=B0=E7=94=BB=E9=9D=A2=E3=81=AB=E3=81=8A=E3=81=91?= =?UTF-8?q?=E3=82=8B=E5=BC=95=E7=94=A8=E3=81=AE=E8=A1=A8=E7=A4=BA=20(#834)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mastodon/features/status/components/detailed_status.jsx | 4 ++++ app/javascript/mastodon/features/status/index.jsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/status/components/detailed_status.jsx b/app/javascript/mastodon/features/status/components/detailed_status.jsx index 5ab0b9472f..06d86ef4fc 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.jsx +++ b/app/javascript/mastodon/features/status/components/detailed_status.jsx @@ -25,6 +25,7 @@ import { DisplayName } from '../../../components/display_name'; import MediaGallery from '../../../components/media_gallery'; import StatusContent from '../../../components/status_content'; import StatusEmojiReactionsBar from '../../../components/status_emoji_reactions_bar'; +import CompactedStatusContainer from '../../../containers/compacted_status_container'; import Audio from '../../audio'; import scheduleIdleTask from '../../ui/util/schedule_idle_task'; import Video from '../../video'; @@ -323,6 +324,8 @@ class DetailedStatus extends ImmutablePureComponent { const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status); const expanded = !status.get('hidden') || status.get('spoiler_text').length === 0; + const quote = !this.props.muted && status.get('quote_id') && ; + return (
@@ -349,6 +352,7 @@ class DetailedStatus extends ImmutablePureComponent { {media} {hashtagBar} + {quote} {emojiReactionsBar} )} diff --git a/app/javascript/mastodon/features/status/index.jsx b/app/javascript/mastodon/features/status/index.jsx index 6e190b0e7c..8c43c5c8cf 100644 --- a/app/javascript/mastodon/features/status/index.jsx +++ b/app/javascript/mastodon/features/status/index.jsx @@ -156,7 +156,7 @@ const makeMapStateToProps = () => { if (status) { ancestorsIds = getAncestorsIds(state, { id: status.get('in_reply_to_id') }); descendantsIds = getDescendantsIds(state, { id: status.get('id') }); - referenceIds = getReferenceIds(state, { id: status.get('id') }); + referenceIds = getReferenceIds(state, { id: status.get('id') }).filter((id) => id !== status.get('quote_id')); } return {