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: Handling events #74

Merged
merged 10 commits into from
Jul 2, 2019
Merged

docs: Handling events #74

merged 10 commits into from
Jul 2, 2019

Conversation

chloewlin
Copy link
Member

Hi all, here is my translation for handling events. Here are some terms I am not sure about:

  • binding/bind: I am using 綁定 here. I know some contributors don't like it, but I can't think of a better word for now. It also feels weird to use the English word. I am open to suggestions.
  • listener: not sure how to translate it.
  • event handler: not sure how to translate it. Sometimes I just refer to it as 事件.

@netlify
Copy link

netlify bot commented Jun 30, 2019

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

Built with commit 1287887

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

@chloewlin chloewlin changed the title Handling events docs: Handling events Jun 30, 2019
content/docs/handling-events.md Outdated Show resolved Hide resolved
content/docs/handling-events.md Outdated Show resolved Hide resolved
content/docs/handling-events.md Outdated Show resolved Hide resolved
content/docs/handling-events.md Outdated Show resolved Hide resolved

## Passing Arguments to Event Handlers {#passing-arguments-to-event-handlers}
## 將 Argument 傳給 Event Handler {#passing-arguments-to-event-handlers}
Copy link
Member

Choose a reason for hiding this comment

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

The argument may translate to 參數?

Copy link
Member Author

Choose a reason for hiding this comment

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

I translate parameter as 參數. Not sure what argument should be, but I found this article saying it should be 引數: https://notfalse.net/6/arg-vs-param. I've never heard of it before.

Should we leave it as it is or do 引數(argument)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated! Please take a look.

content/docs/handling-events.md Outdated Show resolved Hide resolved
content/docs/handling-events.md Outdated Show resolved Hide resolved

In both cases, the `e` argument representing the React event will be passed as a second argument after the ID. With an arrow function, we have to pass it explicitly, but with `bind` any further arguments are automatically forwarded.
以這兩個例子來說,`e` 這個 argument 所代表的 React 事件將會被當作 ID 之後的第二個 argument 被傳遞下去。在使用 arrow function 時,我們必須明確地將它傳遞下去,但若使用 `bind` 語法,未來任何的 argument 都將會自動被傳遞下去。
Copy link
Member

Choose a reason for hiding this comment

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

The argument may translate to 參數?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

chloewlin and others added 7 commits July 2, 2019 00:23
Co-Authored-By: Peng Jie <dean.leehom@gmail.com>
Co-Authored-By: Peng Jie <dean.leehom@gmail.com>
Co-Authored-By: Peng Jie <dean.leehom@gmail.com>
Co-Authored-By: Peng Jie <dean.leehom@gmail.com>
Co-Authored-By: Peng Jie <dean.leehom@gmail.com>
Co-Authored-By: Peng Jie <dean.leehom@gmail.com>
- Although the two have different meanings, we decide to translate
the two as 參數 for clarity and consistency.
@neighborhood999 neighborhood999 merged commit d40c8df into reactjs:master Jul 2, 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.

2 participants