diff --git a/aio/content/guide/router.md b/aio/content/guide/router.md
index 71dbc98f91..3801196047 100644
--- a/aio/content/guide/router.md
+++ b/aio/content/guide/router.md
@@ -1142,9 +1142,7 @@ Begin with a simple version of the app that navigates between two empty views.
### 设置*<base href>*
The router uses the browser's
-
history.pushState
-
for navigation. Thanks to `pushState`, you can make in-app URL paths look the way you want them to
look, e.g. `localhost:3000/crisis-center`. The in-app URLs can be indistinguishable from server URLs.
diff --git a/aio/tools/translator/dict-1.json b/aio/tools/translator/dict-1.json
index 613070d452..5e2e2ed484 100644
--- a/aio/tools/translator/dict-1.json
+++ b/aio/tools/translator/dict-1.json
@@ -1840,7 +1840,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/aot-compiler.md"
},
{
- "original": "and run `npm install` on it.",
+ "original": "The following instructions presuppose that you have downloaded the\n Tour of Heroes' zip\n and run `npm install` on it.",
"translation": "下列步骤假设你已经下载了《英雄指南》的zip包,并且在其中运行过了`npm install`。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/aot-compiler.md"
},
@@ -2035,8 +2035,8 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/architecture.md"
},
{
- "original": "Learn more about the JavaScript module system on the web.",
- "translation": "学习更多关于 JavaScript 模块的知识。",
+ "original": "
",
+ "translation": "
Learn more about the JavaScript module system on the web.\n
学习更多关于 JavaScript 模块的知识。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/architecture.md"
},
{
@@ -12160,7 +12160,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/i18n.md"
},
{
- "original": "that derives from the\n
Common Locale Data Repository (CLDR),\nwhich specifies the\n
pluralization rules.",
+ "original": "This syntax conforms to the\n
ICU Message Format\nthat derives from the\n
Common Locale Data Repository (CLDR),\nwhich specifies the\n
pluralization rules.",
"translation": "这个写法符合
ICU消息格式,它源自
通用区域设置数据库(CLDR),其中指定了
复数规则。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/i18n.md"
},
@@ -20195,7 +20195,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md"
},
{
- "original": "for navigation. Thanks to `pushState`, you can make in-app URL paths look the way you want them to\nlook, e.g. `localhost:3000/crisis-center`. The in-app URLs can be indistinguishable from server URLs.",
+ "original": "The router uses the browser's\n
history.pushState\nfor navigation. Thanks to `pushState`, you can make in-app URL paths look the way you want them to\nlook, e.g. `localhost:3000/crisis-center`. The in-app URLs can be indistinguishable from server URLs.",
"translation": "路由器使用浏览器的
history.pushState进行导航。\n感谢`pushState`!有了它,我们就能按所期望的样子来显示应用内部的URL路径,比如:`localhost:3000/crisis-center`。虽然我们使用的全部是客户端合成的视图,但应用内部的这些URL看起来和来自服务器的没有什么不同。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md"
},
@@ -23370,12 +23370,12 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md"
},
{
- "original": "style by default, you *must* configure that strategy with a **base href**.",
+ "original": "While the router uses the \n
HTML5 pushState\nstyle by default, you *must* configure that strategy with a **base href**.",
"translation": "由于路由器默认使用“
HTML 5 pushState”风格,所以我们*必须*用一个**base href**来配置该策略(Strategy)。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md"
},
{
- "original": "tag in the `` of the `index.html`.",
+ "original": "The preferred way to configure the strategy is to add a\n
<base href> element\ntag in the `` of the `index.html`.",
"translation": "配置该策略的首选方式是往`index.html`的``中添加一个[<base href> element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base)标签。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md"
},
@@ -23875,7 +23875,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/setup-systemjs-anatomy.md"
},
{
- "original": "e2e test runner.",
+ "original": "_End-to-end_ (e2e) tests of the application,\n written in Jasmine and run by the\n
protractor\n e2e test runner.",
"translation": "应用的*端对端*(e2e)测试,用 Jasmine 写成并用
protractor 端对端测试运行器测试。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/setup-systemjs-anatomy.md"
},
@@ -23955,7 +23955,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/setup-systemjs-anatomy.md"
},
{
- "original": "_end-to-end_ (e2e) test runner.",
+ "original": "Configuration for the\n
protractor\n _end-to-end_ (e2e) test runner.",
"translation": "
protractor *端对端* (e2e) 测试器运行器的配置。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/setup-systemjs-anatomy.md"
},
@@ -24040,8 +24040,8 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/setup.md"
},
{
- "original": "and unzip it into your project folder. Then perform the remaining steps with these terminal commands.",
- "translation": "
下载《快速上手》种子",
+ "original": "
Download the QuickStart seed\nand unzip it into your project folder. Then perform the remaining steps with these terminal commands.",
+ "translation": "
下载《快速上手》种子\n并解压到你的项目目录中。然后执行下面的命令完成剩余步骤。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/setup.md"
},
{
@@ -26035,7 +26035,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/styleguide.md"
},
{
- "original": "that humans start to struggle when the number of adjacent interesting things exceeds nine.\nSo when a folder has ten or more files, it may be time to create subfolders.",
+ "original": "On the other hand,\n
psychologists believe\nthat humans start to struggle when the number of adjacent interesting things exceeds nine.\nSo when a folder has ten or more files, it may be time to create subfolders.",
"translation": "另一方面,
心理学家们相信,\n当关注的事物超过 9 个时,人类就会开始感到吃力。\n所以,当一个文件夹中的文件有 10 个或更多个文件时,可能就是创建子目录的时候了。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/styleguide.md"
},
@@ -30030,7 +30030,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md"
},
{
- "original": "predicate that filters the same way as a jQuery selector.",
+ "original": "The **`By`** class is an Angular testing utility that produces useful predicates.\nIts `By.css` static method produces a\n
standard CSS selector\npredicate that filters the same way as a jQuery selector.",
"translation": "**`By`**类是Angular测试工具之一,它生成有用的predicate。\n它的`By.css`静态方法产生
标准CSS选择器\npredicate,与JQuery选择器相同的方式过滤。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md"
},
@@ -30790,7 +30790,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md"
},
{
- "original": "accepted by many handlers including the `RouterLink` directive.",
+ "original": "The first parameter is the _element-to-click_. If you wish, you can pass a\ncustom event object as the second parameter. The default is a (partial)\n
left-button mouse event object\naccepted by many handlers including the `RouterLink` directive.",
"translation": "第一个参数是**用来点击的元素**。如果你愿意,可以将自定义的事件对象传递给第二个参数。\n默认的是(局部的)
鼠标左键事件对象,\n它被许多事件处理器接受,包括`RouterLink`指令。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/testing.md"
},
@@ -33820,7 +33820,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/upgrade.md"
},
{
- "original": "work, once you have an ES6 `import` statement in a file all UMD typed modules must also be\nimported via `import` statements instead of being globally available.",
+ "original": "`@types/angular` is declared as a UMD module, and due to the way\n
UMD typings\nwork, once you have an ES6 `import` statement in a file all UMD typed modules must also be\nimported via `import` statements instead of being globally available.",
"translation": "`@types/angular`声明为UMD模块,根据
UMD类型\n的工作方式,一旦你在文件中有一条ES6的`import`语句,所有的UMD类型化的模型必须都通过`import`语句导入,\n而是不是全局可用。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/upgrade.md"
},
@@ -38805,7 +38805,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/tutorial/toh-pt6.md"
},
{
- "original": "to the module `imports`, effectively replacing the `Http` client's XHR backend service with an in-memory alternative.",
+ "original": "Rather than require a real API server, this example simulates communication with the remote server by adding the\n
InMemoryWebApiModule\nto the module `imports`, effectively replacing the `Http` client's XHR backend service with an in-memory alternative.",
"translation": "导入`InMemoryWebApiModule`并将其加入到模块的`imports`数组。\n `InMemoryWebApiModule`将`Http`客户端默认的后端服务 —\n 这是一个辅助服务,负责与远程服务器对话 —\n 替换成了*内存 Web API*服务:",
"sourceFile": "/Users/twer/private/GDE/content-1/tutorial/toh-pt6.md"
},
diff --git a/aio/tools/translator/dict-2.json b/aio/tools/translator/dict-2.json
index 44dfeb9f9b..81cebd539f 100644
--- a/aio/tools/translator/dict-2.json
+++ b/aio/tools/translator/dict-2.json
@@ -1610,8 +1610,8 @@
"sourceFile": "/Users/twer/private/GDE/content-2/guide/architecture.md"
},
{
- "original": "
Learn more about the JavaScript module system on the web.",
- "translation": "
学习更多关于 JavaScript 模块的知识。",
+ "original": "
",
+ "translation": "
Learn more about the JavaScript module system on the web.\n
学习更多关于 JavaScript 模块的知识。",
"sourceFile": "/Users/twer/private/GDE/content-2/guide/architecture.md"
},
{
@@ -17305,7 +17305,7 @@
"sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md"
},
{
- "original": "for navigation. Thanks to `pushState`, you can make in-app URL paths look the way you want them to\nlook, e.g. `localhost:3000/crisis-center`. The in-app URLs can be indistinguishable from server URLs.",
+ "original": "The router uses the browser's\n
history.pushState\nfor navigation. Thanks to `pushState`, you can make in-app URL paths look the way you want them to\nlook, e.g. `localhost:3000/crisis-center`. The in-app URLs can be indistinguishable from server URLs.",
"translation": "路由器使用浏览器的
history.pushState进行导航。\n感谢`pushState`!有了它,我们就能按所期望的样子来显示应用内部的URL路径,比如:`localhost:3000/crisis-center`。虽然我们使用的全部是客户端合成的视图,但应用内部的这些URL看起来和来自服务器的没有什么不同。",
"sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md"
},
@@ -20480,12 +20480,12 @@
"sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md"
},
{
- "original": "style by default, you *must* configure that strategy with a **base href**.",
+ "original": "While the router uses the \n
HTML5 pushState\nstyle by default, you *must* configure that strategy with a **base href**.",
"translation": "由于路由器默认使用“
HTML 5 pushState”风格,所以我们*必须*用一个**base href**来配置该策略(Strategy)。",
"sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md"
},
{
- "original": "tag in the `` of the `index.html`.",
+ "original": "The preferred way to configure the strategy is to add a\n
<base href> element\ntag in the `` of the `index.html`.",
"translation": "配置该策略的首选方式是往`index.html`的``中添加一个[<base href> element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base)标签。",
"sourceFile": "/Users/twer/private/GDE/content-2/guide/router.md"
},
@@ -20985,7 +20985,7 @@
"sourceFile": "/Users/twer/private/GDE/content-2/guide/setup-systemjs-anatomy.md"
},
{
- "original": "e2e test runner.",
+ "original": "_End-to-end_ (e2e) tests of the application,\n written in Jasmine and run by the\n
protractor\n e2e test runner.",
"translation": "应用的*端对端*(e2e)测试,用 Jasmine 写成并用
protractor 端对端测试运行器测试。",
"sourceFile": "/Users/twer/private/GDE/content-2/guide/setup-systemjs-anatomy.md"
},
@@ -21065,7 +21065,7 @@
"sourceFile": "/Users/twer/private/GDE/content-2/guide/setup-systemjs-anatomy.md"
},
{
- "original": "_end-to-end_ (e2e) test runner.",
+ "original": "Configuration for the\n
protractor\n _end-to-end_ (e2e) test runner.",
"translation": "
protractor *端对端* (e2e) 测试器运行器的配置。",
"sourceFile": "/Users/twer/private/GDE/content-2/guide/setup-systemjs-anatomy.md"
},
@@ -21150,8 +21150,8 @@
"sourceFile": "/Users/twer/private/GDE/content-2/guide/setup.md"
},
{
- "original": "and unzip it into your project folder. Then perform the remaining steps with these terminal commands.",
- "translation": "
下载《快速上手》种子",
+ "original": "
Download the QuickStart seed\nand unzip it into your project folder. Then perform the remaining steps with these terminal commands.",
+ "translation": "
下载《快速上手》种子\n并解压到你的项目目录中。然后执行下面的命令完成剩余步骤。",
"sourceFile": "/Users/twer/private/GDE/content-2/guide/setup.md"
},
{
@@ -23145,7 +23145,7 @@
"sourceFile": "/Users/twer/private/GDE/content-2/guide/styleguide.md"
},
{
- "original": "that humans start to struggle when the number of adjacent interesting things exceeds nine.\nSo when a folder has ten or more files, it may be time to create subfolders.",
+ "original": "On the other hand,\n
psychologists believe\nthat humans start to struggle when the number of adjacent interesting things exceeds nine.\nSo when a folder has ten or more files, it may be time to create subfolders.",
"translation": "另一方面,
心理学家们相信,\n当关注的事物超过 9 个时,人类就会开始感到吃力。\n所以,当一个文件夹中的文件有 10 个或更多个文件时,可能就是创建子目录的时候了。",
"sourceFile": "/Users/twer/private/GDE/content-2/guide/styleguide.md"
},
@@ -27090,7 +27090,7 @@
"sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md"
},
{
- "original": "predicate that filters the same way as a jQuery selector.",
+ "original": "The **`By`** class is an Angular testing utility that produces useful predicates.\nIts `By.css` static method produces a\n
standard CSS selector\npredicate that filters the same way as a jQuery selector.",
"translation": "**`By`**类是Angular测试工具之一,它生成有用的predicate。\n它的`By.css`静态方法产生
标准CSS选择器\npredicate,与JQuery选择器相同的方式过滤。",
"sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md"
},
@@ -27850,7 +27850,7 @@
"sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md"
},
{
- "original": "accepted by many handlers including the `RouterLink` directive.",
+ "original": "The first parameter is the _element-to-click_. If you wish, you can pass a\ncustom event object as the second parameter. The default is a (partial)\n
left-button mouse event object\naccepted by many handlers including the `RouterLink` directive.",
"translation": "第一个参数是**用来点击的元素**。如果你愿意,可以将自定义的事件对象传递给第二个参数。\n默认的是(局部的)
鼠标左键事件对象,\n它被许多事件处理器接受,包括`RouterLink`指令。",
"sourceFile": "/Users/twer/private/GDE/content-2/guide/testing.md"
},
@@ -30880,7 +30880,7 @@
"sourceFile": "/Users/twer/private/GDE/content-2/guide/upgrade.md"
},
{
- "original": "work, once you have an ES6 `import` statement in a file all UMD typed modules must also be\nimported via `import` statements instead of being globally available.",
+ "original": "`@types/angular` is declared as a UMD module, and due to the way\n
UMD typings\nwork, once you have an ES6 `import` statement in a file all UMD typed modules must also be\nimported via `import` statements instead of being globally available.",
"translation": "`@types/angular`声明为UMD模块,根据
UMD类型\n的工作方式,一旦你在文件中有一条ES6的`import`语句,所有的UMD类型化的模型必须都通过`import`语句导入,\n而是不是全局可用。",
"sourceFile": "/Users/twer/private/GDE/content-2/guide/upgrade.md"
},
diff --git a/aio/tools/translator/dict-3.json b/aio/tools/translator/dict-3.json
index 5d7e4646fd..68ff656552 100644
--- a/aio/tools/translator/dict-3.json
+++ b/aio/tools/translator/dict-3.json
@@ -14825,7 +14825,7 @@
"sourceFile": "/Users/twer/private/GDE/content-3/guide/router.md"
},
{
- "original": "for navigation. Thanks to `pushState`, you can make in-app URL paths look the way you want them to\nlook, e.g. `localhost:3000/crisis-center`. The in-app URLs can be indistinguishable from server URLs.",
+ "original": "The router uses the browser's\n
history.pushState\nfor navigation. Thanks to `pushState`, you can make in-app URL paths look the way you want them to\nlook, e.g. `localhost:3000/crisis-center`. The in-app URLs can be indistinguishable from server URLs.",
"translation": "路由器使用浏览器的
history.pushState进行导航。\n感谢`pushState`!有了它,我们就能按所期望的样子来显示应用内部的URL路径,比如:`localhost:3000/crisis-center`。虽然我们使用的全部是客户端合成的视图,但应用内部的这些URL看起来和来自服务器的没有什么不同。",
"sourceFile": "/Users/twer/private/GDE/content-3/guide/router.md"
},
@@ -18025,12 +18025,12 @@
"sourceFile": "/Users/twer/private/GDE/content-3/guide/router.md"
},
{
- "original": "style by default, you *must* configure that strategy with a **base href**.",
+ "original": "While the router uses the\n
HTML5 pushState\nstyle by default, you *must* configure that strategy with a **base href**.",
"translation": "由于路由器默认使用“
HTML 5 pushState”风格,所以我们*必须*用一个**base href**来配置该策略(Strategy)。",
"sourceFile": "/Users/twer/private/GDE/content-3/guide/router.md"
},
{
- "original": "tag in the `` of the `index.html`.",
+ "original": "The preferred way to configure the strategy is to add a\n
<base href> element\ntag in the `` of the `index.html`.",
"translation": "配置该策略的首选方式是往`index.html`的``中添加一个[<base href> element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base)标签。",
"sourceFile": "/Users/twer/private/GDE/content-3/guide/router.md"
},
@@ -18535,7 +18535,7 @@
"sourceFile": "/Users/twer/private/GDE/content-3/guide/setup-systemjs-anatomy.md"
},
{
- "original": "e2e test runner.",
+ "original": "_End-to-end_ (e2e) tests of the application,\n written in Jasmine and run by the\n
protractor\n e2e test runner.",
"translation": "应用的*端对端*(e2e)测试,用 Jasmine 写成并用
protractor 端对端测试运行器测试。",
"sourceFile": "/Users/twer/private/GDE/content-3/guide/setup-systemjs-anatomy.md"
},
@@ -18605,7 +18605,7 @@
"sourceFile": "/Users/twer/private/GDE/content-3/guide/setup-systemjs-anatomy.md"
},
{
- "original": "_end-to-end_ (e2e) test runner.",
+ "original": "Configuration for the\n
protractor\n _end-to-end_ (e2e) test runner.",
"translation": "
protractor *端对端* (e2e) 测试器运行器的配置。",
"sourceFile": "/Users/twer/private/GDE/content-3/guide/setup-systemjs-anatomy.md"
},
@@ -18690,8 +18690,8 @@
"sourceFile": "/Users/twer/private/GDE/content-3/guide/setup.md"
},
{
- "original": "and unzip it into your project folder. Then perform the remaining steps with these terminal commands.",
- "translation": "
下载《快速上手》种子",
+ "original": "
Download the QuickStart seed\nand unzip it into your project folder. Then perform the remaining steps with these terminal commands.",
+ "translation": "
下载《快速上手》种子\n并解压到你的项目目录中。然后执行下面的命令完成剩余步骤。",
"sourceFile": "/Users/twer/private/GDE/content-3/guide/setup.md"
},
{
@@ -20695,7 +20695,7 @@
"sourceFile": "/Users/twer/private/GDE/content-3/guide/styleguide.md"
},
{
- "original": "that humans start to struggle when the number of adjacent interesting things exceeds nine.\nSo when a folder has ten or more files, it may be time to create subfolders.",
+ "original": "On the other hand,\n
psychologists believe\nthat humans start to struggle when the number of adjacent interesting things exceeds nine.\nSo when a folder has ten or more files, it may be time to create subfolders.",
"translation": "另一方面,
心理学家们相信,\n当关注的事物超过 9 个时,人类就会开始感到吃力。\n所以,当一个文件夹中的文件有 10 个或更多个文件时,可能就是创建子目录的时候了。",
"sourceFile": "/Users/twer/private/GDE/content-3/guide/styleguide.md"
},
@@ -25490,7 +25490,7 @@
"sourceFile": "/Users/twer/private/GDE/content-3/guide/upgrade.md"
},
{
- "original": "work, once you have an ES6 `import` statement in a file all UMD typed modules must also be\nimported via `import` statements instead of being globally available.",
+ "original": "`@types/angular` is declared as a UMD module, and due to the way\n
UMD typings\nwork, once you have an ES6 `import` statement in a file all UMD typed modules must also be\nimported via `import` statements instead of being globally available.",
"translation": "`@types/angular`声明为UMD模块,根据
UMD类型\n的工作方式,一旦你在文件中有一条ES6的`import`语句,所有的UMD类型化的模型必须都通过`import`语句导入,\n而是不是全局可用。",
"sourceFile": "/Users/twer/private/GDE/content-3/guide/upgrade.md"
},
diff --git a/aio/tools/translator/utils.ts b/aio/tools/translator/utils.ts
index e21bc6fec1..629382c346 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|section)( ?[^>\n]*)>([^<\n]*)<\/\2>( *)(?=\n)/g;
+ const oneLinePairedTagPattern = /\n( *)<(p|div|h\d+|code-example|section)( ?[^>\n]*)>([^<\n]*)<\/\2>( *)(?=\n)/g;
text = text.replace(oneLinePairedTagPattern, '\n\n$1<$2$3>$4$2>$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$2>$5\n');