fix: 把所有 project 翻译为项目而不是工程

This commit is contained in:
Zhicheng Wang 2018-03-15 17:12:36 +08:00
parent 95b04faeff
commit 00cac11c4f
3 changed files with 6 additions and 6 deletions

View File

@ -224,7 +224,7 @@ This file incorporates the mandatory and many of the optional polyfills as JavaS
The npm packages for the _mandatory_ polyfills (such as `zone.js`) were installed automatically for you when you created your project and their corresponding `import` statements are ready to go. You probably won't touch these.
**强制性** 腻子脚本(如`zone.js`的npm 包在创建工程时就已经自动安装了,相应的 `import` 语句也都加好了。我们一般不用动它们。
**强制性** 腻子脚本(如`zone.js`的npm 包在创建项目时就已经自动安装了,相应的 `import` 语句也都加好了。我们一般不用动它们。
But if you need an optional polyfill, you'll have to install its npm package.
For example, [if you need the web animations polyfill](http://caniuse.com/#feat=web-animation), you could install it with `npm`, using the following command (or the `yarn` equivalent):

View File

@ -71,7 +71,7 @@ the QuickStart repo update instructions</a>.
我们已经把所有范例改成了使用项目根目录下的`src/`文件夹。
也就是把以前的`app/`文件夹移到了`src/`文件夹下面。
要了解如何对你的现有工程进行这种迁移,请参阅<a href="https://github.com/angular/quickstart#updating-to-a-newer-version-of-the-quickstart-repo" target="_blank" target="把范例中的应用迁移到src文件夹">QuickStart中的迁移指南</a>
要了解如何对你的现有项目进行这种迁移,请参阅<a href="https://github.com/angular/quickstart#updating-to-a-newer-version-of-the-quickstart-repo" target="_blank" target="把范例中的应用迁移到src文件夹">QuickStart中的迁移指南</a>
Notably:

View File

@ -190,12 +190,12 @@ Next, in your user preferences (`Cmd+,` or `Ctrl+,`), add:
## Installing in your project
## 安装到工程
## 安装到项目
You can also install Angular Language Service in your project with the
following `npm` command:
我们还可以使用下列`npm`命令来把 Angular 语言服务安装到工程中:
我们还可以使用下列`npm`命令来把 Angular 语言服务安装到项目中:
```sh
@ -206,7 +206,7 @@ npm install --save-dev @angular/language-service
Additionally, add the following to the `"compilerOptions"` section of
your project's `tsconfig.json`.
另外,还要在工程的`tsconfig.json`中添加下列`"compilerOptions"`区域:
另外,还要在项目的`tsconfig.json`中添加下列`"compilerOptions"`区域:
```json
@ -235,7 +235,7 @@ what module the template is part of, the scope you're in, and the component sele
context, it can then determine what the children can be.
当使用带有语言服务的编辑器时,就会有一个编辑器进程,它会启动一个独立的语言服务进程/服务,它们通过[RPC](https://en.wikipedia.org/wiki/Remote_procedure_call)彼此交谈。
当我们在编辑器中输入的时候,它把这些信息发送到另一个进程中,以便追踪工程的状态。
当我们在编辑器中输入的时候,它把这些信息发送到另一个进程中,以便追踪项目的状态。
当我们在模板中触发一个自动完成列表时,编辑器进程就会先把这个模板解析成 HTML AST或者叫[抽象语法树](https://en.wikipedia.org/wiki/Abstract_syntax_tree)。然后Angular 编译器就会解释模板所属的模块以及模板选择器。然后它找出我们的光标目前正在模板 AST 的什么位置。一旦它确定了情境,就可以决定其子节点可以是什么了。
It's a little more involved if you are in an interpolation. If you have an interpolation of `{{data.---}}` inside a `div` and need the completion list after `data.---`, the compiler can't use the HTML AST to find the answer. The HTML AST can only tell the compiler that there is some text with the characters "`{{data.---}}`". That's when the template parser produces an expression AST, which resides within the template AST. The Angular Language Services then looks at `data.---` within its context and asks the TypeScript Language Service what the members of data are. TypeScript then returns the list of possibilities.