翻译文档首页

This commit is contained in:
Zhicheng Wang 2018-03-08 09:28:04 +08:00
parent c29aee6729
commit 8af121ee8f
3 changed files with 14 additions and 21 deletions

View File

@ -7,38 +7,31 @@ Angular is a platform that makes it easy to build applications with the web. Ang
Angular 是一个开发平台。它能帮你更轻松的构建 Web 应用。Angular 集声明式模板、依赖注入、端到端工具和一些最佳实践于一身为你解决开发方面的各种挑战。Angular 为开发者提升构建 Web、手机或桌面应用的能力。 Angular 是一个开发平台。它能帮你更轻松的构建 Web 应用。Angular 集声明式模板、依赖注入、端到端工具和一些最佳实践于一身为你解决开发方面的各种挑战。Angular 为开发者提升构建 Web、手机或桌面应用的能力。
<div class="card-container"> <div class="card-container">
<a href="generated/live-examples/toh-pt1/stackblitz.html" target="_blank" class="docs-card" <a href="generated/live-examples/toh-pt1/stackblitz.html" target="_blank" class="docs-card"
title="Experience Angular in a live coding environment"> title="Experience Angular in a live coding environment">
<section>Get a Glimpse of Angular</section> <section>Get a Glimpse of Angular</section>
<section>Angular 走马观花</section>
<p>A quick look at an Angular "hello world" application.</p> <p>A quick look at an Angular "hello world" application.</p>
<p>快速体验 Angular 的 "hello world" 应用。</p>
<p class="card-footer">Angular in Action</p> <p class="card-footer">Angular in Action</p>
<p class="card-footer">体验 Angular</p>
</a> </a>
<a href="guide/quickstart" class="docs-card" title="Angular Quickstart"> <a href="guide/quickstart" class="docs-card" title="Angular Quickstart">
<section>Get Going with Angular</section> <section>Get Going with Angular</section>
<section>开始使用 Angular</section>
<p>Get going on your own environment with the Quickstart.</p> <p>Get going on your own environment with the Quickstart.</p>
<p>跟随"快速上手"构建你的开发环境</p>
<p class="card-footer">Quickstart</p> <p class="card-footer">Quickstart</p>
<p class="card-footer">快速上手</p>
</a> </a>
<a href="guide/architecture" class="docs-card" title="Angular Architecture"> <a href="guide/architecture" class="docs-card" title="Angular Architecture">
<section>Fundamentals</section> <section>Fundamentals</section>
<section>基本原理</section>
<p>Learn Angular application fundamentals, starting with an architecture overview.</p> <p>Learn Angular application fundamentals, starting with an architecture overview.</p>
<p>学习 Angular 应用的基本原理。<br/>从架构概览开始。</p>
<p class="card-footer">Architecture</p> <p class="card-footer">Architecture</p>
<p class="card-footer">架构</p>
</a> </a>
</div> </div>
## Assumptions ## Assumptions
@ -56,8 +49,8 @@ Most Angular code can be written with just the latest JavaScript,
using [types](https://www.typescriptlang.org/docs/handbook/classes.html "TypeScript Types") for dependency injection, using [types](https://www.typescriptlang.org/docs/handbook/classes.html "TypeScript Types") for dependency injection,
and using [decorators](https://www.typescriptlang.org/docs/handbook/decorators.html "Decorators") for metadata. and using [decorators](https://www.typescriptlang.org/docs/handbook/decorators.html "Decorators") for metadata.
本文档假设你已经熟悉了[JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript "学习 JavaScript")和来自[最新标准](https://babeljs.io/learn-es2015/ "Latest JavaScript standards")的一些知识,比如 [](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes "ES2015 ") 和 [模块](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import "ES2015 模块")。 本文档假设你已经熟悉了 [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript "Learn JavaScript") 和来自 [最新标准](https://babeljs.io/learn-es2015/ "Latest JavaScript standards") 的一些知识,比如 [](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes "ES2015 Classes") 和 [模块](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import "ES2015 Modules")。
下列代码范例都是用最新版本的JavaScript写的利用[类型](https://www.typescriptlang.org/docs/handbook/classes.html "TypeScript 类型")实现依赖注入,并使用[装饰器](https://www.typescriptlang.org/docs/handbook/decorators.html "装饰器")来提供元数据。 下列代码范例都是用最新版本的JavaScript写的利用 [类型](https://www.typescriptlang.org/docs/handbook/classes.html "TypeScript Types") 实现依赖注入,并使用[装饰器](https://www.typescriptlang.org/docs/handbook/decorators.html "Decorators")来提供元数据。
## Feedback ## Feedback

View File

@ -73,12 +73,12 @@
}, },
{ {
"url": "tutorial/toh-pt2", "url": "tutorial/toh-pt2",
"title": "4. 主从结构", "title": "4. 显示英雄列表",
"tooltip": "第四部分:构建一个主从结构的页面,用于展现英雄列表" "tooltip": "第四部分:构建一个主从结构的页面,用于展现英雄列表"
}, },
{ {
"url": "tutorial/toh-pt3", "url": "tutorial/toh-pt3",
"title": "5. 多个组件", "title": "5. 主从结构",
"tooltip": "第五部分:把主从结构的页面重构成多个组件" "tooltip": "第五部分:把主从结构的页面重构成多个组件"
}, },
{ {

View File

@ -1,5 +1,5 @@
function mark(text) { function mark(text) {
return text.replace(/<(h\d|header|p|a)(\b[\s\S]*?)>([\s\S]+?)<\/\1>/gi, function ($0, $1, $2, $3) { return text.replace(/<(h\d|header|p|section)(\b[\s\S]*?)>([\s\S]+?)<\/\1>/gi, function ($0, $1, $2, $3) {
const suffix = isTranslation($3) ? 'result' : 'origin=off'; const suffix = isTranslation($3) ? 'result' : 'origin=off';
return `<${$1} translation-${suffix} ${$2}>${$3}</${$1}>`; return `<${$1} translation-${suffix} ${$2}>${$3}</${$1}>`;
}); });