-
Notifications
You must be signed in to change notification settings - Fork 88
doc: translate strict mode to zh-hant #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deploy preview for zh-hant-reactjs-org ready! Built with commit d18116b |
content/docs/strict-mode.md
Outdated
permalink: docs/strict-mode.html | ||
--- | ||
|
||
`StrictMode` is a tool for highlighting potential problems in an application. Like `Fragment`, `StrictMode` does not render any visible UI. It activates additional checks and warnings for its descendants. | ||
`嚴格模式(Strict Mode)` 是一個用來突顯應用程式裡潛在問題的工具。如同 `Fragment` 一樣,`嚴格模式`不會 render 任何可見的 UI。它為了它底下的所有子元件們啟動了額外的檢查和警告。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`嚴格模式(Strict Mode)` 是一個用來突顯應用程式裡潛在問題的工具。如同 `Fragment` 一樣,`嚴格模式`不會 render 任何可見的 UI。它為了它底下的所有子元件們啟動了額外的檢查和警告。 | |
`嚴格模式`是一個用來突顯應用程式裡潛在問題的工具。如同 `Fragment` 一樣,`嚴格模式`不會 render 任何可見的 UI。它為了底下的所有的依賴們啟動了額外的檢查和警告。 |
content/docs/strict-mode.md
Outdated
> | ||
> Strict mode checks are run in development mode only; _they do not impact the production build_. | ||
> 嚴格模式檢查只會在開發模式中執行;_它們不應該影響線上的應用程式_。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> 嚴格模式檢查只會在開發模式中執行;_它們不應該影響線上的應用程式_。 | |
> 嚴格模式檢查只會在開發模式中執行;_它們不應該影響正式環境_。 |
content/docs/strict-mode.md
Outdated
|
||
In the above example, strict mode checks will *not* be run against the `Header` and `Footer` components. However, `ComponentOne` and `ComponentTwo`, as well as all of their descendants, will have the checks. | ||
在上面的例子裡,嚴格模式檢查將*不會*跑在 `Header` 和 `Footer` 元件上。然而 `ComponentOne` 和 `ComponentTwo`,以及它們底下的所有子元件,都會被檢查。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在上面的例子裡,嚴格模式檢查將*不會*跑在 `Header` 和 `Footer` 元件上。然而 `ComponentOne` 和 `ComponentTwo`,以及它們底下的所有子元件,都會被檢查。 | |
在上面的範例裡,嚴格模式檢查將*不會*跑在 `Header` 和 `Footer` 元件上。然而 `ComponentOne` 和 `ComponentTwo`,以及它們底下的所有子依賴,都會被檢查。 |
content/docs/strict-mode.md
Outdated
* [Warning about deprecated findDOMNode usage](#warning-about-deprecated-finddomnode-usage) | ||
* [Detecting unexpected side effects](#detecting-unexpected-side-effects) | ||
* [Detecting legacy context API](#detecting-legacy-context-api) | ||
`嚴格模式` 目前幫助了: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`嚴格模式` 目前幫助了: | |
`嚴格模式`目前可以幫助: |
content/docs/strict-mode.md
Outdated
* [Detecting legacy context API](#detecting-legacy-context-api) | ||
`嚴格模式` 目前幫助了: | ||
* [發現擁有不安全生命週期的 component](#identifying-unsafe-lifecycles) | ||
* [警告使用到了既有的 string ref API](#warning-about-legacy-string-ref-api-usage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer:
* [警告使用到了既有的 string ref API](#warning-about-legacy-string-ref-api-usage) | |
* [警告使用了 legacy string ref API](#warning-about-legacy-string-ref-api-usage) |
content/docs/strict-mode.md
Outdated
|
||
Strict mode can't automatically detect side effects for you, but it can help you spot them by making them a little more deterministic. This is done by intentionally double-invoking the following methods: | ||
嚴格模式無法自動偵測副作用,但它可以藉由使這些副作用變得更有確定性,來幫助你發現它們。它藉由故意調用兩次下面的函式來完成這個功能: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嚴格模式無法自動偵測副作用,但它可以藉由使這些副作用變得更有確定性,來幫助你發現它們。它藉由故意調用兩次下面的函式來完成這個功能: | |
嚴格模式無法自動檢測 side effect,但它可以藉由使這些 side effect 變得更有確定性,來幫助你發現它們。它藉由故意調用兩次下面的函式來完成這個功能: |
content/docs/strict-mode.md
Outdated
> | ||
> This only applies to development mode. _Lifecycles will not be double-invoked in production mode._ | ||
> 這個只在開發模式發生。 _生命週期不會被重複調用在線上模式。_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> 這個只在開發模式發生。 _生命週期不會被重複調用在線上模式。_ | |
> 這個只在開發模式發生。_生命週期不會被重複調用在正式環境。_ |
content/docs/strict-mode.md
Outdated
|
||
### Detecting legacy context API {#detecting-legacy-context-api} | ||
### 偵測既有的 context API {#detecting-legacy-context-api} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### 偵測既有的 context API {#detecting-legacy-context-api} | |
### 檢測 legacy context API {#detecting-legacy-context-api} |
content/docs/strict-mode.md
Outdated
|
||
The legacy context API is error-prone, and will be removed in a future major version. It still works for all 16.x releases but will show this warning message in strict mode: | ||
既有的 context API 是容易出錯的,並將在以後的主要版本中刪除。它仍然適用於所有 16.x 版本,但將在嚴格模式下顯示以下警告訊息: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
既有的 context API 是容易出錯的,並將在以後的主要版本中刪除。它仍然適用於所有 16.x 版本,但將在嚴格模式下顯示以下警告訊息: | |
Legacy context API 是容易出錯的,並將在以後的主要版本中刪除。它仍然適用於所有 16.x 版本,但將在嚴格模式下顯示以下警告訊息: |
content/docs/strict-mode.md
Outdated
|
||
 | ||
|
||
Read the [new context API documentation](/docs/context.html) to help migrate to the new version. | ||
閱讀[新的 context API文檔](/docs/context.html),以幫助遷移到新版本。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
閱讀[新的 context API文檔](/docs/context.html),以幫助遷移到新版本。 | |
閱讀[新的 context API 文件](/docs/context.html),以助於遷移到新版本。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for helping translation.
@neighborhood999 Just updated based on suggestion. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @eyeccc!
doc: translate strict mode to zh-hant