diff --git a/aio/content/guide/docs-style-guide.md b/aio/content/guide/docs-style-guide.md index 03b88989e4..aef818f438 100644 --- a/aio/content/guide/docs-style-guide.md +++ b/aio/content/guide/docs-style-guide.md @@ -1,6 +1,6 @@ # Angular documentation style guide -# Angular 文档样式指南 +# Angular 文档风格指南 @@ -8,21 +8,21 @@ This style guide is for anyone who contributes to the Angular documentation (thi These guidelines should be followed by all authors. Deviations must be approved by a documentation editor. -本风格指南适用于那些为 Angular 文档(本站点)做贡献的人。所有作者都应遵循这些准则。偏差必须由文档编辑器批准。 +本风格指南适用于那些为 Angular 文档(本站)做贡献的人。所有作者都应遵循这些准则。违反之处必须由本文档的编辑批准。 The guidelines described here serve two purposes: 这里描述的指导原则有两个目的: -- To ensure a high-quality, consistent experience for Angular documentation users. +* To ensure a high-quality, consistent experience for Angular documentation users. 确保为 Angular 文档用户提供高质量,一致的体验。 -- To simplify the writing process for contributing authors. - This guide helps you make decisions about tone, voice, and style. - It also helps you find the right markup quickly. +* To simplify the writing process for contributing authors. +This guide helps you make decisions about tone, voice, and style. +It also helps you find the right markup quickly. - 简化贡献作者的写作过程。本指南可帮助你做出有关音调,语音和风格的决定。它还可以帮助你快速找到正确的标记。 + 简化贡献作者的写作过程。本指南可帮助你做出有关语调、声音和风格的决定。它还可以帮助你快速找到正确的标记(markup)。
item
property is `true`.
```
For block code snippets, we generally prefer to display code with
-the Angular documentation *code-example* component represented by the `
```
-The *#docregion* with no name is the *default region*. Do *not* set the `region` attribute when referring to the default *#docregion*.
+The _#docregion_ with no name is the _default region_. Do _not_ set the `region` attribute when referring to the default _#docregion_.
没有名字的*#docregion*是*默认的区域*。*不要*设置 `region` 指的是默认*#docregion*时属性。
-#### Nested *#docregions*
+#### Nested _#docregions_
#### 嵌套的*#docregions*
-You can nest *#docregions* within *#docregions*
+You can nest _#docregions_ within _#docregions_
*#docregions*内可以嵌套*#docregions*
@@ -990,11 +989,11 @@ The `src/app/app.module.ts` file has a good example of a nested region.
#### 结合片段
You can combine several fragments from the same file into a single code snippet by defining
-multiple *#docregions* with the *same region name*.
+multiple _#docregions_ with the _same region name_.
你可以通过定义多个具有*相同区域名称的* *#docregions*,把*同*一个文件中的多个片段组合到一个代码片段中。
-Examine the `src/app/app.component.ts` file which defines two nested *#docregions*.
+Examine the `src/app/app.component.ts` file which defines two nested _#docregions_.
检查那个定义了两个嵌套*#docregions*的 `src/app/app.component.ts` 文件。
@@ -1043,19 +1042,19 @@ Some observations:
一些意见:
-- The `#docplaster` at the top is another bit of code snippet markup. It tells the processor how to join the fragments into a single snippet.
+* The `#docplaster` at the top is another bit of code snippet markup. It tells the processor how to join the fragments into a single snippet.
顶部的 `#docplaster` 是另一段代码片段标记。它告诉处理器如何把片段连成一个片段。
-In this example, we tell the processor to put the fragments together without anything in between - without any "plaster". Most sample files define this *empty plaster*.
+ In this example, we tell the processor to put the fragments together without anything in between - without any "plaster". Most sample files define this _empty plaster_.
在这个例子中,我们告诉处理器把碎片放在一起,两者之间没有任何东西 - 没有任何“石膏”。大多数样本文件定义了这个*空白膏药*
-If we neglected to add, `#docplaster`, the processor would insert the *default* plaster - an ellipsis comment - between the fragments. Try removing the `#docplaster` comment yourself to see the effect.
+ If we neglected to add, `#docplaster`, the processor would insert the _default_ plaster - an ellipsis comment - between the fragments. Try removing the `#docplaster` comment yourself to see the effect.
如果我们忽略添加 `#docplaster`,处理器就会在片段之间插入一个*默认的* plaster `#docplaster` 省略号注释)。尝试自己删除 `#docplaster` 评论以查看效果。
-- One `#docregion` comment mentions ***two*** region names as does an `#enddocregion` comment. This is a convenient way to start (or stop) multiple regions on the same code line. You could have put these comments on separate lines and many authors prefer to do so.
+* One `#docregion` comment mentions **_two_** region names as does an `#enddocregion` comment. This is a convenient way to start (or stop) multiple regions on the same code line. You could have put these comments on separate lines and many authors prefer to do so.
`#docregion` 一个注释提到了***两个***区域的名字,`#enddocregion` 注释也是如此。这是在同一代码行中启动(或停止)多个区域的便捷方式。你可以把这些注释放在不同的行上,很多作者都喜欢这样做。
@@ -1169,7 +1168,7 @@ Adding ` ` to the page generates the two default lin
指向 stackblitz 的链接,该堆栈是由默认的 `stackblitz.json` 文件定义的,该文件位于代码示例文件夹目录下,其名称与该引导页面同名。
-1. a link that downloads that sample.
+2. a link that downloads that sample.
下载该示例的链接
@@ -1344,9 +1343,9 @@ text to which it applies, using the special `{@a name}` syntax like this.
{@a ugly-anchors}
-#### Ugly, long section header anchors
+ #### Ugly, long section header anchors
-#### 丑陋的长节头锚
+ #### 丑陋的长节头锚
@@ -1380,11 +1379,11 @@ If you do, be sure to set the `id` attribute - not the `name` attribute! The doc
## 警报和 Calllouts
-Alerts and callouts present warnings, extra detail or references to other pages. They can also be used to provide commentary that *enriches* the reader's understanding of the content being presented.
+Alerts and callouts present warnings, extra detail or references to other pages. They can also be used to provide commentary that _enriches_ the reader's understanding of the content being presented.
警报和标注会显示警告,额外的细节或对其它页面的引用。它们还可以用来提供评论,*丰富*读者对正在渲染的内容的理解。
-An alert or callout *must not* contain anything *essential* to that understanding. Don't put a critical instruction or a tutorial step in a subsection.
+An alert or callout _must not_ contain anything _essential_ to that understanding. Don't put a critical instruction or a tutorial step in a subsection.
警告或标注*不得*含有对理解*至关重要的信息*。不要把一个重要的指令或一个指导步骤放进一个小节中。
@@ -1400,7 +1399,7 @@ Alerts draw attention to short important points. Alerts should not be used for m
You'll learn about styles for live examples in the [section below](guide/docs-style-guide#live-examples "Live examples").
-你还会从[下面](guide/docs-style-guide#live-examples "实例")的[章节中](guide/docs-style-guide#live-examples "实例")了解实例的样式。
+你还会从[下面](guide/docs-style-guide#live-examples "实例")的[章节中](guide/docs-style-guide#live-examples "实例")了解实例的风格。
Angular v4