From e3a2d1566fc5ab980923f1cd6b7d08029cdfb370 Mon Sep 17 00:00:00 2001 From: Ajit Bohra Date: Mon, 30 Apr 2018 20:16:56 +0530 Subject: [PATCH 1/5] Add translators note --- core-blocks/embed/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core-blocks/embed/index.js b/core-blocks/embed/index.js index d080cee3acbda..d420751525b62 100644 --- a/core-blocks/embed/index.js +++ b/core-blocks/embed/index.js @@ -29,9 +29,11 @@ import './editor.scss'; const HOSTS_NO_PREVIEWS = [ 'facebook.com' ]; function getEmbedBlockSettings( { title, description, icon, category = 'embed', transforms, keywords = [] } ) { + // translators: %s: Name of service (e.g. VideoPress, YouTube) + const blockDescription = description || __( `Paste URLs from ${ title } to embed the content in this block.` ); return { title, - description: description || __( `Paste URLs from ${ title } to embed the content in this block.` ), + description: blockDescription, icon, category, keywords, From 750469418357c9ab0a702cfa719912d5c2203f64 Mon Sep 17 00:00:00 2001 From: Ajit Bohra Date: Wed, 16 May 2018 16:08:33 +0530 Subject: [PATCH 2/5] Fix warning & subfolder issue --- components/code-editor/editor.js | 12 ++++++------ components/code-editor/index.js | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/code-editor/editor.js b/components/code-editor/editor.js index 0be60c6f79dde..a0fb42fb1d64f 100644 --- a/components/code-editor/editor.js +++ b/components/code-editor/editor.js @@ -14,7 +14,7 @@ class CodeEditor extends Component { super( ...arguments ); this.onFocus = this.onFocus.bind( this ); - this.onBlur = this.onBlur.bind( this ); + this.onChange = this.onChange.bind( this ); this.onCursorActivity = this.onCursorActivity.bind( this ); this.onKeyHandled = this.onKeyHandled.bind( this ); } @@ -25,7 +25,7 @@ class CodeEditor extends Component { this.editor = instance.codemirror; this.editor.on( 'focus', this.onFocus ); - this.editor.on( 'blur', this.onBlur ); + this.editor.on( 'change', this.onChange ); this.editor.on( 'cursorActivity', this.onCursorActivity ); this.editor.on( 'keyHandled', this.onKeyHandled ); @@ -49,7 +49,7 @@ class CodeEditor extends Component { componentWillUnmount() { this.editor.on( 'focus', this.onFocus ); - this.editor.off( 'blur', this.onBlur ); + this.editor.off( 'change', this.onChange ); this.editor.off( 'cursorActivity', this.onCursorActivity ); this.editor.off( 'keyHandled', this.onKeyHandled ); @@ -63,7 +63,7 @@ class CodeEditor extends Component { } } - onBlur( editor ) { + onChange( editor ) { if ( this.props.onChange ) { this.props.onChange( editor.getValue() ); } @@ -99,12 +99,12 @@ class CodeEditor extends Component { } if ( ! this.props.focus && this.editor.hasFocus() ) { - document.activeElement.blur(); + document.activeElement.change(); } } render() { - return