Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update invalid block copy #9667

Merged
merged 2 commits into from
Oct 4, 2018
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
2 changes: 1 addition & 1 deletion edit-post/hooks/validate-multiple-use/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const withMultipleValidation = createHigherOrderComponent( ( BlockEdit ) => {
] }
>
<strong>{ blockType.title }: </strong>
{ __( 'This block may not be used more than once.' ) }
{ __( 'This block can only be used once.' ) }
</Warning>,
];
} );
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/block-compare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class BlockCompare extends Component {
title={ __( 'Current' ) }
className="editor-block-compare__current"
action={ onKeep }
actionText={ __( 'Keep as HTML' ) }
actionText={ __( 'Convert to HTML' ) }
rawContent={ original.rawContent }
renderedContent={ original.renderedContent }
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@ export class BlockInvalidWarning extends Component {
const hasHTMLBlock = !! getBlockType( 'core/html' );
const { compare } = this.state;
const hiddenActions = [
{ title: __( 'Convert to Blocks' ), onClick: convertToBlocks },
{ title: __( 'Convert to Classic Block' ), onClick: convertToClassic },
{ title: __( 'Compare Conversion' ), onClick: this.onCompare },
];

if ( compare ) {
return (
<Modal
title={ __( 'Compare Block Conversion' ) }
title={ __( 'Resolve Block' ) }
onRequestClose={ this.onCompareClose }
className="editor-block-compare"
>
Expand All @@ -65,18 +63,18 @@ export class BlockInvalidWarning extends Component {
return (
<Warning
actions={ [
<Button key="convert" onClick={ convertToBlocks } isLarge isPrimary={ ! hasHTMLBlock }>
{ __( 'Convert to Blocks' ) }
<Button key="convert" onClick={ this.onCompare } isLarge isPrimary={ ! hasHTMLBlock }>
{ __( 'Resolve' ) }
</Button>,
hasHTMLBlock && (
<Button key="edit" onClick={ convertToHTML } isLarge isPrimary>
{ __( 'Keep as HTML' ) }
{ __( 'Convert to HTML' ) }
</Button>
),
] }
secondaryActions={ hiddenActions }
>
{ __( 'This block has been modified externally.' ) }
{ __( 'This block contains unexpected or invalid content.' ) }
</Warning>
);
}
Expand Down