Skip to content

Commit 4fcd66b

Browse files
merging all conflicts
2 parents bc0a2a0 + b50fe64 commit 4fcd66b

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ React コンポーネントを HTML ページの一箇所だけではなくい
110110
111111
### ヒント:本番環境用に JavaScript を圧縮する {#tip-minify-javascript-for-production}
112112

113+
<<<<<<< HEAD
113114
ウェブサイトを本番環境にデプロイするにあたって、圧縮していない JavaScript はページの速度を著しく落としてしまうということに配慮してください。
115+
=======
116+
Before deploying your website to production, be mindful that unminified JavaScript can significantly slow down the page for your users.
117+
>>>>>>> b50fe64c1e88489022eddf2cfff0995778827f84
114118
115119
自分のスクリプトの圧縮が完了していて、デプロイ後の HTML が `production.min.js` で終わる React スクリプトを読み込んでいることが検証できていれば、**あなたのウェブサイトは本番環境にリリースする準備ができています**
116120

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

+5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77

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.
10+
<<<<<<< HEAD
1011
const urlRoot = 'https://ja.reactjs.org';
1112
const version = '16.8.3';
13+
=======
14+
const urlRoot = 'https://reactjs.org';
15+
const version = '16.8.4';
16+
>>>>>>> b50fe64c1e88489022eddf2cfff0995778827f84
1217
const babelURL = 'https://unpkg.com/[email protected]/babel.min.js';
1318

1419
export {babelURL, urlRoot, version};

0 commit comments

Comments
 (0)