Skip to content

Commit

Permalink
Bring greater consistency to placeholder text for media blocks. (#16135)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjellr authored Jun 12, 2019
1 parent c6a62d6 commit 84543ff
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ export class MediaPlaceholder extends Component {
const isVideo = isOneType && 'video' === allowedTypes[ 0 ];

if ( instructions === undefined && mediaUpload ) {
instructions = __( 'Drag a media file, upload a new one or select a file from your library.' );
instructions = __( 'Upload a media file or pick one from your media library.' );

if ( isAudio ) {
instructions = __( 'Drag an audio, upload a new one or select a file from your library.' );
instructions = __( 'Upload an audio file, pick one from your media library, or add one with a URL.' );
} else if ( isImage ) {
instructions = __( 'Drag an image, upload a new one or select a file from your library.' );
instructions = __( 'Upload an image file, pick one from your media library, or add one with a URL.' );
} else if ( isVideo ) {
instructions = __( 'Drag a video, upload a new one or select a file from your library.' );
instructions = __( 'Upload a video file, pick one from your media library, or add one with a URL.' );
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/cover/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class CoverEdit extends Component {
className={ className }
labels={ {
title: label,
instructions: __( 'Drag an image or a video, upload a new one or select a file from your library.' ),
instructions: __( 'Upload an image or video file, or pick one from your media library.' ),
} }
onSelect={ onSelectMedia }
accept="image/*,video/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/file/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class FileEdit extends Component {
icon={ <BlockIcon icon={ icon } /> }
labels={ {
title: __( 'File' ),
instructions: __( 'Drag a file, upload a new one or select a file from your library.' ),
instructions: __( 'Upload a file or pick one from your media library.' ),
} }
onSelect={ this.onSelectFile }
notices={ noticeUI }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ class ImageEdit extends Component {
const src = isExternal ? url : undefined;
const labels = {
title: ! url ? __( 'Image' ) : __( 'Edit image' ),
instructions: __( 'Drag an image to upload, select a file from your library or add one from an URL.' ),
instructions: __( 'Upload an image, pick one from your media library, or add one with a URL.' ),
};
const mediaPreview = ( !! url && <img
alt={ __( 'Edit image' ) }
Expand Down

0 comments on commit 84543ff

Please sign in to comment.