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

Site Editor: Fix the typo in the title label map #53071

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Changes from all commits
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
5 changes: 2 additions & 3 deletions packages/edit-site/src/components/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const interfaceLabels = {
};

const typeLabels = {
wp_template: __( 'Template Part' ),
wp_template: __( 'Template' ),
wp_template_part: __( 'Template Part' ),
wp_block: __( 'Pattern' ),
};
Expand Down Expand Up @@ -165,12 +165,11 @@ export default function Editor( { isLoading } ) {

let title;
if ( hasLoadedPost ) {
const type = typeLabels[ editedPostType ] ?? __( 'Template' );
title = sprintf(
// translators: A breadcrumb trail in browser tab. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).
__( '%1$s ‹ %2$s ‹ Editor' ),
getTitle(),
type
typeLabels[ editedPostType ] ?? typeLabels.wp_template
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change; I hope it's okay to include it here. I just simplified things a bit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have any issues with the change. It could be a personal preference for readability but simple is good.

);
}

Expand Down
Loading