Skip to content
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

[api] react #28

Merged
merged 3 commits into from Mar 10, 2019
Merged

[api] react #28

merged 3 commits into from Mar 10, 2019

Conversation

itszero
Copy link
Contributor

@itszero itszero commented Feb 28, 2019

Translation for the React API in the API reference section. There are some very convoluted sentences in the notes, I've tried my best translating them but suggestions are welcomed! 🙏

@netlify
Copy link

netlify bot commented Feb 28, 2019

Deploy preview for zh-hant-reactjs ready!

Built with commit bfe4a9b

https://deploy-preview-28--zh-hant-reactjs.netlify.com

@netlify
Copy link

netlify bot commented Feb 28, 2019

Deploy preview for zh-hant-reactjs-org ready!

Built with commit ae3975b

https://deploy-preview-28--zh-hant-reactjs-org.netlify.com

Copy link
Member

@bugtender bugtender left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍LGTM, Some minor issues.😺


We recommend [using JSX](/docs/introducing-jsx.html) to describe what your UI should look like. Each JSX element is just syntactic sugar for calling [`React.createElement()`](#createelement). You will not typically invoke the following methods directly if you are using JSX.
我們推薦[使用 JSX](/docs/introducing-jsx.html) 來描述你的 UI 應該長成什麼樣子。 每個 JSX element 都只是呼叫 [`React.createElement()`](#createelement) 的語法糖。當你使用 JSX 的時候你將不需要直接呼叫以下的 method:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
我們推薦[使用 JSX](/docs/introducing-jsx.html) 來描述你的 UI 應該長成什麼樣子。 每個 JSX element 都只是呼叫 [`React.createElement()`](#createelement) 的語法糖。當你使用 JSX 的時候你將不需要直接呼叫以下的 method:
我們推薦[使用 JSX](/docs/introducing-jsx.html) 來描述你的 UI 應該長成什麼樣子。每個 JSX element 都只是呼叫 [`React.createElement()`](#createelement) 的語法糖。當你使用 JSX 的時候你將不需要直接呼叫以下的 method:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method -> 方法

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這我覺得 function 要翻譯 method 不翻譯好像有點不太 consistent?

content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved

We recommend [using JSX](/docs/introducing-jsx.html) to describe what your UI should look like. Each JSX element is just syntactic sugar for calling [`React.createElement()`](#createelement). You will not typically invoke the following methods directly if you are using JSX.
我們推薦[使用 JSX](/docs/introducing-jsx.html) 來描述你的 UI 應該長成什麼樣子。 每個 JSX element 都只是呼叫 [`React.createElement()`](#createelement) 的語法糖。當你使用 JSX 的時候你將不需要直接呼叫以下的 method:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method -> 方法

content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved
itszero and others added 2 commits March 6, 2019 22:43
Co-Authored-By: itszero <github@itsze.ro>
Copy link
Contributor Author

@itszero itszero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super convinced about method being translated to 方法 because function isn't translated. and also traverse to 列舉 or 拜訪

I've merged everything else. Thanks for the review!

content/docs/reference-react.md Outdated Show resolved Hide resolved
content/docs/reference-react.md Outdated Show resolved Hide resolved
@@ -98,21 +98,19 @@ class Greeting extends React.Component {
}
```

See the [React.Component API Reference](/docs/react-component.html) for a list of methods and properties related to the base `React.Component` class.
參閱 [React.Component API 參考資料](/docs/react-component.html) 可查到跟 `React.Component` 相關的 method 及 properties。
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

glossary did specify that prop should be kept as-is though


#### `React.Children.map` {#reactchildrenmap}

```javascript
React.Children.map(children, function[(thisArg)])
```

Invokes a function on every immediate child contained within `children` with `this` set to `thisArg`. If `children` is an array it will be traversed and the function will be called for each child in the array. If children is `null` or `undefined`, this method will return `null` or `undefined` rather than an array.
對每一個列為 `children` 之中的直接 child 呼叫 function 並將 `this` 設定為 `thisArg`。如果 `children` 是一個 array,這將會列舉整個 array 並對每一個 child 呼叫這個 function。如果 children `null` 或是 `undefined`,這個 method 將會回傳 `null` 或是 `undefined` 而不是一個 array
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO 列舉 is more clearer than 拜訪 but it could just be my bias that I've seen a lot of translation associating iteration with 列舉 and it feel it's closer to traversed than visit.

@chloewlin
Copy link
Member

Hi @itszero! I think this is ready to be merged in. Let us revisit the translations of method and traverse later. :)

@chloewlin chloewlin merged commit 22483c4 into reactjs:master Mar 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants