把QuickStart改成“快速起步”
This commit is contained in:
parent
b97a9585c2
commit
86d151c40e
|
@ -66,7 +66,7 @@ nav.side-nav.l-pinned-left.l-layer-4.l-offset-nav
|
|||
|
||||
div(class="side-nav-secondary" ng-class="appCtrl.showDocsNav ? 'is-visible' : ''")
|
||||
.nav-blocks
|
||||
a(class="nav-title #{isQuickstartSelected(cur)}" href="#{qs.href}" title="#{qs.tooltip}") Quickstart
|
||||
a(class="nav-title #{isQuickstartSelected(cur)}" href="#{qs.href}" title="#{qs.tooltip}") 快速起步
|
||||
|
||||
.nav-blocks
|
||||
a(class="nav-title #{anyItemSelected(tutorial)}" href="#{tutorial[0].href}" title="#{tutorial[0].tooltip}") 教程
|
||||
|
@ -111,8 +111,8 @@ script.
|
|||
(function scrollToSelectedLink() {
|
||||
var sideNav = document.getElementsByClassName('side-nav')[0];
|
||||
var link = sideNav.getElementsByClassName('is-selected')[0];
|
||||
if(link && link.offsetTop > window.innerHeight){
|
||||
sideNav.scrollTop = link.offsetTop - (window.innerHeight/2);
|
||||
if (link && link.offsetTop > window.innerHeight) {
|
||||
sideNav.scrollTop = link.offsetTop - (window.innerHeight / 2);
|
||||
//alert("offsetTop: " + link.offsetTop + " side-nav top is " + sideNav.scrollTop);
|
||||
}
|
||||
})()
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
"quickstart": {
|
||||
"icon": "query-builder",
|
||||
"title": "五分钟快速开始",
|
||||
"title": "五分钟“快速起步”",
|
||||
"description": "Angular 2起跑"
|
||||
},
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.l-sub-section
|
||||
:marked
|
||||
你还可以
|
||||
[下载QuickStart源码](https://github.com/angular/quickstart/blob/master/README.md)作为起步。
|
||||
[下载“快速起步”的源码](https://github.com/angular/quickstart/blob/master/README.md)作为起步。
|
||||
|
|
|
@ -45,7 +45,7 @@ figure.image-display
|
|||
|
||||
Create a new project folder (`displaying-data`) and follow the steps in the [QuickStart](../quickstart.html).
|
||||
|
||||
创建一个新的项目文件夹(`displaying-data`),并且完成[快速开始](../quickstart.html)中的步骤。
|
||||
创建一个新的项目文件夹(`displaying-data`),并且完成[“快速起步”](../quickstart.html)中的步骤。
|
||||
|
||||
include ../_quickstart_repo
|
||||
:marked
|
||||
|
@ -104,7 +104,7 @@ include ../_quickstart_repo
|
|||
Remember back in QuickStart that we added the `<my-app>` element to the body of our `index.html`
|
||||
|
||||
注意`@Component`装饰器中指定的CSS选择器`selector`,它指定了一个叫`my-app`的元素。
|
||||
回忆下,在“快速开始”一章中,我们曾把一个`<my-app>`元素添加到`index.html`的`body`里。
|
||||
回忆下,在“快速起步”一章中,我们曾把一个`<my-app>`元素添加到`index.html`的`body`里。
|
||||
+makeExample('displaying-data/ts/index.html', 'my-app')(format=".")
|
||||
|
||||
:marked
|
||||
|
|
|
@ -169,7 +169,7 @@ figure.image-display
|
|||
|
||||
Create a new project folder (`angular2-forms`) and follow the steps in the [QuickStart](../quickstart.html).
|
||||
|
||||
创建一个新的项目文件夹(`angular2-forms`),并且完成[快速开始](../quickstart.html)中的步骤。
|
||||
创建一个新的项目文件夹(`angular2-forms`),并且完成[“快速起步”](../quickstart.html)中的步骤。
|
||||
|
||||
include ../_quickstart_repo
|
||||
:marked
|
||||
|
@ -310,7 +310,7 @@ code-example(format="").
|
|||
|
||||
Replace the contents of the "QuickStart" version with the following:
|
||||
|
||||
把"快速开始"的版本内容替换成下列代码:
|
||||
把"快速起步"的版本内容替换成下列代码:
|
||||
+makeExample('forms/ts/app/app.component.ts', null, 'app/app.component.ts')
|
||||
|
||||
:marked
|
||||
|
|
|
@ -46,7 +46,7 @@ table(width="100%")
|
|||
introduces the major features of Angular in an application context.
|
||||
|
||||
一场按部就班、沉浸式的Angular学习之旅。
|
||||
从[QuickStart](../quickstart.html)开始,本文档中的每一个章节和范例,都基于一个[*英雄指南* 教程](../tutorial),
|
||||
从[“快速起步”](../quickstart.html)开始,本文档中的每一个章节和范例,都基于一个[*英雄指南* 教程](../tutorial),
|
||||
它会在一个假想的应用场景中逐步引出Angular的各个主要特性。
|
||||
tr(style=top)
|
||||
td
|
||||
|
@ -114,7 +114,7 @@ table(width="100%")
|
|||
1. Try the [QuickStart](../quickstart.html). The QuickStart is the "Hello, World" of Angular 2.
|
||||
It shows us how to setup the libraries and tools we'll need to write *any* Angular app.
|
||||
|
||||
1. 试用[QuickStart](../quickstart.html)。QuickStart是Angular 2世界中的“Hello, World”。
|
||||
1. 试用[“快速起步”](../quickstart.html)。“快速起步”是Angular 2世界中的“Hello, World”。
|
||||
它会告诉我们如何安装写*任何*Angular应用时都会用到的那些库和工具。
|
||||
|
||||
1. Take the *Tour of Heroes* [Tutorial](../tutorial) which picks up from where the QuickStart leaves off
|
||||
|
@ -122,7 +122,7 @@ table(width="100%")
|
|||
Simple, yes, but with the essential characteristics we'd expect of a professional application:
|
||||
a sensible project structure, data binding, master/detail, services, dependency injection, navigation, and remote data access.
|
||||
|
||||
1. 学习*英雄指南*[教程](../tutorial) ,它将从QuickStart出发,最终构建出一个简单的“数据驱动”的应用。
|
||||
1. 学习*英雄指南*[教程](../tutorial) ,它将从“快速起步”出发,最终构建出一个简单的“数据驱动”的应用。
|
||||
它虽简单,但也具有我们写一个专业应用时所需的一切基本特性:
|
||||
实用的项目结构、数据绑定、主从视图、服务、依赖注入、导航,以及远程数据访问。
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ include ../_util-fns
|
|||
## HTML
|
||||
HTML is the language of the Angular template. Our [QuickStart](../quickstart.html) application had a template that was pure HTML:
|
||||
|
||||
HTML是Angular模板的“语言”。我们的[QuickStart](../quickstart.html)应用就有一个模板是纯HTML的:
|
||||
HTML是Angular模板的“语言”。我们的[“快速起步”](../quickstart.html)应用就有一个模板是纯HTML的:
|
||||
// #enddocregion html-1
|
||||
|
||||
+makeExample('template-syntax/ts/app/app.component.html', 'my-first-app')(format=".")
|
||||
|
|
|
@ -3,7 +3,7 @@ include _util-fns
|
|||
:marked
|
||||
Our QuickStart goal is to build and run a super-simple Angular 2 application in TypeScript.
|
||||
|
||||
在“QuickStart”中,我们的目标是构建并运行一个超级简单的Angular 2应用 —— 使用TypeScript语言
|
||||
在“快速起步”中,我们的目标是构建并运行一个超级简单的Angular 2应用 —— 使用TypeScript语言
|
||||
|
||||
# Download the code
|
||||
# 下载代码
|
||||
|
@ -11,7 +11,7 @@ include _util-fns
|
|||
[Download the QuickStart source](https://github.com/angular/quickstart/blob/master/README.md)
|
||||
and start coding.
|
||||
|
||||
等不及了?立刻[下载QuickStart源码](https://github.com/angular/quickstart/blob/master/README.md)
|
||||
等不及了?立刻[下载“快速起步”源码](https://github.com/angular/quickstart/blob/master/README.md)
|
||||
开始写代码!
|
||||
|
||||
## See It Run!
|
||||
|
@ -25,7 +25,7 @@ include _util-fns
|
|||
它将在<a href="http://plnkr.co/" title="Plunker" target="_blank">plunker</a>中加载这个范例,并显示一条简短的消息:
|
||||
|
||||
figure.image-display
|
||||
img(src='/resources/images/devguide/quickstart/my-first-app.png' alt="QuickStart应用的输出")
|
||||
img(src='/resources/images/devguide/quickstart/my-first-app.png' alt="“快速起步”应用的输出")
|
||||
|
||||
|
||||
:marked
|
||||
|
@ -310,7 +310,7 @@ a(id="app-component")
|
|||
This QuickStart has only one, extremely simple component.
|
||||
But it has the essential structure of every component we'll ever write:
|
||||
|
||||
这个QuickStart只有一个非常简单的组件,但麻雀虽小,五脏俱全 —— 它具备了我们将来写的组件的基本结构。
|
||||
这个“快速起步”只有一个非常简单的组件,但麻雀虽小,五脏俱全 —— 它具备了我们将来写的组件的基本结构。
|
||||
|
||||
* One or more <a href="javascript: why('component-import')">import</a>
|
||||
statements to reference the things we need.
|
||||
|
@ -419,7 +419,7 @@ a(id="app-component")
|
|||
Our `AppComponent` class is empty because we don't need it to do anything in this QuickStart.
|
||||
|
||||
当我们打算构建一个真实的应用时,可以通过添加属性和应用逻辑来扩展这个类。
|
||||
但我们不需要在这个QuickStart中做这些事,所以这里的`AppComponent`类是空的。
|
||||
但我们不需要在这个“快速起步”中做这些事,所以这里的`AppComponent`类是空的。
|
||||
|
||||
We **export** `AppComponent` so that we can **import** it elsewhere in our application,
|
||||
as we'll see when we create `main.ts`.
|
||||
|
@ -489,7 +489,7 @@ a(id="main")
|
|||
We could have folded its few lines into the `app.component` file
|
||||
and spared ourselves some complexity.
|
||||
|
||||
*main.ts* 文件非常小。它只是一个`QuickStart`,没几行代码。我们本可以把它装进`app.component`文件来减少不必要的复杂度。
|
||||
*main.ts* 文件非常小。它只是一个“快速起步”,没几行代码。我们本可以把它装进`app.component`文件来减少不必要的复杂度。
|
||||
|
||||
We'd rather demonstrate the proper way to structure an Angular application.
|
||||
App bootstrapping is a separate concern from presenting a view.
|
||||
|
@ -579,8 +579,8 @@ code-example(format="").
|
|||
when working with observables.
|
||||
We added the library here in QuickStart so we don't forget later.//TODO this subsection needs to be moved for when we cover the systemjs.config.js
|
||||
|
||||
我们的QuickStart不会用到响应式扩展,但是大量的应用需要它们来提供Observable(译注:响应式编程的核心特性,指监视数据的变更以便做出响应)特性。
|
||||
我们把它加到QuickStart中,以免将来忘了。//TODO 当我们覆盖到systemjs.config.js时,我们得把这些内容移过去。
|
||||
我们的“快速起步”不会用到响应式扩展,但是大量的应用需要它们来提供Observable(译注:响应式编程的核心特性,指监视数据的变更以便做出响应)特性。
|
||||
我们把它加到“快速起步”中,以免将来忘了。//TODO 当我们覆盖到systemjs.config.js时,我们得把这些内容移过去。
|
||||
|
||||
:marked
|
||||
We'll make different choices as we gain experience and
|
||||
|
@ -600,7 +600,7 @@ code-example(format="").
|
|||
<a href="https://webpack.github.io/" target="_blank">webpack</a>.
|
||||
SystemJS happens to be a good choice but we want to be clear that it was a choice and not a preference.
|
||||
|
||||
本QuickStart使用<a href="https://github.com/systemjs/systemjs" target="_blank">SystemJS</a>来加载应用和库模块。
|
||||
本“快速起步”使用<a href="https://github.com/systemjs/systemjs" target="_blank">SystemJS</a>来加载应用和库模块。
|
||||
还有一些其它候选者也能很好地工作,比如备受推崇的<a href="https://webpack.github.io/" target="_blank">webpack</a>。
|
||||
SystemJS是一个好的选择,但要清楚,它只是我们给你的“选择之一”,而不是“推荐”。
|
||||
|
||||
|
@ -619,14 +619,14 @@ code-example(format="").
|
|||
|
||||
With those cautions in mind, what are we doing in this QuickStart configuration?
|
||||
|
||||
好好记住这些,我们再来看看QuickStart中的配置做了点什么。
|
||||
好好记住这些,我们再来看看“快速起步”中的配置做了点什么。
|
||||
|
||||
+makeExample('quickstart/ts/systemjs.config.1.js', null, 'systemjs.config.js')(format=".")
|
||||
:marked
|
||||
Our QuickStart makes such requests when one of its
|
||||
application TypeScript files has an import statement like this:
|
||||
|
||||
在我们的QuickStart中,当应用中的TypeScript文件出现像这样的import语句时,SystemJS就会处理这些请求:
|
||||
在我们的“快速起步”中,当应用中的TypeScript文件出现像这样的import语句时,SystemJS就会处理这些请求:
|
||||
|
||||
+makeExample('quickstart/ts/app/main.ts', 'app-component', 'main.ts (摘录)')(format=".")
|
||||
:marked
|
||||
|
@ -743,7 +743,7 @@ code-example(format="").
|
|||
稍后,一个浏览器页标签就会打开并显示出来。
|
||||
|
||||
figure.image-display
|
||||
img(src='/resources/images/devguide/quickstart/my-first-app.png' alt="QuickStart应用的输出")
|
||||
img(src='/resources/images/devguide/quickstart/my-first-app.png' alt="“快速起步”应用的输出")
|
||||
|
||||
:marked
|
||||
Congratulations! We are in business.
|
||||
|
|
|
@ -25,7 +25,7 @@ include ../_util-fns
|
|||
the [Tour of Heroes](../tutorial/) tutorial
|
||||
such as <code>npm</code>, <code>gulp</code>, and <code>live-server</code>.
|
||||
|
||||
本单元测试章节是在其它章节的基础上编写的。我们建议你按顺序阅读它们。我们同时假设你已经对Angular 2的原理、在[快速开始](../quickstart.html)里介绍的工具、
|
||||
本单元测试章节是在其它章节的基础上编写的。我们建议你按顺序阅读它们。我们同时假设你已经对Angular 2的原理、在[“快速起步”](../quickstart.html)里介绍的工具、
|
||||
[英雄指南](../tutorial)和<code>npm</code>, <code>gulp</code>, and <code>live-server</code>等工具都所有了解。
|
||||
|
||||
.l-main-section
|
||||
|
|
|
@ -30,7 +30,7 @@ include ../_util-fns
|
|||
Next follow all of the steps prescribed in “Install npm packages locally” of the
|
||||
[QuickStart](../quickstart.html).
|
||||
|
||||
下一步,完成[快速开始](../quickstart.html)中的“本地安装npm包”的每一步。
|
||||
下一步,完成[“快速起步”](../quickstart.html)中的“本地安装npm包”的每一步。
|
||||
|
||||
We’ll also add the Jasmine package via `npm`:
|
||||
|
||||
|
@ -142,7 +142,7 @@ figure.image-display
|
|||
We can copy one from the quickstart we wrote previously and paste it into our src sub-folder.
|
||||
It should look something like this:
|
||||
|
||||
我们可以从快速开始拷贝一个之前已写好的,粘贴到我们的src子目录,它应该像这样:
|
||||
我们可以从“快速起步”拷贝一个之前已写好的,粘贴到我们的src子目录,它应该像这样:
|
||||
|
||||
+makeExample('testing/ts/tsconfig.1.json', null, 'tsconfig.json')
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ include ../_util-fns
|
|||
|
||||
Every story starts somewhere. Our story starts where the [QuickStart](../quickstart.html) ends.
|
||||
|
||||
每一个故事,都有一个起点。而我们的故事则开始于[QuickStart](../quickstart.html)的结尾处。
|
||||
每一个故事,都有一个起点。而我们的故事则开始于[“快速起步”](../quickstart.html)的结尾处。
|
||||
|
||||
[Run the live example for part 1](/resources/live-examples/toh-1/ts/plnkr.html)
|
||||
|
||||
|
@ -15,7 +15,7 @@ include ../_util-fns
|
|||
Create a folder called `angular2-tour-of-heroes` and follow the [QuickStart](../quickstart.html) steps
|
||||
which provide the prerequisites, the folder structure, and the core files for our Tour of Heroes.
|
||||
|
||||
创建一个名为`angular2-tour-of-heroes`的文件夹,并且遵循[QuickStart](../quickstart.html)中的步骤初始化它 —— 环境准备、目录结构,并放进我们《英雄指南》的核心文件。
|
||||
创建一个名为`angular2-tour-of-heroes`的文件夹,并且遵循[“快速起步”](../quickstart.html)中的步骤初始化它 —— 环境准备、目录结构,并放进我们《英雄指南》的核心文件。
|
||||
|
||||
include ../_quickstart_repo
|
||||
:marked
|
||||
|
|
|
@ -62,5 +62,5 @@ div(class="home-rows")
|
|||
img(src="resources/images/home/loved-by-millions.png")
|
||||
|
||||
.cta-bar
|
||||
a(href="/docs/ts/latest/quickstart.html" class="button button-large button-shield md-raised " + "md-primary" md-button) 立即开始
|
||||
a(href="/docs/ts/latest/quickstart.html" class="button button-large button-shield md-raised " + "md-primary" md-button) 快速起步
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
## 当前状态
|
||||
目前:
|
||||
- “首页”、“QuickStart”、“教程”、“基础知识”已经完成了翻译和校对。
|
||||
- “首页”、“快速起步”、“教程”、“基础知识”已经完成了翻译和校对。
|
||||
- “烹饪书”已经完成了初译。
|
||||
- “开发人员指南”正在翻译中。
|
||||
- “API参考”尚未开始翻译。
|
||||
|
|
Loading…
Reference in New Issue