fix: 修复一些翻译错误

This commit is contained in:
Zhicheng WANG 2019-01-26 21:38:34 +08:00
parent 893161f7ab
commit 1d6c1396fd
7 changed files with 27 additions and 22 deletions

View File

@ -59,6 +59,7 @@ In your browser, open http://localhost:4200/ to see the new app run.
When you use the [ng serve](cli/serve) command to build an app and serve it locally, the server automatically rebuilds the app and reloads the page when you change any of the source files.
在浏览器中,打开 <http://localhost:4200/> 查看运行效果。
当你使用 [ng serve](cli/serve) 命令来构建应用并在本地启动开发服务器时,服务器会自动重新构建此应用,并在修改源码时重新加载此页面。
## Workspaces and project files
@ -106,6 +107,7 @@ The [ng config](cli/config) command lets you set and retrieve configuration valu
Note that option names in the configuration file must use [camelCase](guide/glossary#case-types), while option names supplied to commands can use either camelCase or dash-case.
[ng config](cli/config) 让你可以从命令行中设置和获取配置项的值。你也可以直接编辑 `angular.json` 文件。
注意,此配置文件中的选项名称必须使用[小驼峰(camelCase)形式](guide/glossary#case-types),不过当在命令行中提供它是可以使用小驼峰和中线分隔(dash-case)两种形式。
* See more about [Workspace Configuration](guide/workspace-config).

View File

@ -1339,18 +1339,18 @@ The following are metadata errors you may encounter, with explanations and sugge
你可能遇到一些元数据错误,下面是对它们的解释和纠正建议。
[<t>Expression form not supported</t><t>不支持此表达式格式</t>](#expression-form-not-supported)<br>
[<t>Reference to a local (non-exported) symbol</t><t>引用了局部(未导出的)符号</t>](#reference-to-a-local-symbol)<br>
[<t>Only initialized variables and constants</t><t>只允许初始化过的变量和常量</t>](#only-initialized-variables)<br>
[<t>Reference to a non-exported class</t><t>引用了未导出的类</t>](#reference-to-a-non-exported-class)<br>
[<t>Reference to a non-exported function</t><t>引用了未导出的函数</t>](#reference-to-a-non-exported-function)<br>
[<t>Function calls are not supported</t><t>不支持函数调用</t>](#function-calls-not-supported)<br>
[<t>Destructured variable or constant not supported</t><t>不支持解构变量或常量</t>](#destructured-variable-not-supported)<br>
[<t>Could not resolve type</t><t>不能解析此类型</t>](#could-not-resolve-type)<br>
[<t>Name expected</t><t>期待是名字</t>](#name-expected)<br>
[<t>Unsupported enum member name</t><t>不支持的枚举成员名</t>](#unsupported-enum-member-name)<br>
[<t>Tagged template expressions are not supported</t><t>不支持带标签函数的模板表达式</t>](#tagged-template-expressions-not-supported)<br>
[<t>Symbol reference expected</t><t>期待是符号引用</t>](#symbol-reference-expected)<br>
[<t>Expression form not supported</t><t>不支持此表达式格式</t>](#expression-form-not-supported)<br>
[<t>Reference to a local (non-exported) symbol</t><t>引用了局部(未导出的)符号</t>](#reference-to-a-local-symbol)<br>
[<t>Only initialized variables and constants</t><t>只允许初始化过的变量和常量</t>](#only-initialized-variables)<br>
[<t>Reference to a non-exported class</t><t>引用了未导出的类</t>](#reference-to-a-non-exported-class)<br>
[<t>Reference to a non-exported function</t><t>引用了未导出的函数</t>](#reference-to-a-non-exported-function)<br>
[<t>Function calls are not supported</t><t>不支持函数调用</t>](#function-calls-not-supported)<br>
[<t>Destructured variable or constant not supported</t><t>不支持解构变量或常量</t>](#destructured-variable-not-supported)<br>
[<t>Could not resolve type</t><t>不能解析此类型</t>](#could-not-resolve-type)<br>
[<t>Name expected</t><t>期待是名字</t>](#name-expected)<br>
[<t>Unsupported enum member name</t><t>不支持的枚举成员名</t>](#unsupported-enum-member-name)<br>
[<t>Tagged template expressions are not supported</t><t>不支持带标签函数的模板表达式</t>](#tagged-template-expressions-not-supported)<br>
[<t>Symbol reference expected</t><t>期待是符号引用</t>](#symbol-reference-expected)<br>
<hr>
@ -1935,6 +1935,7 @@ The compiler expected a name in an expression it was evaluating.
This can happen if you use a number as a property name as in the following example.
编译器期待它正在求值的表达式中是一个名字。
如果你像下面的例子中这样用一个数字作为属性名,就会导致这个问题。
```

View File

@ -103,4 +103,4 @@ without deep knowledge of animation techniques or CSS.
* [Deployment](guide/deployment): Learn techniques for deploying your Angular application to a remote server.
[发布](guide/deployment):学习把你的应用发布到远端服务器的技巧。
[部署](guide/deployment):学习把你的应用发布到远端服务器的技巧。

View File

@ -167,7 +167,7 @@ You use the `ElementRef` in the directive's constructor
to [inject](guide/dependency-injection) a reference to the host DOM element,
the element to which you applied `appHighlight`.
你可以在指令的构造函数中注入 `ElementRef`,来引用宿主 DOM 元素,
你可以在指令的构造函数中使用 `ElementRef` 来[注入](guide/dependency-injection)宿主 DOM 元素的引用,也就是你放置 `appHighlight` 的那个元素。
`ElementRef` grants direct access to the host DOM element
through its `nativeElement` property.

View File

@ -957,7 +957,7 @@ so the <code>@Directive</code> configuration applies to components as well</p>
<p>(implemented as class methods)
</p>
<p>由类的方法实现。</p>
<p>(作为类的方法实现。)</p>
</th>

View File

@ -107,8 +107,6 @@ The following sections describe these selectors.
### :host
### :host 选择器
Use the `:host` pseudo-class selector to target styles in the element that *hosts* the component (as opposed to
targeting elements *inside* the component's template).
@ -138,8 +136,6 @@ The next example targets the host element again, but only when it also has the `
### :host-context
### :host-context 选择器
Sometimes it's useful to apply styles based on some condition *outside* of a component's view.
For example, a CSS theme class could be applied to the document `<body>` element, and
you want to change how your component looks based on that.
@ -307,7 +303,7 @@ They are _not inherited_ by any components nested within the template nor by any
When you use the Angular CLI command [`ng generate component`](cli/generate) without the `--inline-style` flag, it creates an empty styles file for you and references that file in the component's generated `styleUrls`.
CLI 会默认为你创建一个空白的样式表文件,并且在所生成组件的 `styleUrls` 中引用该文件。
当你使用 Angular CLI 的 [`ng generate component`](cli/generate) 命令但不带 `--inline-style` 标志时,CLI 会为你创建一个空白的样式表文件,并且在所生成组件的 `styleUrls` 中引用该文件。
<code-example language="sh" class="code-shell">
ng generate component hero-app
@ -429,7 +425,7 @@ Style strings added to the `@Component.styles` array _must be written in CSS_ be
## View encapsulation
## 控制视图封装模式:原生 (Native)、仿真 (Emulated) 和无 (None)
## 视图封装模式
As discussed earlier, component CSS styles are encapsulated into the component's view and don't
affect the rest of the application.
@ -491,7 +487,7 @@ in most cases.
## Inspecting generated CSS
## 查看仿真 (Emulated) 模式下生成的 CSS
## 查看生成的 CSS
When using emulated view encapsulation, Angular preprocesses
all component styles so that they approximate the standard shadow CSS scoping rules.

View File

@ -23,6 +23,8 @@ import {UrlSegment, UrlTree} from './url_tree';
* guard.
*
*
* `true` `false`
* `UrlTree` `UrlTree`
*
* ```
* class UserToken {}
@ -104,6 +106,8 @@ export type CanActivateFn = (route: ActivatedRouteSnapshot, state: RouterStateSn
* guard.
*
*
* `true` `false`
* `UrlTree` `UrlTree`
*
* ```
* class UserToken {}
@ -195,6 +199,8 @@ export type CanActivateChildFn = (childRoute: ActivatedRouteSnapshot, state: Rou
* guard.
*
*
* `true` `false`
* `UrlTree` `UrlTree`
*
* ```
* class UserToken {}