Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make command palette string transatables #59133

Merged
merged 4 commits into from
Feb 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions packages/edit-site/src/hooks/commands/use-edit-mode-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ function usePageContentFocusCommands() {
if ( currentPostType !== 'wp_template' ) {
commands.push( {
name: 'core/switch-to-template-focus',
/* translators: %1$s: template title */
label: sprintf(
'Edit template: %s',
/* translators: %1$s: template title */
__( 'Edit template: %s' ),
decodeEntities( template.title )
),
icon: layout,
Expand Down Expand Up @@ -119,14 +119,16 @@ function useManipulateDocumentCommands() {
if ( isTemplateRevertable( template ) && ! isEditingPage ) {
const label =
template.type === TEMPLATE_POST_TYPE
? /* translators: %1$s: template title */
?
sprintf(
'Reset template: %s',
/* translators: %1$s: template title */
__( 'Reset template: %s' ),
MarieComet marked this conversation as resolved.
Show resolved Hide resolved
decodeEntities( template.title )
)
: /* translators: %1$s: template part title */
:
sprintf(
'Reset template part: %s',
/* translators: %1$s: template part title */
__( 'Reset template part: %s' ),
MarieComet marked this conversation as resolved.
Show resolved Hide resolved
decodeEntities( template.title )
);
commands.push( {
Expand All @@ -143,14 +145,16 @@ function useManipulateDocumentCommands() {
if ( isTemplateRemovable( template ) && ! isEditingPage ) {
const label =
template.type === TEMPLATE_POST_TYPE
? /* translators: %1$s: template title */
?
sprintf(
'Delete template: %s',
/* translators: %1$s: template title */
__( 'Delete template: %s' ),
MarieComet marked this conversation as resolved.
Show resolved Hide resolved
decodeEntities( template.title )
)
: /* translators: %1$s: template part title */
:
sprintf(
'Delete template part: %s',
/* translators: %1$s: template part title */
__( 'Delete template part: %s' ),
MarieComet marked this conversation as resolved.
Show resolved Hide resolved
decodeEntities( template.title )
);
const path =
Expand Down
Loading