-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Add missing localization to the templates sidebar #25897
Conversation
Size Change: +59 B (0%) Total Size: 1.18 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for spinning this up and thinking about _x
!
title: 'Default (Page)', | ||
description: 'Displays the content of a single page', | ||
title: __( 'Page' ), | ||
description: __( 'Single page template' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: __( 'Single page template' ), | |
description: __( 'Single-page template' ), |
Normally it's a stylistic nit pick (as not all styles in English follow this usage of hyphens), but in the context of i18n I believe this will help make the string less ambiguous for translators and therefore less likely to need _x
or // translators
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense 🤔
I do have a slight personal preference for the non-hyphenated version, though.
How about "Template for single pages/posts"?
It would also be consistent with the singular
description ("Default template for both single posts and pages").
(Also, I'm going to update the titles of page
and single
to "Single Page" and "Single Post", which was my intention already, but it slipped through the commit)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about "Template for single pages/posts"?
No strong opinion, that works too. :) Though I'd drop the slash and go with
description: __( 'Single page template' ), | |
description: __( 'Template for single pages and posts' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, sorry, I meant two separate strings: "Template for single pages" and "Template for single posts". 🙂
packages/edit-site/src/components/left-sidebar/navigation-panel/constants.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! 🙇 🚀 LGTM
Description
When approving #25739 I've completely failed to check for i18n.
Here I've localized all strings contained in the Site Editor's template sidebar, adding contexts where I felt it was needed.
I've also reworded the default templates (and reordered them, and removed a couple that aren't really default) names and description to match the Template Hierarchy docs as closely as possible.
Hopefully I haven't missed anything!
How has this been tested?
In the Site Editor.
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: