From 74c58687473220d3e30a36694d546b9b171da483 Mon Sep 17 00:00:00 2001 From: Rex Ye Date: Mon, 16 May 2016 11:20:52 +0100 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3pattern=E7=9A=84=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=EF=BC=8C=E5=BC=80=E5=A7=8Bjs-to-ts=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/docs/js/latest/cookbook/ts-to-js.jade | 5 +++++ .../ts/latest/cookbook/dependency-injection.jade | 2 +- public/docs/ts/latest/guide/style-guide.jade | 14 +++++++------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/public/docs/js/latest/cookbook/ts-to-js.jade b/public/docs/js/latest/cookbook/ts-to-js.jade index 63bb978e38..d20db94f30 100644 --- a/public/docs/js/latest/cookbook/ts-to-js.jade +++ b/public/docs/js/latest/cookbook/ts-to-js.jade @@ -5,12 +5,17 @@ include ../../../../_includes/_util-fns in JavaScript. Translating from one language to the other is mostly a matter of changing the way we organize our code and the way we access Angular 2 APIs. + + 所有能在TypeScript环境里面做的Angular 2事情,我们都能在JavaScript里面实现。 + 从一个语言翻译到另一个语言最多只能改变我们对源代码的管理方法和如何访问Angular 2的API。 Since TypeScript is a popular language option in Angular 2, many of the code examples you see on the Internet as well as on this site are written in TypeScript. This cookbook contains recipes for translating these kinds of code examples to ES5, so that they can be applied to Angular 2 JavaScript applications. + + :marked diff --git a/public/docs/ts/latest/cookbook/dependency-injection.jade b/public/docs/ts/latest/cookbook/dependency-injection.jade index 023481a854..2eb26990d1 100644 --- a/public/docs/ts/latest/cookbook/dependency-injection.jade +++ b/public/docs/ts/latest/cookbook/dependency-injection.jade @@ -4,7 +4,7 @@ include ../_util-fns Dependency Injection is a powerful pattern for managing code dependencies. In this cookbook we will explore many of the features of Dependency Injection (DI) in Angular. - 依赖注入是一个强大的管理代码依赖链的架构样板。在这个“食谱”中,我们会讨论Angular依赖注入的许多特性。 + 依赖注入是一个强大的管理代码依赖链的架构模式。在这个“食谱”中,我们会讨论Angular依赖注入的许多特性。 :marked diff --git a/public/docs/ts/latest/guide/style-guide.jade b/public/docs/ts/latest/guide/style-guide.jade index fab05a31c0..d0c06ffce5 100644 --- a/public/docs/ts/latest/guide/style-guide.jade +++ b/public/docs/ts/latest/guide/style-guide.jade @@ -279,7 +279,7 @@ a(href="#toc") 回到顶部 :marked **Do** follow a pattern that describes the symbol's feature then its type. The recommended pattern is `feature.type.ts`. - **坚持** 遵循一个样板来描述标志的特性和类型。推荐的样板为`feature.type.ts`。 + **坚持** 遵循一个模式来描述标志的特性和类型。推荐的模式为`feature.type.ts`。 .s-why :marked @@ -329,7 +329,7 @@ a(href="#toc") 回到顶部 :marked **Do** use consistent names for all components following a pattern that describes the component's feature then its type. A recommended pattern is `feature.type.ts`. - **坚持** 对所有组件使用一致的命名规则,遵循这个样板:先描述组件的特征,再描述它的类型。推荐的样板为`feature.type.ts`。 + **坚持** 对所有组件使用一致的命名规则,遵循这个模式:先描述组件的特征,再描述它的类型。推荐的模式为`feature.type.ts`。 .s-rule.do :marked @@ -353,7 +353,7 @@ a(href="#toc") 回到顶部 :marked **Why?** Provides pattern matching for any automated tasks. - **为何?** 与自动任务的样板匹配。 + **为何?** 与自动任务的模式匹配。 a(href="#toc") Back to top @@ -771,7 +771,7 @@ a(href="#toc") 回到顶部 :marked **Why?** Provides pattern matching for [karma](http://karma-runner.github.io/) or other test runners. - **为何?** 提供一个与[karma](http://karma-runner.github.io/)或者其他测试运行器相配的命名样板。 + **为何?** 提供一个与[karma](http://karma-runner.github.io/)或者其他测试运行器相配的命名模式。 :marked - var top="vertical-align:top" @@ -840,7 +840,7 @@ a(href="#toc") Back to top :marked **Why?** Provides pattern matching for test runners and build automation. - **为何?** 提供一个与测试运行器和构建自动化相配的样板。 + **为何?** 提供一个与测试运行器和构建自动化相配的模式。 :marked :marked @@ -2643,7 +2643,7 @@ a(href="#toc") 回到顶部 :marked **Why?** A component that handles routing is known as the component router, thus this follows the Angular 2 routing pattern. - *为何?** 处理路由的组件被称作组件路由器,它遵循Angular 2的路由样板。 + *为何?** 处理路由的组件被称作组件路由器,它遵循Angular 2的路由模式。 .s-why.s-why-last :marked @@ -2707,7 +2707,7 @@ a(href="#toc") 回到顶部 :marked **Do** use file templates or snippets to help follow consistent styles and patterns. Here are templates and/or snippets for some of the web development editors and IDEs. - **坚持** 使用文件模板或代码片段来帮助实现一致的风格和样板。下面是为一些网络开发编辑器和IDE准备的模板和/或代码片段: + **坚持** 使用文件模板或代码片段来帮助实现一致的风格和模式。下面是为一些网络开发编辑器和IDE准备的模板和/或代码片段: .s-rule.consider :marked