From cda11db7ebf2b1a2f504cf7dc460076f48d16322 Mon Sep 17 00:00:00 2001 From: Arvindeva Wibisono <45450464+arvindeva@users.noreply.github.com> Date: Wed, 6 Mar 2019 02:34:38 +0700 Subject: [PATCH 1/5] Fixed typo (#1786) 'minifed' -> 'minified' --- content/docs/add-react-to-a-website.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/add-react-to-a-website.md b/content/docs/add-react-to-a-website.md index 6a668e0a1..a97b44d45 100644 --- a/content/docs/add-react-to-a-website.md +++ b/content/docs/add-react-to-a-website.md @@ -110,7 +110,7 @@ Commonly, you might want to display React components in multiple places on the H ### Tip: Minify JavaScript for Production {#tip-minify-javascript-for-production} -Before deploying your website to production, be mindful that unminifed JavaScript can significantly slow down the page for your users. +Before deploying your website to production, be mindful that unminified JavaScript can significantly slow down the page for your users. 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`: From e81a451424cbf267e0814c0ba76314c8cdb08018 Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Tue, 5 Mar 2019 15:20:19 -0800 Subject: [PATCH 2/5] 16.8.3 -> 16.8.4 --- src/site-constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/site-constants.js b/src/site-constants.js index 2dc51fadc..f26103279 100644 --- a/src/site-constants.js +++ b/src/site-constants.js @@ -8,7 +8,7 @@ // NOTE: We can't just use `location.toString()` because when we are rendering // the SSR part in node.js we won't have a proper location. const urlRoot = 'https://reactjs.org'; -const version = '16.8.3'; +const version = '16.8.4'; const babelURL = 'https://unpkg.com/babel-standalone@6.26.0/babel.min.js'; export {babelURL, urlRoot, version}; From e4015f32c557ce8967de8072b5bc3f297d0d3c79 Mon Sep 17 00:00:00 2001 From: Nat Alison Date: Tue, 5 Mar 2019 15:47:18 -0800 Subject: [PATCH 3/5] Update languages.yml (#1791) * French is at 100% core pages! * Added Swedish --- content/languages.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/content/languages.yml b/content/languages.yml index ee7aa00c0..ff0be2c1d 100644 --- a/content/languages.yml +++ b/content/languages.yml @@ -42,7 +42,7 @@ - name: French translated_name: Français code: fr - status: 1 + status: 2 - name: Gujarati translated_name: ગુજરાતી code: gu @@ -123,6 +123,9 @@ translated_name: සිංහල code: si status: 0 +- name: Swedish + translated_name: Svenska + code: sv - name: Tamil translated_name: தமிழ் code: ta @@ -158,4 +161,4 @@ - name: Traditional Chinese translated_name: 繁體中文 code: zh-hant - status: 0 \ No newline at end of file + status: 0 From b50fe64c1e88489022eddf2cfff0995778827f84 Mon Sep 17 00:00:00 2001 From: Farhad Yasir Date: Thu, 7 Mar 2019 06:31:15 +1100 Subject: [PATCH 4/5] fix(unicode-to-char): Replaced other languages unicode to text (#1780) * fix(unicode-to-char): Replaced other languages unicode to text * fix(unicode-to-char): run prettier to fix lint error * feat(unicode-to-char): modified the replace function with p1 parameter --- src/components/CodeEditor/CodeEditor.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/CodeEditor/CodeEditor.js b/src/components/CodeEditor/CodeEditor.js index 39ebe8f1e..de8235438 100644 --- a/src/components/CodeEditor/CodeEditor.js +++ b/src/components/CodeEditor/CodeEditor.js @@ -11,6 +11,12 @@ import {LiveEditor, LiveProvider} from 'react-live'; import {colors, media} from 'theme'; import MetaTitle from 'templates/components/MetaTitle'; +// Replace unicode to text for other languages +const unicodeToText = text => + text.replace(/\\u([\dA-F]{4})/gi, (_, p1) => + String.fromCharCode(parseInt(p1, 16)), + ); + const compileES5 = ( code, // eslint-disable-next-line no-undef ) => Babel.transform(code, {presets: ['es2015', 'react']}).code; @@ -271,7 +277,7 @@ class CodeEditor extends Component { if (showJSX) { newState.code = code; - newState.compiledES6 = compileES6(code); + newState.compiledES6 = unicodeToText(compileES6(code)); } else { newState.compiledES6 = code; } From d9a8258aa4473cd949a91b43e25ff8fd0b4a4a79 Mon Sep 17 00:00:00 2001 From: jakubdrozdek Date: Thu, 7 Mar 2019 15:55:12 +0100 Subject: [PATCH 5/5] Resolve conflict --- content/docs/add-react-to-a-website.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/content/docs/add-react-to-a-website.md b/content/docs/add-react-to-a-website.md index cf2219dfb..625245bee 100644 --- a/content/docs/add-react-to-a-website.md +++ b/content/docs/add-react-to-a-website.md @@ -111,11 +111,7 @@ Często zdarza się, że komponent trzeba wyświetlić na stronie kilka razy. Ot ### Wskazówka: Minifikuj JavaScript dla potrzeb środowiska produkcyjnego {#tip-minify-javascript-for-production} -<<<<<<< HEAD Przed wdrożeniem strony do środowiska produkcyjnego, pamiętaj, że niezminifikowany kod javascriptowy może znacznie spowolnić działanie twojej strony. -======= -Before deploying your website to production, be mindful that unminified JavaScript can significantly slow down the page for your users. ->>>>>>> b50fe64c1e88489022eddf2cfff0995778827f84 Jeżeli twoje skrypty są już zminifikowane i jeśli wdrożony dokument HTML ładuje wersję Reacta z końcówką `production.min.js` w nazwie, wówczas twoja aplikacja będzie gotowa do użytku w środowisku produkcyjnym: