Skip to content

Commit

Permalink
Use sentence case for tooltips (#17336)
Browse files Browse the repository at this point in the history
* Using sentence case for tooltips. Fixes #16764 in part.

* update snapshots

* second try to match tests
  • Loading branch information
mapk authored and senadir committed Sep 13, 2019
1 parent 9a1e33e commit 1e2e08d
Show file tree
Hide file tree
Showing 19 changed files with 37 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function BlockNavigationDropdown( { hasBlocks, isDisabled } ) {
icon={ MenuIcon }
aria-expanded={ isOpen }
onClick={ isEnabled ? onToggle : undefined }
label={ __( 'Block Navigation' ) }
label={ __( 'Block navigation' ) }
className="editor-block-navigation block-editor-block-navigation"
shortcut={ displayShortcut.access( 'o' ) }
aria-disabled={ ! isEnabled }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function BlockNavigation( { rootBlock, rootBlocks, selectedBlockClientId, select
role="presentation"
className="editor-block-navigation__container block-editor-block-navigation__container"
>
<p className="editor-block-navigation__label block-editor-block-navigation__label">{ __( 'Block Navigation' ) }</p>
<p className="editor-block-navigation__label block-editor-block-navigation__label">{ __( 'Block navigation' ) }</p>
{ hasHierarchy && (
<BlockNavigationList
blocks={ [ rootBlock ] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const FormatToolbar = () => {
{ ( fills ) => fills.length !== 0 &&
<DropdownMenu
icon={ false }
label={ __( 'More Rich Text Controls' ) }
label={ __( 'More rich text controls' ) }
controls={ orderBy( fills.map( ( [ { props } ] ) => props ), 'title' ) }
popoverProps={ POPOVER_PROPS }
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/url-input/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class URLInputButton extends Component {
render() {
const { url, onChange } = this.props;
const { expanded } = this.state;
const buttonLabel = url ? __( 'Edit Link' ) : __( 'Insert Link' );
const buttonLabel = url ? __( 'Edit link' ) : __( 'Insert link' );

return (
<div className="editor-url-input__button block-editor-url-input__button">
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/url-popover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class URLPopover extends Component {
<IconButton
className="editor-url-popover__settings-toggle block-editor-url-popover__settings-toggle"
icon="arrow-down-alt2"
label={ __( 'Link Settings' ) }
label={ __( 'Link settings' ) }
onClick={ this.toggleSettingsVisibility }
aria-expanded={ isSettingsExpanded }
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports[`URLPopover matches the snapshot in its default state 1`] = `
aria-expanded={false}
className="editor-url-popover__settings-toggle block-editor-url-popover__settings-toggle"
icon="arrow-down-alt2"
label="Link Settings"
label="Link settings"
onClick={[Function]}
/>
</div>
Expand All @@ -46,7 +46,7 @@ exports[`URLPopover matches the snapshot when the settings are toggled open 1`]
aria-expanded={true}
className="editor-url-popover__settings-toggle block-editor-url-popover__settings-toggle"
icon="arrow-down-alt2"
label="Link Settings"
label="Link settings"
onClick={[Function]}
/>
</div>
Expand Down
6 changes: 3 additions & 3 deletions packages/block-library/src/button/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,14 @@ class ButtonEdit extends Component {
borderRadius={ borderRadius }
setAttributes={ setAttributes }
/>
<PanelBody title={ __( 'Link Settings' ) }>
<PanelBody title={ __( 'Link settings' ) }>
<ToggleControl
label={ __( 'Open in New Tab' ) }
label={ __( 'Open in new tab' ) }
onChange={ this.onToggleOpenInNewTab }
checked={ linkTarget === '_blank' }
/>
<TextControl
label={ __( 'Link Rel' ) }
label={ __( 'Link rel' ) }
value={ rel || '' }
onChange={ this.onSetLinkRel }
/>
Expand Down
10 changes: 5 additions & 5 deletions packages/block-library/src/file/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,29 @@ export default function FileBlockInspector( {
if ( attachmentPage ) {
linkDestinationOptions = [
{ value: href, label: __( 'Media File' ) },
{ value: attachmentPage, label: __( 'Attachment Page' ) },
{ value: attachmentPage, label: __( 'Attachment page' ) },
];
}

return (
<>
<InspectorControls>
<PanelBody title={ __( 'Text Link Settings' ) }>
<PanelBody title={ __( 'Text link settings' ) }>
<SelectControl
label={ __( 'Link To' ) }
value={ textLinkHref }
options={ linkDestinationOptions }
onChange={ changeLinkDestinationOption }
/>
<ToggleControl
label={ __( 'Open in New Tab' ) }
label={ __( 'Open in new tab' ) }
checked={ openInNewWindow }
onChange={ changeOpenInNewWindow }
/>
</PanelBody>
<PanelBody title={ __( 'Download Button Settings' ) }>
<PanelBody title={ __( 'Download button settings' ) }>
<ToggleControl
label={ __( 'Show Download Button' ) }
label={ __( 'Show download button' ) }
checked={ showDownloadButton }
onChange={ changeShowDownloadButton }
/>
Expand Down
6 changes: 3 additions & 3 deletions packages/block-library/src/gallery/gallery-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ class GalleryImage extends Component {
icon={ leftArrow }
onClick={ isFirstItem ? undefined : onMoveBackward }
className="blocks-gallery-item__move-backward"
label={ __( 'Move Image Backward' ) }
label={ __( 'Move image backward' ) }
aria-disabled={ isFirstItem }
disabled={ ! isSelected }
/>
<IconButton
icon={ rightArrow }
onClick={ isLastItem ? undefined : onMoveForward }
className="blocks-gallery-item__move-forward"
label={ __( 'Move Image Forward' ) }
label={ __( 'Move image forward' ) }
aria-disabled={ isLastItem }
disabled={ ! isSelected }
/>
Expand All @@ -156,7 +156,7 @@ class GalleryImage extends Component {
icon="no-alt"
onClick={ onRemove }
className="blocks-gallery-item__remove"
label={ __( 'Remove Image' ) }
label={ __( 'Remove image' ) }
disabled={ ! isSelected }
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ const ImageURLInputUI = ( {
<IconButton
icon="admin-links"
className="components-toolbar__control"
label={ url ? __( 'Edit Link' ) : __( 'Insert Link' ) }
label={ url ? __( 'Edit link' ) : __( 'Insert link' ) }
aria-expanded={ isOpen }
onClick={ openLinkUI }
/>
Expand Down Expand Up @@ -251,7 +251,7 @@ const ImageURLInputUI = ( {
/>
<IconButton
icon="no"
label={ __( 'Remove Link' ) }
label={ __( 'Remove link' ) }
onClick={ onLinkRemove }
/>
</>
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/latest-posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ class LatestPostsEdit extends Component {
const layoutControls = [
{
icon: 'list-view',
title: __( 'List View' ),
title: __( 'List view' ),
onClick: () => setAttributes( { postLayout: 'list' } ),
isActive: postLayout === 'list',
},
{
icon: 'grid-view',
title: __( 'Grid View' ),
title: __( 'Grid view' ),
onClick: () => setAttributes( { postLayout: 'grid' } ),
isActive: postLayout === 'grid',
},
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/rss/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ class RSSEdit extends Component {
},
{
icon: 'list-view',
title: __( 'List View' ),
title: __( 'List view' ),
onClick: () => setAttributes( { blockLayout: 'list' } ),
isActive: blockLayout === 'list',
},
{
icon: 'grid-view',
title: __( 'Grid View' ),
title: __( 'Grid view' ),
onClick: () => setAttributes( { blockLayout: 'grid' } ),
isActive: blockLayout === 'grid',
},
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e-tests/specs/adding-inline-tokens.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ describe( 'adding inline tokens', () => {
await clickBlockAppender();
await page.keyboard.type( 'a ' );

await clickBlockToolbarButton( 'More Rich Text Controls' );
await clickButton( 'Inline Image' );
await clickBlockToolbarButton( 'More rich text controls' );
await clickButton( 'Inline image' );

// Wait for media modal to appear and upload image.
await page.waitForSelector( '.media-modal input[type=file]' );
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e-tests/specs/block-hierarchy-navigation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe( 'Navigating the block hierarchy', () => {
await page.keyboard.type( 'First column' );

// Navigate to the columns blocks.
await page.click( '[aria-label="Block Navigation"]' );
await page.click( '[aria-label="Block navigation"]' );
const columnsBlockMenuItem = ( await page.$x( "//button[contains(@class,'block-editor-block-navigation__item') and contains(text(), 'Columns')]" ) )[ 0 ];
await columnsBlockMenuItem.click();

Expand All @@ -44,7 +44,7 @@ describe( 'Navigating the block hierarchy', () => {
await page.keyboard.type( '3' );

// Navigate to the last column block.
await page.click( '[aria-label="Block Navigation"]' );
await page.click( '[aria-label="Block navigation"]' );
const lastColumnsBlockMenuItem = ( await page.$x(
"//button[contains(@class,'block-editor-block-navigation__item') and contains(text(), 'Column')]"
) )[ 3 ];
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/specs/blocks/columns.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe( 'Columns', () => {
it( 'restricts all blocks inside the columns block', async () => {
await insertBlock( 'Columns' );
await page.click( '[aria-label="Two columns; equal split"]' );
await page.click( '[aria-label="Block Navigation"]' );
await page.click( '[aria-label="Block navigation"]' );
const columnBlockMenuItem = ( await page.$x( '//button[contains(concat(" ", @class, " "), " block-editor-block-navigation__item-button ")][text()="Column"]' ) )[ 0 ];
await columnBlockMenuItem.click();
await openGlobalBlockInserter();
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e-tests/specs/links.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ describe( 'Links', () => {
}

// Focus on first paragraph, so the link popover will appear over the subsequent ones
await page.click( '[aria-label="Block Navigation"]' );
await page.click( '[aria-label="Block navigation"]' );
await page.click( '.block-editor-block-navigation__item button' );

// Select some text
Expand All @@ -465,7 +465,7 @@ describe( 'Links', () => {
await waitForAutoFocus();

// Click on the Link Settings button
await page.click( 'button[aria-label="Link Settings"]' );
await page.click( 'button[aria-label="Link settings"]' );

// Move mouse over the 'open in new tab' section, then click and drag
const settings = await page.$( '.block-editor-url-popover__settings' );
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/specs/plugins/format-api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe( 'Using Format API', () => {
await clickBlockAppender();
await page.keyboard.type( 'First paragraph' );
await pressKeyWithModifier( 'shiftAlt', 'ArrowLeft' );
await clickBlockToolbarButton( 'More Rich Text Controls' );
await clickBlockToolbarButton( 'More rich text controls' );
await clickButton( 'Custom Link' );
expect( await getEditedPostContent() ).toMatchSnapshot();
} );
Expand Down
2 changes: 1 addition & 1 deletion packages/format-library/src/image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { computeCaretRect } from '@wordpress/dom';
const ALLOWED_MEDIA_TYPES = [ 'image' ];

const name = 'core/image';
const title = __( 'Inline Image' );
const title = __( 'Inline image' );

const stopKeyPropagation = ( event ) => event.stopPropagation();

Expand Down
8 changes: 4 additions & 4 deletions packages/format-library/src/link/modal.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,20 @@ class ModalLinkUI extends Component {
/* eslint-enable jsx-a11y/no-autofocus */ }
<BottomSheet.Cell
icon={ 'editor-textcolor' }
label={ __( 'Link Text' ) }
label={ __( 'Link text' ) }
value={ text }
placeholder={ __( 'Add Link Text' ) }
placeholder={ __( 'Add link text' ) }
onChangeValue={ this.onChangeText }
/>
<BottomSheet.SwitchCell
icon={ 'external' }
label={ __( 'Open in New Tab' ) }
label={ __( 'Open in new tab' ) }
value={ this.state.opensInNewWindow }
onValueChange={ this.onChangeOpensInNewWindow }
separatorType={ 'fullWidth' }
/>
<BottomSheet.Cell
label={ __( 'Remove Link' ) }
label={ __( 'Remove link' ) }
labelStyle={ styles.clearLinkButton }
separatorType={ 'none' }
onPress={ this.removeLink }
Expand Down

0 comments on commit 1e2e08d

Please sign in to comment.