From 71641766f2ca6555fe19b309e9bd9f2455575bcc Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 25 Aug 2023 22:03:04 +0200 Subject: [PATCH] Fix toast saying "published" instead of "saved" after editing post in web UI (#26664) --- app/javascript/mastodon/actions/compose.js | 3 ++- app/javascript/mastodon/locales/en.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/actions/compose.js b/app/javascript/mastodon/actions/compose.js index 260fb43f08..6abfd6157e 100644 --- a/app/javascript/mastodon/actions/compose.js +++ b/app/javascript/mastodon/actions/compose.js @@ -84,6 +84,7 @@ const messages = defineMessages({ uploadErrorPoll: { id: 'upload_error.poll', defaultMessage: 'File upload not allowed with polls.' }, open: { id: 'compose.published.open', defaultMessage: 'Open' }, published: { id: 'compose.published.body', defaultMessage: 'Post published.' }, + saved: { id: 'compose.saved.body', defaultMessage: 'Post saved.' }, }); export const ensureComposeIsVisible = (getState, routerHistory) => { @@ -244,7 +245,7 @@ export function submitCompose(routerHistory) { } dispatch(showAlert({ - message: messages.published, + message: statusId === null ? messages.published : messages.saved, action: messages.open, dismissAfter: 10000, onClick: () => routerHistory.push(`/@${response.data.account.username}/${response.data.id}`), diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index d4cd8c7945..5eeaf8044b 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -137,6 +137,7 @@ "compose.language.search": "Search languages...", "compose.published.body": "Post published.", "compose.published.open": "Open", + "compose.saved.body": "Post saved.", "compose_form.direct_message_warning_learn_more": "Learn more", "compose_form.encryption_warning": "Posts on Mastodon are not end-to-end encrypted. Do not share any sensitive information over Mastodon.", "compose_form.hashtag_warning": "This post won't be listed under any hashtag as it is not public. Only public posts can be searched by hashtag.",