aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/mdn
diff options
context:
space:
mode:
authorA1lo <yin199909@aliyun.com>2022-03-18 21:53:46 +0800
committerGitHub <noreply@github.com>2022-03-18 21:53:46 +0800
commit8824afb494e5398bc0efcf5f7eb78782096fc90c (patch)
tree92fd44c01908cc7b39da131bcac6a0cae024bb6f /files/zh-cn/mdn
parente48f0a637c058b51a6268e0c2c384957e03d2b60 (diff)
downloadtranslated-content-8824afb494e5398bc0efcf5f7eb78782096fc90c.tar.gz
translated-content-8824afb494e5398bc0efcf5f7eb78782096fc90c.tar.bz2
translated-content-8824afb494e5398bc0efcf5f7eb78782096fc90c.zip
Replace marco `anch` with `<a>` tag for `zh-CN` (#4668)
* replace anch with tag `<a>` * auto replace anch with scripts * fix: resolve some incorrect anchors * replace anch with markdown link in markdown files * sync with english version for `Properties` * fix: resolve some incorrect anchors * using `Specifications` marco to replace `<table>` * fix: resolve some incorrect anchors * remove the `noteCard` and add a `h2` head * fix: resolve some incorrect anchors * remove the duplicated content * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors * revert the content change and replace anch * revert the content change and replace anch * revert the content chang * fix: correct the `href` * revert content changes and replace the anch * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors
Diffstat (limited to 'files/zh-cn/mdn')
-rw-r--r--files/zh-cn/mdn/contribute/howto/write_an_api_reference/index.html6
-rw-r--r--files/zh-cn/mdn/guidelines/writing_style_guide/index.html4
-rw-r--r--files/zh-cn/mdn/structures/compatibility_tables/index.html4
-rw-r--r--files/zh-cn/mdn/structures/macros/commonly-used_macros/index.html2
-rw-r--r--files/zh-cn/mdn/structures/macros/other/index.html2
5 files changed, 9 insertions, 9 deletions
diff --git a/files/zh-cn/mdn/contribute/howto/write_an_api_reference/index.html b/files/zh-cn/mdn/contribute/howto/write_an_api_reference/index.html
index 4ef7b2bcec..c81583db61 100644
--- a/files/zh-cn/mdn/contribute/howto/write_an_api_reference/index.html
+++ b/files/zh-cn/mdn/contribute/howto/write_an_api_reference/index.html
@@ -75,7 +75,7 @@ translation_of: MDN/Contribute/Howto/Write_an_API_reference
<p>Note that most API have a special sidebar with quicklinks. This sidebar lists all interfaces, and possibly tutorials and related API.</p>
-<h4 id="Interfaces">Interfaces</h4>
+<h4 id="Interface_pages">Interface pages</h4>
<p>Each interface will have its own page too. It will describe the purpose of the interface and lists all constructors, methods, and properties. The title of the page will be the name of the interface (always starting with an uppercase letter), its slug, the interface name, will be at the top level of the API reference (<a href="/en-US/docs/Web/API">https://developer.mozilla.org/en-US/docs/Web/API</a>)</p>
@@ -187,7 +187,7 @@ translation_of: MDN/Contribute/Howto/Write_an_API_reference
</li>
</ul>
-<p>Each interface in the list has a separate page created for it as a subpage of https://developer.mozilla.org/en-US/docs/Web/API; for example, the document for {{domxref("AudioContext")}} would be located at https://developer.mozilla.org/en-US/docs/Web/API/AudioContext. Each {{anch("Interface pages", "interface page")}} explains what that interface does and provides a list of the methods and properties that comprise the interface. Then each method and property is documented on its own page, which is created as a subpage of the interface it's a member of. For instance, {{domxref("AudioContext.currentTime")}} is documented at https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/currentTime.</p>
+<p>Each interface in the list has a separate page created for it as a subpage of https://developer.mozilla.org/en-US/docs/Web/API; for example, the document for {{domxref("AudioContext")}} would be located at https://developer.mozilla.org/en-US/docs/Web/API/AudioContext. Each <a href="#interface_pages">interface page</a> explains what that interface does and provides a list of the methods and properties that comprise the interface. Then each method and property is documented on its own page, which is created as a subpage of the interface it's a member of. For instance, {{domxref("AudioContext.currentTime")}} is documented at https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/currentTime.</p>
<p>For example, given the list above, the {{domxref("AudioContext")}} interface is documented at https://developer.mozilla.org/en-US/docs/Web/API/AudioContext</p>
@@ -199,7 +199,7 @@ translation_of: MDN/Contribute/Howto/Write_an_API_reference
<li>Go to <a href="/en-US/docs/Web/API">https://developer.mozilla.org/en-US/docs/Web/API</a> and, making sure you are logged in, select the <em>Cog icon &gt; New sub-page</em>. You should now be in an editor for a new page.</li>
<li>Enter the title as the API name as defined by the spec, plus "API". So for example "Web Audio API", "IndexedDB API", or "MediaRecorder API".</li>
<li>The Slug should be auto-filled, with underscores in the place of spaces. If it isn't, correct it.</li>
- <li>Enter some dummy content into the large content area, such as "TBD" or "Content", then click <em>Save Changes</em>. Or just soar right on into the section {{anch("Overview page")}} and start filling out the real content right away.</li>
+ <li>Enter some dummy content into the large content area, such as "TBD" or "Content", then click <em>Save Changes</em>. Or just soar right on into the section <a href="#overview_page">Overview page</a> and start filling out the real content right away.</li>
</ol>
<p>Your landing page now exists! Now all you have to do is fill it in, which is discussed in the next section.</p>
diff --git a/files/zh-cn/mdn/guidelines/writing_style_guide/index.html b/files/zh-cn/mdn/guidelines/writing_style_guide/index.html
index 484017e2b4..8f43728324 100644
--- a/files/zh-cn/mdn/guidelines/writing_style_guide/index.html
+++ b/files/zh-cn/mdn/guidelines/writing_style_guide/index.html
@@ -703,7 +703,7 @@ var toolkitProfileService = Components.classes["@mozilla.org/toolkit/profile-ser
<p>引导页的层级位于网站层级的顶层,例如 <a href="https://developer.mozilla.org/zh-CN/docs/CSS">CSS</a> 和 <a href="https://developer.mozilla.org/zh-CN/docs/HTML">HTML</a> 的主页面就是引导页。引导页具有标准的格式,由以下 3 个部分组成:</p>
<ul>
- <li>一个简介(一般是一段),用来介绍当前页面所讨论的技术及其如何使用。见本文的 {{anch("Creating new subtrees", "创建新的子目录")}}。</li>
+ <li>一个简介(一般是一段),用来介绍当前页面所讨论的技术及其如何使用。见本文的 <a href="#创建新的子目录">创建新的子目录</a>。</li>
</ul>
<div class="note">
@@ -711,7 +711,7 @@ var toolkitProfileService = Components.classes["@mozilla.org/toolkit/profile-ser
</div>
<ul>
- <li>一个两列的列表,其中包含一些小节并提供一些指向其他文章的链接。见本文的 {{anch("Creating a page link list", "创建相关页面的链接列表")}}。</li>
+ <li>一个两列的列表,其中包含一些小节并提供一些指向其他文章的链接。见本文的 <a href="#创建相关页面的链接列表">创建相关页面的链接列表</a>。</li>
<li>第三个是可选的”浏览器兼容性“一节,位于页面的底部。</li>
</ul>
diff --git a/files/zh-cn/mdn/structures/compatibility_tables/index.html b/files/zh-cn/mdn/structures/compatibility_tables/index.html
index 21419aab38..565e6d8efa 100644
--- a/files/zh-cn/mdn/structures/compatibility_tables/index.html
+++ b/files/zh-cn/mdn/structures/compatibility_tables/index.html
@@ -156,7 +156,7 @@ translation_of: MDN/Structures/Compatibility_tables
</ul>
<div>
-<p>在一个HTML、CSS和JS页面中,通常您只需要有一个特性。API则有些不同——它们总是包含多个子特性 (参见下边的 {{anch("Sub-features")}})。</p>
+<p>在一个HTML、CSS和JS页面中,通常您只需要有一个特性。API则有些不同——它们总是包含多个子特性 (参见下边的 <a href="#子特性">子特性</a>)。</p>
<h3 id="一个特性中的基础结构">一个特性中的基础结构</h3>
@@ -170,7 +170,7 @@ translation_of: MDN/Structures/Compatibility_tables
<p>浏览器成员名称在架构里被定义(参见 <a href="https://github.com/mdn/browser-compat-data/blob/master/schemas/compat-data-schema.md#browser-identifiers">浏览器标识符</a>)。你应该使用现有定义的标识符的完整列表。如果你希望添加其他浏览器,请先联系我们,因为这可能会产生广泛的影响,不应该在未经认真考虑就这么做。</p>
-<p>在一个基本的浏览器兼容数据文件中,你只需要在浏览器标识符成员仲包含"version_added" (以下我们会说到{{anch("Advanced cases")}})。其他你可能使用的值还包括: </p>
+<p>在一个基本的浏览器兼容数据文件中,你只需要在浏览器标识符成员仲包含"version_added" (以下我们会说到<a href="#添加数据:高级场景">高级场景</a>)。其他你可能使用的值还包括: </p>
<ul>
<li>一个版本号:如果你知道一个浏览器开始支持这个特性的准确版本,用一个字符串表述版本号,例如“47”。 </li>
diff --git a/files/zh-cn/mdn/structures/macros/commonly-used_macros/index.html b/files/zh-cn/mdn/structures/macros/commonly-used_macros/index.html
index a29edc2bf8..6bed575449 100644
--- a/files/zh-cn/mdn/structures/macros/commonly-used_macros/index.html
+++ b/files/zh-cn/mdn/structures/macros/commonly-used_macros/index.html
@@ -45,7 +45,7 @@ original_slug: MDN/Structures/Macros/Custom_macros
<ul>
<li><code>\{{anch("Linking to pages in references","链接到 MDN 的参考文档页面")}}</code></li>
- <li><p>实际效果:{{anch("Linking to pages in references","链接到 MDN 的参考文档页面")}}</p></li>
+ <li><p>实际效果:<a href="#Linking_to_pages_in_references">链接到 MDN 的参考文档页面</a></p></li>
</ul>
<h3 id="Linking_to_pages_in_references">链接到 MDN 的参考文档页面</h3>
diff --git a/files/zh-cn/mdn/structures/macros/other/index.html b/files/zh-cn/mdn/structures/macros/other/index.html
index c8a8de7a85..08ec80ad62 100644
--- a/files/zh-cn/mdn/structures/macros/other/index.html
+++ b/files/zh-cn/mdn/structures/macros/other/index.html
@@ -16,7 +16,7 @@ tags:
<ul>
<li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/Interwiki.ejs">Interwiki</a></code> 使创建跨wiki链接变得容易。目前它支持链接到 Wikipedia 和 Wikimo。第一个参数是维基的名称(“wikipedia”或“wikimo”),第二个参数是文章的路径。例如,<code>\{{interwiki("wikipedia", "Firefox")}}</code> 显示为 {{ interwiki("wikipedia", "Firefox") }}。例如,此模板会自动检测页面语言并指向维基百科上的相同语言。</li>
<li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/RFC.ejs">RFC</a></code> 给定编号,创建指向指定 RFC 的链接。语法为:<code>\{{RFC(number)}}</code>。例如,<code>\{{RFC(2616)}}</code> 变为 {{ RFC(2616) }}。</li>
- <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/anch.ejs">anch</a></code> 宏插入指向锚点的链接。 <code>\{{Anch("top")}}</code> 产生 <code>&lt;a href=&quot;#top&quot;&gt;top&lt;/a&gt;</code> ({{ Anch("top") }})。您还可以添加包含替换文本的第二个参数以显示为链接文本。</li>
+ <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/anch.ejs">anch</a></code> 宏插入指向锚点的链接。 <code>\{{Anch("top")}}</code> 产生 <code>&lt;a href=&quot;#top&quot;&gt;top&lt;/a&gt;</code> (<a href="#top">top</a>)。您还可以添加包含替换文本的第二个参数以显示为链接文本。</li>
</ul>
<h3 id="Landing_page_components">着陆页组件</h3>