From 72f9f8326c33819b33ad9d4e19a94753b7a385d5 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Tue, 21 Jun 2022 08:42:17 +0300 Subject: [PATCH] address feedback --- .../add-new-template/add-custom-template-modal.js | 6 +++++- .../src/components/add-new-template/new-template.js | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/edit-site/src/components/add-new-template/add-custom-template-modal.js b/packages/edit-site/src/components/add-new-template/add-custom-template-modal.js index 0a313472efee1..3c5980eb8088a 100644 --- a/packages/edit-site/src/components/add-new-template/add-custom-template-modal.js +++ b/packages/edit-site/src/components/add-new-template/add-custom-template-modal.js @@ -55,7 +55,11 @@ function SuggestionListItem( { ); onSelect( { title, - description: `Template for ${ title }`, + description: sprintf( + // translators: Represents the description of a user's custom template in the Site Editor, e.g. "Template for Post: Hello, WordPress" + __( 'Template for %1$s' ), + title + ), slug: `single-${ entityForSuggestions.slug }-${ suggestion.slug }`, } ); } } diff --git a/packages/edit-site/src/components/add-new-template/new-template.js b/packages/edit-site/src/components/add-new-template/new-template.js index 6f87f48aaa774..f8b2f9ec26d31 100644 --- a/packages/edit-site/src/components/add-new-template/new-template.js +++ b/packages/edit-site/src/components/add-new-template/new-template.js @@ -199,7 +199,6 @@ export default function NewTemplate( { postType } ) { return null; } // Update the sort order to match the DEFAULT_TEMPLATE_SLUGS order. - // TODO: check sorting with new items. missingTemplates?.sort( ( template1, template2 ) => { return ( DEFAULT_TEMPLATE_SLUGS.indexOf( template1.slug ) -