-
Notifications
You must be signed in to change notification settings - Fork 86
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
docs: JSX in Depth #102
docs: JSX in Depth #102
Conversation
Deploy preview for zh-hant-reactjs-org ready! Built with commit a9cd027 |
Co-Authored-By: Peng Jie <dean.leehom@gmail.com>
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.
Hi @aboudicheng
Thank you for your helping translation, I left some suggestions below, if have any suggestion, feel free left some comments.
Thank you @neighborhood999 for the suggestions. Please check again and see if anything else could be revised. |
content/docs/jsx-in-depth.md
Outdated
@@ -31,13 +31,13 @@ React.createElement( | |||
) | |||
``` | |||
|
|||
You can also use the self-closing form of the tag if there are no children. So: | |||
如果沒有 children 的話你也可以使用自我閉合的標籤形式。如: |
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.
如果沒有 children 的話你也可以使用自我閉合的標籤形式。如: | |
如果沒有 children 的話你也可以使用閉合的標籤形式。例如: |
content/docs/jsx-in-depth.md
Outdated
@@ -71,11 +71,11 @@ function WarningButton() { | |||
} | |||
``` | |||
|
|||
If you don't use a JavaScript bundler and loaded React from a `<script>` tag, it is already in scope as the `React` global. | |||
如果你不使用任何 JavaScript bundler 並以 `<script>` 標籤來導入 React,那麼它就已經以 `React` 存在於作用域中了。 |
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.
如果你不使用任何 JavaScript bundler 並以 `<script>` 標籤來導入 React,那麼它就已經以 `React` 存在於作用域中了。 | |
如果你不使用任何 JavaScript bundler 並從 `<script>` 標籤來載入 React,那麼它就已經以 `React` 存在於作用域中了。 |
content/docs/jsx-in-depth.md
Outdated
|
||
### Using Dot Notation for JSX Type {#using-dot-notation-for-jsx-type} | ||
### 在 JSX 類型中使用 Dot Notation {#using-dot-notation-for-jsx-type} |
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.
### 在 JSX 類型中使用 Dot Notation {#using-dot-notation-for-jsx-type} | |
### 在 JSX 類型中使用點記法 {#using-dot-notation-for-jsx-type} |
reference: https://developer.mozilla.org/zh-TW/docs/Learn/JavaScript/Objects/Basics
content/docs/jsx-in-depth.md
Outdated
|
||
You can also refer to a React component using dot-notation from within JSX. This is convenient if you have a single module that exports many React components. For example, if `MyComponents.DatePicker` is a component, you can use it directly from JSX with: | ||
你也可以在 JSX 中使用 dot-notation 來指向一個 React Component。這對當你有一個會導出許多 React component 的 module 來講是十分方便的。舉例來說,如果 `MyComponents.DatePicker` 是一個 component,那麼你可以在 JSX 中直接這樣使用: |
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.
Same as above.
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 @aboudicheng ~
content/docs/jsx-in-depth.md
Outdated
@@ -452,7 +452,7 @@ To fix this, make sure that the expression before `&&` is always boolean: | |||
</div> | |||
``` | |||
|
|||
Conversely, if you want a value like `false`, `true`, `null`, or `undefined` to appear in the output, you have to [convert it to a string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#String_conversion) first: | |||
相反地,如果你想要印出 `false`、`true`、`null` 或者 `undefined` 時,你必須要先把它[轉換成一個 string](https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Global_Objects/String#String_conversion): |
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.
Should we translate this string
to 字串
here?
I think it's just a 字串
, not a special word we need to keep in English 🤔
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.
@neighborhood999 suggested that string literals
can be translated as 字串字面值
, so I suppose there's no big deal in translating string
to 字串
. Thanks for pointing out.
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.
Yeah. That makes sense. Thank you!
Updated according to the suggestions, please check again. |
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 @aboudicheng!
Please let me know if you have any suggestion and if any revision can be made.