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';
return (
<Suspense fallback={<Loader timeout={600} />}>
<MonacoEditor
editorDidMount={this.editorDidMount}
editorWillMount={this.editorWillMount}
key={`${editorTheme}-${fileKey}`}
language={modeMap[ext]}
onChange={this.onChange}
options={this.options}
theme={editorTheme}
value={contents}
/>
<span className='notranslate'>
<MonacoEditor
editorDidMount={this.editorDidMount}
editorWillMount={this.editorWillMount}
key={`${editorTheme}-${fileKey}`}
language={modeMap[ext]}
onChange={this.onChange}
options={this.options}
theme={editorTheme}
value={contents}
/>
</span>
</Suspense>
);
}

View File

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