From 1a0ef82d1e7d383957f2f6c0a6cd32c4313bafc2 Mon Sep 17 00:00:00 2001 From: Anurag Vasanwala <75766877+AnuragVasanwala@users.noreply.github.com> Date: Wed, 18 Oct 2023 18:23:19 +0530 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Enhance=20`PostPublishDial?= =?UTF-8?q?og`=20wording=20for=20`scheduled`=20and=20`private`=20story?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/postPublishDialog/index.js | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/packages/wp-story-editor/src/components/postPublishDialog/index.js b/packages/wp-story-editor/src/components/postPublishDialog/index.js index c92d96b68e71..be646508c742 100644 --- a/packages/wp-story-editor/src/components/postPublishDialog/index.js +++ b/packages/wp-story-editor/src/components/postPublishDialog/index.js @@ -33,16 +33,18 @@ function PostPublishDialog() { embedPostLink: confirmURL, link: storyURL, isFreshlyPublished, + status, } = useStory( ({ state: { - story: { embedPostLink, link }, + story: { embedPostLink, link, status }, meta: { isFreshlyPublished }, }, }) => ({ embedPostLink, link, isFreshlyPublished, + status, }) ); @@ -61,12 +63,19 @@ function PostPublishDialog() { const primaryText = confirmURL ? __('Add to new post', 'web-stories') : ''; + const dialogTitle = + status === 'private' + ? __('Story published privately.', 'web-stories') + : status === 'future' + ? __('Story scheduled.', 'web-stories') + : __('Story published.', 'web-stories'); + return ( - {__( - 'Your story has been successfully published! View story.', - 'web-stories' - )} + {status === 'future' + ? __( + 'Your story has been successfully scheduled! View story.', + 'web-stories' + ) + : __( + 'Your story has been successfully published! View story.', + 'web-stories' + )} {confirmURL && (