diff --git a/public/docs/ts/latest/guide/style-guide.jade b/public/docs/ts/latest/guide/style-guide.jade index 27b9ab6336..10bac57c50 100644 --- a/public/docs/ts/latest/guide/style-guide.jade +++ b/public/docs/ts/latest/guide/style-guide.jade @@ -84,6 +84,7 @@ a(id='toc') 1. [Single responsibility](#single-responsibility) [单一职责](#single-responsibility) + 1. [Naming](#naming) [命名](#naming) @@ -95,6 +96,7 @@ a(id='toc') 1. [App structure and Angular modules](#application-structure-and-angular-modules) [应用结构与 Angular 模块](#app-structure-and-angular-modules) + 1. [Components](#components) [组件](#components) @@ -114,6 +116,7 @@ a(id='toc') 1. [Lifecycle hooks](#lifecycle-hooks) [生命周期钩子](#lifecycle-hooks) + 1. [Appendix](#appendix) [附录](#appendix) diff --git a/public/translate/cn/translate.js b/public/translate/cn/translate.js index 15b887472d..a779cd009a 100644 --- a/public/translate/cn/translate.js +++ b/public/translate/cn/translate.js @@ -30,6 +30,11 @@ var sourceVisible = localStorage.getItem('source-visible') === 'true'; var prevNode = node.previousElementSibling; var $english = $(prevNode); if (isCorrespondingNode(node, prevNode) && !isTranslation(prevNode.textContent)) { + var id = $english.attr('id'); + if (id) { + $translated.attr('id', id); + $english.removeAttr('id'); + } $translated.after($english); $translated.addClass('translated'); $translated.addClass('translated-cn');