diff --git a/aio/content/guide/router.md b/aio/content/guide/router.md index db5d45574f..87d50473fc 100644 --- a/aio/content/guide/router.md +++ b/aio/content/guide/router.md @@ -5622,7 +5622,7 @@ navigates from the root of the application down to the *Dragon Crisis*: * The first item in the array identifies the parent route (`/crisis-center`). - 数组中的第一个条目用来标记出父路由('/crisis-center')。 + 数组中的第一个条目标记出了父路由(`/crisis-center`)。 * There are no parameters for this parent route so you're done with it. diff --git a/aio/content/guide/template-syntax.md b/aio/content/guide/template-syntax.md index 172a7ec389..0a50845535 100644 --- a/aio/content/guide/template-syntax.md +++ b/aio/content/guide/template-syntax.md @@ -1504,26 +1504,39 @@ Here's how the table renders: 这里是表格渲染出来的样子: - - 1-2列 + - - - Six + - 六列 + + + + + -
- One-Two +
-
+ One-Two - Five + 1-2列 - 五列 + +
+ + Five + + 五列 + + + + Six + + 六列 + +
One of the primary use cases for attribute binding diff --git a/aio/tools/translator/bin/translate-one.ts b/aio/tools/translator/bin/translate-one.ts index a8ac6b1e82..ee6b2252d4 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 = 'guide/template-syntax.md'; +const filename = 'guide/router.md'; translateFile(__dirname + '/../../../../../content-en/' + filename, dirs.content + filename); diff --git a/aio/tools/translator/dict-3.json b/aio/tools/translator/dict-3.json index 2e827cccfc..4789335456 100644 --- a/aio/tools/translator/dict-3.json +++ b/aio/tools/translator/dict-3.json @@ -6856,7 +6856,7 @@ }, { "original": "Note the following:", - "translation": "要注意的有两点:", + "translation": "请注意以下几点:", "sourceFile": "/Users/twer/private/GDE/content-3/guide/form-validation.md" }, { @@ -12211,7 +12211,7 @@ }, { "original": "Note the following:", - "translation": "要注意的有两点:", + "translation": "请注意以下几点:", "sourceFile": "/Users/twer/private/GDE/content-3/guide/pipes.md" }, { @@ -17946,7 +17946,7 @@ }, { "original": "* The first item in the array identifies the parent route (`/crisis-center`).", - "translation": "数组中的第一个条目用来标记出父路由('/crisis-center')。", + "translation": "数组中的第一个条目标记出了父路由(`/crisis-center`)。", "sourceFile": "/Users/twer/private/GDE/content-3/guide/router.md" }, { diff --git a/aio/tools/translator/utils.ts b/aio/tools/translator/utils.ts index 6a5da487f3..df3f0537a2 100644 --- a/aio/tools/translator/utils.ts +++ b/aio/tools/translator/utils.ts @@ -56,6 +56,11 @@ export function normalizeLines(text: string): string { text = text.replace(oneLineCommentPattern, '\n\n$1$2$3\n'); const oneLineBrTagPattern = /\n( *)(
)( *)(?=\n)/g; text = text.replace(oneLineBrTagPattern, '\n\n$1$2$3\n'); + + // 原文中有 back to top 被分成两行的情况,这里把它标准化一下 + const specialBackToTopPattern = /Back to top\s+<\/a>/g; + text = text.replace(specialBackToTopPattern, 'Back to top'); + const backToTopPattern = /\n( *)(Back to top<\/a>)( *)(?=\n)/g; text = text.replace(backToTopPattern, '\n\n$1$2$3\n'); const atTagCommentPattern = /\n( *)({@a.*})( *)(?=\n)/g;