修改了翻译的一些小bug

This commit is contained in:
Zhicheng Wang 2016-05-13 13:29:08 +08:00
parent 3634128fff
commit 74547be9e2
5 changed files with 32 additions and 17 deletions

View File

@ -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 <a href="/libraries.html">Libraries</a>
li <a href="/about/">About</a>
li <a href="/about/">关于</a>
li <a href="/resources/">Books & Training</a>
li <a href="/resources/">书籍与培训</a>
li <a href="/resources/">Tools & Libraries</a>
li <a href="/resources/">工具与库</a>
li <a href="/resources/">Community</a>
li <a href="/resources/">社区</a>
li <a href="/presskit.html">出版工具</a>
li <a href="/presskit.html">Press Kit</a>
li <a href="/presskit.html">出版配套</a>
.c3
h3.text-headline HELP
h3.text-headline 帮助
ul.text-body
li <a href="http://stackoverflow.com/questions/tagged/angular2">Stack Overflow</a>
li <a href="http://stackoverflow.com/questions/tagged/angular2">Stack Overflow</a>
li <a href="https://gitter.im/angular/angular">Gitter</a>
li <a href="https://gitter.im/angular/angular">Gitter</a>
li <a href="https://groups.google.com/forum/#!forum/angular"> Google Group</a>
li <a href="https://github.com/angular/angular/issues"> 报告问题 </a>
li <a class="footer-feedback" ng-click="appCtrl.openFeedback()" aria-label="Submit feedback on this page"> 站内反馈 </a>
li <a href="https://groups.google.com/forum/#!forum/angular"> Google Group</a>
li <a href="https://github.com/angular/angular/issues"> Report Issues</a>
li <a href="https://github.com/angular/angular/issues"> 报告问题</a>
li <a class="footer-feedback" ng-click="appCtrl.openFeedback()" aria-label="Submit feedback on this page"> Site Feedback</a>
li <a class="footer-feedback" ng-click="appCtrl.openFeedback()" aria-label="Submit feedback on this page"> 网站反馈</a>
.c3
h3.text-headline COMMUNITY
h3.text-headline 社区
ul.text-body
li <a href="/events.html">Events</a>
li <a href="/events.html">事件</a>
li <a href="http://www.meetup.com/topics/angularjs/">Meetups</a>
li <a href="http://www.meetup.com/topics/angularjs/">Meetups</a>
li <a href="https://twitter.com/angularjs"> Twitter</a>
li <a href="https://twitter.com/angularjs"> Twitter</a>
li <a href="https://github.com/angular/angular"> GitHub</a>
li <a href="https://github.com/angular/angular"> GitHub</a>
li <a href="/contribute.html"> Contribute</a>
li <a href="/contribute.html"> 做贡献</a>
footer(class="background-steel")
small.text-caption 来自 Google ©2010-2016。 代码许可协议:<a href="/license" class="text-snow">MIT-style License</a>。 文档许可协议:<a class="text-snow" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
small.text-caption Powered by Google ©2010-2016. Code licensed under an <a href="/license" class="text-snow">MIT-style License</a>. Documentation licensed under <a class="text-snow" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
small.text-caption Powered by Google ©2010-2016. 代码授权协议:<a href="/license" class="text-snow">MIT式协议</a>。 文档授权协议:<a class="text-snow" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
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

View File

@ -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

View File

@ -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"

View File

@ -1,3 +1,3 @@
.hidden {
.lang-english {
display: none !important;
}

View File

@ -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) {