From b495de9e4a3fcd7d7651cd78ad2aabda284c111d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=C3=AAn=20Ary?= Date: Tue, 14 Sep 2021 22:36:48 +0700 Subject: [PATCH 1/2] Translate CDN Links page and Create a New React App page --- .gitignore | 1 + content/docs/cdn-links.md | 14 ++-- content/docs/create-a-new-react-app.md | 84 ++++++++++----------- content/docs/nav.yml | 4 +- src/components/FeedbackForm/FeedbackForm.js | 2 +- 5 files changed, 53 insertions(+), 52 deletions(-) diff --git a/.gitignore b/.gitignore index d1bde99ce..19f7230bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .cache .DS_STORE .idea +.history node_modules public yarn-error.log \ No newline at end of file diff --git a/content/docs/cdn-links.md b/content/docs/cdn-links.md index e357811de..61716456e 100644 --- a/content/docs/cdn-links.md +++ b/content/docs/cdn-links.md @@ -6,32 +6,32 @@ prev: create-a-new-react-app.html next: release-channels.html --- -Both React and ReactDOM are available over a CDN. +Cả React và ReactDOM đều có sẵn trên CDN. ```html ``` -The versions above are only meant for development, and are not suitable for production. Minified and optimized production versions of React are available at: +Các phiên bản trên chỉ dành cho develop và không phù hợp cho production. Các phiên bản production thu nhỏ và tối ưu hóa của React có sẵn tại: ```html ``` -To load a specific version of `react` and `react-dom`, replace `17` with the version number. +Để tải một phiên bản cụ thể của `react` và `react-dom`, thay thế `17` với số phiên bản. -### Why the `crossorigin` Attribute? {#why-the-crossorigin-attribute} +### Tại sao lại có Thuộc Tính `crossorigin`? {#why-the-crossorigin-attribute} -If you serve React from a CDN, we recommend to keep the [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) attribute set: +Nếu bạn phân phối React từ CDN, chúng tôi khuyên bạn nên giữ bộ thuộc tính [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes): ```html ``` -We also recommend to verify that the CDN you are using sets the `Access-Control-Allow-Origin: *` HTTP header: +Chúng tôi cũng khuyên bạn nên xác minh rằng CDN bạn đang sử dụng đặt `Access-Control-Allow-Origin: *` HTTP header: ![Access-Control-Allow-Origin: *](../images/docs/cdn-cors-header.png) -This enables a better [error handling experience](/blog/2017/07/26/error-handling-in-react-16.html) in React 16 and later. +Điều này cho phép trải nghiệm [xử lý lỗi tốt hơn](/blog/2017/07/26/error-handling-in-react-16.html) trong React 16 trở lên. diff --git a/content/docs/create-a-new-react-app.md b/content/docs/create-a-new-react-app.md index 12afba206..6a1486d64 100644 --- a/content/docs/create-a-new-react-app.md +++ b/content/docs/create-a-new-react-app.md @@ -1,6 +1,6 @@ --- id: create-a-new-react-app -title: Create a New React App +title: Tạo một App React mới permalink: docs/create-a-new-react-app.html redirect_from: - "docs/add-react-to-a-new-app.html" @@ -8,38 +8,38 @@ prev: add-react-to-a-website.html next: cdn-links.html --- -Use an integrated toolchain for the best user and developer experience. +Sử dụng chuỗi công cụ tích hợp để có trải nghiệm tốt nhất cho người dùng và nhà phát triển. -This page describes a few popular React toolchains which help with tasks like: +Trang này mô tả một số công cụ React phổ biến giúp thực hiện các tác vụ như: -* Scaling to many files and components. -* Using third-party libraries from npm. -* Detecting common mistakes early. -* Live-editing CSS and JS in development. -* Optimizing the output for production. +* Mở rộng quy mô cho nhiều file và component. +* Sử dụng thư viện của bên thứ ba từ npm. +* Phát hiện sớm các lỗi thường gặp. +* Chỉnh sửa trực tiếp CSS và JS đang được phát triển. +* Tối ưu hóa đầu ra cho production. -The toolchains recommended on this page **don't require configuration to get started**. +Các công cụ được đề xuất trên trang này **không yêu cầu cấu hình để bắt đầu**. -## You Might Not Need a Toolchain {#you-might-not-need-a-toolchain} +## Bạn Có Thể Không Cần một Chuỗi Công Cụ {#you-might-not-need-a-toolchain} -If you don't experience the problems described above or don't feel comfortable using JavaScript tools yet, consider [adding React as a plain ` ``` -Các phiên bản trên chỉ dành cho develop và không phù hợp cho production. Các phiên bản production thu nhỏ và tối ưu hóa của React có sẵn tại: +The versions above are only meant for development, and are not suitable for production. Minified and optimized production versions of React are available at: ```html ``` -Để tải một phiên bản cụ thể của `react` và `react-dom`, thay thế `17` với số phiên bản. +To load a specific version of `react` and `react-dom`, replace `17` with the version number. -### Tại sao lại có Thuộc Tính `crossorigin`? {#why-the-crossorigin-attribute} +### Why the `crossorigin` Attribute? {#why-the-crossorigin-attribute} -Nếu bạn phân phối React từ CDN, chúng tôi khuyên bạn nên giữ bộ thuộc tính [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes): +If you serve React from a CDN, we recommend to keep the [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) attribute set: ```html ``` -Chúng tôi cũng khuyên bạn nên xác minh rằng CDN bạn đang sử dụng đặt `Access-Control-Allow-Origin: *` HTTP header: +We also recommend to verify that the CDN you are using sets the `Access-Control-Allow-Origin: *` HTTP header: ![Access-Control-Allow-Origin: *](../images/docs/cdn-cors-header.png) -Điều này cho phép trải nghiệm [xử lý lỗi tốt hơn](/blog/2017/07/26/error-handling-in-react-16.html) trong React 16 trở lên. +This enables a better [error handling experience](/blog/2017/07/26/error-handling-in-react-16.html) in React 16 and later.