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

[debate] 'React JSX transform uses the upper case ...' translation #126

Closed
seognil opened this issue Feb 20, 2019 · 2 comments
Closed

[debate] 'React JSX transform uses the upper case ...' translation #126

seognil opened this issue Feb 20, 2019 · 2 comments

Comments

@seognil
Copy link
Contributor

seognil commented Feb 20, 2019

原文:/warnings/unknown-prop.html 16 行

React JSX transform uses the upper vs. lower case convention to distinguish between user-defined components and DOM tags

该句子附带的链接:/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized 96 行

When an element type starts with a lowercase letter, it refers to a built-in component like <div> or <span> and results in a string 'div' or 'span' passed to React.createElement. Types that start with a capital letter like <Foo /> compile to React.createElement(Foo) and correspond to a component defined or imported in your JavaScript file.


从英语的语法结构上来看,
transform 可能是个名词,uses 是动词,
那么 transform 可能表示为:
「转换、转换器、转换引擎」
链接部分的原意也提到了「results in / compile to」和转换有关的意思。
(不知道 React 源码是怎么处理的……)

如果将 transform 视为动词,则可以表示为:
「转换(使用)、交替、切换、依次」
use 可以解释为:
「使用、根据」

#111 (comment)


部分备选翻译:

「React JSX 引擎使用大小写约定来区分用户自定义组件和 DOM 标签。」
「React JSX 语法使用大小写约定来区分用户自定义组件和 DOM 标签。」

@hijiangtao
Copy link
Member

嗯,个人倾向于前者「transform 可能是个名词」,以你最新的 commit 为准吧。

@hijiangtao
Copy link
Member

#111 Approved.

To be merged and closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants