fix(client): wrap editor in span with "notranslate" (#38389)

* Update Editor.js

* Fix linting issue

* Working on Preview with .notranslate

* Add "notranslate" for Preview component
This commit is contained in:
Esteban Borai
2020-04-26 11:22:41 -03:00
committed by GitHub
parent 9230db42ee
commit c5ba18e978
2 changed files with 13 additions and 11 deletions

View File

@ -220,16 +220,18 @@ class Editor extends Component {
const editorTheme = theme === 'night' ? 'vs-dark-custom' : 'vs-custom'; const editorTheme = theme === 'night' ? 'vs-dark-custom' : 'vs-custom';
return ( return (
<Suspense fallback={<Loader timeout={600} />}> <Suspense fallback={<Loader timeout={600} />}>
<MonacoEditor <span className='notranslate'>
editorDidMount={this.editorDidMount} <MonacoEditor
editorWillMount={this.editorWillMount} editorDidMount={this.editorDidMount}
key={`${editorTheme}-${fileKey}`} editorWillMount={this.editorWillMount}
language={modeMap[ext]} key={`${editorTheme}-${fileKey}`}
onChange={this.onChange} language={modeMap[ext]}
options={this.options} onChange={this.onChange}
theme={editorTheme} options={this.options}
value={contents} theme={editorTheme}
/> value={contents}
/>
</span>
</Suspense> </Suspense>
); );
} }

View File

@ -46,7 +46,7 @@ class Preview extends Component {
render() { render() {
const iframeToggle = this.state.iframeStatus ? 'disable' : 'enable'; const iframeToggle = this.state.iframeStatus ? 'disable' : 'enable';
return ( return (
<div className={`challenge-preview ${iframeToggle}-iframe`}> <div className={`notranslate challenge-preview ${iframeToggle}-iframe`}>
<iframe <iframe
className={'challenge-preview-frame'} className={'challenge-preview-frame'}
id={mainId} id={mainId}