From 840e08f84c766f6d835eb4592f755afa27072aa4 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Tue, 26 Nov 2019 16:14:40 +0000 Subject: [PATCH 01/11] Expanding on sentance case to everywhere else So far we have only done this in the tooltips and in menus. If sentance case of right approach we should consider taking this across all areas. Included in this: - Side panel - Block library - Settings There may be areas missed, but gives a starting view to see if everyone agrees to go forward with this across everything. If we do, then we need a patch for core. Expands on #16764 --- docs/designers-developers/developers/slotfills/README.md | 6 +++--- .../developers/slotfills/plugin-post-status-info.md | 4 ++-- packages/block-editor/src/components/inserter/menu.js | 6 +++--- .../block-editor/src/components/inserter/test/menu.js | 2 +- packages/block-library/src/navigation-link/edit.js | 2 +- packages/blocks/src/store/reducer.js | 6 +++--- packages/e2e-tests/specs/editor/various/sidebar.test.js | 8 ++++---- packages/edit-post/README.md | 2 +- .../src/components/header/mode-switcher/index.js | 4 ++-- .../edit-post/src/components/header/writing-menu/index.js | 6 +++--- .../src/components/keyboard-shortcut-help-modal/config.js | 2 +- .../src/components/keyboard-shortcut-help-modal/index.js | 2 +- .../test/__snapshots__/index.js.snap | 2 +- .../edit-post/src/components/manage-blocks-modal/index.js | 2 +- .../components/sidebar/plugin-post-status-info/index.js | 4 ++-- .../edit-post/src/components/sidebar/post-status/index.js | 2 +- .../edit-post/src/plugins/copy-content-menu-item/index.js | 2 +- packages/edit-post/src/plugins/index.js | 2 +- .../plugins/keyboard-shortcuts-help-menu-item/index.js | 2 +- .../src/plugins/manage-blocks-menu-item/index.js | 2 +- packages/editor/src/components/post-comments/index.js | 2 +- packages/editor/src/components/post-pingbacks/index.js | 2 +- .../src/components/post-switch-to-draft-button/index.js | 2 +- packages/editor/src/components/post-trash/index.js | 2 +- 24 files changed, 38 insertions(+), 38 deletions(-) diff --git a/docs/designers-developers/developers/slotfills/README.md b/docs/designers-developers/developers/slotfills/README.md index 4ae945f3c4125b..1fde71f171f99b 100644 --- a/docs/designers-developers/developers/slotfills/README.md +++ b/docs/designers-developers/developers/slotfills/README.md @@ -41,7 +41,7 @@ SlotFills are created using `createSlotFill`. This creates two components, `Slot ```js /** - * Defines as extensibility slot for the Status & Visibility panel. + * Defines as extensibility slot for the Status & visibility panel. */ /** @@ -65,7 +65,7 @@ export default PluginPostStatusInfo; ``` -This new Slot is then exposed in the editor. The example below is from core and represents the Status & Visibility panel. +This new Slot is then exposed in the editor. The example below is from core and represents the Status & visibility panel. As we can see, the `` is wrapping all of the items that will appear in the panel. Any items that have been added via the SlotFill ( see the example above ), will be included in the `fills` parameter and be displayed between the `` and `` components. @@ -75,7 +75,7 @@ See [core code](https://github.com/WordPress/gutenberg/tree/master/packages/edit ```js function PostStatus( { isOpened, onTogglePanel } ) { return ( - + { ( fills ) => ( diff --git a/docs/designers-developers/developers/slotfills/plugin-post-status-info.md b/docs/designers-developers/developers/slotfills/plugin-post-status-info.md index 4e0ad584872b03..745fe64c62b9ee 100644 --- a/docs/designers-developers/developers/slotfills/plugin-post-status-info.md +++ b/docs/designers-developers/developers/slotfills/plugin-post-status-info.md @@ -1,6 +1,6 @@ # PluginPostStatusInfo -This slots allows for the insertion of items in the Status & Visibility panel of the document sidebar. +This slots allows for the insertion of items in the Status & visibility panel of the document sidebar. ## Example @@ -22,5 +22,5 @@ registerPlugin( 'post-status-info-test', { render: PluginPostStatusInfoTest } ); ## Location -![Location in the Status & Visibility panel](https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/assets/plugin-post-status-info-location.png?raw=true) +![Location in the Status & visibility panel](https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/assets/plugin-post-status-info-location.png?raw=true) diff --git a/packages/block-editor/src/components/inserter/menu.js b/packages/block-editor/src/components/inserter/menu.js index e2cc6b968bb099..9b185a2bf5e2ba 100644 --- a/packages/block-editor/src/components/inserter/menu.js +++ b/packages/block-editor/src/components/inserter/menu.js @@ -320,7 +320,7 @@ export class InserterMenu extends Component { { !! suggestedItems.length && - { __( 'Manage All Reusable Blocks' ) } + { __( 'Manage all reusable blocks' ) } ) } @@ -421,7 +421,7 @@ export class InserterMenu extends Component { { ! hoveredItem && (
-
{ __( 'Content Blocks' ) }
+
{ __( 'Content blocks' ) }

{ __( 'Welcome to the wonderful world of blocks! Blocks are the basis of all content within the editor.' diff --git a/packages/block-editor/src/components/inserter/test/menu.js b/packages/block-editor/src/components/inserter/test/menu.js index ef9d2b10214a98..712af2ba005b13 100644 --- a/packages/block-editor/src/components/inserter/test/menu.js +++ b/packages/block-editor/src/components/inserter/test/menu.js @@ -163,7 +163,7 @@ describe( 'InserterMenu', () => { const activeCategory = element.querySelector( '.components-panel__body.is-opened > .components-panel__body-title' ); - expect( activeCategory.textContent ).toBe( 'Most Used' ); + expect( activeCategory.textContent ).toBe( 'Most used' ); } ); it( 'should show nothing if there are no items', () => { diff --git a/packages/block-library/src/navigation-link/edit.js b/packages/block-library/src/navigation-link/edit.js index eb673de0292d46..8bf587d0dc6900 100644 --- a/packages/block-library/src/navigation-link/edit.js +++ b/packages/block-library/src/navigation-link/edit.js @@ -153,7 +153,7 @@ function NavigationLinkEdit( { } - title={ __( 'Add Submenu' ) } + title={ __( 'Add submenu' ) } onClick={ insertLinkBlock } /> diff --git a/packages/blocks/src/store/reducer.js b/packages/blocks/src/store/reducer.js index ad947696a5f1c9..a84cdc75780308 100644 --- a/packages/blocks/src/store/reducer.js +++ b/packages/blocks/src/store/reducer.js @@ -23,12 +23,12 @@ import { __ } from '@wordpress/i18n'; * Module Constants */ export const DEFAULT_CATEGORIES = [ - { slug: 'common', title: __( 'Common Blocks' ) }, + { slug: 'common', title: __( 'Common blocks' ) }, { slug: 'formatting', title: __( 'Formatting' ) }, - { slug: 'layout', title: __( 'Layout Elements' ) }, + { slug: 'layout', title: __( 'Layout elements' ) }, { slug: 'widgets', title: __( 'Widgets' ) }, { slug: 'embed', title: __( 'Embeds' ) }, - { slug: 'reusable', title: __( 'Reusable Blocks' ) }, + { slug: 'reusable', title: __( 'Reusable blocks' ) }, ]; /** diff --git a/packages/e2e-tests/specs/editor/various/sidebar.test.js b/packages/e2e-tests/specs/editor/various/sidebar.test.js index d0768f916f0f63..84235016e28ef3 100644 --- a/packages/e2e-tests/specs/editor/various/sidebar.test.js +++ b/packages/e2e-tests/specs/editor/various/sidebar.test.js @@ -117,10 +117,10 @@ describe( 'Sidebar', () => { expect( await findSidebarPanelWithTitle( 'Categories' ) ).toBeDefined(); expect( await findSidebarPanelWithTitle( 'Tags' ) ).toBeDefined(); - expect( await findSidebarPanelWithTitle( 'Featured Image' ) ).toBeDefined(); + expect( await findSidebarPanelWithTitle( 'Featured image' ) ).toBeDefined(); expect( await findSidebarPanelWithTitle( 'Excerpt' ) ).toBeDefined(); expect( await findSidebarPanelWithTitle( 'Discussion' ) ).toBeDefined(); - expect( await findSidebarPanelWithTitle( 'Status & Visibility' ) ).toBeDefined(); + expect( await findSidebarPanelWithTitle( 'Status & visibility' ) ).toBeDefined(); await page.evaluate( () => { const { removeEditorPanel } = wp.data.dispatch( 'core/edit-post' ); @@ -135,9 +135,9 @@ describe( 'Sidebar', () => { expect( await findSidebarPanelWithTitle( 'Categories' ) ).toBeUndefined(); expect( await findSidebarPanelWithTitle( 'Tags' ) ).toBeUndefined(); - expect( await findSidebarPanelWithTitle( 'Featured Image' ) ).toBeUndefined(); + expect( await findSidebarPanelWithTitle( 'Featured image' ) ).toBeUndefined(); expect( await findSidebarPanelWithTitle( 'Excerpt' ) ).toBeUndefined(); expect( await findSidebarPanelWithTitle( 'Discussion' ) ).toBeUndefined(); - expect( await findSidebarPanelWithTitle( 'Status & Visibility' ) ).toBeUndefined(); + expect( await findSidebarPanelWithTitle( 'Status & visibility' ) ).toBeUndefined(); } ); } ); diff --git a/packages/edit-post/README.md b/packages/edit-post/README.md index 0a9441a55b101f..070d4e743da467 100644 --- a/packages/edit-post/README.md +++ b/packages/edit-post/README.md @@ -269,7 +269,7 @@ _Returns_ # **PluginPostStatusInfo** -Renders a row in the Status & Visibility panel of the Document sidebar. +Renders a row in the Status & visibility panel of the Document sidebar. It should be noted that this is named and implemented around the function it serves and not its location, which may change in future iterations. diff --git a/packages/edit-post/src/components/header/mode-switcher/index.js b/packages/edit-post/src/components/header/mode-switcher/index.js index 4cfbca192e65be..1e970dc6941681 100644 --- a/packages/edit-post/src/components/header/mode-switcher/index.js +++ b/packages/edit-post/src/components/header/mode-switcher/index.js @@ -18,11 +18,11 @@ import shortcuts from '../../../keyboard-shortcuts'; const MODES = [ { value: 'visual', - label: __( 'Visual Editor' ), + label: __( 'Visual editor' ), }, { value: 'text', - label: __( 'Code Editor' ), + label: __( 'Code editor' ), }, ]; diff --git a/packages/edit-post/src/components/header/writing-menu/index.js b/packages/edit-post/src/components/header/writing-menu/index.js index 0484e32c28cd6e..ead786ad265346 100644 --- a/packages/edit-post/src/components/header/writing-menu/index.js +++ b/packages/edit-post/src/components/header/writing-menu/index.js @@ -17,21 +17,21 @@ function WritingMenu() { > diff --git a/packages/edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap b/packages/edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap index 63bb5751a130a3..5e6ed4e2690d9a 100644 --- a/packages/edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +++ b/packages/edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap @@ -14,7 +14,7 @@ exports[`KeyboardShortcutHelpModal should match snapshot when the modal is activ className="edit-post-keyboard-shortcut-help" closeLabel="Close" onRequestClose={[Function]} - title="Keyboard Shortcuts" + title="Keyboard shortcuts" > diff --git a/packages/edit-post/src/components/sidebar/plugin-post-status-info/index.js b/packages/edit-post/src/components/sidebar/plugin-post-status-info/index.js index 2d149639130eda..efff9ba774d9ed 100644 --- a/packages/edit-post/src/components/sidebar/plugin-post-status-info/index.js +++ b/packages/edit-post/src/components/sidebar/plugin-post-status-info/index.js @@ -1,5 +1,5 @@ /** - * Defines as extensibility slot for the Status & Visibility panel. + * Defines as extensibility slot for the Status & visibility panel. */ /** @@ -10,7 +10,7 @@ import { createSlotFill, PanelRow } from '@wordpress/components'; export const { Fill, Slot } = createSlotFill( 'PluginPostStatusInfo' ); /** - * Renders a row in the Status & Visibility panel of the Document sidebar. + * Renders a row in the Status & visibility panel of the Document sidebar. * It should be noted that this is named and implemented around the function it serves * and not its location, which may change in future iterations. * diff --git a/packages/edit-post/src/components/sidebar/post-status/index.js b/packages/edit-post/src/components/sidebar/post-status/index.js index b9d50676f7141a..7e6509096b5412 100644 --- a/packages/edit-post/src/components/sidebar/post-status/index.js +++ b/packages/edit-post/src/components/sidebar/post-status/index.js @@ -26,7 +26,7 @@ const PANEL_NAME = 'post-status'; function PostStatus( { isOpened, onTogglePanel } ) { return ( - + { ( fills ) => ( <> diff --git a/packages/edit-post/src/plugins/copy-content-menu-item/index.js b/packages/edit-post/src/plugins/copy-content-menu-item/index.js index 8b1fe930608fc9..65e97a05bcfd05 100644 --- a/packages/edit-post/src/plugins/copy-content-menu-item/index.js +++ b/packages/edit-post/src/plugins/copy-content-menu-item/index.js @@ -28,7 +28,7 @@ function CopyContentMenuItem( { createNotice, editedPostContent, hasCopied, setS > { hasCopied ? __( 'Copied!' ) : - __( 'Copy All Content' ) } + __( 'Copy all content' ) } ) ); diff --git a/packages/edit-post/src/plugins/index.js b/packages/edit-post/src/plugins/index.js index bae6f081189ee6..2ef0d67d489e9a 100644 --- a/packages/edit-post/src/plugins/index.js +++ b/packages/edit-post/src/plugins/index.js @@ -26,7 +26,7 @@ registerPlugin( 'edit-post', { role="menuitem" href={ addQueryArgs( 'edit.php', { post_type: 'wp_block' } ) } > - { __( 'Manage All Reusable Blocks' ) } + { __( 'Manage all reusable blocks' ) } diff --git a/packages/edit-post/src/plugins/keyboard-shortcuts-help-menu-item/index.js b/packages/edit-post/src/plugins/keyboard-shortcuts-help-menu-item/index.js index e066626567252b..49e947b9c7ea49 100644 --- a/packages/edit-post/src/plugins/keyboard-shortcuts-help-menu-item/index.js +++ b/packages/edit-post/src/plugins/keyboard-shortcuts-help-menu-item/index.js @@ -14,7 +14,7 @@ export function KeyboardShortcutsHelpMenuItem( { openModal } ) { } } shortcut={ displayShortcut.access( 'h' ) } > - { __( 'Keyboard Shortcuts' ) } + { __( 'Keyboard shortcuts' ) } ); } diff --git a/packages/edit-post/src/plugins/manage-blocks-menu-item/index.js b/packages/edit-post/src/plugins/manage-blocks-menu-item/index.js index fff70dd41a8dac..3171032d3ccda4 100644 --- a/packages/edit-post/src/plugins/manage-blocks-menu-item/index.js +++ b/packages/edit-post/src/plugins/manage-blocks-menu-item/index.js @@ -12,7 +12,7 @@ export function ManageBlocksMenuItem( { openModal } ) { openModal( 'edit-post/manage-blocks' ); } } > - { __( 'Block Manager' ) } + { __( 'Block manager' ) } ); } diff --git a/packages/editor/src/components/post-comments/index.js b/packages/editor/src/components/post-comments/index.js index 9cbae279d2bbcf..f4c412b616d594 100644 --- a/packages/editor/src/components/post-comments/index.js +++ b/packages/editor/src/components/post-comments/index.js @@ -11,7 +11,7 @@ function PostComments( { commentStatus = 'open', ...props } ) { return ( diff --git a/packages/editor/src/components/post-pingbacks/index.js b/packages/editor/src/components/post-pingbacks/index.js index b037b5a868b26a..f18a0368214cb1 100644 --- a/packages/editor/src/components/post-pingbacks/index.js +++ b/packages/editor/src/components/post-pingbacks/index.js @@ -11,7 +11,7 @@ function PostPingbacks( { pingStatus = 'open', ...props } ) { return ( diff --git a/packages/editor/src/components/post-switch-to-draft-button/index.js b/packages/editor/src/components/post-switch-to-draft-button/index.js index 07270c4ed33a26..835cfea455e711 100644 --- a/packages/editor/src/components/post-switch-to-draft-button/index.js +++ b/packages/editor/src/components/post-switch-to-draft-button/index.js @@ -38,7 +38,7 @@ function PostSwitchToDraftButton( { disabled={ isSaving } isTertiary > - { isMobileViewport ? __( 'Draft' ) : __( 'Switch to Draft' ) } + { isMobileViewport ? __( 'Draft' ) : __( 'Switch to draft' ) } ); } diff --git a/packages/editor/src/components/post-trash/index.js b/packages/editor/src/components/post-trash/index.js index 9c2a167faa22fb..119afd59d3a0d6 100644 --- a/packages/editor/src/components/post-trash/index.js +++ b/packages/editor/src/components/post-trash/index.js @@ -15,7 +15,7 @@ function PostTrash( { isNew, postId, postType, ...props } ) { return ( ); } From cb7bd222658e09af2a59ab7c0ced12111fab3acf Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Tue, 26 Nov 2019 16:18:24 +0000 Subject: [PATCH 02/11] Catch a few missed --- .../components/options-modal/test/__snapshots__/index.js.snap | 2 +- .../edit-post/src/components/sidebar/featured-image/index.js | 2 +- .../editor/src/components/post-taxonomies/flat-term-selector.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/edit-post/src/components/options-modal/test/__snapshots__/index.js.snap b/packages/edit-post/src/components/options-modal/test/__snapshots__/index.js.snap index 401d2d952dbab3..8f894e7c90fdb1 100644 --- a/packages/edit-post/src/components/options-modal/test/__snapshots__/index.js.snap +++ b/packages/edit-post/src/components/options-modal/test/__snapshots__/index.js.snap @@ -29,7 +29,7 @@ exports[`OptionsModal should match snapshot when the modal is active 1`] = ` /> diff --git a/packages/edit-post/src/components/sidebar/featured-image/index.js b/packages/edit-post/src/components/sidebar/featured-image/index.js index 982ece4fbb3823..e6ff45262c1610 100644 --- a/packages/edit-post/src/components/sidebar/featured-image/index.js +++ b/packages/edit-post/src/components/sidebar/featured-image/index.js @@ -28,7 +28,7 @@ function FeaturedImage( { isEnabled, isOpened, postType, onTogglePanel } ) { title={ get( postType, [ 'labels', 'featured_image' ], - __( 'Featured Image' ) + __( 'Featured image' ) ) } opened={ isOpened } onToggle={ onTogglePanel } diff --git a/packages/editor/src/components/post-taxonomies/flat-term-selector.js b/packages/editor/src/components/post-taxonomies/flat-term-selector.js index 06db56eef101f5..998bb8fa6946fc 100644 --- a/packages/editor/src/components/post-taxonomies/flat-term-selector.js +++ b/packages/editor/src/components/post-taxonomies/flat-term-selector.js @@ -212,7 +212,7 @@ class FlatTermSelector extends Component { const newTermLabel = get( taxonomy, [ 'labels', 'add_new_item' ], - slug === 'post_tag' ? __( 'Add New Tag' ) : __( 'Add New Term' ) + slug === 'post_tag' ? __( 'Add New tag' ) : __( 'Add New Term' ) ); const singularName = get( taxonomy, From 686a068ff395d4e79a857e6667c72ec014b3edf0 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Tue, 26 Nov 2019 16:20:40 +0000 Subject: [PATCH 03/11] Update tag --- .../editor/src/components/post-taxonomies/flat-term-selector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/components/post-taxonomies/flat-term-selector.js b/packages/editor/src/components/post-taxonomies/flat-term-selector.js index 998bb8fa6946fc..da6b0782966d4b 100644 --- a/packages/editor/src/components/post-taxonomies/flat-term-selector.js +++ b/packages/editor/src/components/post-taxonomies/flat-term-selector.js @@ -212,7 +212,7 @@ class FlatTermSelector extends Component { const newTermLabel = get( taxonomy, [ 'labels', 'add_new_item' ], - slug === 'post_tag' ? __( 'Add New tag' ) : __( 'Add New Term' ) + slug === 'post_tag' ? __( 'Add new tag' ) : __( 'Add new Term' ) ); const singularName = get( taxonomy, From b90fc3c998d7090f2bba9085c4ba618b4ae2eec9 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Tue, 10 Dec 2019 11:33:32 +0000 Subject: [PATCH 04/11] Test catches Fixes test issues. --- docs/contributors/scripts.md | 2 +- .../developers/backward-compatibility/deprecations.md | 2 +- docs/designers-developers/key-concepts.md | 6 +++--- .../block-editor/src/components/block-list/style.scss | 2 +- .../block-editor/src/components/inserter/test/menu.js | 8 ++++---- packages/block-library/src/classic/index.js | 2 +- .../various/__snapshots__/reusable-blocks.test.js.snap | 2 +- .../specs/editor/various/reusable-blocks.test.js | 10 +++++----- packages/editor/CHANGELOG.md | 2 +- .../reusable-block-convert-button.js | 10 +++++----- .../reusable-block-delete-button.js | 2 +- .../__snapshots__/reusable-block-delete-button.js.snap | 2 +- .../test/reusable-block-convert-button.js | 2 +- packages/editor/src/store/effects/reusable-blocks.js | 6 +++--- packages/list-reusable-blocks/README.md | 2 +- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/docs/contributors/scripts.md b/docs/contributors/scripts.md index 28a768e41599ca..a58e18ca24df23 100644 --- a/docs/contributors/scripts.md +++ b/docs/contributors/scripts.md @@ -30,7 +30,7 @@ The editor includes a number of packages to enable various pieces of functionali | [I18N](/packages/i18n/README.md) | wp-i18n | Internationalization utilities for client-side localization | | [Is Shallow Equal](/packages/is-shallow-equal/README.md) | wp-is-shallow-equal | A function for performing a shallow comparison between two objects or arrays | | [Keycodes](/packages/keycodes/README.md) | wp-keycodes | Keycodes utilities for WordPress, used to check the key pressed in events like `onKeyDown` | -| [List Reusable Blocks](/packages/list-reusable-blocks/README.md) | wp-list-reusable-blocks | Package used to add import/export links to the listing page of the reusable blocks | +| [List Reusable blocks](/packages/list-reusable-blocks/README.md) | wp-list-reusable-blocks | Package used to add import/export links to the listing page of the reusable blocks | | [NUX](/packages/nux/README.md) | wp-nux | Components, and wp.data methods useful for onboarding a new user to the WordPress admin interface | | [Plugins](/packages/plugins/README.md) | wp-plugins | Plugins module for WordPress | | [Redux Routine](/packages/redux-routine/README.md) | wp-redux-routine | Redux middleware for generator coroutines | diff --git a/docs/designers-developers/developers/backward-compatibility/deprecations.md b/docs/designers-developers/developers/backward-compatibility/deprecations.md index 9421833ba0290e..cf721c44875c6c 100644 --- a/docs/designers-developers/developers/backward-compatibility/deprecations.md +++ b/docs/designers-developers/developers/backward-compatibility/deprecations.md @@ -124,7 +124,7 @@ For features included in the Gutenberg plugin, the deprecation policy is intende - `wp.components.CodeEditor` has been removed. Used `wp.codeEditor` directly instead. - `wp.blocks.setUnknownTypeHandlerName` has been removed. Please use `setFreeformContentHandlerName` and `setUnregisteredTypeHandlerName` instead. - `wp.blocks.getUnknownTypeHandlerName` has been removed. Please use `getFreeformContentHandlerName` and `getUnregisteredTypeHandlerName` instead. -- The Reusable Blocks Data API was marked as experimental as it's subject to change in the future. +- The Reusable blocks Data API was marked as experimental as it's subject to change in the future. ## 4.1.0 diff --git a/docs/designers-developers/key-concepts.md b/docs/designers-developers/key-concepts.md index f7cce56235d17c..4bb2234db6fe79 100644 --- a/docs/designers-developers/key-concepts.md +++ b/docs/designers-developers/key-concepts.md @@ -38,13 +38,13 @@ Blocks can be limited or locked-in-place by Templates and custom code. In the Block Inserter (the accordion-sorted, popup modal that shows a site's available blocks to users) each accordion title is a Block Category, which are either the defaults or customized by developers through Plugins or code. -## Reusable Blocks +## Reusable blocks -Reusable Blocks are a way to share a block (or multiple blocks) as a reusable, repeatable piece of content. +Reusable blocks are a way to share a block (or multiple blocks) as a reusable, repeatable piece of content. Any edits to a reusable block are made to every usage of that repeatable block. -Reusable Blocks are stored as a hidden post type and are dynamic blocks that "ref" or reference the post_id and return the post_content for that wp_block. +Reusable blocks are stored as a hidden post type and are dynamic blocks that "ref" or reference the post_id and return the post_content for that wp_block. ## Templates diff --git a/packages/block-editor/src/components/block-list/style.scss b/packages/block-editor/src/components/block-list/style.scss index e40b7676be37c1..dbf605d378f4ab 100644 --- a/packages/block-editor/src/components/block-list/style.scss +++ b/packages/block-editor/src/components/block-list/style.scss @@ -376,7 +376,7 @@ } } - // Reusable Blocks clickthrough overlays. + // Reusable blocks clickthrough overlays. &.is-reusable > .block-editor-block-list__block-edit .block-editor-inner-blocks.has-overlay { // Remove only the top click overlay. &::after { diff --git a/packages/block-editor/src/components/inserter/test/menu.js b/packages/block-editor/src/components/inserter/test/menu.js index 712af2ba005b13..9a08a458b32199 100644 --- a/packages/block-editor/src/components/inserter/test/menu.js +++ b/packages/block-editor/src/components/inserter/test/menu.js @@ -239,7 +239,7 @@ describe( 'InserterMenu', () => { it( 'should show the common category blocks', () => { const element = initializeAllClosedMenuStateAndReturnElement(); - const commonBlocksTab = getTabButtonWithContent( element, 'Common Blocks' ); + const commonBlocksTab = getTabButtonWithContent( element, 'Common blocks' ); TestUtils.Simulate.click( commonBlocksTab ); @@ -259,7 +259,7 @@ describe( 'InserterMenu', () => { it( 'should disable items with `isDisabled`', () => { const element = initializeMenuDefaultStateAndReturnElement(); - const layoutTab = getTabButtonWithContent( element, 'Layout Elements' ); + const layoutTab = getTabButtonWithContent( element, 'Layout elements' ); TestUtils.Simulate.click( layoutTab ); @@ -282,7 +282,7 @@ describe( 'InserterMenu', () => { ); expect( matchingCategories ).toHaveLength( 2 ); - expect( matchingCategories[ 0 ].textContent ).toBe( 'Common Blocks' ); + expect( matchingCategories[ 0 ].textContent ).toBe( 'Common blocks' ); expect( matchingCategories[ 1 ].textContent ).toBe( 'Embeds' ); const visibleBlocks = element.querySelectorAll( @@ -308,7 +308,7 @@ describe( 'InserterMenu', () => { ); expect( matchingCategories ).toHaveLength( 2 ); - expect( matchingCategories[ 0 ].textContent ).toBe( 'Common Blocks' ); + expect( matchingCategories[ 0 ].textContent ).toBe( 'Common blocks' ); expect( matchingCategories[ 1 ].textContent ).toBe( 'Embeds' ); const visibleBlocks = element.querySelectorAll( diff --git a/packages/block-library/src/classic/index.js b/packages/block-library/src/classic/index.js index 63cdf7713c3092..dc1f63a01e8b0e 100644 --- a/packages/block-library/src/classic/index.js +++ b/packages/block-library/src/classic/index.js @@ -22,7 +22,7 @@ export const settings = { supports: { className: false, customClassName: false, - // Hide 'Add to Reusable Blocks' on Classic blocks. Showing it causes a + // Hide 'Add to Reusable blocks' on Classic blocks. Showing it causes a // confusing UX, because of its similarity to the 'Convert to Blocks' button. reusable: false, }, diff --git a/packages/e2e-tests/specs/editor/various/__snapshots__/reusable-blocks.test.js.snap b/packages/e2e-tests/specs/editor/various/__snapshots__/reusable-blocks.test.js.snap index fb2a458cef30ed..a266c0df25c180 100644 --- a/packages/e2e-tests/specs/editor/various/__snapshots__/reusable-blocks.test.js.snap +++ b/packages/e2e-tests/specs/editor/various/__snapshots__/reusable-blocks.test.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Reusable Blocks multi-selection reusable block can be converted back to regular blocks 1`] = ` +exports[`Reusable blocks multi-selection reusable block can be converted back to regular blocks 1`] = ` "

Hello there!

diff --git a/packages/e2e-tests/specs/editor/various/reusable-blocks.test.js b/packages/e2e-tests/specs/editor/various/reusable-blocks.test.js index cfcd565254f2e3..690244edf4f3d7 100644 --- a/packages/e2e-tests/specs/editor/various/reusable-blocks.test.js +++ b/packages/e2e-tests/specs/editor/various/reusable-blocks.test.js @@ -16,7 +16,7 @@ function waitForAndAcceptDialog() { } ); } -describe( 'Reusable Blocks', () => { +describe( 'Reusable blocks', () => { beforeAll( async () => { await createNewPost(); } ); @@ -37,7 +37,7 @@ describe( 'Reusable Blocks', () => { await clickBlockToolbarButton( 'More options' ); - const convertButton = await page.waitForXPath( '//button[text()="Add to Reusable Blocks"]' ); + const convertButton = await page.waitForXPath( '//button[text()="Add to Reusable blocks"]' ); await convertButton.click(); // Wait for creation to finish @@ -77,7 +77,7 @@ describe( 'Reusable Blocks', () => { await clickBlockToolbarButton( 'More options' ); - const convertButton = await page.waitForXPath( '//button[text()="Add to Reusable Blocks"]' ); + const convertButton = await page.waitForXPath( '//button[text()="Add to Reusable blocks"]' ); await convertButton.click(); // Wait for creation to finish @@ -178,7 +178,7 @@ describe( 'Reusable Blocks', () => { // Delete the block and accept the confirmation dialog await clickBlockToolbarButton( 'More options' ); - const deleteButton = await page.waitForXPath( '//button[text()="Remove from Reusable Blocks"]' ); + const deleteButton = await page.waitForXPath( '//button[text()="Remove from Reusable blocks"]' ); await Promise.all( [ waitForAndAcceptDialog(), deleteButton.click() ] ); // Wait for deletion to finish @@ -214,7 +214,7 @@ describe( 'Reusable Blocks', () => { // Convert block to a reusable block await clickBlockToolbarButton( 'More options' ); - const convertButton = await page.waitForXPath( '//button[text()="Add to Reusable Blocks"]' ); + const convertButton = await page.waitForXPath( '//button[text()="Add to Reusable blocks"]' ); await convertButton.click(); // Wait for creation to finish diff --git a/packages/editor/CHANGELOG.md b/packages/editor/CHANGELOG.md index dd4389226720c5..f4fa8ef5d23828 100644 --- a/packages/editor/CHANGELOG.md +++ b/packages/editor/CHANGELOG.md @@ -273,7 +273,7 @@ ### Deprecations -- The Reusable Blocks Data API is marked as experimental as it's subject to change in the future ([#11230](https://github.com/WordPress/gutenberg/pull/11230)). +- The Reusable blocks Data API is marked as experimental as it's subject to change in the future ([#11230](https://github.com/WordPress/gutenberg/pull/11230)). ## 6.0.1 (2018-10-30) diff --git a/packages/editor/src/components/reusable-blocks-buttons/reusable-block-convert-button.js b/packages/editor/src/components/reusable-blocks-buttons/reusable-block-convert-button.js index e9b9bbb81f003a..130dd8a5bcb496 100644 --- a/packages/editor/src/components/reusable-blocks-buttons/reusable-block-convert-button.js +++ b/packages/editor/src/components/reusable-blocks-buttons/reusable-block-convert-button.js @@ -30,7 +30,7 @@ export function ReusableBlockConvertButton( { icon="controls-repeat" onClick={ onConvertToReusable } > - { __( 'Add to Reusable Blocks' ) } + { __( 'Add to Reusable blocks' ) } ) } { isReusable && ( @@ -68,21 +68,21 @@ export default compose( [ // Show 'Convert to Regular Block' when selected block is a reusable block const isVisible = isReusable || ( - // Hide 'Add to Reusable Blocks' when reusable blocks are disabled + // Hide 'Add to Reusable blocks' when reusable blocks are disabled canInsertBlockType( 'core/block' ) && every( blocks, ( block ) => ( // Guard against the case where a regular block has *just* been converted !! block && - // Hide 'Add to Reusable Blocks' on invalid blocks + // Hide 'Add to Reusable blocks' on invalid blocks block.isValid && - // Hide 'Add to Reusable Blocks' when block doesn't support being made reusable + // Hide 'Add to Reusable blocks' when block doesn't support being made reusable hasBlockSupport( block.name, 'reusable', true ) ) ) && - // Hide 'Add to Reusable Blocks' when current doesn't have permission to do that + // Hide 'Add to Reusable blocks' when current doesn't have permission to do that !! canUser( 'create', 'blocks' ) ); diff --git a/packages/editor/src/components/reusable-blocks-buttons/reusable-block-delete-button.js b/packages/editor/src/components/reusable-blocks-buttons/reusable-block-delete-button.js index 8c9abb9589c7d5..97f76e7a991858 100644 --- a/packages/editor/src/components/reusable-blocks-buttons/reusable-block-delete-button.js +++ b/packages/editor/src/components/reusable-blocks-buttons/reusable-block-delete-button.js @@ -24,7 +24,7 @@ export function ReusableBlockDeleteButton( { isVisible, isDisabled, onDelete } ) disabled={ isDisabled } onClick={ () => onDelete() } > - { __( 'Remove from Reusable Blocks' ) } + { __( 'Remove from Reusable blocks' ) } ); } diff --git a/packages/editor/src/components/reusable-blocks-buttons/test/__snapshots__/reusable-block-delete-button.js.snap b/packages/editor/src/components/reusable-blocks-buttons/test/__snapshots__/reusable-block-delete-button.js.snap index 4d7c78b8697658..de8cab21dd4629 100644 --- a/packages/editor/src/components/reusable-blocks-buttons/test/__snapshots__/reusable-block-delete-button.js.snap +++ b/packages/editor/src/components/reusable-blocks-buttons/test/__snapshots__/reusable-block-delete-button.js.snap @@ -7,6 +7,6 @@ exports[`ReusableBlockDeleteButton matches the snapshot 1`] = ` icon="no" onClick={[Function]} > - Remove from Reusable Blocks + Remove from Reusable B=blocks `; diff --git a/packages/editor/src/components/reusable-blocks-buttons/test/reusable-block-convert-button.js b/packages/editor/src/components/reusable-blocks-buttons/test/reusable-block-convert-button.js index c6fba313e31b34..6584cb4aba2ea9 100644 --- a/packages/editor/src/components/reusable-blocks-buttons/test/reusable-block-convert-button.js +++ b/packages/editor/src/components/reusable-blocks-buttons/test/reusable-block-convert-button.js @@ -33,7 +33,7 @@ describe( 'ReusableBlockConvertButton', () => { ); expect( wrapper.props.children[ 1 ] ).toBeFalsy(); const button = wrapper.props.children[ 0 ]; - expect( button.props.children ).toBe( 'Add to Reusable Blocks' ); + expect( button.props.children ).toBe( 'Add to Reusable blocks' ); button.props.onClick(); expect( onConvert ).toHaveBeenCalled(); } ); diff --git a/packages/editor/src/store/effects/reusable-blocks.js b/packages/editor/src/store/effects/reusable-blocks.js index bdc0ebaa5a7d97..0a4973b65a4485 100644 --- a/packages/editor/src/store/effects/reusable-blocks.js +++ b/packages/editor/src/store/effects/reusable-blocks.js @@ -37,7 +37,7 @@ import { const REUSABLE_BLOCK_NOTICE_ID = 'REUSABLE_BLOCK_NOTICE_ID'; /** - * Fetch Reusable Blocks Effect Handler. + * Fetch Reusable blocks Effect Handler. * * @param {Object} action action object. * @param {Object} store Redux Store. @@ -92,7 +92,7 @@ export const fetchReusableBlocks = async ( action, store ) => { }; /** - * Save Reusable Blocks Effect Handler. + * Save Reusable blocks Effect Handler. * * @param {Object} action action object. * @param {Object} store Redux Store. @@ -137,7 +137,7 @@ export const saveReusableBlocks = async ( action, store ) => { }; /** - * Delete Reusable Blocks Effect Handler. + * Delete Reusable blocks Effect Handler. * * @param {Object} action action object. * @param {Object} store Redux Store. diff --git a/packages/list-reusable-blocks/README.md b/packages/list-reusable-blocks/README.md index fa416dd182a753..f14e9dd2e59790 100644 --- a/packages/list-reusable-blocks/README.md +++ b/packages/list-reusable-blocks/README.md @@ -1,4 +1,4 @@ -# List Reusable Blocks +# List Reusable blocks Package used to add import/export links to the listing page of the reusable blocks. From 90b090f496a0a55bcf863261e9c385929d972fb9 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Tue, 10 Dec 2019 15:08:38 +0000 Subject: [PATCH 05/11] Catches the test fails for sentance case. --- docs/designers-developers/faq.md | 2 +- .../test/__snapshots__/index.js.snap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/designers-developers/faq.md b/docs/designers-developers/faq.md index 154055b1a6f431..1681b397d6f3ee 100644 --- a/docs/designers-developers/faq.md +++ b/docs/designers-developers/faq.md @@ -116,7 +116,7 @@ This is the canonical list of keyboard shortcuts: F10 - Switch between Visual Editor and Code Editor. + Switch between Visual editor and Code editor. Ctrl+Shift+Alt+M M diff --git a/packages/edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap b/packages/edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap index 5e6ed4e2690d9a..c53199d28f399a 100644 --- a/packages/edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +++ b/packages/edit-post/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap @@ -134,7 +134,7 @@ exports[`KeyboardShortcutHelpModal should match snapshot when the modal is activ ], }, Object { - "description": "Switch between Visual Editor and Code Editor.", + "description": "Switch between Visual editor and Code editor.", "keyCombination": Array [ "Ctrl", "+", From 809d5f13d03590bd5a34f2591ef406d002a7f699 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Tue, 10 Dec 2019 16:00:15 +0000 Subject: [PATCH 06/11] Test fix --- .../test/__snapshots__/reusable-block-delete-button.js.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/components/reusable-blocks-buttons/test/__snapshots__/reusable-block-delete-button.js.snap b/packages/editor/src/components/reusable-blocks-buttons/test/__snapshots__/reusable-block-delete-button.js.snap index de8cab21dd4629..1e1747fdf2d232 100644 --- a/packages/editor/src/components/reusable-blocks-buttons/test/__snapshots__/reusable-block-delete-button.js.snap +++ b/packages/editor/src/components/reusable-blocks-buttons/test/__snapshots__/reusable-block-delete-button.js.snap @@ -7,6 +7,6 @@ exports[`ReusableBlockDeleteButton matches the snapshot 1`] = ` icon="no" onClick={[Function]} > - Remove from Reusable B=blocks + Remove from Reusable blocks `; From 013f9ce3b4258fce2fdbc140214445661006ba94 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Tue, 10 Dec 2019 16:44:47 +0000 Subject: [PATCH 07/11] Update index.js --- packages/edit-post/src/components/options-modal/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-post/src/components/options-modal/index.js b/packages/edit-post/src/components/options-modal/index.js index 792cc348ae1110..0088d29af2ee94 100644 --- a/packages/edit-post/src/components/options-modal/index.js +++ b/packages/edit-post/src/components/options-modal/index.js @@ -64,7 +64,7 @@ export function OptionsModal( { isModalActive, isViewable, closeModal } ) { ) } /> - + From c7b49b61536ef82e5df1ca8baa8196e787e0a3b0 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Tue, 10 Dec 2019 18:53:49 +0000 Subject: [PATCH 08/11] Catch some more test fails --- packages/e2e-tests/specs/editor/plugins/allowed-blocks.test.js | 2 +- packages/e2e-tests/specs/editor/various/fullscreen-mode.test.js | 2 +- packages/e2e-tests/specs/editor/various/shortcut-help.test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/e2e-tests/specs/editor/plugins/allowed-blocks.test.js b/packages/e2e-tests/specs/editor/plugins/allowed-blocks.test.js index bed48d6e93ff2c..19c967a4ae0b5c 100644 --- a/packages/e2e-tests/specs/editor/plugins/allowed-blocks.test.js +++ b/packages/e2e-tests/specs/editor/plugins/allowed-blocks.test.js @@ -41,7 +41,7 @@ describe( 'Allowed Blocks Filter', () => { } ); it( 'should remove not allowed blocks from the block manager', async () => { - await clickOnMoreMenuItem( 'Block Manager' ); + await clickOnMoreMenuItem( 'Block manager' ); const BLOCK_LABEL_SELECTOR = '.edit-post-manage-blocks-modal__checklist-item .components-checkbox-control__label'; await page.waitForSelector( BLOCK_LABEL_SELECTOR ); diff --git a/packages/e2e-tests/specs/editor/various/fullscreen-mode.test.js b/packages/e2e-tests/specs/editor/various/fullscreen-mode.test.js index 9936fd1e48a52c..42007b1c03acb9 100644 --- a/packages/e2e-tests/specs/editor/various/fullscreen-mode.test.js +++ b/packages/e2e-tests/specs/editor/various/fullscreen-mode.test.js @@ -13,7 +13,7 @@ describe( 'Fullscreen Mode', () => { } ); it( 'should open the fullscreen mode from the more menu', async () => { - await clickOnMoreMenuItem( 'Fullscreen Mode' ); + await clickOnMoreMenuItem( 'Fullscreen mode' ); await toggleMoreMenu(); const isFullscreenEnabled = await page.$eval( 'body', ( body ) => { diff --git a/packages/e2e-tests/specs/editor/various/shortcut-help.test.js b/packages/e2e-tests/specs/editor/various/shortcut-help.test.js index 03c53949b436dd..488c2428e5f0c3 100644 --- a/packages/e2e-tests/specs/editor/various/shortcut-help.test.js +++ b/packages/e2e-tests/specs/editor/various/shortcut-help.test.js @@ -14,7 +14,7 @@ describe( 'keyboard shortcut help modal', () => { } ); it( 'displays the shortcut help modal when opened using the menu item in the more menu', async () => { - await clickOnMoreMenuItem( 'Keyboard Shortcuts' ); + await clickOnMoreMenuItem( 'Keyboard shortcuts' ); const shortcutHelpModalElements = await page.$$( '.edit-post-keyboard-shortcut-help' ); expect( shortcutHelpModalElements ).toHaveLength( 1 ); } ); From 4a223d1f9282b2e1c32c8884db390b24340f30e9 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Tue, 10 Dec 2019 22:25:53 +0000 Subject: [PATCH 09/11] Test fixes --- packages/e2e-test-utils/src/switch-editor-mode-to.js | 2 +- packages/editor/src/components/post-featured-image/index.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/e2e-test-utils/src/switch-editor-mode-to.js b/packages/e2e-test-utils/src/switch-editor-mode-to.js index 6003350a183cce..e791872cd1dc4a 100644 --- a/packages/e2e-test-utils/src/switch-editor-mode-to.js +++ b/packages/e2e-test-utils/src/switch-editor-mode-to.js @@ -11,7 +11,7 @@ import { toggleMoreMenu } from './toggle-more-menu'; export async function switchEditorModeTo( mode ) { await toggleMoreMenu(); const [ button ] = await page.$x( - `//button[contains(text(), '${ mode } Editor')]` + `//button[contains(text(), '${ mode } editor')]` ); await button.click( 'button' ); await toggleMoreMenu(); diff --git a/packages/editor/src/components/post-featured-image/index.js b/packages/editor/src/components/post-featured-image/index.js index fdae4eadd53724..53b1c4f2b5c871 100644 --- a/packages/editor/src/components/post-featured-image/index.js +++ b/packages/editor/src/components/post-featured-image/index.js @@ -21,9 +21,9 @@ import PostFeaturedImageCheck from './check'; const ALLOWED_MEDIA_TYPES = [ 'image' ]; // Used when labels from post type were not yet loaded or when they are not present. -const DEFAULT_FEATURE_IMAGE_LABEL = __( 'Featured Image' ); -const DEFAULT_SET_FEATURE_IMAGE_LABEL = __( 'Set Featured Image' ); -const DEFAULT_REMOVE_FEATURE_IMAGE_LABEL = __( 'Remove Image' ); +const DEFAULT_FEATURE_IMAGE_LABEL = __( 'Featured image' ); +const DEFAULT_SET_FEATURE_IMAGE_LABEL = __( 'Set featured image' ); +const DEFAULT_REMOVE_FEATURE_IMAGE_LABEL = __( 'Remove image' ); function PostFeaturedImage( { currentPostId, featuredImageId, onUpdateImage, onRemoveImage, media, postType } ) { const postLabel = get( postType, [ 'labels' ], {} ); From c7f1e89262fd25bdcb28197c57dbc9807b85d346 Mon Sep 17 00:00:00 2001 From: Miguel Fonseca Date: Wed, 11 Dec 2019 12:36:23 +0000 Subject: [PATCH 10/11] Override WP labels for post and page types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … to conform to sentence-style capitalisation across the editor UI. (This is a quick commit to show the idea. Do expand on it and polish.) From Slack: "If we used this it would have to be properly marked [e.g. @TODO] and commented so that before the next core release we could revisit these labels as a whole." --- lib/client-assets.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/client-assets.php b/lib/client-assets.php index 44b2766647d075..4edd0bd08eff46 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -149,6 +149,25 @@ function gutenberg_override_translation_file( $file, $handle ) { } add_filter( 'load_script_translation_file', 'gutenberg_override_translation_file', 10, 2 ); +/** + * Filters the default labels for common post types to change the case style + * from capitalized (e.g. "Featured Image") to sentence-style (e.g. "Featured + * image"). + * + * See: https://github.com/WordPress/gutenberg/pull/18758 + * + * @param object Object with all the labels as member variables. + * + * @return object Object with all the labels, including overridden ones. + */ +function gutenberg_override_posttype_labels( $labels ) { + $labels->featured_image = 'Featured image'; + return $labels; +} +foreach ( array( 'post', 'page' ) as $post_type ) { + add_filter( "post_type_labels_{$post_type}", 'gutenberg_override_posttype_labels' ); +} + /** * Registers a style according to `wp_register_style`. Honors this request by * deregistering any style by the same handler before registration. From 1b741a77d8ee059294e8a9ed08742d8f3301221b Mon Sep 17 00:00:00 2001 From: Miguel Fonseca Date: Thu, 12 Dec 2019 11:41:27 +0000 Subject: [PATCH 11/11] gutenberg_override_posttype_labels: small fixes --- lib/client-assets.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client-assets.php b/lib/client-assets.php index 4edd0bd08eff46..e9e12db68eebf9 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -156,12 +156,12 @@ function gutenberg_override_translation_file( $file, $handle ) { * * See: https://github.com/WordPress/gutenberg/pull/18758 * - * @param object Object with all the labels as member variables. + * @param object $labels Object with all the labels as member variables. * * @return object Object with all the labels, including overridden ones. */ function gutenberg_override_posttype_labels( $labels ) { - $labels->featured_image = 'Featured image'; + $labels->featured_image = __( 'Featured image', 'gutenberg' ); return $labels; } foreach ( array( 'post', 'page' ) as $post_type ) {