From 53a55f2db35fc4584513150744e882f81260829c Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Mon, 9 May 2016 18:45:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=BA=86=E5=B0=8F=E6=8A=84?= =?UTF-8?q?=E3=80=82=20=E5=A2=9E=E5=8A=A0=E4=BA=86=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E7=9A=84About=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/docs/ts/latest/cheatsheet.jade | 3 +- .../docs/ts/latest/guide/cheatsheet-cn.json | 513 ++++++++++++++++++ public/translate/cn/about.jade | 23 + 3 files changed, 538 insertions(+), 1 deletion(-) create mode 100644 public/docs/ts/latest/guide/cheatsheet-cn.json create mode 100644 public/translate/cn/about.jade diff --git a/public/docs/ts/latest/cheatsheet.jade b/public/docs/ts/latest/cheatsheet.jade index 4548cf52e0..68eb320686 100644 --- a/public/docs/ts/latest/cheatsheet.jade +++ b/public/docs/ts/latest/cheatsheet.jade @@ -1,7 +1,8 @@ - var base = current.path[4] ? '.' : './guide'; .banner p.text-body This cheat sheet is provisional and may change. Angular 2 is currently in Beta. + p.text-body 本小抄是临时的,将来可能改变。Angular 2目前还是Beta状态。 article(class="l-content-small grid-fluid docs-content") .cheatsheet - ngio-cheatsheet(src= base + '/cheatsheet.json') + ngio-cheatsheet(src= base + '/cheatsheet-cn.json') diff --git a/public/docs/ts/latest/guide/cheatsheet-cn.json b/public/docs/ts/latest/guide/cheatsheet-cn.json new file mode 100644 index 0000000000..0cca92207e --- /dev/null +++ b/public/docs/ts/latest/guide/cheatsheet-cn.json @@ -0,0 +1,513 @@ +{ + "currentEnvironment": "TypeScript", + "version": { + "raw": "2.0.0-rc.1", + "major": 2, + "minor": 0, + "patch": 0, + "prerelease": [ + "local" + ], + "build": "sha.48e03ae", + "version": "2.0.0-local", + "codeName": "snapshot", + "isSnapshot": true, + "full": "2.0.0-local+sha.48e03ae", + "branch": "master", + "commitSHA": "48e03ae748c0d68292380c4af2361faab5f6b497" + }, + "sections": [ + { + "name": "引导", + "description": "

import {bootstrap} from 'angular2/platform/browser';\n\n

\n", + "items": [ + { + "syntax": "bootstrap​(MyAppComponent, [MyService, provide(...)]);", + "bold": [ + "provide" + ], + "description": "

以MyAppComponent作为根组件引导应用,并且配置DI的各种provider。

\n" + } + ], + "index": 0 + }, + { + "name": "模板语法", + "description": "", + "items": [ + { + "syntax": "", + "bold": [ + "[value]" + ], + "description": "

把属性value绑定到表达式firstName的结果。

\n" + }, + { + "syntax": "
", + "bold": [ + "[attr.role]" + ], + "description": "

把Attribute role 绑定到表达式 myAriaRole的结果。

\n" + }, + { + "syntax": "
", + "bold": [ + "[class.extra-sparkle]" + ], + "description": "

把元素是否出现CSS类extra-sparkle,绑定到一个表达式isDelightful的结果是否为真。

\n" + }, + { + "syntax": "
", + "bold": [ + "[style.width.px]" + ], + "description": "

把样式的width属性绑定到表达式mySize的结果,以px为单位。这个单位是可选的。

\n" + }, + { + "syntax": "