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

docs(zh-hant): Translate Components and Props #12

Merged

Conversation

bugtender
Copy link
Member

@bugtender bugtender commented Feb 13, 2019

This Pull Request translates Components and Props page.

Click to view translated page from this Pull Request

localhost_8000_docs_components-and-props html

Reference

See the tracking issue of progress: #1

@@ -16,23 +16,23 @@ prev: rendering-elements.html
next: state-and-lifecycle.html
---

Components let you split the UI into independent, reusable pieces, and think about each piece in isolation. This page provides an introduction to the idea of components. You can find a [detailed component API reference here](/docs/react-component.html).
元件使你可以將 UI 拆分成獨立且可復用的程式碼,並且專注於各別程式碼的思考。本章節旨在介紹元件的相關概念,你也可以在此參閱[詳細的 API 文件](/docs/react-component.html)
Copy link
Member

Choose a reason for hiding this comment

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

Hey @bugtender ! I know you will fix this later. Just a quick reminder, we might want to consider using component in English rather than 元件 to avoid having to translate pureComponents and higherComponents. We should discuss this soon!

>
>To learn more about the reasoning behind this convention, please read [JSX In Depth](/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized).
>想要了解更多此約定背後的原因,請參閱 [JSX In Depth](/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized) 章節。
Copy link
Member

Choose a reason for hiding this comment

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

I think convention should be 傳統?

Copy link
Member

Choose a reason for hiding this comment

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

@chloewlin Here means is not the 傳統, like 習慣 or 慣例

- 想要了解更多此約定背後的原因
+ 想要了解更多關於此慣例的原因

@bugtender
Copy link
Member Author

@chloewlin @neighborhood999 Thanks for reviewing! I just update it. 🐈

Copy link
Member

@neighborhood999 neighborhood999 left a comment

Choose a reason for hiding this comment

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

@bugtender I left some suggestions, thank you!

content/docs/components-and-props.md Outdated Show resolved Hide resolved
content/docs/components-and-props.md Outdated Show resolved Hide resolved
content/docs/components-and-props.md Outdated Show resolved Hide resolved
content/docs/components-and-props.md Outdated Show resolved Hide resolved
content/docs/components-and-props.md Outdated Show resolved Hide resolved
content/docs/components-and-props.md Outdated Show resolved Hide resolved
content/docs/components-and-props.md Outdated Show resolved Hide resolved

Extracting components might seem like grunt work at first, but having a palette of reusable components pays off in larger apps. A good rule of thumb is that if a part of your UI is used several times (`Button`, `Panel`, `Avatar`), or is complex enough on its own (`App`, `FeedStory`, `Comment`), it is a good candidate to be a reusable component.
在一開始,將 component 分離出來可能是一件繁重的工作,但是在較大的應用程式中,建構可復用的 component 是非常值得。以經驗來說,如果一個 UI 中有一部分會被重複使用很多次(`Button``Panel``Avatar`),或者它足夠複雜到自成一個 component(`App``FeedStory``Comment`),那它就適合被抽出作為一個可復用的 component
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
在一開始,將 component 分離出來可能是一件繁重的工作,但是在較大的應用程式中,建構可復用的 component 是非常值得。以經驗來說,如果一個 UI 中有一部分會被重複使用很多次(`Button``Panel``Avatar`),或者它足夠複雜到自成一個 component(`App``FeedStory``Comment`),那它就適合被抽出作為一個可復用的 component。
在一開始,將 component 抽離出來可能是一件繁重的工作,但是在較大的應用程式中,建構可覆用的 component 是非常值得。以經驗來說,如果一個 UI 中有一部分會被重複使用很多次(`Button``Panel``Avatar`),或者它足夠複雜到自成一個 component(`App``FeedStory``Comment`),那它就適合被抽出作為一個可覆用的 component。

Copy link
Member

Choose a reason for hiding this comment

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

Should reusable be 可復用的, 可覆用的 or even 可重複使用的?This is one React specific term that we should all agree on.

Copy link
Member

Choose a reason for hiding this comment

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

I think reusable is not the specific term of React 😛.

Copy link
Member

Choose a reason for hiding this comment

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

Ok. So after some googling, looks like people use both 重複 and 重覆 for repeat, but more people use . This means reusable should be either 可複用的 or 可覆用的

References:
(1) https://www.moedict.tw/%E8%A4%87
(2) https://www.moedict.tw/%E8%A6%86
(3) https://goo.gl/Xgk9E1 (but notice how both are interchangeable)

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, sorry my MacBook auto correct 複用 with 復用. I prefer 複用.

content/docs/components-and-props.md Outdated Show resolved Hide resolved
content/docs/components-and-props.md Outdated Show resolved Hide resolved
@chloewlin
Copy link
Member

@bugtender thank you so much. I think this post is 98% done. The only thing we need to discuss is weather we want to keep terminologies like function and reusable or translate them. At this point, it's more about style. Let's discuss. I will merge this in soon.

@bugtender
Copy link
Member Author

Apply suggestions and changed all 函式 back to function.

ref: chentsulin/redux#19

@bugtender bugtender force-pushed the translate-components-and-props-zh_hant branch 3 times, most recently from c2c5102 to 186875e Compare February 15, 2019 18:57
@bugtender bugtender force-pushed the translate-components-and-props-zh_hant branch from 186875e to c1e2b11 Compare February 18, 2019 02:48
@bugtender bugtender force-pushed the translate-components-and-props-zh_hant branch from c1e2b11 to 555f5cc Compare February 18, 2019 03:13
@netlify
Copy link

netlify bot commented Feb 18, 2019

Deploy preview for zh-hant-reactjs ready!

Built with commit b2c6dfb

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

@bugtender bugtender force-pushed the translate-components-and-props-zh_hant branch from 555f5cc to 967a6b8 Compare February 18, 2019 03:18
@bugtender
Copy link
Member Author

Finally setting up the Netlify preview. Sorry for mess notification and commit. 😰

@chloewlin
Copy link
Member

chloewlin commented Feb 18, 2019

Hey @bugtender good job setting up Netlify!

I added one final comment for line 33. After that, I think we can merge yours in. 💯

@chloewlin chloewlin merged commit dad3fe4 into reactjs:master Feb 19, 2019
@bugtender bugtender deleted the translate-components-and-props-zh_hant branch December 9, 2019 21:54
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.

3 participants