-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Translated C1~C4 of style guide #559
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
Conversation
src/v2/style-guide/index.md
Outdated
- `el` | ||
|
||
2. **Global Awareness** (requires knowledge beyond the component) | ||
2. **全局警惕** (要求组件以外的知识) |
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.
全局感知
src/v2/style-guide/index.md
Outdated
- `delimiters` | ||
- `comments` | ||
|
||
5. **Template Dependencies** (assets used in the template) | ||
5. **模板依赖** (模板内使用的资产) |
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.
“资产”是不是还是用“资源”好些?
src/v2/style-guide/index.md
Outdated
- `watch` | ||
- Lifecycle Events (in the order they are called) | ||
- 生命周期事件 (按照它们被调用的顺序) |
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.
生命周期钩子?感觉原文也需要改一下吧……
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.
恩,hook 好一些,支持
- `methods` | ||
|
||
11. **Rendering** (the declarative description of the component output) | ||
11. **渲染** (组件输出的声明式描述) | ||
- `template`/`render` |
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.
这个竟然放到最后……也是我没有想到的……
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.
🤷♀️ 我觉得有两方面原因,1 是比较大段,且逻辑性较弱;2 是很多组件都直接写 <template>
标签了,这个选项直接写的比较少。
src/v2/style-guide/index.md
Outdated
- `v-for` | ||
|
||
2. **Conditionals** (whether the element is rendered/shown) | ||
2. **有条件的** (元素是否渲染/显示) |
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.
干脆叫“条件指令”或者“渲染条件”?
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.
条件渲染 靠谱
src/v2/style-guide/index.md
Outdated
- `v-if` | ||
- `v-else-if` | ||
- `v-else` | ||
- `v-show` | ||
- `v-cloak` | ||
|
||
3. **Render Modifiers** (changes the way the element renders) | ||
3. **渲染修改器** (改变元素的渲染方式) |
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.
“修改渲染方式”?
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.
那就变成括号里的解释了。。。可能还是把 modifier 翻译一下 (为“修改器”) 比较好
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.
modifier 就有修饰符/修改器两种译法咯?
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.
统一到“修饰符”?
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.
但是这个和指令的修饰符又不是一个概念……
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.
那翻译成“渲染方式”如何?
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.
好像可以
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.
All done
src/v2/style-guide/index.md
Outdated
- `v-pre` | ||
- `v-once` | ||
|
||
4. **Global Awareness** (requires knowledge beyond the component) | ||
4. **全局警惕** (需要超越组件的知识) |
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.
感知?
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.
我理解是指这个信息是全局可感知的,用户也需要确保外部使用时没有冲突。
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.
「感知」的译法听起来有点奇怪(虽然并不能想到更好的译法),是不是加个脚注说明一下比较好。另外 knowledge 在这里应该和 awareness 是一个意思,译做「知识」似乎不太合适(包括上面那个)。
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.
“感知”我个人还是很常用的,比如“感知”外部的变化什么的。还有这个“超越组件”我看了一下也应该改一下,换成“组件外部”。整个也许可以译为“需被组件外部感知”?
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.
「感知」是一个主动行为。这里 global awareness 的意思我理解是「大家注意啦!我在全局域里加了个 name/key,你们起名别冲突了!」,是需要组件外部环境知悉某个改变(但组件选项的 parent
似乎不属于这种情况;parent
为什么需要全局感知?)。如果理解这里的含义倒是不觉得「感知」很有违和感,只是一上来突然看到这个词,上下文又是针对一个组件/元素的,难免会习惯性产生「由内向外」的思考,这时会有点费解(因为这里的「感知」其实是「由外向内」的)。
需被组件外部感知
这个解释 ok。
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.
但组件选项的
parent
似乎不属于这种情况;parent
为什么需要全局感知?
其实也可能是英文原文表达不够准确啦。
src/v2/style-guide/index.md
Outdated
@@ -1407,8 +1407,7 @@ computed: { | |||
``` | |||
|
|||
``` js | |||
// No spaces are also fine, as long as the component | |||
// is still easy to read and navigate. | |||
// 没有空格在组件易于阅读和导航时也没问题。 |
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.
这个 space 是空行的意思吧?
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.
恩,翻错了,已修正
No description provided.