Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/block-library/src/audio/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* External dependencies
*/
import { TouchableWithoutFeedback } from 'react-native';
import { isEmpty } from 'lodash';

/**
* WordPress dependencies
Expand Down Expand Up @@ -228,7 +227,7 @@ function AudioEdit( {
<BlockCaption
accessible={ true }
accessibilityLabelCreator={ ( caption ) =>
isEmpty( caption )
! caption
? /* translators: accessibility text. Empty Audio caption. */
__( 'Audio caption. Empty' )
: sprintf(
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/embed/embed-preview.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* External dependencies
*/
import { TouchableWithoutFeedback } from 'react-native';
import { isEmpty } from 'lodash';
import classnames from 'classnames/dedupe';

/**
Expand Down Expand Up @@ -52,7 +51,7 @@ const EmbedPreview = ( {
styles[ `embed-preview__sandbox--align-${ align }` ];

function accessibilityLabelCreator( caption ) {
return isEmpty( caption )
return ! caption
? /* translators: accessibility text. Empty Embed caption. */
__( 'Embed caption. Empty' )
: sprintf(
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/gallery/gallery.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* External dependencies
*/
import { View } from 'react-native';
import { isEmpty } from 'lodash';

/**
* Internal dependencies
Expand Down Expand Up @@ -100,7 +99,7 @@ export const Gallery = ( props ) => {
isSelected={ isCaptionSelected }
accessible={ true }
accessibilityLabelCreator={ ( caption ) =>
isEmpty( caption )
! caption
? /* translators: accessibility text. Empty gallery caption. */

'Gallery caption. Empty'
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/gallery/v1/gallery.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* External dependencies
*/
import { View } from 'react-native';
import { isEmpty } from 'lodash';

/**
* Internal dependencies
Expand Down Expand Up @@ -142,7 +141,7 @@ export const Gallery = ( props ) => {
isSelected={ isCaptionSelected }
accessible={ true }
accessibilityLabelCreator={ ( caption ) =>
isEmpty( caption )
! caption
? /* translators: accessibility text. Empty gallery caption. */
'Gallery caption. Empty'
: sprintf(
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/video/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* External dependencies
*/
import { View, TouchableWithoutFeedback, Text } from 'react-native';
import { isEmpty } from 'lodash';

/**
* WordPress dependencies
Expand Down Expand Up @@ -367,7 +366,7 @@ class VideoEdit extends Component {
<BlockCaption
accessible={ true }
accessibilityLabelCreator={ ( caption ) =>
isEmpty( caption )
! caption
? /* translators: accessibility text. Empty video caption. */
__( 'Video caption. Empty' )
: sprintf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { Switch } from 'react-native';
import { isEmpty } from 'lodash';

/**
* WordPress dependencies
*/
Expand All @@ -20,7 +20,7 @@ export default function BottomSheetSwitchCell( props ) {
};

const getAccessibilityLabel = () => {
if ( isEmpty( cellProps.help ) ) {
if ( ! cellProps.help ) {
return value
? sprintf(
/* translators: accessibility text. Switch setting ON state. %s: Switch title. */
Expand Down
5 changes: 2 additions & 3 deletions packages/editor/src/components/post-title/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* External dependencies
*/
import { View } from 'react-native';
import { isEmpty } from 'lodash';

/**
* WordPress dependencies
Expand Down Expand Up @@ -80,7 +79,7 @@ class PostTitle extends Component {

getTitle( title, postType ) {
if ( 'page' === postType ) {
return isEmpty( title )
return ! title
? /* translators: accessibility text. empty page title. */
__( 'Page title. Empty' )
: sprintf(
Expand All @@ -90,7 +89,7 @@ class PostTitle extends Component {
);
}

return isEmpty( title )
return ! title
? /* translators: accessibility text. empty post title. */
__( 'Post title. Empty' )
: sprintf(
Expand Down