Skip to content

Commit

Permalink
Fix the language switching issue
Browse files Browse the repository at this point in the history
  • Loading branch information
xfq committed Nov 26, 2021
1 parent 91cf0a8 commit 5ae868a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions index.html
Expand Up @@ -134,12 +134,12 @@ <h6 its-locale-filter-list="zh-hant" lang="zh-hant">發表對本文檔的建議<
<p its-locale-filter-list="zh-hans" lang="zh-hans">本章节描述了本文档的发布状态。其他更新版本可能会覆盖本文档。W3C的文档列表和最新版本可通过<a href="https://www.w3.org/TR/">W3C技术报告</a>索引访问。</p>
<p its-locale-filter-list="zh-hans" lang="zh-hans">以编辑草稿方式发布的文档还没有通过<abbr title="World Wide Web Consortium">W3C</abbr>会员流程的认可。这是一份文档草稿并且会不断更新。请暂时不要正式引用本文档。</p>
<p its-locale-filter-list="zh-hans" lang="zh-hans">本文档遵循<abbr title="World Wide Web Consortium">W3C</abbr><a id="sotd_patent_zh_hans" href="http://www.w3.org/Consortium/Patent-Policy/">专利政策</a>。<abbr title="World Wide Web Consortium">W3C</abbr>为工作组的产出成果维护着一份<a href="https://www.w3.org/groups/wg/i18n-core/ipr" rel="disclosure">公开专利披露列表</a>,此页面也同时涵盖了专利披露说明。若个人发现其有包含<a href="http://www.w3.org/Consortium/Patent-Policy/#def-essential">必须声明</a>的专利信息,必须按照<a href="http://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure"><abbr title="World Wide Web Consortium">W3C</abbr>专利政策第六章节</a>披露此信息。</p>
<p its-locale-filter-list="zh-hans" lang="zh-hans">本文档遵循<a id="w3c_process_revision_zh_hans" href="https://www.w3.org/2021/Process-20211102/"><abbr title="World Wide Web Consortium">W3C</abbr>流程文档</a>(2 November 2021)。</p>
<p its-locale-filter-list="zh-hans" lang="zh-hans">本文档遵循<a id="w3c_process_revision_zh_hans" href="https://www.w3.org/2021/Process-20211102/"><abbr title="World Wide Web Consortium">W3C</abbr>流程文档</a>(2021年11月2日版)。</p>

<p its-locale-filter-list="zh-hant" lang="zh-hant">本章節描述了本文檔的發布狀態。其他更新版本可能會覆蓋本文檔。W3C的文檔列表和最新版本可通過<a href="https://www.w3.org/TR/">W3C技術報告</a>索引訪問。</p>
<p its-locale-filter-list="zh-hant" lang="zh-hant">以編輯草稿方式發布的文檔還沒有通過<abbr title="World Wide Web Consortium">W3C</abbr>會員流程的認可。這是一份文檔草稿並且會不斷更新。請暫時不要正式引用本文檔。</p>
<p its-locale-filter-list="zh-hant" lang="zh-hant">本文檔遵循<abbr title="World Wide Web Consortium">W3C</abbr><a id="sotd_patent_zh-hant" href="http://www.w3.org/Consortium/Patent-Policy/">專利政策</a>。<abbr title="World Wide Web Consortium">W3C</abbr>為工作組的產出成果維護著一份<a href="https://www.w3.org/groups/wg/i18n-core/ipr" rel="disclosure">公開專利披露列表</a>,此頁面也同時涵蓋了專利披露說明。若個人發現其有包含<a href="http://www.w3.org/Consortium/Patent-Policy/#def-essential">必須聲明</a>的專利信息,必須按照<a href="http://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure"><abbr title="World Wide Web Consortium">W3C</abbr>專利政策第六章節</a>披露此信息。</p>
<p its-locale-filter-list="zh-hant" lang="zh-hant">本文檔遵循<a id="w3c_process_revision_zh-hant" href="https://www.w3.org/2021/Process-20211102/"><abbr title="World Wide Web Consortium">W3C</abbr>流程文檔</a>(2 November 2021)。</p>
<p its-locale-filter-list="zh-hant" lang="zh-hant">本文檔遵循<a id="w3c_process_revision_zh-hant" href="https://www.w3.org/2021/Process-20211102/"><abbr title="World Wide Web Consortium">W3C</abbr>流程文檔</a>(2021年11月2日版)。</p>
</div>


Expand Down
16 changes: 8 additions & 8 deletions script.js
Expand Up @@ -5,8 +5,8 @@ var LANG_LIST = ['en', 'zh-hant', 'zh-hans']
var L10N = {
'en': {
selector: {
'#abstract-1': 'Abstract',
'#h-sotd': 'Status of This Document',
'#abstract > h2': 'Abstract',
'#sotd > h2': 'Status of This Document',
'#table-of-contents': 'Table of Contents',
'.note-title': 'Note',
},
Expand All @@ -22,8 +22,8 @@ var L10N = {

'zh-hant': {
selector: {
'#abstract-1': '摘要',
'#h-sotd': '關於本文檔',
'#abstract > h2': '摘要',
'#sotd > h2': '關於本文檔',
'#table-of-contents': '內容大綱',
'.note-title': '注',
},
Expand Down Expand Up @@ -51,8 +51,8 @@ var L10N = {

'zh-hans': {
selector: {
'#abstract-1': '摘要',
'#h-sotd': '关于本文档',
'#abstract > h2': '摘要',
'#sotd > h2': '关于本文档',
'#table-of-contents': '内容大纲',
'.note-title': '注',
},
Expand Down Expand Up @@ -141,7 +141,7 @@ function replaceBoilerplateText(lang) {
Object.assign($elmt.firstChild, { textContent: l10n['fig'] })
})

$$('h1 + h2 + details summary')
$$('body > div.head > details > summary')
.forEach(function($summary) {
var originalText = $summary.dataset.originalText || $summary.textContent.trim()
var text = l10n['summary'] || originalText
Expand All @@ -152,7 +152,7 @@ function replaceBoilerplateText(lang) {
}
})

$$('h1 + h2 + details dl dt')
$$('body > div.head > details > dl > dt')
.forEach(function($dt) {
var originalText = $dt.dataset.originalText || $dt.textContent.trim()
var text = l10n.dt[originalText] || originalText
Expand Down

0 comments on commit 5ae868a

Please sign in to comment.