From 38af562afff052b1ca31054f202486be872d621d Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Wed, 7 Mar 2018 11:25:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=B9=20section=20=E5=92=8C=20code-t?= =?UTF-8?q?abs=20=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/tools/translator/bin/translate-one.ts | 4 +- aio/tools/translator/dict-1.json | 1065 ++++++++++++++------- aio/tools/translator/dict-2.json | 1047 +++++++++++++------- aio/tools/translator/dict-3.json | 29 +- aio/tools/translator/utils.ts | 8 +- 5 files changed, 1479 insertions(+), 674 deletions(-) diff --git a/aio/tools/translator/bin/translate-one.ts b/aio/tools/translator/bin/translate-one.ts index b3f07dbc71..6baaa94546 100644 --- a/aio/tools/translator/bin/translate-one.ts +++ b/aio/tools/translator/bin/translate-one.ts @@ -3,5 +3,5 @@ import { dirs } from '../dirs'; import { translateFile } from '../translate'; -const filename = 'attribute-directives.md'; -translateFile(__dirname + '/../../../../../content-en/' + 'guide/' + filename, dirs.content + 'guide/' + filename); +const filename = 'guide/i18n.md'; +translateFile(__dirname + '/../../../../../content-en/' + filename, dirs.content + filename); diff --git a/aio/tools/translator/dict-1.json b/aio/tools/translator/dict-1.json index d20012848b..613070d452 100644 --- a/aio/tools/translator/dict-1.json +++ b/aio/tools/translator/dict-1.json @@ -1929,6 +1929,11 @@ "translation": "当然,这只是冰山一角。后面我们将学习更多的细节。不过,目前我们还是先关注全景图吧。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/architecture.md" }, + { + "original": "The code referenced on this page is available as a .", + "translation": "

\n 本章所引用的代码见。\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/architecture.md" + }, { "original": "## Modules", "translation": "## 模块", @@ -2170,8 +2175,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/architecture.md" }, { - "original": "

", - "translation": "元数据告诉 Angular 如何处理一个类。", + "original": "Metadata tells Angular how to process a class.", + "translation": "

元数据告诉 Angular 如何处理一个类。

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/architecture.md" }, { @@ -3415,13 +3420,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "latest", - "translation": "最新版", + "original": "

\n latest\n

", + "translation": "

\n 最新版\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "latest", - "translation": "最新版", + "original": "

\n latest\n

", + "translation": "

\n 最新版\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { @@ -3470,13 +3475,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "Browsers (Desktop & Mobile)", - "translation": "浏览器(桌面和移动)", + "original": "

\n Browsers (Desktop & Mobile)\n

", + "translation": "

\n 浏览器(桌面和移动)\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "Polyfills Required", - "translation": "需要的填充库", + "original": "

\n Polyfills Required\n

", + "translation": "

\n 需要的填充库\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { @@ -3535,18 +3540,18 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "All but Chrome, Firefox, Edge, IE11 and Safari 10", - "translation": "除了 Chrome、Firefox、Edge、IE11 和 Safari 10 外的所有浏览器", + "original": "

All but Chrome, Firefox, Edge, IE11 and Safari 10

", + "translation": "

除了 Chrome、Firefox、Edge、IE11 和 Safari 10 外的所有浏览器

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "[NgClass](api/common/NgClass) on SVG elements", - "translation": "在 SVG 元素上应用 [NgClass](api/common/NgClass)", + "original": "

[NgClass](api/common/NgClass) on SVG elements

", + "translation": "

在 SVG 元素上应用 [NgClass](api/common/NgClass)

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "[Http](guide/http) when sending and receiving binary data", - "translation": "用 [Http](guide/http) 发送和接收二进制数据", + "original": "

[Http](guide/http) when sending and receiving binary data

", + "translation": "

用 [Http](guide/http) 发送和接收二进制数据

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { @@ -3560,23 +3565,23 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "Polyfill", - "translation": "填充库", + "original": "

\n Polyfill\n

", + "translation": "

\n 填充库\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "Licence", - "translation": "授权方式", + "original": "

\n Licence\n

", + "translation": "

\n 授权方式\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "Size*", - "translation": "大小*", + "original": "

\n Size*\n

", + "translation": "

\n 大小*\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "Public domain", - "translation": "公共域", + "original": "

\n Public domain\n

", + "translation": "

\n 公共域\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { @@ -4005,63 +4010,403 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "Bootstrapping", - "translation": "启动", + "original": "

Bootstrapping

", + "translation": "

启动

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "Template syntax", - "translation": "模板语法", + "original": "", + "translation": "

Bootstraps the app, using the root component from the specified NgModule.

\n

NgModule 中指定的根组件进行启动。

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "Built-in directives", - "translation": "内置指令", + "original": "\n\n", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "\n ", "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { @@ -12810,8 +13170,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { - "original": "Component", - "translation": "组件", + "original": "

Component\n

", + "translation": "

\n 组件\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" + }, + { + "original": "

Description\n

", + "translation": "

\n 描述\n

\n \n ", "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { @@ -12850,8 +13215,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { - "original": "Counter", - "translation": "计数器", + "original": "

\n Counter\n

", + "translation": "

\n 计数器\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { @@ -14230,18 +14595,18 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Feature Module", - "translation": "特性模块", + "original": "

\n Feature Module\n

", + "translation": "

\n 特性模块\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Guidelines", - "translation": "指导原则", + "original": "

\n Guidelines\n

", + "translation": "

\n 指导原则\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Domain", - "translation": "领域", + "original": "

\n Domain\n

", + "translation": "

\n 领域\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14285,8 +14650,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Routed", - "translation": "路由特性模块", + "original": "

\n Routed\n

", + "translation": "

\n 路由特性模块\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14330,8 +14695,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Routing", - "translation": "路由模块", + "original": "

\n Routing\n

", + "translation": "

\n 路由模块\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14405,8 +14770,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Service", - "translation": "服务", + "original": "

\n Service\n

", + "translation": "

\n 服务\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14430,8 +14795,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Widget", - "translation": "窗口部件", + "original": "

\n Widget\n

", + "translation": "

\n 窗口部件\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14470,173 +14835,173 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Feature Module", - "translation": "特性模块", + "original": "

\n Feature Module\n

", + "translation": "

\n 特性模块\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Declarations", - "translation": "声明`declarations`", + "original": "

\n Declarations\n

", + "translation": "

\n 声明`declarations`\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Providers", - "translation": "提供商`providers`", + "original": "

\n Providers\n

", + "translation": "

\n 提供商`providers`\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Exports", - "translation": "导出什么", + "original": "

\n Exports\n

", + "translation": "

\n 导出什么\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Imported By", - "translation": "被谁导入", + "original": "

\n Imported By\n

", + "translation": "

\n 被谁导入\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Examples", - "translation": "范例", + "original": "

\n Examples\n

", + "translation": "

\n 范例\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Domain", - "translation": "领域", + "original": "

\n Domain\n

", + "translation": "

\n 领域\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Yes", - "translation": "有", + "original": "

\n Yes\n

", + "translation": "

\n 有\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Rare", - "translation": "罕见", + "original": "

\n Rare\n

", + "translation": "

\n 罕见\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Top component", - "translation": "顶级组件", + "original": "

\n Top component\n

", + "translation": "

\n 顶级组件\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Feature, AppModule", - "translation": "特性模块和AppModule", + "original": "

\n Feature, AppModule\n

", + "translation": "

\n 特性模块和AppModule\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "ContactModule (before routing)", - "translation": "ContactModule(路由之前的那个例子)", + "original": "

\n ContactModule (before routing)\n

", + "translation": "

\n ContactModule(路由之前的那个例子)\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Routed", - "translation": "路由", + "original": "

\n Routed\n

", + "translation": "

\n 路由\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Yes", - "translation": "有", + "original": "

\n Yes\n

", + "translation": "

\n 有\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Rare", - "translation": "罕见", + "original": "

\n Rare\n

", + "translation": "

\n 罕见\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "No", - "translation": "无", + "original": "

\n No\n

", + "translation": "

\n 无\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Nobody", - "translation": "无", + "original": "

\n Nobody\n

", + "translation": "

\n 无\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "ContactModule, HeroModule, CrisisModule", - "translation": "ContactModuleHeroModuleCrisisModule", + "original": "

\n ContactModule, HeroModule, CrisisModule\n

", + "translation": "

\n ContactModuleHeroModuleCrisisModule\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Routing", - "translation": "路由", + "original": "

\n Routing\n

", + "translation": "

\n 路由\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "No", - "translation": "无", + "original": "

\n No\n

", + "translation": "

\n 无\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Yes", - "translation": "有", + "original": "

\n Yes\n

", + "translation": "

\n 有\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "No", - "translation": "无", + "original": "

\n No\n

", + "translation": "

\n 无\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "HttpModule, CoreModule", - "translation": "HttpModuleCoreModule", + "original": "

\n HttpModule, CoreModule\n

", + "translation": "

\n HttpModuleCoreModule\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Service", - "translation": "服务", + "original": "

\n Service\n

", + "translation": "

\n 服务\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "No", - "translation": "无", + "original": "

\n No\n

", + "translation": "

\n 无\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Yes", - "translation": "有", + "original": "

\n Yes\n

", + "translation": "

\n 有\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "No", - "translation": "无", + "original": "

\n No\n

", + "translation": "

\n 无\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "HttpModule, CoreModule", - "translation": "HttpModuleCoreModule", + "original": "

\n HttpModule, CoreModule\n

", + "translation": "

\n HttpModuleCoreModule\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Widget", - "translation": "窗口部件", + "original": "

\n Widget\n

", + "translation": "

\n 窗口部件\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Yes", - "translation": "有", + "original": "

\n Yes\n

", + "translation": "

\n 有\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Rare", - "translation": "罕见", + "original": "

\n Rare\n

", + "translation": "

\n 罕见\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Yes", - "translation": "有", + "original": "

\n Yes\n

", + "translation": "

\n 有\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Feature", - "translation": "特性模块", + "original": "

\n Feature\n

", + "translation": "

\n 特性模块\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "CommonModule, SharedModule", - "translation": "CommonModuleSharedModule", + "original": "

\n CommonModule, SharedModule\n

", + "translation": "

\n CommonModuleSharedModule\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14790,13 +15155,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Property", - "translation": "属性", + "original": "

\n Property\n

", + "translation": "

\n 属性\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -18485,13 +18850,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/reactive-forms.md" }, { - "original": "Property", - "translation": "属性", + "original": "

\n Property\n

", + "translation": "

\n 属性\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/reactive-forms.md" }, { - "original": "Description", - "translation": "说明", + "original": "

\n Description\n

", + "translation": "

\n 说明\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/reactive-forms.md" }, { @@ -19520,83 +19885,123 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "Router Part", - "translation": "路由器部件", + "original": "

\n Router Part\n

", + "translation": "

\n 路由器部件\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "Meaning", - "translation": "含义", + "original": "

\n Meaning\n

", + "translation": "

\n 含义\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "Router", - "translation": "Router(路由器)", + "original": "

\n Router\n

", + "translation": "

\n Router(路由器)\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "RouterModule", - "translation": "RouterModule(路由器模块)", + "original": "

\n Displays the application component for the active URL.\n Manages navigation from one component to the next.\n

", + "translation": "

\n 为激活的URL显示应用组件。管理从一个组件到另一个组件的导航\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "Routes", - "translation": "Routes(路由数组)", + "original": "

\n RouterModule\n

", + "translation": "

\n RouterModule(路由器模块)\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "Defines an array of Routes, each mapping a URL path to a component.", - "translation": "定义了一个路由数组,每一个都会把一个URL路径映射到一个组件。", + "original": "

\n A separate NgModule that provides the necessary service providers\n and directives for navigating through application views.\n

", + "translation": "

\n 一个独立的Angular模块,用于提供所需的服务提供商,以及用来在应用视图之间进行导航的指令。\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "Route", - "translation": "Route(路由)", + "original": "

\n Routes\n

", + "translation": "

\n Routes(路由数组)\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "RouterOutlet", - "translation": "RouterOutlet(路由出口)", + "original": "

\n Defines an array of Routes, each mapping a URL path to a component.\n

", + "translation": "

\n 定义了一个路由数组,每一个都会把一个URL路径映射到一个组件。\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "The directive (<router-outlet>) that marks where the router displays a view.", - "translation": "该指令(<router-outlet>)用来标记出路由器该在哪里显示视图。", + "original": "

\n Route\n

", + "translation": "

\n Route(路由)\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "RouterLink", - "translation": "RouterLink(路由链接)", + "original": "

\n Defines how the router should navigate to a component based on a URL pattern.\n Most routes consist of a path and a component type.\n

", + "translation": "

\n 定义路由器该如何根据URL模式(pattern)来导航到组件。大多数路由都由路径和组件类构成。\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "RouterLinkActive", - "translation": "RouterLinkActive(活动路由链接)", + "original": "

\n RouterOutlet\n

", + "translation": "

\n RouterOutlet(路由出口)\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "ActivatedRoute", - "translation": "ActivatedRoute(激活的路由)", + "original": "

\n The directive (<router-outlet>) that marks where the router displays a view.\n

", + "translation": "

\n 该指令(<router-outlet>)用来标记出路由器该在哪里显示视图。\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "RouterState", - "translation": "RouterState(路由器状态)", + "original": "

\n RouterLink\n

", + "translation": "

\n RouterLink(路由链接)\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "Link parameters array", - "translation": "链接参数数组", + "original": "

\n The directive for binding a clickable HTML element to\n a route. Clicking an element with a routerLink directive\n that is bound to a link parameters array triggers a navigation.\n

", + "translation": "

\n 该指令用来把一个可点击的HTML元素绑定到路由。\n 点击带有绑定到字符串链接参数数组routerLink指令的元素就会触发一次导航。\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "Routing component", - "translation": "路由组件", + "original": "

\n RouterLinkActive\n

", + "translation": "

\n RouterLinkActive(活动路由链接)\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "An Angular component with a RouterOutlet that displays views based on router navigations.", - "translation": "一个带有RouterOutlet的Angular组件,它根据路由器的导航来显示相应的视图。", + "original": "

\n The directive for adding/removing classes from an HTML element when an associated\n routerLink contained on or inside the element becomes active/inactive.\n

", + "translation": "

\n 当HTML元素上或元素内的routerLink变为激活或非激活状态时,该指令为这个HTML元素添加或移除CSS类。\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" + }, + { + "original": "

\n ActivatedRoute\n

", + "translation": "

\n ActivatedRoute(激活的路由)\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" + }, + { + "original": "

\n A service that is provided to each route component that contains route specific\n information such as route parameters, static data, resolve data, global query params, and the global fragment.\n

", + "translation": "

\n 为每个路由组件提供提供的一个服务,它包含特定于路由的信息,比如路由参数、静态数据、解析数据、全局查询参数和全局碎片(fragment)。\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" + }, + { + "original": "

\n RouterState\n

", + "translation": "

\n RouterState(路由器状态)\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" + }, + { + "original": "

\n The current state of the router including a tree of the currently activated\n routes together with convenience methods for traversing the route tree.\n

", + "translation": "

\n 路由器的当前状态包含了一棵由程序中激活的路由构成的树。它包含一些用于遍历路由树的快捷方法。\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" + }, + { + "original": "

\n Link parameters array\n

", + "translation": "

\n 链接参数数组\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" + }, + { + "original": "

\n An array that the router interprets as a routing instruction.\n You can bind that array toa RouterLink or pass the array as an argument to\n the Router.navigate method.\n

", + "translation": "

\n 这个数组会被路由器解释成一个路由操作指南。我们可以把一个RouterLink绑定到该数组,或者把它作为参数传给Router.navigate方法。\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" + }, + { + "original": "

\n Routing component\n

", + "translation": "

\n 路由组件\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" + }, + { + "original": "

An Angular component with a RouterOutlet that displays views based on router navigations.\n

", + "translation": "

\n 一个带有RouterOutlet的Angular组件,它根据路由器的导航来显示相应的视图。\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { @@ -23710,13 +24115,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/setup.md" }, { - "original": "File", - "translation": "文件", + "original": "

\n File\n

", + "translation": "

\n 文件\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/setup.md" }, { - "original": "Purpose", - "translation": "用途", + "original": "

\n Purpose\n

", + "translation": "

\n 用途\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/setup.md" }, { @@ -24845,13 +25250,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/styleguide.md" }, { - "original": "Symbol Name", - "translation": "符号名", + "original": "

\n Symbol Name\n

", + "translation": "

\n 符号名\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/styleguide.md" }, { - "original": "File Name", - "translation": "文件名", + "original": "

\n File Name\n

", + "translation": "

\n 文件名\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/styleguide.md" }, { @@ -24900,13 +25305,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/styleguide.md" }, { - "original": "Symbol Name", - "translation": "符号名", + "original": "

\n Symbol Name\n

", + "translation": "

\n 符号名\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/styleguide.md" }, { - "original": "File Name", - "translation": "文件名", + "original": "

\n File Name\n

", + "translation": "

\n 文件名\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/styleguide.md" }, { @@ -25080,13 +25485,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/styleguide.md" }, { - "original": "Symbol Name", - "translation": "符号名", + "original": "

\n Symbol Name\n

", + "translation": "

\n 符号名\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/styleguide.md" }, { - "original": "File Name", - "translation": "文件名", + "original": "

\n File Name\n

", + "translation": "

\n 文件名\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/styleguide.md" }, { @@ -27260,63 +27665,78 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Data direction", - "translation": "数据方向", + "original": "

\n Data direction\n

", + "translation": "

\n 数据方向\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Syntax", - "translation": "语法", + "original": "

\n Syntax\n

", + "translation": "

\n 语法\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Type", - "translation": "绑定类型", + "original": "

\n Type\n

", + "translation": "

\n 绑定类型\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "One-way", - "translation": "单向", + "original": "

\n One-way\n

", + "translation": "

\n 单向\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "from data source", - "translation": "从数据源", + "original": "

\n from data source\n

", + "translation": "

\n 从数据源\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "to view target", - "translation": "到视图目标", + "original": "

\n to view target\n

", + "translation": "

\n 到视图目标\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Interpolation", - "translation": "插值表达式", + "original": "

\n Interpolation\n

", + "translation": "

\n 插值表达式\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Class", - "translation": "类", + "original": "

\n Class\n

", + "translation": "

\n 类\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Style", - "translation": "样式", + "original": "

\n Style\n

", + "translation": "

\n 样式\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "One-way", - "translation": "单向", + "original": "

One-way

", + "translation": "

\n 单向\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "from view target", - "translation": "从视图目标", + "original": "

from view target

", + "translation": "

\n 从视图目标\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "to data source", - "translation": "到数据源", + "original": "

to data source\n

", + "translation": "

\n 到数据源\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" + }, + { + "original": "", + "translation": "

NgModules

", + "translation": "

Angular 模块

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "Forms", - "translation": "表单", + "original": "

Defines a module that contains components, directives, pipes, and providers.

", + "translation": "

定义一个模块,其中可以包含组件、指令、管道和服务提供商。

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "Class decorators", - "translation": "类装饰器(decorator)", + "original": "

List of components, directives, and pipes that belong to this module.

", + "translation": "

属于当前模块的组件、指令和管道的列表。

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "Directive configuration", - "translation": "指令配置", + "original": "

List of modules to import into this module. Everything from the imported modules\nis available to declarations of this module.

", + "translation": "

本模块所导入的模块列表

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "Does not support parent-child relationship selectors.", - "translation": "但不支持指定父子关系的选择器。", + "original": "

List of components, directives, and pipes visible to modules that import this module.

", + "translation": "

那些导入了本模块的模块所能看到的组件、指令和管道的列表

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "Component configuration", - "translation": "组件配置", + "original": "

List of dependency injection providers visible both to the contents of this module and to importers of this module.

", + "translation": "

依赖注入提供商的列表,本模块以及本模块导入的所有模块中的内容都可以看见它们。

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "Class field decorators for directives and components", - "translation": "给指令或组件类用的属性装饰器", + "original": "

List of components to bootstrap when this module is bootstrapped.

", + "translation": "

当本模块启动时,随之启动的组件列表。

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "Directive and component change detection and lifecycle hooks", - "translation": "指令和组件的变更检测与生命周期钩子", + "original": "

Template syntax

", + "translation": "

模板语法

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "Dependency injection configuration", - "translation": "依赖注入的配置", + "original": "

Binds property value to the result of expression firstName.

\n

value属性绑定到表达式firstName

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "Routing and navigation", - "translation": "路由与导航", + "original": "

Binds attribute role to the result of expression myAriaRole.

\n

把属性(Attribute)role绑定到表达式myAriaRole的结果。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Binds the presence of the CSS class extra-sparkle on the element to the truthiness of the expression isDelightful.

\n

根据isDelightful表达式的结果是否为真,决定CSS类extra-sparkle是否出现在当前元素上。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Binds style property width to the result of expression mySize in pixels. Units are optional.

\n

把CSS样式属性width的px(像素)值绑定到表达式mySize的结果。单位是可选的。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Calls method readRainbow when a click event is triggered on this button element (or its children) and passes in the event object.

\n

当这个按钮元素(及其子元素)上的click事件触发时,调用方法readRainbow,并把这个事件对象作为参数传进去。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Binds a property to an interpolated string, for example, \"Hello Seabiscuit\". Equivalent to:\n<div [title]=\"'Hello ' + ponyName\">

\n

把一个属性绑定到插值字符串(如\"Hello Seabiscuit\")。这种写法等价于<div [title]=\"'Hello ' + ponyName\">

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Binds text content to an interpolated string, for example, \"Hello Seabiscuit\".

", + "translation": "

把文本内容绑定到插值字符串(如\"Hello Seabiscuit\")

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Sets up two-way data binding. Equivalent to: <my-cmp [title]=\"name\" (titleChange)=\"name=$event\">

\n

设置双向绑定。等价于<my-cmp [title]=\"name\" (titleChange)=\"name=$event\">

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Creates a local variable movieplayer that provides access to the video element instance in data-binding and event-binding expressions in the current template.

\n

创建一个局部变量movieplayer,支持在当前模板的数据绑定和事件绑定表达式中访问video元素的实例。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

The * symbol turns the current element into an embedded template. Equivalent to:\n<template [myUnless]=\"myExpression\"><p>...</p></template>

\n

星号*会把当前元素转换成内嵌式模板,等价于:<template [myUnless]=\"myExpression\"><p>...</p></template>

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Transforms the current value of expression cardNumber via the pipe called myCardNumberFormatter.

\n

使用名叫myCardNumberFormatter的管道对表达式cardNumber的当前值进行变幻

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

The safe navigation operator (?) means that the employer field is optional and if undefined, the rest of the expression should be ignored.

\n

安全导航操作符(?)表示employer字段是可选的,如果它是 undefined ,那么表达式其余的部分就会被忽略,并返回 undefined

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

An SVG snippet template needs an svg: prefix on its root element to disambiguate the SVG element from an HTML component.

\n

模板中的 SVG 片段需要给它的根元素加上svg:前缀,以便把 SVG 元素和 HTML 元素区分开。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

An <svg> root element is detected as an SVG element automatically, without the prefix.

\n

<svg>作为根元素时会自动识别为 SVG 元素,不需要前缀。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Built-in directives

", + "translation": "

内置指令

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Removes or recreates a portion of the DOM tree based on the showSection expression.

\n

根据showSection表达式的结果,移除或重新创建 DOM 树的一部分。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Turns the li element and its contents into a template, and uses that to instantiate a view for each item in list.

", + "translation": "

把li元素及其内容变成一个模板,并使用这个模板为列表中的每一个条目实例化一个视图。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Conditionally swaps the contents of the div by selecting one of the embedded templates based on the current value of conditionExpression.

\n

根据conditionExpression的当前值选择一个嵌入式模板,并用它替换这个 div 的内容。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Binds the presence of CSS classes on the element to the truthiness of the associated map values. The right-hand expression should return {class-name: true/false} map.

\n

根据 map 中的 value 是否为真,来决定该元素上是否出现与 name 对应的 CSS 类。右侧的表达式应该返回一个形如 {class-name: true/false} 的 map。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Forms

", + "translation": "

表单

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Provides two-way data-binding, parsing, and validation for form controls.

", + "translation": "

为表单控件提供双向数据绑定、解析和验证功能。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Class decorators

", + "translation": "

类装饰器(decorator)

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Declares that a class is a component and provides metadata about the component.

", + "translation": "

声明一个类是组件,并提供该组件的元数据。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Declares that a class is a directive and provides metadata about the directive.

", + "translation": "

声明一个类是指令,并提供该指令的元数据。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Declares that a class is a pipe and provides metadata about the pipe.

", + "translation": "

声明一个类是管道,并提供该管道的元数据。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Declares that a class has dependencies that should be injected into the constructor when the dependency injector is creating an instance of this class.\n

", + "translation": "

声明一个类具有一些依赖,当依赖注入器试图创建该类的实例时,应该把这些依赖注入到该类的构造函数中。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Directive configuration

", + "translation": "

指令配置

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Specifies a CSS selector that identifies this directive within a template. Supported selectors include element,\n[attribute], .class, and :not().

\n

指定一个 CSS 选择器,用于在模板中标记出该指令。支持的选择器类型包括:元素名[属性名], .类名:not()

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Does not support parent-child relationship selectors.

", + "translation": "

但不支持指定父子关系的选择器。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

List of dependency injection providers for this directive and its children.

", + "translation": "

该指令及其子指令的依赖注入提供商列表。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Component configuration

", + "translation": "

组件配置

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "", + "translation": "

\n@Component extends @Directive,\nso the @Directive configuration applies to components as well

\n

@Component 继承自 @Directive,因此 @Directive 的配置也能用于 @Component

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "", + "translation": "

If set, the templateUrl and styleUrl are resolved relative to the component.

\n

如果设置了,那么 templateUrlstyleUrl 的路径就会相对于当前组件进行解析。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

List of dependency injection providers scoped to this component's view.

", + "translation": "

依赖注入提供商列表,但它们的范围被限定为当前组件的视图。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Inline template or external template URL of the component's view.

", + "translation": "

当前组件视图的内联模板或外部模板的 URL 。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

List of inline CSS styles or external stylesheet URLs for styling the component’s view.

", + "translation": "

用于为当前组件的视图提供样式的内联 CSS 或外部样式表 URL 的列表。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Class field decorators for directives and components

", + "translation": "

给指令或组件类用的属性装饰器

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Declares an input property that you can update via property binding (example:\n<my-cmp [myProperty]=\"someExpression\">).

\n

声明一个输入属性,你可以通过属性绑定来更新它,如 <my-cmp [myProperty]=\"someExpression\">

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Declares an output property that fires events that you can subscribe to with an event binding (example: <my-cmp (myEvent)=\"doSomething()\">).

\n

声明一个输出属性,它发出事件,你可以用事件绑定来订阅它们(如:<my-cmp (myEvent)=\"doSomething()\">)。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Binds a host element property (here, the CSS class valid) to a directive/component property (isValid).

\n

把宿主元素的一个属性(这里是 CSS 类 valid)绑定到指令或组件上的 isValid 属性。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Subscribes to a host element event (click) with a directive/component method (onClick), optionally passing an argument ($event).

\n

用指令或组件上的onClick方法订阅宿主元素上的click事件,并从中获取$event参数(可选)

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Binds the first result of the component content query (myPredicate) to a property (myChildComponent) of the class.

\n

把组件内容查询(myPredicate)的第一个结果绑定到该类的 myChildComponent 属性上。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Binds the results of the component content query (myPredicate) to a property (myChildComponents) of the class.

\n

把组件内容查询(myPredicate)的全部结果绑定到该类的 myChildComponents 属性上

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Binds the first result of the component view query (myPredicate) to a property (myChildComponent) of the class. Not available for directives.

\n

把组件视图查询(myPredicate)的第一个结果绑定到该类的 myChildComponent 属性上。对指令无效。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Binds the results of the component view query (myPredicate) to a property (myChildComponents) of the class. Not available for directives.

\n

把组件视图查询(myPredicate)的全部结果绑定到该类的 myChildComponents 属性上。对指令无效。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Directive and component change detection and lifecycle hooks

", + "translation": "

指令和组件的变更检测与生命周期钩子

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

(implemented as class methods)\n

", + "translation": "

由类的方法实现。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.

", + "translation": "

在任何其它生命周期钩子之前调用。可以用它来注入依赖项,但不要在这里做正事。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Called after every change to input properties and before processing content or child views.

\n

每当输入属性发生变化时就会调用,但位于处理内容(ng-content)或子视图之前。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Called after the constructor, initializing input properties, and the first call to ngOnChanges.

\n

在调用完构造函数、初始化完所有输入属性并首次调用过ngOnChanges之后调用。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Called every time that the input properties of a component or a directive are checked. Use it to extend change detection by performing a custom check.

", + "translation": "

每当对组件或指令的输入属性进行变更检测时就会调用。可以用它来扩展变更检测逻辑,执行自定义的检测逻辑。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Called after ngOnInit when the component's or directive's content has been initialized.

\n

ngOnInit完成之后,当组件或指令的内容(ng-content)已经初始化完毕时调用。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Called after every check of the component's or directive's content.

\n

每当组件或指令的内容(ng-content)做变更检测时调用。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.

\n

ngAfterContentInit完毕,并且组件的视图已经初始化完毕时调用。只适用于组件。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Called after every check of the component's view. Applies to components only.

", + "translation": "

当组件视图每次执行变更检测时调用。只适用于组件。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Called once, before the instance is destroyed.

", + "translation": "

只在实例被销毁前调用一次。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Dependency injection configuration

", + "translation": "

依赖注入的配置

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Sets or overrides the provider for MyService to the MyMockService class.

\n

MyService 的服务提供商设置或改写为 MyMockService 类。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Sets or overrides the provider for MyService to the myFactory factory function.

\n

MyService 的服务提供商设置或改写为 myFactory 工厂函数。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Sets or overrides the provider for MyValue to the value 41.

\n

MyValue 的服务提供商改写为一个特定的值 41

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Routing and navigation

", + "translation": "

路由与导航

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Configures routes for the application. Supports static, parameterized, redirect, and wildcard routes. Also supports custom route data and resolve.

", + "translation": "

为该应用配置路由。支持静态、参数化、重定向和通配符路由。也支持自定义路由数据和解析(resolve)函数。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Marks the location to load the component of the active route.

", + "translation": "

标记出一个位置,用来加载活动路由的组件。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

Creates a link to a different view based on a route instruction consisting of a route path, required and optional parameters, query parameters, and a fragment. To navigate to a root route, use the / prefix; for a child route, use the ./prefix; for a sibling or parent, use the ../ prefix.

\n

使用路由体系创建一个到其它视图的链接。路由体系由路由路径、必要参数、可选参数、查询参数和文档片段组成。要导航到根路由,请使用/前缀;要导航到子路由,使用./前缀;要导航到兄弟路由或父级路由,使用../前缀。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

The provided classes are added to the element when the routerLink becomes the current active route.

\n

routerLink 指向的路由变成活动路由时,为当前元素添加一些类(比如这里的 active)。

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

An interface for defining a class that the router should call first to determine if it should activate this component. Should return a boolean or an Observable/Promise that resolves to a boolean.

\n

用来定义类的接口。路由器会首先调用本接口来决定是否激活该路由。应该返回一个 boolean 或能解析成 booleanObservable/Promise

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

An interface for defining a class that the router should call first to determine if it should deactivate this component after a navigation. Should return a boolean or an Observable/Promise that resolves to a boolean.

\n

用来定义类的接口。路由器会在导航离开前首先调用本接口以决定是否取消激活本路由。应该返回一个 boolean 或能解析成 booleanObservable/Promise

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

An interface for defining a class that the router should call first to determine if it should activate the child route. Should return a boolean or an Observable/Promise that resolves to a boolean.

\n

用来定义类的接口。路由器会首先调用本接口来决定是否激活一个子路由。应该返回一个 boolean 或能解析成 booleanObservable/Promise

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

An interface for defining a class that the router should call first to resolve route data before rendering the route. Should return a value or an Observable/Promise that resolves to a value.

\n

用来定义类的接口。路由器会在渲染该路由之前,首先调用它来解析路由数据。应该返回一个值或能解析成值的 Observable/Promise

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" + }, + { + "original": "

An interface for defining a class that the router should call first to check if the lazy loaded module should be loaded. Should return a boolean or an Observable/Promise that resolves to a boolean.

\n

用来定义类的接口。路由器会首先调用它来决定是否应该加载一个惰性加载模块。应该返回一个 boolean 或能解析成 booleanObservable/Promise

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { @@ -6565,13 +6910,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md" }, { - "original": "Future proofing: No need to remember @Injectable() when you add a dependency later.", - "translation": "面向未来: 没有必要记得在后来添加依赖的时候添加 @Injectable()。", + "original": "

\n Future proofing: No need to remember @Injectable() when you add a dependency later.\n

", + "translation": "

\n 面向未来: 没有必要记得在后来添加依赖的时候添加 @Injectable()。\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md" }, { - "original": "Consistency: All services follow the same rules, and you don't have to wonder why a decorator is missing.", - "translation": "一致性:所有的服务都遵循同样的规则,不需要考虑为什么某个地方少了一个。", + "original": "

\n Consistency: All services follow the same rules, and you don't have to wonder why a decorator is missing.\n

", + "translation": "

\n 一致性:所有的服务都遵循同样的规则,不需要考虑为什么某个地方少了一个。\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md" }, { @@ -6904,6 +7249,16 @@ "translation": "### 非类依赖", "sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md" }, + { + "original": "

\n What if the dependency value isn't a class? Sometimes the thing you want to inject is a\n string, function, or object.\n

", + "translation": "

\n 如果依赖值不是一个类呢?有时候想要注入的东西是一个字符串,函数或者对象。\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md" + }, + { + "original": "

\n Applications often define configuration objects with lots of small facts\n (like the title of the application or the address of a web API endpoint)\n but these configuration objects aren't always instances of a class.\n They can be object literals such as this one:\n

", + "translation": "

\n 应用程序经常为很多很小的因素定义配置对象(例如应用程序的标题或网络API终点的地址)。\n 但是这些配置对象不总是类的实例,它们可能是对象,如下面这个:\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md" + }, { "original": "What if you'd like to make this configuration object available for injection?\nYou know you can register an object with a [value provider](guide/dependency-injection#value-provider).", "translation": "我们想让这个配置对象在注入时可用,而且知道可以使用[值提供商](guide/dependency-injection#value-provider)来注册一个对象。", @@ -9250,33 +9605,33 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "State", - "translation": "状态", + "original": "

\n State\n

", + "translation": "

\n 状态\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "Class if true", - "translation": "为真时的 CSS 类", + "original": "

\n Class if true\n

", + "translation": "

\n 为真时的 CSS 类\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "Class if false", - "translation": "为假时的 CSS 类", + "original": "

\n Class if false\n

", + "translation": "

\n 为假时的 CSS 类\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "The control has been visited.", - "translation": "控件被访问过。", + "original": "

\n The control has been visited.\n

", + "translation": "

\n 控件被访问过。\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "The control's value has changed.", - "translation": "控件的值变化了。", + "original": "

\n The control's value has changed.\n

", + "translation": "

\n 控件的值变化了。\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "The control's value is valid.", - "translation": "控件的值有效。", + "original": "

\n The control's value is valid.\n

", + "translation": "

\n 控件的值有效。\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { @@ -12640,8 +12995,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { - "original": "Hook", - "translation": "钩子", + "original": "

Hook\n

", + "translation": "

\n 钩子\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" + }, + { + "original": "

Purpose and Timing\n

", + "translation": "

\n 目的和时机\n

\n

\n Event\n

", + "translation": "

\n 事件\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" + }, + { + "original": "

\n Two-way\n

", + "translation": "

\n 双向\n

", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" + }, + { + "original": "

\n Two-way\n

", + "translation": "

\n 双向\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { @@ -27500,78 +27920,78 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Type", - "translation": "绑定类型", + "original": "

\n Type\n

", + "translation": "

\n 绑定类型\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Target", - "translation": "目标", + "original": "

\n Target\n

", + "translation": "

\n 目标\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Examples", - "translation": "范例", + "original": "

\n Examples\n

", + "translation": "

\n 范例\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Element property", - "translation": "元素的 property", + "original": "

\n Element property\n

", + "translation": "

\n 元素的 property\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Component property", - "translation": "组件的 property", + "original": "

\n Component property\n

", + "translation": "

\n 组件的 property\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Directive property", - "translation": "指令的 property", + "original": "

\n Directive property\n

", + "translation": "

\n 指令的 property\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Event", - "translation": "事件", + "original": "

\n Event\n

", + "translation": "

\n 事件\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Element event", - "translation": "元素的事件", + "original": "

\n Element event\n

", + "translation": "

\n 元素的事件\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Component event", - "translation": "组件的事件", + "original": "

\n Component event\n

", + "translation": "

\n 组件的事件\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Directive event", - "translation": "指令的事件", + "original": "

\n Directive event\n

", + "translation": "

\n 指令的事件\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Two-way", - "translation": "双向", + "original": "

\n Two-way\n

", + "translation": "

\n 双向\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Event and property", - "translation": "事件与 property", + "original": "

\n Event and property\n

", + "translation": "

\n 事件与 property\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Attribute (the exception)", - "translation": "attribute(例外情况)", + "original": "

\n Attribute (the exception)\n

", + "translation": "

\n attribute(例外情况)\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Class", - "translation": "CSS 类", + "original": "

\n Class\n

", + "translation": "

\n CSS 类\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Style", - "translation": "样式", + "original": "

\n Style\n

", + "translation": "

\n 样式\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { @@ -28925,8 +29345,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { - "original": "Aliasing input/output properties", - "translation": "给输入/输出属性起别名", + "original": "

\n Aliasing input/output properties\n

", + "translation": "

\n 给输入/输出属性起别名\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/template-syntax.md" }, { @@ -29245,13 +29665,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Technology", - "translation": "技术", + "original": "

\n Technology\n

", + "translation": "

\n 技术\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Purpose", - "translation": "目的", + "original": "

\n Purpose\n

", + "translation": "

\n 目的\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { @@ -29260,8 +29680,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Angular testing utilities", - "translation": "Angular测试工具", + "original": "

\n Angular testing utilities\n

", + "translation": "

\n Angular测试工具\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { @@ -31475,13 +31895,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Function", - "translation": "函数", + "original": "

\n Function\n

", + "translation": "

\n 函数\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { @@ -31580,13 +32000,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Methods", - "translation": "方法", + "original": "

\n Methods\n

", + "translation": "

\n 方法\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { @@ -31710,13 +32130,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Properties", - "translation": "属性", + "original": "

\n Properties\n

", + "translation": "

\n 属性\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { @@ -31765,13 +32185,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Methods", - "translation": "方法", + "original": "

\n Methods\n

", + "translation": "

\n 方法\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { @@ -31850,13 +32270,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Member", - "translation": "成员", + "original": "

\n Member\n

", + "translation": "

\n 成员\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { @@ -31990,13 +32410,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "File", - "translation": "文件", + "original": "

\n File\n

", + "translation": "

\n 文件\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md" }, { @@ -32915,33 +33335,33 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/upgrade.md" }, { - "original": "Binding definition", - "translation": "绑定定义", + "original": "

\n Binding definition\n

", + "translation": "

\n 绑定定义\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/upgrade.md" }, { - "original": "Template syntax", - "translation": "模板语法", + "original": "

\n Template syntax\n

", + "translation": "

\n 模板语法\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/upgrade.md" }, { - "original": "Attribute binding", - "translation": "属性(Attribute)绑定", + "original": "

\n Attribute binding\n

", + "translation": "

\n 属性(Attribute)绑定\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/upgrade.md" }, { - "original": "Expression binding", - "translation": "表达式绑定", + "original": "

\n Expression binding\n

", + "translation": "

\n 表达式绑定\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/upgrade.md" }, { - "original": "One-way binding", - "translation": "单向绑定", + "original": "

\n One-way binding\n

", + "translation": "

\n 单向绑定\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/upgrade.md" }, { - "original": "Two-way binding", - "translation": "双向绑定", + "original": "

\n Two-way binding\n

", + "translation": "

\n 双向绑定\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/upgrade.md" }, { @@ -33900,18 +34320,18 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/upgrade.md" }, { - "original": "Previous code", - "translation": "老代码", + "original": "

\n Previous code\n

", + "translation": "

\n 老代码\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/upgrade.md" }, { - "original": "New code", - "translation": "新代码", + "original": "

\n New code\n

", + "translation": "

\n 新代码\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/upgrade.md" }, { - "original": "Notes", - "translation": "说明", + "original": "

\n Notes\n

", + "translation": "

\n 说明\n

", "sourceFile": "/Users/twer/private/GDE/content-1/guide/upgrade.md" }, { @@ -35391,32 +35811,17 @@ }, { "original": "
", - "translation": "\n
Angular 走马观花
", - "sourceFile": "/Users/twer/private/GDE/content-1/marketing/docs.md" - }, - { - "original": "

", - "translation": "体验 Angular", + "translation": "", "sourceFile": "/Users/twer/private/GDE/content-1/marketing/docs.md" }, { "original": "", - "translation": "\n

开始使用 Angular
", - "sourceFile": "/Users/twer/private/GDE/content-1/marketing/docs.md" - }, - { - "original": "

", - "translation": "快速上手", + "translation": "", "sourceFile": "/Users/twer/private/GDE/content-1/marketing/docs.md" }, { "original": "", - "translation": "\n

基本原理
", - "sourceFile": "/Users/twer/private/GDE/content-1/marketing/docs.md" - }, - { - "original": "

", - "translation": "架构", + "translation": "", "sourceFile": "/Users/twer/private/GDE/content-1/marketing/docs.md" }, { diff --git a/aio/tools/translator/dict-2.json b/aio/tools/translator/dict-2.json index 382f476d71..44dfeb9f9b 100644 --- a/aio/tools/translator/dict-2.json +++ b/aio/tools/translator/dict-2.json @@ -1504,6 +1504,11 @@ "translation": "当然,这只是冰山一角。后面我们将学习更多的细节。不过,目前我们还是先关注全景图吧。", "sourceFile": "/Users/twer/private/GDE/content-2/guide/architecture.md" }, + { + "original": "The code referenced on this page is available as a .", + "translation": "

\n 本章所引用的代码见。\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/architecture.md" + }, { "original": "## Modules", "translation": "## 模块", @@ -1745,8 +1750,8 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/architecture.md" }, { - "original": "

", - "translation": "元数据告诉 Angular 如何处理一个类。", + "original": "Metadata tells Angular how to process a class.", + "translation": "

元数据告诉 Angular 如何处理一个类。

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/architecture.md" }, { @@ -2980,13 +2985,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { - "original": "latest", - "translation": "最新版", + "original": "

\n latest\n

", + "translation": "

\n 最新版\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { - "original": "latest", - "translation": "最新版", + "original": "

\n latest\n

", + "translation": "

\n 最新版\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { @@ -3075,13 +3080,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { - "original": "Browsers (Desktop & Mobile)", - "translation": "浏览器(桌面和移动)", + "original": "

\n Browsers (Desktop & Mobile)\n

", + "translation": "

\n 浏览器(桌面和移动)\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { - "original": "Polyfills Required", - "translation": "需要的填充库", + "original": "

\n Polyfills Required\n

", + "translation": "

\n 需要的填充库\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { @@ -3150,18 +3155,18 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { - "original": "All but Chrome, Firefox, Edge, IE11 and Safari 10", - "translation": "除了 Chrome、Firefox、Edge、IE11 和 Safari 10 外的所有浏览器", + "original": "

All but Chrome, Firefox, Edge, IE11 and Safari 10

", + "translation": "

除了 Chrome、Firefox、Edge、IE11 和 Safari 10 外的所有浏览器

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { - "original": "[NgClass](api/common/NgClass) on SVG elements", - "translation": "在 SVG 元素上应用 [NgClass](api/common/NgClass)", + "original": "

[NgClass](api/common/NgClass) on SVG elements

", + "translation": "

在 SVG 元素上应用 [NgClass](api/common/NgClass)

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { - "original": "[Http](guide/http) when sending and receiving binary data", - "translation": "用 [Http](guide/http) 发送和接收二进制数据", + "original": "

[Http](guide/http) when sending and receiving binary data

", + "translation": "

用 [Http](guide/http) 发送和接收二进制数据

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { @@ -3175,23 +3180,23 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { - "original": "Polyfill", - "translation": "填充库", + "original": "

\n Polyfill\n

", + "translation": "

\n 填充库\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { - "original": "Licence", - "translation": "授权方式", + "original": "

\n Licence\n

", + "translation": "

\n 授权方式\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { - "original": "Size*", - "translation": "大小*", + "original": "

\n Size*\n

", + "translation": "

\n 大小*\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { - "original": "Public domain", - "translation": "公共域", + "original": "

\n Public domain\n

", + "translation": "

\n 公共域\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/browser-support.md" }, { @@ -3625,63 +3630,403 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" }, { - "original": "Bootstrapping", - "translation": "启动", + "original": "

Bootstrapping

", + "translation": "

启动

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" }, { - "original": "Template syntax", - "translation": "模板语法", + "original": "

Bootstraps the app, using the root component from the specified NgModule.

\n

NgModule 中指定的根组件进行启动。

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" }, { - "original": "Built-in directives", - "translation": "内置指令", + "original": "\n\n", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "", + "translation": "\n ", "sourceFile": "/Users/twer/private/GDE/content-2/guide/lifecycle-hooks.md" }, { @@ -10825,8 +11175,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/lifecycle-hooks.md" }, { - "original": "Component", - "translation": "组件", + "original": "

Component\n

", + "translation": "

\n 组件\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/lifecycle-hooks.md" + }, + { + "original": "

Description\n

", + "translation": "

\n 描述\n

\n \n ", "sourceFile": "/Users/twer/private/GDE/content-2/guide/lifecycle-hooks.md" }, { @@ -10865,8 +11220,8 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/lifecycle-hooks.md" }, { - "original": "Counter", - "translation": "计数器", + "original": "

\n Counter\n

", + "translation": "

\n 计数器\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/lifecycle-hooks.md" }, { @@ -12225,18 +12580,18 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Feature Module", - "translation": "特性模块", + "original": "

\n Feature Module\n

", + "translation": "

\n 特性模块\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Guidelines", - "translation": "指导原则", + "original": "

\n Guidelines\n

", + "translation": "

\n 指导原则\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Domain", - "translation": "领域", + "original": "

\n Domain\n

", + "translation": "

\n 领域\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { @@ -12280,8 +12635,8 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Routed", - "translation": "路由特性模块", + "original": "

\n Routed\n

", + "translation": "

\n 路由特性模块\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { @@ -12325,8 +12680,8 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Routing", - "translation": "路由模块", + "original": "

\n Routing\n

", + "translation": "

\n 路由模块\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { @@ -12400,8 +12755,8 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Service", - "translation": "服务", + "original": "

\n Service\n

", + "translation": "

\n 服务\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { @@ -12425,8 +12780,8 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Widget", - "translation": "窗口部件", + "original": "

\n Widget\n

", + "translation": "

\n 窗口部件\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { @@ -12465,173 +12820,173 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Feature Module", - "translation": "特性模块", + "original": "

\n Feature Module\n

", + "translation": "

\n 特性模块\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Declarations", - "translation": "声明`declarations`", + "original": "

\n Declarations\n

", + "translation": "

\n 声明`declarations`\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Providers", - "translation": "提供商`providers`", + "original": "

\n Providers\n

", + "translation": "

\n 提供商`providers`\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Exports", - "translation": "导出什么", + "original": "

\n Exports\n

", + "translation": "

\n 导出什么\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Imported By", - "translation": "被谁导入", + "original": "

\n Imported By\n

", + "translation": "

\n 被谁导入\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Examples", - "translation": "范例", + "original": "

\n Examples\n

", + "translation": "

\n 范例\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Domain", - "translation": "领域", + "original": "

\n Domain\n

", + "translation": "

\n 领域\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Yes", - "translation": "有", + "original": "

\n Yes\n

", + "translation": "

\n 有\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Rare", - "translation": "罕见", + "original": "

\n Rare\n

", + "translation": "

\n 罕见\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Top component", - "translation": "顶级组件", + "original": "

\n Top component\n

", + "translation": "

\n 顶级组件\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Feature, AppModule", - "translation": "特性模块和AppModule", + "original": "

\n Feature, AppModule\n

", + "translation": "

\n 特性模块和AppModule\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "ContactModule (before routing)", - "translation": "ContactModule(路由之前的那个例子)", + "original": "

\n ContactModule (before routing)\n

", + "translation": "

\n ContactModule(路由之前的那个例子)\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Routed", - "translation": "路由", + "original": "

\n Routed\n

", + "translation": "

\n 路由\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Yes", - "translation": "有", + "original": "

\n Yes\n

", + "translation": "

\n 有\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Rare", - "translation": "罕见", + "original": "

\n Rare\n

", + "translation": "

\n 罕见\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "No", - "translation": "无", + "original": "

\n No\n

", + "translation": "

\n 无\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Nobody", - "translation": "无", + "original": "

\n Nobody\n

", + "translation": "

\n 无\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "ContactModule, HeroModule, CrisisModule", - "translation": "ContactModuleHeroModuleCrisisModule", + "original": "

\n ContactModule, HeroModule, CrisisModule\n

", + "translation": "

\n ContactModuleHeroModuleCrisisModule\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Routing", - "translation": "路由", + "original": "

\n Routing\n

", + "translation": "

\n 路由\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "No", - "translation": "无", + "original": "

\n No\n

", + "translation": "

\n 无\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Yes", - "translation": "有", + "original": "

\n Yes\n

", + "translation": "

\n 有\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "No", - "translation": "无", + "original": "

\n No\n

", + "translation": "

\n 无\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "HttpModule, CoreModule", - "translation": "HttpModuleCoreModule", + "original": "

\n HttpModule, CoreModule\n

", + "translation": "

\n HttpModuleCoreModule\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Service", - "translation": "服务", + "original": "

\n Service\n

", + "translation": "

\n 服务\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "No", - "translation": "无", + "original": "

\n No\n

", + "translation": "

\n 无\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Yes", - "translation": "有", + "original": "

\n Yes\n

", + "translation": "

\n 有\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "No", - "translation": "无", + "original": "

\n No\n

", + "translation": "

\n 无\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "HttpModule, CoreModule", - "translation": "HttpModuleCoreModule", + "original": "

\n HttpModule, CoreModule\n

", + "translation": "

\n HttpModuleCoreModule\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Widget", - "translation": "窗口部件", + "original": "

\n Widget\n

", + "translation": "

\n 窗口部件\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Yes", - "translation": "有", + "original": "

\n Yes\n

", + "translation": "

\n 有\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Rare", - "translation": "罕见", + "original": "

\n Rare\n

", + "translation": "

\n 罕见\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Yes", - "translation": "有", + "original": "

\n Yes\n

", + "translation": "

\n 有\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Feature", - "translation": "特性模块", + "original": "

\n Feature\n

", + "translation": "

\n 特性模块\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "CommonModule, SharedModule", - "translation": "CommonModuleSharedModule", + "original": "

\n CommonModule, SharedModule\n

", + "translation": "

\n CommonModuleSharedModule\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { @@ -12775,13 +13130,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Property", - "translation": "属性", + "original": "

\n Property\n

", + "translation": "

\n 属性\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/ngmodule-faq.md" }, { @@ -15610,13 +15965,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/reactive-forms.md" }, { - "original": "Property", - "translation": "属性", + "original": "

\n Property\n

", + "translation": "

\n 属性\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/reactive-forms.md" }, { - "original": "Description", - "translation": "说明", + "original": "

\n Description\n

", + "translation": "

\n 说明\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/reactive-forms.md" }, { @@ -16640,83 +16995,123 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "Router Part", - "translation": "路由器部件", + "original": "

\n Router Part\n

", + "translation": "

\n 路由器部件\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "Meaning", - "translation": "含义", + "original": "

\n Meaning\n

", + "translation": "

\n 含义\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "Router", - "translation": "Router(路由器)", + "original": "

\n Router\n

", + "translation": "

\n Router(路由器)\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "RouterModule", - "translation": "RouterModule(路由器模块)", + "original": "

\n Displays the application component for the active URL.\n Manages navigation from one component to the next.\n

", + "translation": "

\n 为激活的URL显示应用组件。管理从一个组件到另一个组件的导航\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "Routes", - "translation": "Routes(路由数组)", + "original": "

\n RouterModule\n

", + "translation": "

\n RouterModule(路由器模块)\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "Defines an array of Routes, each mapping a URL path to a component.", - "translation": "定义了一个路由数组,每一个都会把一个URL路径映射到一个组件。", + "original": "

\n A separate NgModule that provides the necessary service providers\n and directives for navigating through application views.\n

", + "translation": "

\n 一个独立的Angular模块,用于提供所需的服务提供商,以及用来在应用视图之间进行导航的指令。\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "Route", - "translation": "Route(路由)", + "original": "

\n Routes\n

", + "translation": "

\n Routes(路由数组)\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "RouterOutlet", - "translation": "RouterOutlet(路由出口)", + "original": "

\n Defines an array of Routes, each mapping a URL path to a component.\n

", + "translation": "

\n 定义了一个路由数组,每一个都会把一个URL路径映射到一个组件。\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "The directive (<router-outlet>) that marks where the router displays a view.", - "translation": "该指令(<router-outlet>)用来标记出路由器该在哪里显示视图。", + "original": "

\n Route\n

", + "translation": "

\n Route(路由)\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "RouterLink", - "translation": "RouterLink(路由链接)", + "original": "

\n Defines how the router should navigate to a component based on a URL pattern.\n Most routes consist of a path and a component type.\n

", + "translation": "

\n 定义路由器该如何根据URL模式(pattern)来导航到组件。大多数路由都由路径和组件类构成。\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "RouterLinkActive", - "translation": "RouterLinkActive(活动路由链接)", + "original": "

\n RouterOutlet\n

", + "translation": "

\n RouterOutlet(路由出口)\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "ActivatedRoute", - "translation": "ActivatedRoute(激活的路由)", + "original": "

\n The directive (<router-outlet>) that marks where the router displays a view.\n

", + "translation": "

\n 该指令(<router-outlet>)用来标记出路由器该在哪里显示视图。\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "RouterState", - "translation": "RouterState(路由器状态)", + "original": "

\n RouterLink\n

", + "translation": "

\n RouterLink(路由链接)\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "Link parameters array", - "translation": "链接参数数组", + "original": "

\n The directive for binding a clickable HTML element to\n a route. Clicking an element with a routerLink directive\n that is bound to a link parameters array triggers a navigation.\n

", + "translation": "

\n 该指令用来把一个可点击的HTML元素绑定到路由。\n 点击带有绑定到字符串链接参数数组routerLink指令的元素就会触发一次导航。\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "Routing component", - "translation": "路由组件", + "original": "

\n RouterLinkActive\n

", + "translation": "

\n RouterLinkActive(活动路由链接)\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { - "original": "An Angular component with a RouterOutlet that displays views based on router navigations.", - "translation": "一个带有RouterOutlet的Angular组件,它根据路由器的导航来显示相应的视图。", + "original": "

\n The directive for adding/removing classes from an HTML element when an associated\n routerLink contained on or inside the element becomes active/inactive.\n

", + "translation": "

\n 当HTML元素上或元素内的routerLink变为激活或非激活状态时,该指令为这个HTML元素添加或移除CSS类。\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" + }, + { + "original": "

\n ActivatedRoute\n

", + "translation": "

\n ActivatedRoute(激活的路由)\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" + }, + { + "original": "

\n A service that is provided to each route component that contains route specific\n information such as route parameters, static data, resolve data, global query params, and the global fragment.\n

", + "translation": "

\n 为每个路由组件提供提供的一个服务,它包含特定于路由的信息,比如路由参数、静态数据、解析数据、全局查询参数和全局碎片(fragment)。\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" + }, + { + "original": "

\n RouterState\n

", + "translation": "

\n RouterState(路由器状态)\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" + }, + { + "original": "

\n The current state of the router including a tree of the currently activated\n routes together with convenience methods for traversing the route tree.\n

", + "translation": "

\n 路由器的当前状态包含了一棵由程序中激活的路由构成的树。它包含一些用于遍历路由树的快捷方法。\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" + }, + { + "original": "

\n Link parameters array\n

", + "translation": "

\n 链接参数数组\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" + }, + { + "original": "

\n An array that the router interprets as a routing instruction.\n You can bind that array toa RouterLink or pass the array as an argument to\n the Router.navigate method.\n

", + "translation": "

\n 这个数组会被路由器解释成一个路由操作指南。我们可以把一个RouterLink绑定到该数组,或者把它作为参数传给Router.navigate方法。\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" + }, + { + "original": "

\n Routing component\n

", + "translation": "

\n 路由组件\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" + }, + { + "original": "

An Angular component with a RouterOutlet that displays views based on router navigations.\n

", + "translation": "

\n 一个带有RouterOutlet的Angular组件,它根据路由器的导航来显示相应的视图。\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md" }, { @@ -20830,13 +21225,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/setup.md" }, { - "original": "File", - "translation": "文件", + "original": "

\n File\n

", + "translation": "

\n 文件\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/setup.md" }, { - "original": "Purpose", - "translation": "用途", + "original": "

\n Purpose\n

", + "translation": "

\n 用途\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/setup.md" }, { @@ -21965,13 +22360,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/styleguide.md" }, { - "original": "Symbol Name", - "translation": "符号名", + "original": "

\n Symbol Name\n

", + "translation": "

\n 符号名\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/styleguide.md" }, { - "original": "File Name", - "translation": "文件名", + "original": "

\n File Name\n

", + "translation": "

\n 文件名\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/styleguide.md" }, { @@ -22020,13 +22415,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/styleguide.md" }, { - "original": "Symbol Name", - "translation": "符号名", + "original": "

\n Symbol Name\n

", + "translation": "

\n 符号名\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/styleguide.md" }, { - "original": "File Name", - "translation": "文件名", + "original": "

\n File Name\n

", + "translation": "

\n 文件名\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/styleguide.md" }, { @@ -22200,13 +22595,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/styleguide.md" }, { - "original": "Symbol Name", - "translation": "符号名", + "original": "

\n Symbol Name\n

", + "translation": "

\n 符号名\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/styleguide.md" }, { - "original": "File Name", - "translation": "文件名", + "original": "

\n File Name\n

", + "translation": "

\n 文件名\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/styleguide.md" }, { @@ -24380,63 +24775,78 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Data direction", - "translation": "数据方向", + "original": "

\n Data direction\n

", + "translation": "

\n 数据方向\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Syntax", - "translation": "语法", + "original": "

\n Syntax\n

", + "translation": "

\n 语法\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Type", - "translation": "绑定类型", + "original": "

\n Type\n

", + "translation": "

\n 绑定类型\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "One-way", - "translation": "单向", + "original": "

\n One-way\n

", + "translation": "

\n 单向\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "from data source", - "translation": "从数据源", + "original": "

\n from data source\n

", + "translation": "

\n 从数据源\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "to view target", - "translation": "到视图目标", + "original": "

\n to view target\n

", + "translation": "

\n 到视图目标\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Interpolation", - "translation": "插值表达式", + "original": "

\n Interpolation\n

", + "translation": "

\n 插值表达式\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Class", - "translation": "类", + "original": "

\n Class\n

", + "translation": "

\n 类\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Style", - "translation": "样式", + "original": "

\n Style\n

", + "translation": "

\n 样式\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "One-way", - "translation": "单向", + "original": "

One-way

", + "translation": "

\n 单向\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "from view target", - "translation": "从视图目标", + "original": "

from view target

", + "translation": "

\n 从视图目标\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "to data source", - "translation": "到数据源", + "original": "

to data source\n

", + "translation": "

\n 到数据源\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" + }, + { + "original": "

NgModules

", + "translation": "

Angular 模块

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" }, { - "original": "Forms", - "translation": "表单", + "original": "

Defines a module that contains components, directives, pipes, and providers.

", + "translation": "

定义一个模块,其中可以包含组件、指令、管道和服务提供商。

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" }, { - "original": "Class decorators", - "translation": "类装饰器(decorator)", + "original": "

List of components, directives, and pipes that belong to this module.

", + "translation": "

属于当前模块的组件、指令和管道的列表。

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" }, { - "original": "Directive configuration", - "translation": "指令配置", + "original": "

List of modules to import into this module. Everything from the imported modules\nis available to declarations of this module.

", + "translation": "

本模块所导入的模块列表

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" }, { - "original": "Does not support parent-child relationship selectors.", - "translation": "但不支持指定父子关系的选择器。", + "original": "

List of components, directives, and pipes visible to modules that import this module.

", + "translation": "

那些导入了本模块的模块所能看到的组件、指令和管道的列表

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" }, { - "original": "Component configuration", - "translation": "组件配置", + "original": "

List of dependency injection providers visible both to the contents of this module and to importers of this module.

", + "translation": "

依赖注入提供商的列表,本模块以及本模块导入的所有模块中的内容都可以看见它们。

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" }, { - "original": "Class field decorators for directives and components", - "translation": "给指令或组件类用的属性装饰器", + "original": "

List of components to bootstrap when this module is bootstrapped.

", + "translation": "

当本模块启动时,随之启动的组件列表。

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" }, { - "original": "Directive and component change detection and lifecycle hooks", - "translation": "指令和组件的变更检测与生命周期钩子", + "original": "

Template syntax

", + "translation": "

模板语法

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" }, { - "original": "Dependency injection configuration", - "translation": "依赖注入的配置", + "original": "

Binds property value to the result of expression firstName.

\n

value属性绑定到表达式firstName

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" }, { - "original": "Routing and navigation", - "translation": "路由与导航", + "original": "

Binds attribute role to the result of expression myAriaRole.

\n

把属性(Attribute)role绑定到表达式myAriaRole的结果。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Binds the presence of the CSS class extra-sparkle on the element to the truthiness of the expression isDelightful.

\n

根据isDelightful表达式的结果是否为真,决定CSS类extra-sparkle是否出现在当前元素上。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Binds style property width to the result of expression mySize in pixels. Units are optional.

\n

把CSS样式属性width的px(像素)值绑定到表达式mySize的结果。单位是可选的。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Calls method readRainbow when a click event is triggered on this button element (or its children) and passes in the event object.

\n

当这个按钮元素(及其子元素)上的click事件触发时,调用方法readRainbow,并把这个事件对象作为参数传进去。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Binds a property to an interpolated string, for example, \"Hello Seabiscuit\". Equivalent to:\n<div [title]=\"'Hello ' + ponyName\">

\n

把一个属性绑定到插值字符串(如\"Hello Seabiscuit\")。这种写法等价于<div [title]=\"'Hello ' + ponyName\">

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Binds text content to an interpolated string, for example, \"Hello Seabiscuit\".

", + "translation": "

把文本内容绑定到插值字符串(如\"Hello Seabiscuit\")

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Sets up two-way data binding. Equivalent to: <my-cmp [title]=\"name\" (titleChange)=\"name=$event\">

\n

设置双向绑定。等价于<my-cmp [title]=\"name\" (titleChange)=\"name=$event\">

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Creates a local variable movieplayer that provides access to the video element instance in data-binding and event-binding expressions in the current template.

\n

创建一个局部变量movieplayer,支持在当前模板的数据绑定和事件绑定表达式中访问video元素的实例。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

The * symbol turns the current element into an embedded template. Equivalent to:\n<template [myUnless]=\"myExpression\"><p>...</p></template>

\n

星号*会把当前元素转换成内嵌式模板,等价于:<template [myUnless]=\"myExpression\"><p>...</p></template>

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Transforms the current value of expression cardNumber via the pipe called myCardNumberFormatter.

\n

使用名叫myCardNumberFormatter的管道对表达式cardNumber的当前值进行变幻

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

The safe navigation operator (?) means that the employer field is optional and if undefined, the rest of the expression should be ignored.

\n

安全导航操作符(?)表示employer字段是可选的,如果它是 undefined ,那么表达式其余的部分就会被忽略,并返回 undefined

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

An SVG snippet template needs an svg: prefix on its root element to disambiguate the SVG element from an HTML component.

\n

模板中的 SVG 片段需要给它的根元素加上svg:前缀,以便把 SVG 元素和 HTML 元素区分开。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

An <svg> root element is detected as an SVG element automatically, without the prefix.

\n

<svg>作为根元素时会自动识别为 SVG 元素,不需要前缀。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Built-in directives

", + "translation": "

内置指令

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Removes or recreates a portion of the DOM tree based on the showSection expression.

\n

根据showSection表达式的结果,移除或重新创建 DOM 树的一部分。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Turns the li element and its contents into a template, and uses that to instantiate a view for each item in list.

", + "translation": "

把li元素及其内容变成一个模板,并使用这个模板为列表中的每一个条目实例化一个视图。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Conditionally swaps the contents of the div by selecting one of the embedded templates based on the current value of conditionExpression.

\n

根据conditionExpression的当前值选择一个嵌入式模板,并用它替换这个 div 的内容。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Binds the presence of CSS classes on the element to the truthiness of the associated map values. The right-hand expression should return {class-name: true/false} map.

\n

根据 map 中的 value 是否为真,来决定该元素上是否出现与 name 对应的 CSS 类。右侧的表达式应该返回一个形如 {class-name: true/false} 的 map。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Forms

", + "translation": "

表单

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Provides two-way data-binding, parsing, and validation for form controls.

", + "translation": "

为表单控件提供双向数据绑定、解析和验证功能。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Class decorators

", + "translation": "

类装饰器(decorator)

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Declares that a class is a component and provides metadata about the component.

", + "translation": "

声明一个类是组件,并提供该组件的元数据。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Declares that a class is a directive and provides metadata about the directive.

", + "translation": "

声明一个类是指令,并提供该指令的元数据。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Declares that a class is a pipe and provides metadata about the pipe.

", + "translation": "

声明一个类是管道,并提供该管道的元数据。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Declares that a class has dependencies that should be injected into the constructor when the dependency injector is creating an instance of this class.\n

", + "translation": "

声明一个类具有一些依赖,当依赖注入器试图创建该类的实例时,应该把这些依赖注入到该类的构造函数中。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Directive configuration

", + "translation": "

指令配置

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Specifies a CSS selector that identifies this directive within a template. Supported selectors include element,\n[attribute], .class, and :not().

\n

指定一个 CSS 选择器,用于在模板中标记出该指令。支持的选择器类型包括:元素名[属性名], .类名:not()

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Does not support parent-child relationship selectors.

", + "translation": "

但不支持指定父子关系的选择器。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

List of dependency injection providers for this directive and its children.

", + "translation": "

该指令及其子指令的依赖注入提供商列表。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Component configuration

", + "translation": "

组件配置

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "", + "translation": "

\n@Component extends @Directive,\nso the @Directive configuration applies to components as well

\n

@Component 继承自 @Directive,因此 @Directive 的配置也能用于 @Component

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "", + "translation": "

If set, the templateUrl and styleUrl are resolved relative to the component.

\n

如果设置了,那么 templateUrlstyleUrl 的路径就会相对于当前组件进行解析。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

List of dependency injection providers scoped to this component's view.

", + "translation": "

依赖注入提供商列表,但它们的范围被限定为当前组件的视图。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Inline template or external template URL of the component's view.

", + "translation": "

当前组件视图的内联模板或外部模板的 URL 。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

List of inline CSS styles or external stylesheet URLs for styling the component’s view.

", + "translation": "

用于为当前组件的视图提供样式的内联 CSS 或外部样式表 URL 的列表。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Class field decorators for directives and components

", + "translation": "

给指令或组件类用的属性装饰器

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Declares an input property that you can update via property binding (example:\n<my-cmp [myProperty]=\"someExpression\">).

\n

声明一个输入属性,你可以通过属性绑定来更新它,如 <my-cmp [myProperty]=\"someExpression\">

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Declares an output property that fires events that you can subscribe to with an event binding (example: <my-cmp (myEvent)=\"doSomething()\">).

\n

声明一个输出属性,它发出事件,你可以用事件绑定来订阅它们(如:<my-cmp (myEvent)=\"doSomething()\">)。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Binds a host element property (here, the CSS class valid) to a directive/component property (isValid).

\n

把宿主元素的一个属性(这里是 CSS 类 valid)绑定到指令或组件上的 isValid 属性。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Subscribes to a host element event (click) with a directive/component method (onClick), optionally passing an argument ($event).

\n

用指令或组件上的onClick方法订阅宿主元素上的click事件,并从中获取$event参数(可选)

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Binds the first result of the component content query (myPredicate) to a property (myChildComponent) of the class.

\n

把组件内容查询(myPredicate)的第一个结果绑定到该类的 myChildComponent 属性上。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Binds the results of the component content query (myPredicate) to a property (myChildComponents) of the class.

\n

把组件内容查询(myPredicate)的全部结果绑定到该类的 myChildComponents 属性上

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Binds the first result of the component view query (myPredicate) to a property (myChildComponent) of the class. Not available for directives.

\n

把组件视图查询(myPredicate)的第一个结果绑定到该类的 myChildComponent 属性上。对指令无效。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Binds the results of the component view query (myPredicate) to a property (myChildComponents) of the class. Not available for directives.

\n

把组件视图查询(myPredicate)的全部结果绑定到该类的 myChildComponents 属性上。对指令无效。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Directive and component change detection and lifecycle hooks

", + "translation": "

指令和组件的变更检测与生命周期钩子

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

(implemented as class methods)\n

", + "translation": "

由类的方法实现。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.

", + "translation": "

在任何其它生命周期钩子之前调用。可以用它来注入依赖项,但不要在这里做正事。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Called after every change to input properties and before processing content or child views.

\n

每当输入属性发生变化时就会调用,但位于处理内容(ng-content)或子视图之前。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Called after the constructor, initializing input properties, and the first call to ngOnChanges.

\n

在调用完构造函数、初始化完所有输入属性并首次调用过ngOnChanges之后调用。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Called every time that the input properties of a component or a directive are checked. Use it to extend change detection by performing a custom check.

", + "translation": "

每当对组件或指令的输入属性进行变更检测时就会调用。可以用它来扩展变更检测逻辑,执行自定义的检测逻辑。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Called after ngOnInit when the component's or directive's content has been initialized.

\n

ngOnInit完成之后,当组件或指令的内容(ng-content)已经初始化完毕时调用。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Called after every check of the component's or directive's content.

\n

每当组件或指令的内容(ng-content)做变更检测时调用。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.

\n

ngAfterContentInit完毕,并且组件的视图已经初始化完毕时调用。只适用于组件。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Called after every check of the component's view. Applies to components only.

", + "translation": "

当组件视图每次执行变更检测时调用。只适用于组件。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Called once, before the instance is destroyed.

", + "translation": "

只在实例被销毁前调用一次。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Dependency injection configuration

", + "translation": "

依赖注入的配置

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Sets or overrides the provider for MyService to the MyMockService class.

\n

MyService 的服务提供商设置或改写为 MyMockService 类。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Sets or overrides the provider for MyService to the myFactory factory function.

\n

MyService 的服务提供商设置或改写为 myFactory 工厂函数。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Sets or overrides the provider for MyValue to the value 41.

\n

MyValue 的服务提供商改写为一个特定的值 41

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Routing and navigation

", + "translation": "

路由与导航

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Configures routes for the application. Supports static, parameterized, redirect, and wildcard routes. Also supports custom route data and resolve.

", + "translation": "

为该应用配置路由。支持静态、参数化、重定向和通配符路由。也支持自定义路由数据和解析(resolve)函数。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Marks the location to load the component of the active route.

", + "translation": "

标记出一个位置,用来加载活动路由的组件。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

Creates a link to a different view based on a route instruction consisting of a route path, required and optional parameters, query parameters, and a fragment. To navigate to a root route, use the / prefix; for a child route, use the ./prefix; for a sibling or parent, use the ../ prefix.

\n

使用路由体系创建一个到其它视图的链接。路由体系由路由路径、必要参数、可选参数、查询参数和文档片段组成。要导航到根路由,请使用/前缀;要导航到子路由,使用./前缀;要导航到兄弟路由或父级路由,使用../前缀。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

The provided classes are added to the element when the routerLink becomes the current active route.

\n

routerLink 指向的路由变成活动路由时,为当前元素添加一些类(比如这里的 active)。

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

An interface for defining a class that the router should call first to determine if it should activate this component. Should return a boolean or an Observable/Promise that resolves to a boolean.

\n

用来定义类的接口。路由器会首先调用本接口来决定是否激活该路由。应该返回一个 boolean 或能解析成 booleanObservable/Promise

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

An interface for defining a class that the router should call first to determine if it should deactivate this component after a navigation. Should return a boolean or an Observable/Promise that resolves to a boolean.

\n

用来定义类的接口。路由器会在导航离开前首先调用本接口以决定是否取消激活本路由。应该返回一个 boolean 或能解析成 booleanObservable/Promise

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

An interface for defining a class that the router should call first to determine if it should activate the child route. Should return a boolean or an Observable/Promise that resolves to a boolean.

\n

用来定义类的接口。路由器会首先调用本接口来决定是否激活一个子路由。应该返回一个 boolean 或能解析成 booleanObservable/Promise

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

An interface for defining a class that the router should call first to resolve route data before rendering the route. Should return a value or an Observable/Promise that resolves to a value.

\n

用来定义类的接口。路由器会在渲染该路由之前,首先调用它来解析路由数据。应该返回一个值或能解析成值的 Observable/Promise

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" + }, + { + "original": "

An interface for defining a class that the router should call first to check if the lazy loaded module should be loaded. Should return a boolean or an Observable/Promise that resolves to a boolean.

\n

用来定义类的接口。路由器会首先调用它来决定是否应该加载一个惰性加载模块。应该返回一个 boolean 或能解析成 booleanObservable/Promise

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/cheatsheet.md" }, { @@ -7820,33 +8165,33 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/forms.md" }, { - "original": "State", - "translation": "状态", + "original": "

\n State\n

", + "translation": "

\n 状态\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/forms.md" }, { - "original": "Class if true", - "translation": "为真时的 CSS 类", + "original": "

\n Class if true\n

", + "translation": "

\n 为真时的 CSS 类\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/forms.md" }, { - "original": "Class if false", - "translation": "为假时的 CSS 类", + "original": "

\n Class if false\n

", + "translation": "

\n 为假时的 CSS 类\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/forms.md" }, { - "original": "The control has been visited.", - "translation": "控件被访问过。", + "original": "

\n The control has been visited.\n

", + "translation": "

\n 控件被访问过。\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/forms.md" }, { - "original": "The control's value has changed.", - "translation": "控件的值变化了。", + "original": "

\n The control's value has changed.\n

", + "translation": "

\n 控件的值变化了。\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/forms.md" }, { - "original": "The control's value is valid.", - "translation": "控件的值有效。", + "original": "

\n The control's value is valid.\n

", + "translation": "

\n 控件的值有效。\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/forms.md" }, { @@ -10655,8 +11000,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/lifecycle-hooks.md" }, { - "original": "Hook", - "translation": "钩子", + "original": "

Hook\n

", + "translation": "

\n 钩子\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/lifecycle-hooks.md" + }, + { + "original": "

Purpose and Timing\n

", + "translation": "

\n 目的和时机\n

\n

\n Event\n

", + "translation": "

\n 事件\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" + }, + { + "original": "

\n Two-way\n

", + "translation": "

\n 双向\n

", + "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" + }, + { + "original": "

\n Two-way\n

", + "translation": "

\n 双向\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { @@ -24620,78 +25030,78 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Type", - "translation": "绑定类型", + "original": "

\n Type\n

", + "translation": "

\n 绑定类型\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Target", - "translation": "目标", + "original": "

\n Target\n

", + "translation": "

\n 目标\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Examples", - "translation": "范例", + "original": "

\n Examples\n

", + "translation": "

\n 范例\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Element property", - "translation": "元素的 property", + "original": "

\n Element property\n

", + "translation": "

\n 元素的 property\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Component property", - "translation": "组件的 property", + "original": "

\n Component property\n

", + "translation": "

\n 组件的 property\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Directive property", - "translation": "指令的 property", + "original": "

\n Directive property\n

", + "translation": "

\n 指令的 property\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Event", - "translation": "事件", + "original": "

\n Event\n

", + "translation": "

\n 事件\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Element event", - "translation": "元素的事件", + "original": "

\n Element event\n

", + "translation": "

\n 元素的事件\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Component event", - "translation": "组件的事件", + "original": "

\n Component event\n

", + "translation": "

\n 组件的事件\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Directive event", - "translation": "指令的事件", + "original": "

\n Directive event\n

", + "translation": "

\n 指令的事件\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Two-way", - "translation": "双向", + "original": "

\n Two-way\n

", + "translation": "

\n 双向\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Event and property", - "translation": "事件与 property", + "original": "

\n Event and property\n

", + "translation": "

\n 事件与 property\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Attribute (the exception)", - "translation": "attribute(例外情况)", + "original": "

\n Attribute (the exception)\n

", + "translation": "

\n attribute(例外情况)\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Class", - "translation": "CSS 类", + "original": "

\n Class\n

", + "translation": "

\n CSS 类\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Style", - "translation": "样式", + "original": "

\n Style\n

", + "translation": "

\n 样式\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { @@ -25995,8 +26405,8 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { - "original": "Aliasing input/output properties", - "translation": "给输入/输出属性起别名", + "original": "

\n Aliasing input/output properties\n

", + "translation": "

\n 给输入/输出属性起别名\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/template-syntax.md" }, { @@ -26315,13 +26725,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Technology", - "translation": "技术", + "original": "

\n Technology\n

", + "translation": "

\n 技术\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Purpose", - "translation": "目的", + "original": "

\n Purpose\n

", + "translation": "

\n 目的\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { @@ -26330,8 +26740,8 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Angular testing utilities", - "translation": "Angular测试工具", + "original": "

\n Angular testing utilities\n

", + "translation": "

\n Angular测试工具\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { @@ -28545,13 +28955,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Function", - "translation": "函数", + "original": "

\n Function\n

", + "translation": "

\n 函数\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { @@ -28650,13 +29060,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Methods", - "translation": "方法", + "original": "

\n Methods\n

", + "translation": "

\n 方法\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { @@ -28780,13 +29190,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Properties", - "translation": "属性", + "original": "

\n Properties\n

", + "translation": "

\n 属性\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { @@ -28835,13 +29245,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Methods", - "translation": "方法", + "original": "

\n Methods\n

", + "translation": "

\n 方法\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { @@ -28920,13 +29330,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Member", - "translation": "成员", + "original": "

\n Member\n

", + "translation": "

\n 成员\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { @@ -29060,13 +29470,13 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "File", - "translation": "文件", + "original": "

\n File\n

", + "translation": "

\n 文件\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { - "original": "Description", - "translation": "描述", + "original": "

\n Description\n

", + "translation": "

\n 描述\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md" }, { @@ -29985,33 +30395,33 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/upgrade.md" }, { - "original": "Binding definition", - "translation": "绑定定义", + "original": "

\n Binding definition\n

", + "translation": "

\n 绑定定义\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/upgrade.md" }, { - "original": "Template syntax", - "translation": "模板语法", + "original": "

\n Template syntax\n

", + "translation": "

\n 模板语法\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/upgrade.md" }, { - "original": "Attribute binding", - "translation": "属性(Attribute)绑定", + "original": "

\n Attribute binding\n

", + "translation": "

\n 属性(Attribute)绑定\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/upgrade.md" }, { - "original": "Expression binding", - "translation": "表达式绑定", + "original": "

\n Expression binding\n

", + "translation": "

\n 表达式绑定\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/upgrade.md" }, { - "original": "One-way binding", - "translation": "单向绑定", + "original": "

\n One-way binding\n

", + "translation": "

\n 单向绑定\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/upgrade.md" }, { - "original": "Two-way binding", - "translation": "双向绑定", + "original": "

\n Two-way binding\n

", + "translation": "

\n 双向绑定\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/upgrade.md" }, { @@ -30970,18 +31380,18 @@ "sourceFile": "/Users/twer/private/GDE/content-2/guide/upgrade.md" }, { - "original": "Previous code", - "translation": "老代码", + "original": "

\n Previous code\n

", + "translation": "

\n 老代码\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/upgrade.md" }, { - "original": "New code", - "translation": "新代码", + "original": "

\n New code\n

", + "translation": "

\n 新代码\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/upgrade.md" }, { - "original": "Notes", - "translation": "说明", + "original": "

\n Notes\n

", + "translation": "

\n 说明\n

", "sourceFile": "/Users/twer/private/GDE/content-2/guide/upgrade.md" }, { @@ -32461,32 +32871,17 @@ }, { "original": "
", - "translation": "\n
Angular 走马观花
", - "sourceFile": "/Users/twer/private/GDE/content-2/marketing/docs.md" - }, - { - "original": "

", - "translation": "体验 Angular", + "translation": "", "sourceFile": "/Users/twer/private/GDE/content-2/marketing/docs.md" }, { "original": "", - "translation": "\n

开始使用 Angular
", - "sourceFile": "/Users/twer/private/GDE/content-2/marketing/docs.md" - }, - { - "original": "

", - "translation": "快速上手", + "translation": "", "sourceFile": "/Users/twer/private/GDE/content-2/marketing/docs.md" }, { "original": "", - "translation": "\n

基本原理
", - "sourceFile": "/Users/twer/private/GDE/content-2/marketing/docs.md" - }, - { - "original": "

", - "translation": "架构", + "translation": "", "sourceFile": "/Users/twer/private/GDE/content-2/marketing/docs.md" }, { diff --git a/aio/tools/translator/dict-3.json b/aio/tools/translator/dict-3.json index a864b79fc1..5d7e4646fd 100644 --- a/aio/tools/translator/dict-3.json +++ b/aio/tools/translator/dict-3.json @@ -2969,6 +2969,11 @@ "translation": "[Web 动画](guide/browser-support#web-animations)", "sourceFile": "/Users/twer/private/GDE/content-3/guide/browser-support.md" }, + { + "original": "

If AnimationBuilder is used then the polyfill will enable scrubbing\n support for IE/Edge and Safari (Chrome and Firefox support this natively).

", + "translation": "

如果使用了AnimationBuilder,那么腻子脚本将为 IE/Edge 和 Safari 启用擦除(scrubbing)支持(Chrome 和 Firefox 原生支持此特性)

", + "sourceFile": "/Users/twer/private/GDE/content-3/guide/browser-support.md" + }, { "original": "If you use the following deprecated i18n pipes:", "translation": "如果你使用下列已废弃的i18n管道:", @@ -27480,13 +27485,13 @@ "sourceFile": "/Users/twer/private/GDE/content-3/marketing/docs.md" }, { - "original": "A quick look at an Angular \"hello world\" application.", - "translation": "快速体验 Angular 的 \"hello world\" 应用。", + "original": "

A quick look at an Angular \"hello world\" application.

", + "translation": "

快速体验 Angular 的 \"hello world\" 应用。

", "sourceFile": "/Users/twer/private/GDE/content-3/marketing/docs.md" }, { - "original": "

", - "translation": "体验 Angular", + "original": "

Angular in Action

", + "translation": "

体验 Angular

", "sourceFile": "/Users/twer/private/GDE/content-3/marketing/docs.md" }, { @@ -27495,13 +27500,13 @@ "sourceFile": "/Users/twer/private/GDE/content-3/marketing/docs.md" }, { - "original": "Get going on your own environment with the Quickstart.", - "translation": "跟随\"快速上手\"构建你的开发环境", + "original": "

Get going on your own environment with the Quickstart.

", + "translation": "

跟随\"快速上手\"构建你的开发环境

", "sourceFile": "/Users/twer/private/GDE/content-3/marketing/docs.md" }, { - "original": "

", - "translation": "快速上手", + "original": "

Quickstart

", + "translation": "

快速上手

", "sourceFile": "/Users/twer/private/GDE/content-3/marketing/docs.md" }, { @@ -27510,13 +27515,13 @@ "sourceFile": "/Users/twer/private/GDE/content-3/marketing/docs.md" }, { - "original": "Learn Angular application fundamentals, starting with an architecture overview.", - "translation": "学习 Angular 应用的基本原理。
从架构概览开始。", + "original": "

Learn Angular application fundamentals, starting with an architecture overview.

", + "translation": "

学习 Angular 应用的基本原理。
从架构概览开始。

", "sourceFile": "/Users/twer/private/GDE/content-3/marketing/docs.md" }, { - "original": "

", - "translation": "架构", + "original": "

Architecture

", + "translation": "

架构

", "sourceFile": "/Users/twer/private/GDE/content-3/marketing/docs.md" }, { diff --git a/aio/tools/translator/utils.ts b/aio/tools/translator/utils.ts index 6b2a394c07..e21bc6fec1 100644 --- a/aio/tools/translator/utils.ts +++ b/aio/tools/translator/utils.ts @@ -52,7 +52,7 @@ export function normalizeLines(text: string): string { text = text.replace(blockElementPattern, '\n\n'); const hxPattern = /(\n *#+ .*)(?=\n)/g; text = text.replace(hxPattern, '\n$1\n'); - const oneLinePairedTagPattern = /\n( *)<(p|div|h\d+|a|code-example)( ?[^>\n]*)>([^<\n]*)<\/\2>( *)(?=\n)/g; + const oneLinePairedTagPattern = /\n( *)<(p|div|h\d+|a|code-example|section)( ?[^>\n]*)>([^<\n]*)<\/\2>( *)(?=\n)/g; text = text.replace(oneLinePairedTagPattern, '\n\n$1<$2$3>$4$5\n'); const oneLineThTdTagPattern = /\n( *)<(th|td|li)( ?[^>\n]*)>(.*)<\/\2>( *)(?=\n)/g; text = text.replace(oneLineThTdTagPattern, '\n\n$1<$2$3>\n\n$1 $4\n\n$1$5\n'); @@ -62,12 +62,12 @@ export function normalizeLines(text: string): string { text = text.replace(oneLineBrTagPattern, '\n\n$1$2$3\n'); const atTagCommentPattern = /\n( *)({@a.*})( *)(?=\n)/g; text = text.replace(atTagCommentPattern, '\n\n$1$2$3\n'); - const oneLineClosedTagPattern = /\n( *)<(hr|p)(\/?)>( *)(?=\n)/g; + const oneLineClosedTagPattern = /\n( *)<(hr)(\/?)>( *)(?=\n)/g; text = text.replace(oneLineClosedTagPattern, '\n\n$1<$2$3>$4\n'); - const multiLinePairedTagPattern = /\n( *)<(header|p)( *[^>\n]*)>\n*(.*?)\n*( *)<\/\2>( *)(?=\n)/g; + const multiLinePairedTagPattern = /\n( *)<(header)( *[^>\n]*)>\n*(.*?)\n*( *)<\/\2>( *)(?=\n)/g; text = text.replace(multiLinePairedTagPattern, '\n\n$1<$2$3>\n\n$4\n\n$5$6\n'); - const blockTagPattern = /\n( *)<(\/?)(td|th|div|code-example)( *[^>\n]*)>( *)(?=\n)/g; + const blockTagPattern = /\n( *)<(\/?)(td|th|div|code-example|code-tabs)( *[^>\n]*)>( *)(?=\n)/g; text = text.replace(blockTagPattern, '\n\n$1<$2$3$4>$5\n'); const multiLineCodePattern = /\n( *)```(\w*)( *)(?=\n)/g;