From 3fe722490ad666896b1e94f82a5aa706367c6b1a Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Sun, 30 Jul 2017 14:10:08 +0800 Subject: [PATCH] fix: don't hide translation-origin if there is not translation-result fix: translate more. --- aio/content/marketing/docs.md | 1 + aio/content/marketing/features.html | 6 ++++++ aio/content/navigation.json | 2 +- aio/content/tutorial/index.md | 7 +++++-- aio/src/styles/_translator.scss | 2 +- .../angular-base-package/post-processors/h1-checker.js | 5 ++++- 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/aio/content/marketing/docs.md b/aio/content/marketing/docs.md index e6d900c3ab..b07d94fa5b 100644 --- a/aio/content/marketing/docs.md +++ b/aio/content/marketing/docs.md @@ -1,4 +1,5 @@

What is Angular?

+

什么是 Angular?

Angular is a platform that makes it easy to build applications with the web. Angular combines declarative templates, dependency injection, end to end tooling, and integrated best practices to solve development challenges. Angular empowers developers to build applications that live on the web, mobile, or the desktop diff --git a/aio/content/marketing/features.html b/aio/content/marketing/features.html index f37cadd10e..aa352a570a 100755 --- a/aio/content/marketing/features.html +++ b/aio/content/marketing/features.html @@ -1,5 +1,6 @@

Features & Benefits

+

特性与优点

@@ -8,19 +9,24 @@
Cross Platform
+
跨平台
Progressive Web Apps
+
渐进式应用

Use modern web platform capabilities to deliver app-like experiences. High performance, offline, and zero-step installation.

+

充分利用现代 Web 平台的各种能力,提供 App 式体验。高性能、离线使用、免安装。

Native
+
原生

Build native mobile apps with strategies from Ionic Framework, NativeScript, and React Native.

+

基于来自Ionic Framework、NativeScript和React Native的不同策略构建原生应用。

diff --git a/aio/content/navigation.json b/aio/content/navigation.json index 55cf9fa9e5..7ded08a782 100644 --- a/aio/content/navigation.json +++ b/aio/content/navigation.json @@ -394,7 +394,7 @@ }, { "url": "https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md", - "title": "行动守则", + "title": "行为规范", "tooltip": "让我们彼此尊重" } ] diff --git a/aio/content/tutorial/index.md b/aio/content/tutorial/index.md index b054338a6e..2efee47327 100644 --- a/aio/content/tutorial/index.md +++ b/aio/content/tutorial/index.md @@ -1,6 +1,9 @@ -# Tutorial: Tour of Heroes +@title +教程:英雄指南 -# 教程:英雄指南 +@intro + +@description The grand plan for this tutorial is to build an app that helps a staffing agency manage its stable of heroes. diff --git a/aio/src/styles/_translator.scss b/aio/src/styles/_translator.scss index fe8f64577d..9ae2083aa2 100644 --- a/aio/src/styles/_translator.scss +++ b/aio/src/styles/_translator.scss @@ -1,4 +1,4 @@ -[translation-origin=off] { +[translation-result] + [translation-origin=off] { display: none; } diff --git a/aio/tools/transforms/angular-base-package/post-processors/h1-checker.js b/aio/tools/transforms/angular-base-package/post-processors/h1-checker.js index 4e9a082936..ee5356b5e9 100644 --- a/aio/tools/transforms/angular-base-package/post-processors/h1-checker.js +++ b/aio/tools/transforms/angular-base-package/post-processors/h1-checker.js @@ -20,9 +20,12 @@ module.exports = function h1CheckerPostProcessor() { } }); - file.title = file.headings.h1[0]; if (file.headings.h1.length > 2) { file.fail(`More than two h1 found in ${file}`); + } else if (file.headings.h1.length > 1) { + file.title = file.headings.h1[1]; + } else if (file.headings.h1.length === 1) { + file.title = file.headings.h1[0]; } }; };