Skip to content

Commit e319d4c

Browse files
authored
Merge pull request #124 from reactjs/revert_squash_merge
Fixing sync with upstream
2 parents ec1067b + 4d93289 commit e319d4c

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

content/docs/add-react-to-a-website.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Commonly, you might want to display React components in multiple places on the H
110110
111111
### Tip: Minify JavaScript for Production {#tip-minify-javascript-for-production}
112112

113-
Before deploying your website to production, be mindful that unminifed JavaScript can significantly slow down the page for your users.
113+
Before deploying your website to production, be mindful that unminified JavaScript can significantly slow down the page for your users.
114114

115115
If you already minify the application scripts, **your site will be production-ready** if you ensure that the deployed HTML loads the versions of React ending in `production.min.js`:
116116

content/languages.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
- name: French
4343
translated_name: Français
4444
code: fr
45-
status: 1
45+
status: 2
4646
- name: Gujarati
4747
translated_name: ગુજરાતી
4848
code: gu
@@ -123,6 +123,9 @@
123123
translated_name: සිංහල
124124
code: si
125125
status: 0
126+
- name: Swedish
127+
translated_name: Svenska
128+
code: sv
126129
- name: Tamil
127130
translated_name: தமிழ்
128131
code: ta
@@ -158,4 +161,4 @@
158161
- name: Traditional Chinese
159162
translated_name: 繁體中文
160163
code: zh-hant
161-
status: 0
164+
status: 0

src/components/CodeEditor/CodeEditor.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ import {LiveEditor, LiveProvider} from 'react-live';
1111
import {colors, media} from 'theme';
1212
import MetaTitle from 'templates/components/MetaTitle';
1313

14+
// Replace unicode to text for other languages
15+
const unicodeToText = text =>
16+
text.replace(/\\u([\dA-F]{4})/gi, (_, p1) =>
17+
String.fromCharCode(parseInt(p1, 16)),
18+
);
19+
1420
const compileES5 = (
1521
code, // eslint-disable-next-line no-undef
1622
) => Babel.transform(code, {presets: ['es2015', 'react']}).code;
@@ -271,7 +277,7 @@ class CodeEditor extends Component {
271277

272278
if (showJSX) {
273279
newState.code = code;
274-
newState.compiledES6 = compileES6(code);
280+
newState.compiledES6 = unicodeToText(compileES6(code));
275281
} else {
276282
newState.compiledES6 = code;
277283
}

src/site-constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// NOTE: We can't just use `location.toString()` because when we are rendering
99
// the SSR part in node.js we won't have a proper location.
1010
const urlRoot = 'https://reactjs.org';
11-
const version = '16.8.3';
11+
const version = '16.8.4';
1212
const babelURL = 'https://unpkg.com/[email protected]/babel.min.js';
1313

1414
export {babelURL, urlRoot, version};

0 commit comments

Comments
 (0)