From 8824afb494e5398bc0efcf5f7eb78782096fc90c Mon Sep 17 00:00:00 2001 From: A1lo Date: Fri, 18 Mar 2022 21:53:46 +0800 Subject: Replace marco `anch` with `` tag for `zh-CN` (#4668) * replace anch with tag `` * 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 `` * 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 --- files/zh-cn/mdn/contribute/howto/write_an_api_reference/index.html | 6 +++--- files/zh-cn/mdn/guidelines/writing_style_guide/index.html | 4 ++-- files/zh-cn/mdn/structures/compatibility_tables/index.html | 4 ++-- files/zh-cn/mdn/structures/macros/commonly-used_macros/index.html | 2 +- files/zh-cn/mdn/structures/macros/other/index.html | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'files/zh-cn/mdn') 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

Note that most API have a special sidebar with quicklinks. This sidebar lists all interfaces, and possibly tutorials and related API.

-

Interfaces

+

Interface pages

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 (https://developer.mozilla.org/en-US/docs/Web/API)

@@ -187,7 +187,7 @@ translation_of: MDN/Contribute/Howto/Write_an_API_reference -

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.

+

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

For example, given the list above, the {{domxref("AudioContext")}} interface is documented at https://developer.mozilla.org/en-US/docs/Web/API/AudioContext

@@ -199,7 +199,7 @@ translation_of: MDN/Contribute/Howto/Write_an_API_reference
  • Go to https://developer.mozilla.org/en-US/docs/Web/API and, making sure you are logged in, select the Cog icon > New sub-page. You should now be in an editor for a new page.
  • 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".
  • The Slug should be auto-filled, with underscores in the place of spaces. If it isn't, correct it.
  • -
  • Enter some dummy content into the large content area, such as "TBD" or "Content", then click Save Changes. Or just soar right on into the section {{anch("Overview page")}} and start filling out the real content right away.
  • +
  • Enter some dummy content into the large content area, such as "TBD" or "Content", then click Save Changes. Or just soar right on into the section Overview page and start filling out the real content right away.
  • Your landing page now exists! Now all you have to do is fill it in, which is discussed in the next section.

    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

    引导页的层级位于网站层级的顶层,例如 CSSHTML 的主页面就是引导页。引导页具有标准的格式,由以下 3 个部分组成:

    @@ -711,7 +711,7 @@ var toolkitProfileService = Components.classes["@mozilla.org/toolkit/profile-ser
    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
    -

    在一个HTML、CSS和JS页面中,通常您只需要有一个特性。API则有些不同——它们总是包含多个子特性 (参见下边的 {{anch("Sub-features")}})。

    +

    在一个HTML、CSS和JS页面中,通常您只需要有一个特性。API则有些不同——它们总是包含多个子特性 (参见下边的 子特性)。

    一个特性中的基础结构

    @@ -170,7 +170,7 @@ translation_of: MDN/Structures/Compatibility_tables

    浏览器成员名称在架构里被定义(参见 浏览器标识符)。你应该使用现有定义的标识符的完整列表。如果你希望添加其他浏览器,请先联系我们,因为这可能会产生广泛的影响,不应该在未经认真考虑就这么做。

    -

    在一个基本的浏览器兼容数据文件中,你只需要在浏览器标识符成员仲包含"version_added" (以下我们会说到{{anch("Advanced cases")}})。其他你可能使用的值还包括: 

    +

    在一个基本的浏览器兼容数据文件中,你只需要在浏览器标识符成员仲包含"version_added" (以下我们会说到高级场景)。其他你可能使用的值还包括: 

    • 一个版本号:如果你知道一个浏览器开始支持这个特性的准确版本,用一个字符串表述版本号,例如“47”。 
    • 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
      • \{{anch("Linking to pages in references","链接到 MDN 的参考文档页面")}}
      • -
      • 实际效果:{{anch("Linking to pages in references","链接到 MDN 的参考文档页面")}}

      • +
      • 实际效果:链接到 MDN 的参考文档页面

      链接到 MDN 的参考文档页面

      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:
      • Interwiki 使创建跨wiki链接变得容易。目前它支持链接到 Wikipedia 和 Wikimo。第一个参数是维基的名称(“wikipedia”或“wikimo”),第二个参数是文章的路径。例如,\{{interwiki("wikipedia", "Firefox")}} 显示为 {{ interwiki("wikipedia", "Firefox") }}。例如,此模板会自动检测页面语言并指向维基百科上的相同语言。
      • RFC 给定编号,创建指向指定 RFC 的链接。语法为:\{{RFC(number)}}。例如,\{{RFC(2616)}} 变为 {{ RFC(2616) }}。
      • -
      • anch 宏插入指向锚点的链接。 \{{Anch("top")}} 产生 <a href="#top">top</a> ({{ Anch("top") }})。您还可以添加包含替换文本的第二个参数以显示为链接文本。
      • +
      • anch 宏插入指向锚点的链接。 \{{Anch("top")}} 产生 <a href="#top">top</a> (top)。您还可以添加包含替换文本的第二个参数以显示为链接文本。

      着陆页组件

      -- cgit v1.2.3-54-g00ecf