Skip to content

Commit

Permalink
Apply sentence case formatting to Setting Sidebar controls
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Feb 21, 2020
1 parent c6821d7 commit 7dd6c58
Show file tree
Hide file tree
Showing 32 changed files with 76 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ exports[`ColorPaletteControl matches the snapshot 1`] = `
onClick={[Function]}
type="button"
>
Custom Color
Custom color
</button>
</div>
<button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe( 'ColorPaletteControl', () => {

// Is showing the custom color picker.
expect(
wrapper.root.findAll( getButtonWithTestPredicate( 'Custom Color' ) )
wrapper.root.findAll( getButtonWithTestPredicate( 'Custom color' ) )
).toHaveLength( 1 );
} );

Expand Down Expand Up @@ -128,7 +128,7 @@ describe( 'ColorPaletteControl', () => {

// Is showing the custom color picker.
expect(
wrapper.root.findAll( getButtonWithTestPredicate( 'Custom Color' ) )
wrapper.root.findAll( getButtonWithTestPredicate( 'Custom color' ) )
).toHaveLength( 1 );
} );

Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/colors/use-colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ export default function __experimentalUseColors(

panelLabel = colorConfig.label ||
COMMON_COLOR_LABELS[ name ] ||
startCase( name ), // E.g. 'Background Color'.
startCase( name ), // E.g. 'Background color'.
componentName = startCase( name ).replace( /\s/g, '' ), // E.g. 'BackgroundColor'.

color = colorConfig.color,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ImageSizeControl extends Component {
<>
{ ! isEmpty( imageSizeOptions ) && (
<SelectControl
label={ __( 'Image Size' ) }
label={ __( 'Image size' ) }
value={ slug }
options={ imageSizeOptions }
onChange={ onChangeImage }
Expand All @@ -59,7 +59,7 @@ class ImageSizeControl extends Component {
{ isResizable && (
<div className="block-editor-image-size-control">
<p className="block-editor-image-size-control__row">
{ __( 'Image Dimensions' ) }
{ __( 'Image dimensions' ) }
</p>
<div className="block-editor-image-size-control__row">
<TextControl
Expand Down
4 changes: 2 additions & 2 deletions packages/block-editor/src/hooks/anchor.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ export const withInspectorControl = createHigherOrderComponent(
<InspectorAdvancedControls>
<TextControl
className="html-anchor-control"
label={ __( 'HTML Anchor' ) }
label={ __( 'HTML anchor' ) }
help={
<>
{ __(
'Enter a word or two — without spaces — to make a unique web address just for this heading, called an “anchor.” Then, you’ll be able to link directly to this section of your page.'
'Enter a word or two — without spaces — to make a unique web address just for this heading, called an “anchor.” Then, you’ll be able to link directly to this section of your page.'
) }

<ExternalLink
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/hooks/custom-class-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const withInspectorControl = createHigherOrderComponent(
<BlockEdit { ...props } />
<InspectorAdvancedControls>
<TextControl
label={ __( 'Additional CSS Class(es)' ) }
label={ __( 'Additional CSS class(es)' ) }
value={ props.attributes.className || '' }
onChange={ ( nextValue ) => {
props.setAttributes( {
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/archives/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function ArchivesEdit( { attributes, setAttributes } ) {
<InspectorControls>
<PanelBody title={ __( 'Archives settings' ) }>
<ToggleControl
label={ __( 'Display as Dropdown' ) }
label={ __( 'Display as dropdown' ) }
checked={ displayAsDropdown }
onChange={ () =>
setAttributes( {
Expand All @@ -23,7 +23,7 @@ export default function ArchivesEdit( { attributes, setAttributes } ) {
}
/>
<ToggleControl
label={ __( 'Show Post Counts' ) }
label={ __( 'Show post counts' ) }
checked={ showPostCounts }
onChange={ () =>
setAttributes( {
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/button/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function BorderPanel( { borderRadius = '', setAttributes } ) {
<PanelBody title={ __( 'Border settings' ) }>
<RangeControl
value={ borderRadius }
label={ __( 'Border Radius' ) }
label={ __( 'Border radius' ) }
min={ MIN_BORDER_RADIUS_VALUE }
max={ MAX_BORDER_RADIUS_VALUE }
initialPosition={ INITIAL_BORDER_RADIUS_POSITION }
Expand Down Expand Up @@ -232,7 +232,7 @@ function ButtonEdit( {
{
colorValue: textColor.color,
onColorChange: setTextColor,
label: __( 'Text Color' ),
label: __( 'Text color' ),
},
{
colorValue: backgroundColor.color,
Expand Down
6 changes: 3 additions & 3 deletions packages/block-library/src/categories/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,17 @@ class CategoriesEdit extends Component {
<InspectorControls>
<PanelBody title={ __( 'Categories settings' ) }>
<ToggleControl
label={ __( 'Display as Dropdown' ) }
label={ __( 'Display as dropdown' ) }
checked={ displayAsDropdown }
onChange={ this.toggleDisplayAsDropdown }
/>
<ToggleControl
label={ __( 'Show Hierarchy' ) }
label={ __( 'Show hierarchy' ) }
checked={ showHierarchy }
onChange={ this.toggleShowHierarchy }
/>
<ToggleControl
label={ __( 'Show Post Counts' ) }
label={ __( 'Show post counts' ) }
checked={ showPostCounts }
onChange={ this.toggleShowPostCounts }
/>
Expand Down
6 changes: 3 additions & 3 deletions packages/block-library/src/cover/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,15 +329,15 @@ function CoverEdit( {
<PanelBody title={ __( 'Media settings' ) }>
{ IMAGE_BACKGROUND_TYPE === backgroundType && (
<ToggleControl
label={ __( 'Fixed Background' ) }
label={ __( 'Fixed background' ) }
checked={ hasParallax }
onChange={ toggleParallax }
/>
) }
{ IMAGE_BACKGROUND_TYPE === backgroundType &&
! hasParallax && (
<FocalPointPicker
label={ __( 'Focal Point Picker' ) }
label={ __( 'Focal point picker' ) }
url={ url }
value={ focalPoint }
onChange={ ( newFocalPoint ) =>
Expand Down Expand Up @@ -396,7 +396,7 @@ function CoverEdit( {
>
{ !! url && (
<RangeControl
label={ __( 'Background Opacity' ) }
label={ __( 'Background opacity' ) }
value={ dimRatio }
onChange={ ( newDimRation ) =>
setAttributes( {
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/file/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function FileBlockInspector( {
let linkDestinationOptions = [ { value: href, label: __( 'URL' ) } ];
if ( attachmentPage ) {
linkDestinationOptions = [
{ value: href, label: __( 'Media File' ) },
{ value: href, label: __( 'Media file' ) },
{ value: attachmentPage, label: __( 'Attachment page' ) },
];
}
Expand All @@ -28,7 +28,7 @@ export default function FileBlockInspector( {
<InspectorControls>
<PanelBody title={ __( 'Text link settings' ) }>
<SelectControl
label={ __( 'Link To' ) }
label={ __( 'Link to' ) }
value={ textLinkHref }
options={ linkDestinationOptions }
onChange={ changeLinkDestinationOption }
Expand Down
6 changes: 3 additions & 3 deletions packages/block-library/src/gallery/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,22 +394,22 @@ class GalleryEdit extends Component {
) }

<ToggleControl
label={ __( 'Crop Images' ) }
label={ __( 'Crop images' ) }
{ ...MOBILE_CONTROL_PROPS }
checked={ !! imageCrop }
onChange={ this.toggleImageCrop }
help={ this.getImageCropHelp }
/>
<SelectControl
label={ __( 'Link To' ) }
label={ __( 'Link to' ) }
{ ...mobileLinkToProps }
value={ linkTo }
onChange={ this.setLinkTo }
options={ linkOptions }
/>
{ shouldShowSizeOptions && (
<SelectControl
label={ __( 'Images Size' ) }
label={ __( 'Images size' ) }
{ ...MOBILE_CONTROL_PROPS_SEPARATOR_NONE }
value={ sizeSlug }
options={ imageSizeOptions }
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 @@ -446,7 +446,7 @@ export class ImageEdit extends Component {
<InspectorControls>
<PanelBody title={ __( 'Image settings' ) }>
<TextareaControl
label={ __( 'Alt Text (Alternative Text)' ) }
label={ __( 'Alt text (alternative text)' ) }
value={ alt }
onChange={ this.updateAlt }
help={
Expand Down Expand Up @@ -477,7 +477,7 @@ export class ImageEdit extends Component {
</InspectorControls>
<InspectorAdvancedControls>
<TextControl
label={ __( 'Title Attribute' ) }
label={ __( 'Title attribute' ) }
value={ title || '' }
onChange={ this.onSetTitle }
help={
Expand Down
8 changes: 4 additions & 4 deletions packages/block-library/src/latest-comments/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,22 @@ class LatestComments extends Component {
<InspectorControls>
<PanelBody title={ __( 'Latest comments settings' ) }>
<ToggleControl
label={ __( 'Display Avatar' ) }
label={ __( 'Display avatar' ) }
checked={ displayAvatar }
onChange={ this.toggleDisplayAvatar }
/>
<ToggleControl
label={ __( 'Display Date' ) }
label={ __( 'Display date' ) }
checked={ displayDate }
onChange={ this.toggleDisplayDate }
/>
<ToggleControl
label={ __( 'Display Excerpt' ) }
label={ __( 'Display excerpt' ) }
checked={ displayExcerpt }
onChange={ this.toggleDisplayExcerpt }
/>
<RangeControl
label={ __( 'Number of Comments' ) }
label={ __( 'Number of comments' ) }
value={ commentsToShow }
onChange={ this.setCommentsToShow }
min={ MIN_COMMENTS }
Expand Down
8 changes: 4 additions & 4 deletions packages/block-library/src/latest-posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class LatestPostsEdit extends Component {
<InspectorControls>
<PanelBody title={ __( 'Post content settings' ) }>
<ToggleControl
label={ __( 'Post Content' ) }
label={ __( 'Post content' ) }
checked={ displayPostContent }
onChange={ ( value ) =>
setAttributes( { displayPostContent: value } )
Expand All @@ -114,7 +114,7 @@ class LatestPostsEdit extends Component {
options={ [
{ label: __( 'Excerpt' ), value: 'excerpt' },
{
label: __( 'Full Post' ),
label: __( 'Full post' ),
value: 'full_post',
},
] }
Expand Down Expand Up @@ -149,7 +149,7 @@ class LatestPostsEdit extends Component {
/>
</PanelBody>

<PanelBody title={ __( 'Featured Image Settings' ) }>
<PanelBody title={ __( 'Featured image settings' ) }>
<ToggleControl
label={ __( 'Display featured image' ) }
checked={ displayFeaturedImage }
Expand Down Expand Up @@ -188,7 +188,7 @@ class LatestPostsEdit extends Component {
/>
<BaseControl>
<BaseControl.VisualLabel>
{ __( 'Image Alignment' ) }
{ __( 'Image alignment' ) }
</BaseControl.VisualLabel>
<BlockAlignmentToolbar
value={ featuredImageAlign }
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/list/ordered-list-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const OrderedListSettings = ( { setAttributes, reversed, start } ) => (
<InspectorControls>
<PanelBody title={ __( 'Ordered list settings' ) }>
<TextControl
label={ __( 'Start Value' ) }
label={ __( 'Start value' ) }
type="number"
onChange={ ( value ) => {
const int = parseInt( value, 10 );
Expand All @@ -24,7 +24,7 @@ const OrderedListSettings = ( { setAttributes, reversed, start } ) => (
step="1"
/>
<ToggleControl
label={ __( 'Reverse List Numbering' ) }
label={ __( 'Reverse list numbering' ) }
checked={ reversed || false }
onChange={ ( value ) => {
setAttributes( {
Expand Down
6 changes: 3 additions & 3 deletions packages/block-library/src/media-text/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class MediaTextEdit extends Component {
{
value: backgroundColor.color,
onChange: setBackgroundColor,
label: __( 'Background Color' ),
label: __( 'Background color' ),
},
];
const toolbarControls = [
Expand Down Expand Up @@ -277,7 +277,7 @@ class MediaTextEdit extends Component {
) }
{ imageFill && (
<FocalPointPicker
label={ __( 'Focal Point Picker' ) }
label={ __( 'Focal point picker' ) }
url={ mediaUrl }
value={ focalPoint }
onChange={ ( value ) =>
Expand All @@ -287,7 +287,7 @@ class MediaTextEdit extends Component {
) }
{ mediaType === 'image' && (
<TextareaControl
label={ __( 'Alt Text (Alternative Text)' ) }
label={ __( 'Alt text (alternative text)' ) }
value={ mediaAlt }
onChange={ onMediaAltChange }
help={
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/paragraph/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function ParagraphBlock( {
onChange={ setFontSize }
/>
<ToggleControl
label={ __( 'Drop Cap' ) }
label={ __( 'Drop cap' ) }
checked={ !! dropCap }
onChange={ () =>
setAttributes( { dropCap: ! dropCap } )
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/pullquote/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ class PullQuoteEdit extends Component {
{
value: mainColor.color,
onChange: this.pullQuoteMainColorSetter,
label: __( 'Main Color' ),
label: __( 'Main color' ),
},
{
value: textColor.color,
onChange: this.pullQuoteTextColorSetter,
label: __( 'Text Color' ),
label: __( 'Text color' ),
},
] }
>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/pullquote/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const settings = {
label: _x( 'Default', 'block style' ),
isDefault: true,
},
{ name: SOLID_COLOR_STYLE_NAME, label: __( 'Solid Color' ) },
{ name: SOLID_COLOR_STYLE_NAME, label: __( 'Solid color' ) },
],
supports: {
align: [ 'left', 'right', 'wide', 'full' ],
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/social-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => {
>
<PanelRow>
<TextControl
label={ __( 'Link Label' ) }
label={ __( 'Link label' ) }
help={ __(
'Briefly describe the link to help screen reader users.'
) }
Expand Down Expand Up @@ -75,7 +75,7 @@ const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => {
onChange={ ( nextURL ) =>
setAttributes( { url: nextURL } )
}
placeholder={ __( 'Enter Address' ) }
placeholder={ __( 'Enter address' ) }
disableSuggestions={ true }
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/table/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ export class TableEdit extends Component {
{
value: backgroundColor.color,
onChange: setBackgroundColor,
label: __( 'Background Color' ),
label: __( 'Background color' ),
disableCustomColors: true,
colors: BACKGROUND_COLORS,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/video/edit-common-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const VideoSettings = ( { setAttributes, attributes } ) => {
checked={ muted }
/>
<ToggleControl
label={ __( 'Playback Controls' ) }
label={ __( 'Playback controls' ) }
onChange={ toggleAttribute( 'controls' ) }
checked={ controls }
/>
Expand Down
Loading

0 comments on commit 7dd6c58

Please sign in to comment.