diff --git a/public/_includes/_footer.jade b/public/_includes/_footer.jade index 5ef757ccba..fbe6d0f98c 100644 --- a/public/_includes/_footer.jade +++ b/public/_includes/_footer.jade @@ -14,39 +14,60 @@ else .logo-inverse-large .c3 + h3.text-headline RESOURCES h3.text-headline 资源 ul.text-body // TODO: (ericjim) make a libraries page to showcase all angular 2 libraries //li Libraries + li About li 关于 + li Books & Training li 书籍与培训 + li Tools & Libraries li 工具与库 + li Community li 社区 - li 出版工具 + li Press Kit + li 出版配套 .c3 + h3.text-headline HELP h3.text-headline 帮助 ul.text-body li Stack Overflow + li Stack Overflow + li Gitter li Gitter li Google Group - li 报告问题 - li 站内反馈 + li Google Group + li Report Issues + li 报告问题 + li Site Feedback + li 网站反馈 .c3 + h3.text-headline COMMUNITY h3.text-headline 社区 ul.text-body li Events + li 事件 + li Meetups li Meetups li Twitter + li Twitter + li GitHub li GitHub li Contribute + li 做贡献 footer(class="background-steel") - small.text-caption 来自 Google ©2010-2016。 代码许可协议:MIT-style License。 文档许可协议:CC BY 4.0. + small.text-caption Powered by Google ©2010-2016. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0. + small.text-caption Powered by Google ©2010-2016. 代码授权协议:MIT式协议。 文档授权协议:CC BY 4.0. + a(aria-label="View Style Guide" href=styleguide title="Style Guide" class="styleguide-trigger text-snow" md-button) + span.icon-favorite a(aria-label="查看风格指南" href=styleguide title="风格指南" class="styleguide-trigger text-snow" md-button) span.icon-favorite diff --git a/public/docs/ts/latest/quickstart.jade b/public/docs/ts/latest/quickstart.jade index f5a8432d3c..474203ce98 100644 --- a/public/docs/ts/latest/quickstart.jade +++ b/public/docs/ts/latest/quickstart.jade @@ -53,15 +53,15 @@ figure.image-display 在此日程中,我们将会看到很多代码块。它们都很容易拷贝和粘贴: code-example(format='.', language='html'). - Click the glyph on the right to copy code snippets to the clipboard ==========> - 点击右边的图标来把代码片段拷贝到剪贴板 ==========> button(class="verbose off md-primary md-button md-ink-ripple", type="button", onclick="verbose(false)"). Hide explanations +button(class="verbose off md-primary md-button md-ink-ripple", type="button", onclick="verbose(false)"). 隐藏解释 button(class="verbose on md-primary md-button md-ink-ripple", type="button", onclick="verbose(true)"). View explanations +button(class="verbose on md-primary md-button md-ink-ripple", type="button", onclick="verbose(true)"). 查看解释 .l-verbose-section :marked diff --git a/public/news.jade b/public/news.jade index 52e9de25e1..bf17b53462 100644 --- a/public/news.jade +++ b/public/news.jade @@ -29,7 +29,6 @@ target="_blank" href="http://angularjs.blogspot.com/2016/03/code-reuse-in-angular-2-native-mobile.html" ) Code Reuse in Angular 2 Native Mobile Apps with NativeScript - br a( target="_blank" href="http://angularjs.blogspot.com/2016/03/code-reuse-in-angular-2-native-mobile.html" @@ -56,7 +55,6 @@ target="_blank" href="http://www.mediacurrent.com/blog/building-wundergroundcom-drupal-angular-2-challenge-1-how-bootstrap" ) Building Wunderground.com with Drupal & Angular 2: How to Bootstrap - br a( target="_blank" href="http://www.mediacurrent.com/blog/building-wundergroundcom-drupal-angular-2-challenge-1-how-bootstrap" @@ -76,7 +74,6 @@ target="_blank" href="http://blog.jetbrains.com/webstorm/2016/04/angular-2-workflow-in-webstorm/" ) Angular 2 workflow in WebStorm - br a( target="_blank" href="http://blog.jetbrains.com/webstorm/2016/04/angular-2-workflow-in-webstorm/" @@ -96,7 +93,6 @@ target="_blank" href="http://m12.io/blog/we-launched-angular-2-project" ) After six months of development we launched on Angular 2 - br a( target="_blank" href="http://m12.io/blog/we-launched-angular-2-project" @@ -116,7 +112,6 @@ target="_blank" href="http://blog.thoughtram.io/angular/2016/03/21/template-driven-forms-in-angular-2.html" ) Template-driven Forms in Angular 2 - br a( target="_blank" href="http://blog.thoughtram.io/angular/2016/03/21/template-driven-forms-in-angular-2.html" @@ -145,7 +140,6 @@ class="twitter-follow-button" data-show-count="false" ) Follow @angularjs - br a( href="http://twitter.com/angularjs" class="twitter-follow-button" diff --git a/public/resources/css/_translate.scss b/public/resources/css/_translate.scss index 2724ccfa28..85b19c3ac2 100644 --- a/public/resources/css/_translate.scss +++ b/public/resources/css/_translate.scss @@ -1,3 +1,3 @@ -.hidden { +.lang-english { display: none !important; } diff --git a/public/resources/js/translate.js b/public/resources/js/translate.js index 2d615da58c..47d49102ec 100644 --- a/public/resources/js/translate.js +++ b/public/resources/js/translate.js @@ -1,17 +1,17 @@ (function () { - var targets = document.querySelectorAll('p, li, h1, h2, h3, h4, h5, h6, header, a, button'); + var targets = document.querySelectorAll('p, li, h1, h2, h3, h4, h5, h6, header, a, button, small'); _.each(targets, function (node) { if (isTranslationResult(node)) { var prevNode = node.previousElementSibling; - if (prevNode && !prevNode.classList.contains('nav-list-item')) { - prevNode.classList.add('hidden'); + if (prevNode && isOriginalEnglish(prevNode.innerText) && !prevNode.classList.contains('nav-list-item')) { + prevNode.classList.add('lang-english'); } node.title = prevNode.innerText; } }); function isOriginalEnglish(text) { - return /[\1-\255⇨]/.test(text); + return /^[\1-\255—]*$/.test(text); } function isClonedNode(node1, node2) {