fix: 人工修订自动翻译
fix: 标准化原文中的异常语句
This commit is contained in:
		
							parent
							
								
									73eb2d2d73
								
							
						
					
					
						commit
						c618678281
					
				| @ -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. | ||||
| 
 | ||||
|  | ||||
| @ -1504,26 +1504,39 @@ Here's how the table renders: | ||||
| 这里是表格渲染出来的样子: | ||||
| 
 | ||||
| <table border="1px"> | ||||
|   <tr><td colspan="2"> | ||||
| 
 | ||||
|   One-Two | ||||
|   <tr> | ||||
| 
 | ||||
|   1-2列 | ||||
|       <td colspan="2"> | ||||
| 
 | ||||
|   </td></tr> | ||||
|   <tr><td> | ||||
|           One-Two | ||||
| 
 | ||||
|   Five | ||||
|           1-2列 | ||||
| 
 | ||||
|   五列 | ||||
|       </td> | ||||
| 
 | ||||
|   </td><td> | ||||
|   </tr> | ||||
| 
 | ||||
|   Six | ||||
|   <tr> | ||||
| 
 | ||||
|   六列 | ||||
|       <td> | ||||
| 
 | ||||
|           Five | ||||
| 
 | ||||
|           五列 | ||||
| 
 | ||||
|       </td> | ||||
| 
 | ||||
| <td> | ||||
| 
 | ||||
|     Six | ||||
| 
 | ||||
|     六列 | ||||
| 
 | ||||
| </td> | ||||
| 
 | ||||
|   </tr> | ||||
| 
 | ||||
|   </td></tr> | ||||
|  </table> | ||||
| 
 | ||||
| One of the primary use cases for attribute binding | ||||
|  | ||||
| @ -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); | ||||
|  | ||||
| @ -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" | ||||
|   }, | ||||
|   { | ||||
|  | ||||
| @ -56,6 +56,11 @@ export function normalizeLines(text: string): string { | ||||
|   text = text.replace(oneLineCommentPattern, '\n\n$1$2$3\n'); | ||||
|   const oneLineBrTagPattern = /\n( *)(<br class="clear">)( *)(?=\n)/g; | ||||
|   text = text.replace(oneLineBrTagPattern, '\n\n$1$2$3\n'); | ||||
| 
 | ||||
|   // 原文中有 back to top 被分成两行的情况,这里把它标准化一下
 | ||||
|   const specialBackToTopPattern = /<a href="#toc">Back to top\s+<\/a>/g; | ||||
|   text = text.replace(specialBackToTopPattern, '<a href="#toc">Back to top</a>'); | ||||
| 
 | ||||
|   const backToTopPattern = /\n( *)(<a href="#toc">Back to top<\/a>)( *)(?=\n)/g; | ||||
|   text = text.replace(backToTopPattern, '\n\n$1$2$3\n'); | ||||
|   const atTagCommentPattern = /\n( *)({@a.*})( *)(?=\n)/g; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user