diff options
Diffstat (limited to 'files/zh-cn')
16 files changed, 50 insertions, 517 deletions
diff --git a/files/zh-cn/learn/tools_and_testing/client-side_javascript_frameworks/vue_getting_started/index.html b/files/zh-cn/learn/tools_and_testing/client-side_javascript_frameworks/vue_getting_started/index.html index c4ad60834a..6822995d45 100644 --- a/files/zh-cn/learn/tools_and_testing/client-side_javascript_frameworks/vue_getting_started/index.html +++ b/files/zh-cn/learn/tools_and_testing/client-side_javascript_frameworks/vue_getting_started/index.html @@ -28,7 +28,7 @@ translation_of: Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Vue_ge <h2 id="一个更简洁的框架——Vue">一个更简洁的框架——Vue</h2> -<p>Vue是一个现代JavaScript框架提供了有用的设施渐进增强——不像许多其他框架,您可以使用Vue增强现有的HTML。这使您可以使用Vue作为<a href="https://mdn.mozillademos.org/files/17240/vue-default-app.png">jQuery</a>等库的临时替代品。</p> +<p>Vue是一个现代JavaScript框架提供了有用的设施渐进增强——不像许多其他框架,您可以使用Vue增强现有的HTML。这使您可以使用Vue作为<a href="https://wiki.developer.mozilla.org/zh-CN/docs/Glossary/jQuery">jQuery</a>等库的临时替代品。</p> <p>也就是说,您还可以使用Vue编写整个单页应用程序(SPAs)。这允许您创建标记完全由Vue管理,可以提高开发人员的经验和性能在处理复杂的应用程序。当你需要的时候它还允许您利用其他库对客户端路由和状态进行管理。此外,Vue需要“中间地带”的方法工具客户端路由和状态管理。虽然Vue核心团队维护了建议的函数库,但他们并没有直接捆绑到 Vue 里。这样你就可以选择一个其他路由/状态管理库,来更好地适应您的应用程序。</p> diff --git a/files/zh-cn/mdn/community/角色/index.html b/files/zh-cn/mdn/community/角色/index.html deleted file mode 100644 index e9ceeacc0b..0000000000 --- a/files/zh-cn/mdn/community/角色/index.html +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: 社区的角色 -slug: MDN/Community/角色 -tags: - - Community - - Landing - - MDN Meta -translation_of: MDN/Community/Roles ---- -<div>{{MDNSidebar}}</div><p>在MDN社区中有多种类型的角色,每个角色都有明确的职责。</p> - -<p>{{LandingPageListSubPages()}}</p> diff --git a/files/zh-cn/mdn/contribute/localize/index.html b/files/zh-cn/mdn/contribute/localize/index.html deleted file mode 100644 index d67b35280a..0000000000 --- a/files/zh-cn/mdn/contribute/localize/index.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: MDN 本地化 -slug: MDN/Contribute/Localize -tags: - - I10n - - Landing - - Localization - - MDN -translation_of: MDN/Contribute/Localize ---- -<div>{{MDNSidebar}}</div> - -<div>{{IncludeSubnav("/zh-CN/docs/MDN")}}</div> - -<p>MDN 被全世界的人们和 Firefox 项目组内部用作 Web 技术的参考和指南。众多的本地化社区是 Mozilla 项目的一个关键部分,他们对文档的翻译和本地化工作可以帮助世界各地的人们开发开放 Web。如果你想更多地了解本地化相关的内容,或者准备开始一个新的本地化工作,你可以从这里开始。</p> - -<h2 id="MDN_上的本地化类型">MDN 上的本地化类型</h2> - -<p>MDN 上的本地化包含三个方面,它们位于不同的系统并要求不同访问权限。</p> - -<h4 id="MDN_站点的用户界面">MDN 站点的用户界面</h4> - -<p>指的是每个或大多数 MDN 页面中都有的框架、导航和用户控制组件等部分。这些地方使用 Mozilla <a href="https://developer.mozilla.org/zh-CN/docs/Localizing_with_Pontoon">Pontoon</a> 系统自动翻译,<a href="https://pontoon.mozilla.org/projects/mdn/">这里</a>是该项目的主页。如果你所在地区的语言没有包含在 MDN 中,你可以联系 Pontoon 管理员来启用。见<a href="https://developer.mozilla.org/zh-CN/docs/MDN/Contribute/Localize/Starting_a_localization">创建新的 MDN 本地化</a>。</p> - -<h4 id="MDN_上的内容">MDN 上的内容</h4> - -<p>指 MDN 页面中的主体内容,包含参考、指南和教程等文章。可以使用 <a href="https://developer.mozilla.org/zh-CN/docs/MDN/Contribute/Localize/Translating_pages">MDN 内建的翻译接口</a>来翻译这些文章。如果你所在地区的语言没有包含在该接口所支持的语言列表中,可参考<a href="https://developer.mozilla.org/zh-CN/docs/MDN/Contribute/Localize/Starting_a_localization">创建新的 MDN 本地化</a>来了解如何操作。</p> - -<h4 id="宏字符串">宏字符串</h4> - -<p>这些字符串由<a href="https://developer.mozilla.org/zh-CN/docs/MDN/Contribute/Structures/Macros">宏模板</a>产生,以创建导航、消息或某些预定义的结构。因为修改模板可能会对已经使用该模板的所有页面产生影响,所以每次修改模板都需要通过<a href="https://developer.mozilla.org/zh-CN/docs/MDN/Contribute/Tools/Template_editing">提交一个 pull request 并经过评审</a>。</p> - -<p>以下页面提供了 MDN 上本地化的更多信息:</p> - -<p>{{LandingPageListSubpages}}</p> - -<h2 id="MDN_上的本地化社区">MDN 上的本地化社区</h2> - -<p>MDN 上的本地化活动由两个主体共同完成:独立的个人和一起工作的本地化小组,后者可能是一个更大的 Mozilla 本地化社区的一部分。MDN 上的本地化项目则由本地化带头人所领导。</p> - -<ul> - <li><a href="/zh-CN/docs/MDN/Contribute/Localize/Localization_projects">本地化项目</a></li> - <li><a href="/zh-CN/docs/MDN/Community/Roles/Localization_driver_role">本地化带头人</a></li> -</ul> - -<h2 id="中文翻译术语表和翻译规范">中文翻译术语表和翻译规范</h2> - -<p>这篇文章列出了翻译中会遇到的一些术语以及翻译时推荐遵守的规范,推荐阅读:</p> - -<p><a href="/zh-CN/docs/Glossary_of_translation">翻译术语表和翻译规范</a></p> - -<h2 id="本地化相关的工具">本地化相关的工具</h2> - -<p>这里介绍几个对你的本地化工作非常有用的工具:</p> - -<dl> - <dt><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localizing_with_Pontoon" title="/en-US/docs/Mozilla/Localization/Localizing_with_Verbatim">Pontoon</a></dt> - <dd>用于多个 Mozilla 项目中的字符串的翻译,包括 MDN 用户界面和 Firefox 用户界面。</dd> - <dt><a href="http://transvision.mozfr.org/" title="http://transvision.mozfr.org/">Transvision</a></dt> - <dd>由 Mozilla 法国社区提供的一个工具。它可以搜索某个英文在 Mozilla 代码中所有出现的地方,并列出针对目标语言的所有翻译。当需要确定某个单词或短语如何翻译更好时很有用。</dd> -</dl> - -<h2 id="参阅">参阅</h2> - -<ul> - <li><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Localization">Mozilla 中的本地化</a></li> - <li><a href="https://developer.mozilla.org/zh-CN/docs/Glossary_of_translation">翻译术语表和翻译规范</a></li> -</ul> diff --git a/files/zh-cn/mdn/contribute/localize/localization_projects/index.html b/files/zh-cn/mdn/contribute/localize/localization_projects/index.html deleted file mode 100644 index 96cf43b145..0000000000 --- a/files/zh-cn/mdn/contribute/localize/localization_projects/index.html +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: 本地化项目 -slug: MDN/Contribute/Localize/Localization_projects -tags: - - MDN元信息 - - 参考 - - 国际化 - - 本地化 - - 社区 -translation_of: MDN/Contribute/Localize/Localization_projects ---- -<div>{{MDNSidebar}}</div> - -<p><span class="seoSummary">所有在 MDN 上的本地化及翻译工作都是由我们了不起的社区志愿者们完成的。这篇文章列出了 MDN 上“中文(简体)”本地化项目的带头人以及其他贡献者们。</span></p> - -<p>比起普通的贡献者,每个本地化项目的带头人都拥有下面这些特点:他们对 MDN 这个平台比较了解;他们投入 MDN 本地化的时间和精力也比其他贡献者多;他们会有一些其他贡献者没有的编辑权限,比如移动页面,比如修改某些特殊页面的内容;他们会和 MDN 的管理员进行邮件往来。</p> - -<div class="note"> -<p>每个参与“中文(简体)”本地化的贡献者都应该自觉的把自己的名字添加到下面的表格中(会自动同步到本文档的英文页面中去),并在个人详情页完善好自己的个人信息,以便其他人联系。</p> -</div> - -<table class="fullwidth-table"> - <tbody> - <tr> - <th style="width: 100px;">本地化语言</th> - <th style="width: 100px;">本地化带头人</th> - <th>其他贡献者们</th> - <th>备注</th> - </tr> - <tr> - <td> - <p>中文 (简体)</p> - </td> - <td> - <div id="leader">{{userlink("ziyunfei")}}</div> - </td> - <td> - <div>{{userlink("Terry.Qiao")}}, {{userlink("iwo")}}, {{userlink("du.wei")}}, {{userlink("xcffl")}}, {{userlink("c_king")}}, {{userlink("yan")}}, {{userlink("shengyouxiao")}}, {{userlink("sunnylost")}}, {{userlink("Joyce")}}, {{userlink("Chajn")}}, {{userlink("sagitattoo")}}, {{userlink("ma3r")}}, {{userlink("hyspace")}}, {{userlink("TimZhao")}}, {{userlink("drygin")}}, {{userlink("zhangyaochun1987")}}, {{userlink("donghao526")}}, {{userlink("jtyjty99999")}}, {{userlink("Nightingale")}}, {{userlink("bingguo")}}, {{userlink("fishenal")}}, {{userlink("wanglingzhi")}}, {{userlink("Meteormatt")}}, {{userlink("Darrel.Hsu")}}, {{userlink("aztack")}}, {{userlink("smith_zhong")}}, {{userlink("fatbigbright")}}, {{userlink("manjun.han")}}, {{userlink("stoprunning3")}}, {{userlink("Kennyluck")}}, {{userlink("Technommy")}}, {{userlink("Will_Chen")}}, {{userlink("Jimmie_Felidae")}}, {{userlink("alimon")}}, {{userlink("cagen53070830")}}, {{userlink("crazybullet")}}, {{userlink("princetoad@gmail.com")}}, {{userlink("xiaoxiong")}}, {{userlink("zbinlin")}}, {{userlink("liminjun")}}, {{userlink("Jack_No1")}}, {{userlink("endlesswind")}}, {{userlink("evantre")}}, {{userlink("wanglong")}}, {{userlink("wangming")}}, {{userlink("Elvis_7")}}, {{userlink("anjianshi")}}, {{userlink("xuxun")}}, {{userlink("RobberPhex")}}, {{userlink("YangHanlin")}}, {{userlink("chyingp")}}, {{userlink("companycy")}}, {{userlink("robsean")}}, {{userlink("Fiag")}}, {{userlink("hutuxu")}}, {{userlink("jessiecaisme")}}, {{userlink("sleepholic")}}, {{userlink("xuexiaocai")}}, {{userlink("ArthasTree")}}, {{userlink("Wenbin")}}, {{userlink("xupingmao")}}, {{userlink("Dx.Yang")}}, {{userlink("HeyMemo")}}, {{userlink("LieGroup")}}, {{userlink("amibug")}}, {{userlink("gqqnbig")}}, {{userlink("lilyh")}}, {{userlink("sunorry")}}, {{userlink("Kasuganosora")}}, {{userlink("LinusYu")}}, {{userlink("Maple-Jan")}}, {{userlink("ZhangJianxiang")}}, {{userlink("bowen-shi")}}, {{userlink("figure7")}}, {{userlink("qiumaoyuan")}}, {{userlink("sonicview")}}, {{userlink("zekai.zheng")}}, {{userlink("VinceZhao")}}, {{userlink("coolfire")}}, {{userlink("ericchan1336")}}, {{userlink("jingyu9575")}}, {{userlink("jiraiya")}}, {{userlink("fskuok")}}, {{userlink("jpuncle")}}, {{userlink("reygreen1")}}, {{userlink("yanhaijing1234")}}, {{userlink("yfdyh000")}}, {{userlink("DaoG")}}, {{userlink("Josephok")}}, {{userlink("Othella")}}, {{userlink("aihua")}}, {{userlink("guoyunhebrave")}}, {{userlink("hxl")}}, {{userlink("james.li")}}, {{userlink("jedmeng")}}, {{userlink("ndon")}}, {{userlink("yisi")}}, {{userlink("ReyCG")}}, {{userlink("smartkid")}}, {{userlink("OlingCat")}}, {{userlink("Breezewish")}}, {{userlink("iakuf")}}, {{userlink("ccForward")}}, {{userlink("Jone_Casper")}}, {{userlink("jasonworg")}}, {{userlink("NIGHTEAGLE")}}, {{userlink("saintwinkle")}}, {{userlink("psychebb")}}, {{userlink("zorceta")}}, {{userlink("Light1980")}}, {{userlink("Gaohaoyang")}}, {{userlink("Dolphin_Wood")}}, {{userlink("nyx2014")}}, {{userlink("licop")}}, {{userlink(" qianjiahao")}}, {{userlink("charlie")}}, {{userlink("kun.yan")}}, {{userlink("Jacksunwei")}}, {{userlink("FredWe")}}, {{userlink("lukywong")}}, {{userlink("lttxzmj")}}, {{userlink("pantao")}}, {{userlink("Serifx")}}, {{userlink("kangmingxuan")}}, {{userlink("Ende93")}}, {{userlink("MarxJiao")}}, {{userlink("distums")}}, {{userlink("binggg")}}, {{userlink("Jiang-Xuan")}}, {{userlink("ArcherGrey")}}, {{userlink("johncido")}}, {{userlink("runyul")}}, {{userlink("xjr7670")}}, {{userlink("pluwen")}}, {{userlink("Lyra007")}}, {{userlink("zsxeee")}}, {{userlink("codeofjackie")}}, {{userlink("Louis-7")}}, {{userlink("Chor")}}, {{userlink("celdr")}}, {{userlink("Roronoa_Zoro")}}, {{userlink("mynull")}}, {{userlink("Lsnsh")}}, {{userlink("CharCat")}},{{userlink("guow10")}},{{userlink("Tindoc")}},{{userlink("SirnoChan")}},{{userlink("kagurakana")}},{{userlink("plusmultiply0")}},{{userlink("Adrian-Yan")}},{{userlink("Mookiepiece")}},{{userlink("cheiron")}},</div> - - <div>{{userlink("greatofdream")}},{{userlink("lastVigo")}},{{userlink("sdutwsl")}},</div> - </td> - <td> - <div id="notes"> - <p><span style="line-height: 1.5;">如有问题讨论,请加 QQ 群 26079139 咨询带头人。</span></p> - </div> - </td> - </tr> - </tbody> -</table> diff --git a/files/zh-cn/mdn/contribute/localize/rss_feeds/index.html b/files/zh-cn/mdn/contribute/localize/rss_feeds/index.html deleted file mode 100644 index b6faf42e3d..0000000000 --- a/files/zh-cn/mdn/contribute/localize/rss_feeds/index.html +++ /dev/null @@ -1,218 +0,0 @@ ---- -title: MDN RSS 订阅源 -slug: MDN/Contribute/Localize/RSS_feeds -translation_of: MDN/Tools/Feeds -translation_of_original: MDN/Contribute/Localize/RSS_feeds ---- -<div>{{MDNSidebar}}</div><p>订阅你所感兴趣的本地化项目,第一时间得知文档变化。</p> -<table class="fullwidth-table"> - <thead> - <tr> - <th scope="col">本地化语言</th> - <th scope="col">简称</th> - <th scope="col">本地化名称</th> - <th scope="col">订阅源地址</th> - </tr> - </thead> - <tbody> - <tr> - <th><a href="https://developer.mozilla.org/ar/">Arabian</a></th> - <td>ar</td> - <td>عربي</td> - <td><a href="https://developer.mozilla.org/ar/docs/feeds/atom/all">https://developer.mozilla.org/ar/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/bn-BD/">Bengali (Bangladesh)</a></th> - <td>bn-BD</td> - <td>বাঙ্গালী</td> - <td><a href="https://developer.mozilla.org/bn-BD/docs/feeds/atom/all">https://developer.mozilla.org/bn-BD/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/ca/">Catalan</a></th> - <td>ca</td> - <td>català</td> - <td><a href="https://developer.mozilla.org/ca/docs/feeds/atom/all">https://developer.mozilla.org/ca/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/cs/">Czech</a></th> - <td>cs</td> - <td>Čeština</td> - <td><a href="https://developer.mozilla.org/cs/docs/feeds/atom/all">https://developer.mozilla.org/cs/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/de/">German</a></th> - <td>de</td> - <td>Deutsch</td> - <td><a href="https://developer.mozilla.org/de/docs/feeds/atom/all">https://developer.mozilla.org/de/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/el/">Greek</a></th> - <td>el</td> - <td>Ελληνικά</td> - <td><a href="https://developer.mozilla.org/el/docs/feeds/atom/all">https://developer.mozilla.org/el/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/en-US/">English</a></th> - <td>en-US</td> - <td>English</td> - <td><a href="https://developer.mozilla.org/en-US/docs/feeds/atom/all">https://developer.mozilla.org/en-US/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/es/">Spanish</a></th> - <td>es</td> - <td>Español</td> - <td><a href="https://developer.mozilla.org/es/docs/feeds/atom/all">https://developer.mozilla.org/es/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/fa/">Persian</a></th> - <td>fa</td> - <td>فارسی</td> - <td><a href="https://developer.mozilla.org/fa/docs/feeds/atom/all">https://developer.mozilla.org/fa/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/fi/">Finnish</a></th> - <td>fi</td> - <td>suomi</td> - <td><a href="https://developer.mozilla.org/fi/docs/feeds/atom/all">https://developer.mozilla.org/fi/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/fr/">French</a></th> - <td>fr</td> - <td>Français</td> - <td><a href="https://developer.mozilla.org/fr/docs/feeds/atom/all">https://developer.mozilla.org/fr/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/fy-NL/">Frisian</a></th> - <td>fy-NL</td> - <td>Frysk</td> - <td><a href="https://developer.mozilla.org/fy-NL/docs/feeds/atom/all">https://developer.mozilla.org/fy-NL/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/ga-IE/">Georgian (Ireland)</a></th> - <td>ga-IE</td> - <td>Gaeilge (Éire)</td> - <td><a href="https://developer.mozilla.org/ga-IE/docs/feeds/atom/all">https://developer.mozilla.org/ga-IE/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/he/">Hebrew</a></th> - <td>he</td> - <td>עברית</td> - <td><a href="https://developer.mozilla.org/he/docs/feeds/atom/all">https://developer.mozilla.org/he/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/hr/">Croatian</a></th> - <td>hr</td> - <td>Hrvatski</td> - <td><a href="https://developer.mozilla.org/hr/docs/feeds/atom/all">https://developer.mozilla.org/hr/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/hu/">Hungarian</a></th> - <td>hu</td> - <td>Magyar</td> - <td><a href="https://developer.mozilla.org/hu/docs/feeds/atom/all">https://developer.mozilla.org/hu/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/id/">Indonesian</a></th> - <td>id</td> - <td>Bahasa Indonesia</td> - <td><a href="https://developer.mozilla.org/id/docs/feeds/atom/all">https://developer.mozilla.org/id/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/it/">Italian</a></th> - <td>it</td> - <td>Italiano</td> - <td><a href="https://developer.mozilla.org/it/docs/feeds/atom/all">https://developer.mozilla.org/it/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/ja/">Japanese</a></th> - <td>ja</td> - <td>日本語</td> - <td><a href="https://developer.mozilla.org/ja/docs/feeds/atom/all">https://developer.mozilla.org/ja/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/ka/">Georgian</a></th> - <td>ka</td> - <td>ქართული</td> - <td><a href="https://developer.mozilla.org/ka/docs/feeds/atom/all">https://developer.mozilla.org/ka/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/ko/">Korean</a></th> - <td>ko</td> - <td>한국어</td> - <td><a href="https://developer.mozilla.org/ko/docs/feeds/atom/all">https://developer.mozilla.org/ko/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/nl/">Dutch</a></th> - <td>nl</td> - <td>Nederlands</td> - <td><a href="https://developer.mozilla.org/nl/docs/feeds/atom/all">https://developer.mozilla.org/nl/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/pl/">Polish</a></th> - <td>pl</td> - <td>Polski</td> - <td><a href="https://developer.mozilla.org/pl/docs/feeds/atom/all">https://developer.mozilla.org/pl/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/pt-BR/">Portuguese (Brazil)</a></th> - <td>pt-BR</td> - <td>Português (do Brasil)</td> - <td><a href="https://developer.mozilla.org/pt-BR/docs/feeds/atom/all">https://developer.mozilla.org/pt-BR/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/pt-PT/">Portuguese (Europe)</a></th> - <td>pt-PT</td> - <td>Português (Europeu)</td> - <td><a href="https://developer.mozilla.org/pt-PT/docs/feeds/atom/all">https://developer.mozilla.org/pt-PT/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/ro/">Romanian</a></th> - <td>ro</td> - <td>română</td> - <td><a href="https://developer.mozilla.org/ro/docs/feeds/atom/all">https://developer.mozilla.org/ro/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/ru/">Russian</a></th> - <td>ru</td> - <td>Русский</td> - <td><a href="https://developer.mozilla.org/ru/docs/feeds/atom/all">https://developer.mozilla.org/ru/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/sq/">Albanian</a></th> - <td>sq</td> - <td>Shqip</td> - <td><a href="https://developer.mozilla.org/sq/docs/feeds/atom/all">https://developer.mozilla.org/sq/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/th/">Thai</a></th> - <td>th</td> - <td>ไทย</td> - <td><a href="https://developer.mozilla.org/th/docs/feeds/atom/all">https://developer.mozilla.org/th/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/tr/">Turkish</a></th> - <td>tr</td> - <td>Türkçe</td> - <td><a href="https://developer.mozilla.org/tr/docs/feeds/atom/all">https://developer.mozilla.org/tr/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/vi/">Vietnamese</a></th> - <td>vi</td> - <td>Tiếng Việt</td> - <td><a href="https://developer.mozilla.org/vi/docs/feeds/atom/all">https://developer.mozilla.org/vi/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/zh-CN/">Chinese (Simplified)</a></th> - <td>zh-CN</td> - <td>中文 (简体)</td> - <td><a href="https://developer.mozilla.org/zh-CN/docs/feeds/atom/all">https://developer.mozilla.org/zh-CN/docs/feeds/atom/all</a></td> - </tr> - <tr> - <th><a href="https://developer.mozilla.org/zh-TW/">Chinese (Traditional)</a></th> - <td>zh-TW</td> - <td>中文 (繁體)</td> - <td><a href="https://developer.mozilla.org/zh-TW/docs/feeds/atom/all">https://developer.mozilla.org/zh-TW/docs/feeds/atom/all</a></td> - </tr> - </tbody> -</table> -<p>如果你想要更灵活的自定义所订阅的消息,请查看<a href="/zh-CN/docs/MDN/User_guide/Feeds" title="Feeds | MDN">订阅源</a>一文。</p> diff --git a/files/zh-cn/mdn/contribute/localize/starting_a_localization/index.html b/files/zh-cn/mdn/contribute/localize/starting_a_localization/index.html deleted file mode 100644 index 56f977a6b2..0000000000 --- a/files/zh-cn/mdn/contribute/localize/starting_a_localization/index.html +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: Starting a new MDN localization -slug: MDN/Contribute/Localize/Starting_a_localization -tags: - - 未翻译 -translation_of: MDN/Contribute/Localize/Starting_a_localization ---- -<div>{{MDNSidebar}}</div> - -<p>If your language doesn't already have a <a href="/en-US/docs/Project:MDN/Localizing/Localization_projects" title="/en-US/docs/Project:MDN/Localizing/Localization_projects">localization project</a> on MDN, and you have the time and the enthusiasm to do so, you should consider starting a new one. This article is a guide to how to go about starting a localization project.</p> - -<h2 id="Getting_started">Getting started</h2> - -<p>If you'd like to start a localization project to translate MDN into your language, here are the steps you need to follow to get up and running.</p> - -<ol> - <li>First, <a href="https://localize.mozilla.org/projects/mdn/" title="https://localize.mozilla.org/projects/mdn/">check to see</a> if there's already a localization for that language.</li> - <li>Contact your locale's <a href="http://wiki.mozilla.org/L10n:Localization_Teams">Mozilla l10n team</a> and let them know that you want to start it.</li> - <li>Sign up to our <a href="/Project:en/Community">Mailing Lists</a> and head to the <a href="irc://irc.mozilla.org/mdn" title="irc://irc.mozilla.org/devmo">#mdn</a> IRC channel on <a class="link-irc" href="irc://irc.mozilla.org">irc.mozilla.org</a>.</li> - <li>Contact the <a href="mailto:mdn-admins@mozilla.org?subject=Starting%20a%20localization%20project" title="mailto:mdn-admins@mozilla.org?subject=Starting%20a%20localization%20project">MDN administration team</a> to let them know you're starting a new localization. You don't need their permission or anything, but we likes to know who you are. Let us know a little bit about you and which locale you're planning to start work on.</li> - <li>Add a row for your language to the list of <a href="/en-US/docs/Project:MDN/Localizing/Localization_projects" title="/en-US/docs/Project:MDN/Localizing/Localization_projects">localization projects</a>, and include anyone else who is planning to work on it.</li> - <li><a href="https://bugzilla.mozilla.org/enter_bug.cgi?alias=&assigned_to=nobody%40mozilla.org&blocked=&bug_file_loc=http%3A%2F%2F&bug_severity=normal&bug_status=NEW&comment=&component=Localization&contenttypeentry=&contenttypemethod=autodetect&contenttypeselection=text%2Fplain&data=&defined_groups=1&dependson=&description=&flag_type-4=X&flag_type-607=X&flag_type-791=X&flag_type-800=X&form_name=enter_bug&keywords=&maketemplate=Remember%20values%20as%20bookmarkable%20template&op_sys=All&priority=--&product=Mozilla%20Developer%20Network&qa_contact=website%40mdn.bugs&rep_platform=All&requestee_type-4=&requestee_type-607=&requestee_type-791=&requestee_type-800=&short_desc=&status_whiteboard=&target_milestone=---&version=unspecified" title="https://bugzilla.mozilla.org/enter_bug.cgi?alias=&assigned_to=nobody%40mozilla.org&blocked=&bug_file_loc=http%3A%2F%2F&bug_severity=normal&bug_status=NEW&comment=&component=Localization&contenttypeentry=&contenttypemethod=autodetect&contenttypeselection=text%2Fplain&data=&defined_groups=1&dependson=&description=&flag_type-4=X&flag_type-607=X&flag_type-791=X&flag_type-800=X&form_name=enter_bug&keywords=&maketemplate=Remember%20values%20as%20bookmarkable%20template&op_sys=All&priority=--&product=Mozilla%20Developer%20Network&qa_contact=website%40mdn.bugs&rep_platform=All&requestee_type-4=&requestee_type-607=&requestee_type-791=&requestee_type-800=&short_desc=&status_whiteboard=&target_milestone=---&version=unspecified">Create a bug</a> in <a href="http://bugzilla.mozilla.org">Bugzilla</a> requesting that your language be added to the list of languages supported by MDN. This bug should be in the "Mozilla Developer Network" > "Localization" category. It will be automatically assigned to the correct person. This is needed so that your language shows up in the list of languages to choose from on the site; until this is done, you won't be able to continue.</li> - <li>Wait while the MDN team handles your request. If your bug isn't responded to within three or four days, please add a comment to the bug asking for an "ETA" for completion.</li> - <li>Once the locale has been added to MDN, you can <a href="https://localize.mozilla.org/projects/mdn/" title="https://localize.mozilla.org/projects/mdn/">use the Verbatim tool</a> to translate the user interface strings for the site, and you can begin translating articles on the wiki. While translating the site's strings in Verbatim isn't required, it does add a nice touch to have the user interface presented in your language.</li> -</ol> - -<h2 id="Organizing_a_localization_project">Organizing a localization project</h2> - -<p>There are lots of great tips from various existing translation teams; you should feel free to adopt any of these ideas you choose. In addition, please feel free to add your own suggestions as well. See <a href="/profiles/traducción">this template</a> in the Spanish wiki for an example.</p> - -<ul> - <li>Use a macro to identify articles that are in the process of being translated. The macro should provide an information box that includes a link to the original version of the article. You may also wish to use page tags to indicate pages that need more translation work. This helps track articles that are in the process of being translated.</li> - <li>Use a macro to include articles that need to be translated in article lists with a flag or marker next to them indicating that the article hasn't been translated yet. This is a way to advertise important articles in need of translation. See <a href="/profiles/tradúceme">this template</a> in the Spanish version of MDN for an example.</li> - <li>Make use of the "Needs technical review" and "Needs editorial review" flags, to mark articles that have been translated but should be double-checked for technical and grammatical accuracy.</li> - <li>Use the "junk" tag to mark pages that need to be deleted. Since only admins have access to delete articles, this provides a way to mark that an article is obsolete until the admins get the page deleted.</li> - <li>Be sure to include translations of these MDN "how to" pages, and include additional pages as necessary to explain your localization team's policies and practices.</li> -</ul> - -<p>To find help with your project, be sure to ask around on the dev-mdc mailing list, the <a href="irc://irc.mozilla.org/devmo" title="irc://irc.mozilla.org/devmo">#devmo</a> IRC channel, and other MDN-related discussion areas. See "<a href="/en-US/docs/Project:MDN/Contributing/Join_the_community" title="/en-US/docs/Project:MDN/Contributing/Join_the_community">Join the MDN community</a>" for pointers to community discussion channels that will help you find others interested in joining your localization team.</p> - -<p>You may also be able to find others interested in helping you by attending local Web development events, at your local hacker space, and the like. Be creative!</p> - -<h2 id="Localization_look_and_feel">Localization look and feel</h2> - -<p>The basic structure of each of the localizations of MDN should be essentially the same. In general, you should try to maintain the same hierarchy of pages, so that each page on each language corresponds to a similar page in each locale.</p> - -<p>You are welcome to link to external local pages, write your own articles, and translate everything from the English wiki. If you do decide to write your own articles, it would be helpful if you could provide an English translation for the English wiki so it can then get translated into all of the other localized wikis.</p> - -<p>Adding local resources you should keep a neutral point of view; that is, you shouldn't promote a particular perspective, and should instead simply provide the facts as best as possible (see information about the <a href="http://en.wikipedia.org/wiki/NPOV">NPOV</a> rule on Wikipedia). You should not link to commercial sites (like paid courses, web design companies, etc.). You should promote open standards and cross-browser compatibility over closed or proprietary methods wherever possible.</p> - -<div class="note"> -<p><strong>Note:</strong> Team leads are encouraged to monitor their locale's content for spam and other inappropriate materials and take steps to get them removed or corrected.</p> -</div> - -<h2 id="Policy">Policy</h2> - -<p>All materials created and translated for the MDN should follow our <a href="/en-US/docs/Project:Copyrights">Copyright and Licensing Policies</a>.</p> - -<p>If you encounter problems of any sort—technical, policy, or other—please contact the <a href="mailto:mdn-admins@mozilla.org?subject=Localization%20question" title="mailto:mdn-admins@mozilla.org?subject=Localization%20question">MDN admin team</a>.</p> - -<h2 id="See_also">See also</h2> - -<ul> - <li><a href="/en-US/docs/Project:MDN/Localizing" title="/en-US/docs/Project:MDN/Localizing">Localizing MDN</a></li> -</ul> diff --git a/files/zh-cn/mdn/contribute/localize/translating_pages/index.html b/files/zh-cn/mdn/contribute/localize/translating_pages/index.html deleted file mode 100644 index 4d6a915298..0000000000 --- a/files/zh-cn/mdn/contribute/localize/translating_pages/index.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: 翻译 MDN 上的页面 -slug: MDN/Contribute/Localize/Translating_pages -tags: - - MDN - - 向导 - - 国际化 - - 本地化 - - 页面翻译 -translation_of: MDN/Contribute/Localize/Translating_pages ---- -<div>{{MDNSidebar}}</div> - -<p>本文是翻译 MDN 的基本指南,包括翻译的机制以及处理不同内容的技巧。</p> - -<h2 id="创建页面翻译">创建页面翻译</h2> - -<p>当您浏览到一个 MDN 的页面,并想要翻译成您的语言,请参照以下步骤:</p> - -<ol> - <li>点击页面上的语言图标 ( {{FontAwesomeIcon("icon- language")}}) 打开<strong>语言</strong>菜单,并点击<strong>添加翻译副本</strong>,就会看到选择语言的页面。</li> - <li>点击您想要翻译成的语言。翻译文章的页面会打开,页面左边是文章的原语言。</li> - <li>在<strong>翻译描述</strong>下,您可以翻译标题,或者,也可以将slug翻译成目标语言。slug 是网页 URL 的最后那一部分(例如,这篇文章的“Translating_pages”)。一些语言的社区不翻译 slug,保留使用英语版本的 slug。请您对比其他 MDN 上您的语言的文章来决定一个普遍的做法。当您完成描述的翻译时,您可以点击<strong>翻译描述</strong>后的减号来隐藏它,这样下面翻译内容的部分就有更大的空间。</li> - <li>在<strong>翻译内容</strong>下,翻译页面的主体内容。</li> - <li>为您翻译的页面添加至少一个标签。</li> - <li>当您完成时点击<strong>保存更改。</strong></li> -</ol> - -<div class="note"><strong>注意:</strong> 翻译中的文章用户初始界面为英文版。如果 MDN 的本地化中您的目标语言存在的话,那么在接下来的访问翻译特定文章时,用户界面将以目标语言显示。MDN 用户界面能使用 <a href="https://pontoon.mozilla.org/projects/mdn/" title="https://pontoon.mozilla.org/projects/mdn/">Pontoon</a> 来本地化。如何使用这个工具的细节参阅 <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localizing_with_Pontoon" title="/en-US/docs/Mozilla/Localization/Localizing_with_Pontoon">使用 Pontoon 进行本地化</a>。</div> - -<h2 id="编辑已有翻译">编辑已有翻译</h2> - -<ul> - <li>在一已翻译的网页上,点击<strong>编辑</strong>按键(有的时候标记为目标语言)。翻译中的文章视图展开。</li> -</ul> - -<p><span id="cke_bm_86C" style="display: none;"> </span>如果英语版本已经被更改而翻译副本还是上次更新状态,翻译中的文章视图在英语版面中显示一个源级别的不同更改。帮助您看到翻译副本中什么需要更新。</p> - -<h2 id="标签翻译">标签翻译</h2> - -<p>确保页面至少有一个标签,即使是翻译的页面。一般而言,和原始文章使用相同的标签是一个好主意。</p> - -<p>一些标签用于搜索筛选,或者作为贡献者之间的约定。这些标签无需翻译。如果需要了解这些标签,请参看<a href="/zh-CN/docs/Project:MDN/Contributing/Tagging_standards">标签标准</a>。 如果标签标准里面没有您想用的标签,您可以新建翻译了的标签来分类内容。</p> - -<h2 id="给本地化新手的小技巧">给本地化新手的小技巧</h2> - -<p>如果您不熟悉 MDN 的本地化,请参考以下建议:</p> - -<ul> - <li>可以先从<a href="/zh-CN/docs/Glossary">术语表</a>中的文章开始翻译,因为它们非常简短。</li> - <li>优先翻译标记为<a href="/en-US/docs/tag/l10n%3Apriority">"本地化:高优先级"</a>的文章。一般来说,教程和概念性文章比参考页面的优先级更高,因为读者在学习新概念时更需要翻译。</li> - <li>请不要翻译双花括号之间的文本,例如<code>\{{some-text("more text")}}</code>,而且标点符号也不要修改。这是一个<a href="/zh-CN/docs/MDN/Contribute/Structures/Macros">Macros</a>(宏),它可能会在页面上创建一个结构,或者做一些其他有用的事情。您可能会看到由宏生成的未翻译文本;在您对 MDN 有更深入的了解之前,不用担心这个问题。(修改这个文本需要<a href="en-US/docs/MDN/Contribute/Tools/Template_editing">特殊权限</a>,因为宏可能非常强大。)如果您好奇,请查看<a href="/zh-CN/docs/MDN/Contribute/Content/Custom_macros">常用的宏</a>,以查看宏所做的事情。</li> - <li>访问<a href="/zh-CN/docs/MDN/Contribute/Localize/Localization_projects">本地化项目</a>页面,了解更多关于您的语言环境本地化的信息。</li> -</ul> diff --git a/files/zh-cn/web/api/parentnode/queryselectorall/index.html b/files/zh-cn/web/api/parentnode/queryselectorall/index.html index 1664ec5559..2f7bc72f71 100644 --- a/files/zh-cn/web/api/parentnode/queryselectorall/index.html +++ b/files/zh-cn/web/api/parentnode/queryselectorall/index.html @@ -16,7 +16,7 @@ translation_of: Web/API/ParentNode/querySelectorAll <p>The {{domxref("ParentNode")}} mixin defines the <code><strong>querySelectorAll()</strong></code> method 返回一个 {{domxref("NodeList")}} 表示元素的列表,把当前的元素作为根与指定的选择器组相匹配。</p> -<p>If you need only a single result, consider the {{domxref("ParentNode.querySelector", "querySelector()")}} method instead.</p> +<p>如果你只需要一个结果,可以考虑使用{{domxref("ParentNode.querySelector", "querySelector()")}}方法来代替。</p> <div class="note"> <p><strong>Note:</strong> This method is implemented as {{domxref("Element.querySelectorAll()")}}, {{domxref("Document.querySelectorAll()")}}, and {{domxref("DocumentFragment.querySelectorAll()")}}</p> @@ -24,7 +24,7 @@ translation_of: Web/API/ParentNode/querySelectorAll <h2 id="语法">语法</h2> -<pre class="syntaxbox"><var>elementList</var> = <em>parentNode</em>.querySelectorAll(<var>selectors</var>); +<pre class="syntaxbox notranslate"><var>elementList</var> = <em>parentNode</em>.querySelectorAll(<var>selectors</var>); </pre> <h3 id="参数">参数</h3> @@ -41,10 +41,10 @@ translation_of: Web/API/ParentNode/querySelectorAll <h3 id="返回值">返回值</h3> -<p>A non-live {{domxref("NodeList")}} containing one {{domxref("Element")}} object for each descendant node that matches at least one of the specified selectors.</p> +<p>一个不存活的 {{domxref("NodeList")}} ,每个子节点拥有一个 {{domxref("Element")}} 对象,其中每个子节点至少与一个选择器相匹配。</p> <div class="note"> -<p><strong>Note:</strong> If the specified <code>selectors</code> include a <a href="/en-US/docs/Web/CSS/Pseudo-elements">CSS pseudo-element</a>, the returned list is always empty.</p> +<p><strong>Note:</strong> 如果指定的 <code>selectors</code> 包含<a href="/en-US/docs/Web/CSS/Pseudo-elements">CSS pseudo-element</a>,那么返回的列表始终为空。</p> </div> <h3 id="Exceptions">Exceptions</h3> @@ -58,24 +58,24 @@ translation_of: Web/API/ParentNode/querySelectorAll <p>To obtain a {{domxref("NodeList")}} of all of the {{HTMLElement("p")}} elements in the document:</p> -<pre class="brush: js">var matches = document.querySelectorAll("p");</pre> +<pre class="brush: js notranslate">var matches = document.querySelectorAll("p");</pre> <p>这个例子返回了所有 class 为 "note" 或者 "alert" 的 div 元素的一个列表:</p> -<pre class="brush: js">var matches = document.querySelectorAll("div.note, div.alert");</pre> +<pre class="brush: js notranslate">var matches = document.querySelectorAll("div.note, div.alert");</pre> <p>Here, we get a list of <code><p></code> elements whose immediate parent element is a {{domxref("div")}} with the class <code>"highlighted"</code> and which are located inside a container whose ID is <code>"test"</code>.</p> -<pre class="brush: js">var container = document.querySelector("#test"); +<pre class="brush: js notranslate">var container = document.querySelector("#test"); var matches = container.querySelectorAll("div.highlighted > p");</pre> <p>This example uses an <a href="/en-US/docs/Web/CSS/Attribute_selectors">attribute selector</a> to return a list of the {{domxref("iframe")}} elements in the document that contain an attribute named <code>"data-src"</code>:</p> -<pre class="brush: js">var matches = document.querySelectorAll("iframe[data-src]");</pre> +<pre class="brush: js notranslate">var matches = document.querySelectorAll("iframe[data-src]");</pre> <p>Here, an attribute selector is used to return a list of the list items contained within a list whose ID is <code>"userlist"</code> which have a <code>"data-active"</code> attribute whose value is <code>"1"</code>:</p> -<pre class="brush: js">var container = document.querySelector("#userlist"); +<pre class="brush: js notranslate">var container = document.querySelector("#userlist"); var matches = container.querySelectorAll("li[data-active=1]");</pre> <h2 id="User_notes">User notes</h2> @@ -86,7 +86,7 @@ var matches = container.querySelectorAll("li[data-active=1]");</pre> <p>Consider this HTML, with its three nested {{HTMLElement("div")}} blocks.</p> -<pre class="brush: html"><div class="outer"> +<pre class="brush: html notranslate"><div class="outer"> <div class="select"> <div class="inner"> </div> @@ -95,7 +95,7 @@ var matches = container.querySelectorAll("li[data-active=1]");</pre> <h3 id="JavaScript">JavaScript</h3> -<pre class="brush: js">var select = document.querySelector('.select'); +<pre class="brush: js notranslate">var select = document.querySelector('.select'); var inner = select.querySelectorAll('.outer .inner'); inner.length; // 1, not 0! </pre> @@ -104,7 +104,7 @@ inner.length; // 1, not 0! <p>The {{cssxref(":scope")}} pseudo-class restores the expected behavior, only matching selectors on descendants of the base element:</p> -<pre class="brush: js">var select = document.querySelector('.select'); +<pre class="brush: js notranslate">var select = document.querySelector('.select'); var inner = select.querySelectorAll(':scope .outer .inner'); inner.length; // 0</pre> diff --git a/files/zh-cn/web/css/url/index.html b/files/zh-cn/web/css/url/index.html index 9b3451e3d7..3ba85545e4 100644 --- a/files/zh-cn/web/css/url/index.html +++ b/files/zh-cn/web/css/url/index.html @@ -1,7 +1,8 @@ --- title: <url> slug: Web/CSS/url -translation_of: Web/CSS/url +translation_of: Web/CSS/url() +translation_of_original: Web/CSS/url --- <p>{{ CssRef() }}</p> diff --git a/files/zh-cn/web/html/element/tr/index.html b/files/zh-cn/web/html/element/tr/index.html index a7b41a75d4..a5ccfcacd7 100644 --- a/files/zh-cn/web/html/element/tr/index.html +++ b/files/zh-cn/web/html/element/tr/index.html @@ -3,7 +3,7 @@ title: <tr> slug: Web/HTML/Element/tr translation_of: Web/HTML/Element/tr --- -<p><strong>HTML <code><tr></code> 元素</strong>定义表格中的行。 Those can be a mix of {{HTMLElement("td")}} and {{HTMLElement("th")}} elements.</p> +<p><strong>HTML <code><tr></code> 元素</strong>定义表格中的行。 同一行可同时出现{{HTMLElement("td")}} 和{{HTMLElement("th")}} 元素.</p> <table class="properties"> <tbody> @@ -40,12 +40,12 @@ translation_of: Web/HTML/Element/tr <dl> <dt>{{htmlattrdef("align")}} {{deprecatedGeneric("inline","html4.01")}}, {{obsoleteGeneric("inline","html5")}}</dt> - <dd>This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are: + <dd>该枚举属性指定每个单元格中内容的水平对齐方式,可使用的属性值如下: <ul> - <li><code>left</code>, aligning the content to the left of the cells</li> - <li><code>center</code>, centering the content in the cells</li> - <li><code>right</code>, aligning the content to the right of the cells</li> - <li><code>justify</code>, widening the spaces in the textual content so that the content is justified in the cells</li> + <li><code>left</code>, 内容在单元格中左对齐</li> + <li><code>center</code>, 内容在单元格中居中</li> + <li><code>right</code>, 内容在单元格中右对齐</li> + <li><code>justify</code>, 增加文本内容之间的空白以伸展这行文本,使得该单元格中的多行文本具有相同的长度。</li> <li><code>char</code>, aligning the textual content on a special character with a minimal offset, defined by the {{htmlattrxref("char", "tr")}} and {{htmlattrxref("charoff", "tr")}} attributes {{unimplemented_inline("2212")}}</li> </ul> @@ -112,12 +112,12 @@ translation_of: Web/HTML/Element/tr <tr> <td>{{SpecName('HTML WHATWG','tables.html#the-tr-element','tr element')}}</td> <td>{{Spec2('HTML WHATWG')}}</td> - <td> </td> + <td></td> </tr> <tr> <td>{{SpecName('HTML5 W3C','tabular-data.html#the-tr-element','tr element')}}</td> <td>{{Spec2('HTML5 W3C')}}</td> - <td> </td> + <td></td> </tr> </tbody> </table> diff --git a/files/zh-cn/web/javascript/a_re-introduction_to_javascript/index.html b/files/zh-cn/web/javascript/a_re-introduction_to_javascript/index.html index 0f423505da..bcf94763b0 100644 --- a/files/zh-cn/web/javascript/a_re-introduction_to_javascript/index.html +++ b/files/zh-cn/web/javascript/a_re-introduction_to_javascript/index.html @@ -946,8 +946,8 @@ add20(7); // ? <p>这里发生的事情和前面介绍过的内嵌函数十分相似:一个函数被定义在了另外一个函数的内部,内部函数可以访问外部函数的变量。唯一的不同是,外部函数已经返回了,那么常识告诉我们局部变量“应该”不再存在。但是它们却仍然存在——否则 <code>adder</code> 函数将不能工作。也就是说,这里存在 <code>makeAdder</code> 的局部变量的两个不同的“副本”——一个是 <code>a</code> 等于 5,另一个是 <code>a</code> 等于 20。那些函数的运行结果就如下所示:</p> -<pre class="brush: js notranslate">x(6); // 返回 11 -y(7); // 返回 27 +<pre class="brush: js notranslate">add5(6); // 返回 11 +add20(7); // 返回 27 </pre> <p>下面来说说,到底发生了什么了不得的事情。每当 JavaScript 执行一个函数时,都会创建一个作用域对象(scope object),用来保存在这个函数中创建的局部变量。它使用一切被传入函数的变量进行初始化(初始化后,它包含一切被传入函数的变量)。这与那些保存的所有全局变量和函数的全局对象(global object)相类似,但仍有一些很重要的区别:第一,每次函数被执行的时候,就会创建一个新的,特定的作用域对象;第二,与全局对象(如浏览器的 <code>window</code> 对象)不同的是,你不能从 JavaScript 代码中直接访问作用域对象,也没有 可以遍历当前作用域对象中的属性 的方法。</p> diff --git a/files/zh-cn/web/javascript/reference/global_objects/math/random/index.html b/files/zh-cn/web/javascript/reference/global_objects/math/random/index.html index 46aad728b8..ea760c65f6 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/math/random/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/math/random/index.html @@ -11,7 +11,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/random --- <div>{{JSRef}}</div> -<div><code><strong>Math.random()</strong></code> 函数返回一个浮点, 伪随机数在范围从<strong>0到</strong>小于<strong>1</strong>,也就是说,从0(包括0)往上,但是不包括1(排除1),然后您可以缩放到所需的范围。实现将初始种子选择到随机数生成算法;它不能被用户选择或重置。</div> +<div><code><strong>Math.random()</strong></code> 函数返回一个浮点数, 伪随机数在范围从<strong>0到</strong>小于<strong>1</strong>,也就是说,从0(包括0)往上,但是不包括1(排除1),然后您可以缩放到所需的范围。实现将初始种子选择到随机数生成算法;它不能被用户选择或重置。</div> <p>{{EmbedInteractiveExample("pages/js/math-random.html")}}</p> diff --git a/files/zh-cn/web/javascript/reference/global_objects/promise/all/index.html b/files/zh-cn/web/javascript/reference/global_objects/promise/all/index.html index 84264ce68b..e81f816fbf 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/promise/all/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/promise/all/index.html @@ -13,9 +13,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Promise/all --- <div>{{JSRef}}</div> -<p><code><strong>Promise.all(iterable)</strong></code> 方法返回一个 {{jsxref("Promise")}} 实例,此实例在 <code>iterable</code> 参数内所有的 <code>promise</code> 都“完成(resolved)”或参数中不包含 <code>promise</code> 时回调完成(resolve);如果参数中 <code>promise</code> 有一个失败(rejected),此实例回调失败(reject),失败的原因是第一个失败 <code>promise</code> 的结果。</p> - -<p>它通常在启动多个异步任务并发运行并为其结果创建承诺之后使用,以便人们可以等待所有任务完成。</p> +<p>Promise.all() 方法接收一个promise的idterable类型(注:Array,Map,Set都属于ES6的iterable类型)的输入,并且只返回一个{{jsxref("Promise")}}实例, 那个输入的所有promise的resolve回调的结果是一个数组。这个{{jsxref("Promise")}}的resolve回调执行是在所有输入的promise的resolve回调都结束,或者输入的iterable里没有promise了的时候。它的reject回调执行是,只要任何一个输入的promise的reject回调执行或者输入不合法的promise就会立即抛出错误,并且reject的是第一个抛出的错误信息。</p> <div>{{EmbedInteractiveExample("pages/js/promise-all.html")}}</div> @@ -23,7 +21,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Promise/all <h2 id="语法">语法</h2> -<pre class="syntaxbox"><var>Promise.all(iterable)</var>;</pre> +<pre class="syntaxbox notranslate"><var>Promise.all(iterable)</var>;</pre> <h3 id="参数">参数</h3> @@ -58,7 +56,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Promise/all <p><code>Promise.all</code> 等待所有都完成(或第一个失败)。</p> -<pre class="brush: js">var p1 = Promise.resolve(3); +<pre class="brush: js notranslate">var p1 = Promise.resolve(3); var p2 = 1337; var p3 = new Promise((resolve, reject) => { setTimeout(resolve, 100, 'foo'); @@ -70,7 +68,7 @@ Promise.all([p1, p2, p3]).then(values => { <p>如果参数中包含非 <code>promise</code> 值,这些值将被忽略,但仍然会被放在返回数组中(如果 <code>promise</code> 完成的话):</p> -<pre class="brush: js">// this will be counted as if the iterable passed is empty, so it gets fulfilled +<pre class="brush: js notranslate">// this will be counted as if the iterable passed is empty, so it gets fulfilled var p = Promise.all([1,2,3]); // this will be counted as if the iterable passed contains only the resolved promise with value "444", so it gets fulfilled var p2 = Promise.all([1,2,3, Promise.resolve(444)]); @@ -93,7 +91,7 @@ setTimeout(function(){ <p>下面的例子中演示了 <code>Promise.all</code> 的异步性(如果传入的可迭代对象是空的,就是同步):</p> -<pre class="brush: js">// we are passing as argument an array of promises that are already resolved, +<pre class="brush: js notranslate">// we are passing as argument an array of promises that are already resolved, // to trigger Promise.all as soon as possible var resolvedPromisesArray = [Promise.resolve(33), Promise.resolve(44)]; @@ -115,7 +113,7 @@ setTimeout(function(){ <p>如果 <code>Promise.all</code> 失败,也是一样的:</p> -<pre class="brush: js">var mixedPromisesArray = [Promise.resolve(33), Promise.reject(44)]; +<pre class="brush: js notranslate">var mixedPromisesArray = [Promise.resolve(33), Promise.reject(44)]; var p = Promise.all(mixedPromisesArray); console.log(p); setTimeout(function(){ @@ -131,7 +129,7 @@ setTimeout(function(){ <p>但是,<code>Promise.all</code> <strong>当且仅当</strong>传入的可迭代对象为空时为同步:</p> -<pre class="brush: js">var p = Promise.all([]); // will be immediately resolved +<pre class="brush: js notranslate">var p = Promise.all([]); // will be immediately resolved var p2 = Promise.all([1337, "hi"]); // non-promise values will be ignored, but the evaluation will be done asynchronously console.log(p); console.log(p2) @@ -151,7 +149,7 @@ setTimeout(function(){ <p><code>Promise.all</code> 在任意一个传入的 <code>promise</code> 失败时返回失败。例如,如果你传入的 <code>promise</code>中,有四个 <code>promise</code> 在一定的时间之后调用成功函数,有一个立即调用失败函数,那么 <code>Promise.all</code> 将立即变为失败。</p> -<pre class="brush: js">var p1 = new Promise((resolve, reject) => { +<pre class="brush: js notranslate">var p1 = new Promise((resolve, reject) => { setTimeout(resolve, 1000, 'one'); }); var p2 = new Promise((resolve, reject) => { diff --git a/files/zh-cn/web/javascript/reference/global_objects/regexp/index.html b/files/zh-cn/web/javascript/reference/global_objects/regexp/index.html index 77e10c7396..27da890c46 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/regexp/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/regexp/index.html @@ -1,5 +1,5 @@ --- -title: RegExp +title: RegExp(正则表达式) slug: Web/JavaScript/Reference/Global_Objects/RegExp tags: - Class @@ -23,16 +23,16 @@ translation_of: Web/JavaScript/Reference/Global_Objects/RegExp <dl> <dt>字面量</dt> - <dd>由斜杠包围而不是引号包围。</dd> + <dd>由斜杠(/)包围而不是引号包围。</dd> <dt>构造函数的字符串参数</dt> <dd>由引号而不是斜杠包围。</dd> </dl> <p>以下三种表达式都会创建相同的正则表达式:</p> -<pre class="brush: js notranslate" style="font-size: 14px;">/ab+c/i; -new RegExp('ab+c', 'i'); -new RegExp(/ab+c/, 'i');</pre> +<pre class="brush: js notranslate" style="font-size: 14px;">/ab+c/i; //字面量形式 +new RegExp('ab+c', 'i'); // 首个参数为字符串模式的构造函数 +new RegExp(/ab+c/, 'i'); // 首个参数为常规字面量的构造函数</pre> <p>当表达式被赋值时,字面量形式提供正则表达式的编译(compilation)状态,当正则表达式保持为常量时使用字面量。例如当你在循环中使用字面量构造一个正则表达式时,正则表达式不会在每一次迭代中都被重新编译(recompiled)。</p> @@ -258,7 +258,7 @@ console.log(/[^.]+/.exec(url)[0].substr(7)); // logs "xxx" console.log("'group:" + group + "'"); }); // 'group:undefined'</code></pre> -<p>注意,由于web兼容性 <code>RegExp.$N</code> 仍会返回一个空的字符串代替 <code>undefined</code> ({{bug(1053944)}}).</p> +<p>注意,由于web兼容性 <code>RegExp.$N</code> 仍会返回一个空的字符串代替 <code>undefined</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1053944">bug 1053944</a>).</p> <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/javascript/reference/global_objects/unescape/index.html b/files/zh-cn/web/javascript/reference/global_objects/unescape/index.html index b85895a7cd..59df2809d8 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/unescape/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/unescape/index.html @@ -9,11 +9,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/unescape <p><font face="Open Sans, Arial, sans-serif">已废弃的</font><code><strong>unescape()</strong></code> 方法计算生成一个新的字符串,其中的十六进制转义序列将被其表示的字符替换。上述的转义序列就像{{jsxref("escape")}}里介绍的一样。因为 <code>unescape</code> 已经废弃,建议使用 {{jsxref("decodeURI")}}或者{{jsxref("decodeURIComponent")}} 替代本方法。</p> -<div class="note"><strong>注意:</strong>不要使用<code>unescape</code>去解码URLS,使用<code>decodeURI</code>替代。</div> +<div class="note"><strong>注意:</strong>不要使用<code>unescape</code>去解码URLS,使用<code>decodeURI</code>或<code>decodeURIComponent</code>替代。</div> <h2 id="语法">语法</h2> -<pre class="syntaxbox"><code>unescape(str)</code></pre> +<pre class="syntaxbox notranslate"><code>unescape(str)</code></pre> <h3 id="参数">参数</h3> @@ -32,7 +32,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/unescape <h2 id="示例">示例</h2> -<pre class="brush: js">unescape('abc123'); // "abc123" +<pre class="brush: js notranslate">unescape('abc123'); // "abc123" unescape('%E4%F6%FC'); // "äöü" unescape('%u0107'); // "ć" </pre> diff --git a/files/zh-cn/web/javascript/reference/operators/instanceof/index.html b/files/zh-cn/web/javascript/reference/operators/instanceof/index.html index c97b2a72a4..d637cf41e1 100644 --- a/files/zh-cn/web/javascript/reference/operators/instanceof/index.html +++ b/files/zh-cn/web/javascript/reference/operators/instanceof/index.html @@ -20,7 +20,7 @@ translation_of: Web/JavaScript/Reference/Operators/instanceof <h2 id="Syntax" name="Syntax">语法</h2> -<pre><code><em>object</em> instanceof <em>constructor</em></code></pre> +<pre class="notranslate"><code><em>object</em> instanceof <em>constructor</em></code></pre> <h3 id="Parameters" name="Parameters">参数</h3> @@ -38,7 +38,7 @@ translation_of: Web/JavaScript/Reference/Operators/instanceof <p><code>instanceof</code> 运算符用来检测 <code>constructor.prototype </code>是否存在于参数 <code>object</code> 的原型链上。</p> -<pre class="brush: js">// 定义构造函数 +<pre class="brush: js notranslate">// 定义构造函数 function C(){} function D(){} @@ -87,14 +87,14 @@ o3 instanceof C; // true 因为 C.prototype 现在在 o3 的原型链上 <p>但是,使用对象文字符号创建的对象在这里是一个例外:虽然原型未定义,但 <code>instanceof Object</code> 返回 <code>true</code>。</p> -<pre class="brush: js">var simpleStr = "This is a simple string"; +<pre class="brush: js notranslate">var simpleStr = "This is a simple string"; var myString = new String(); var newStr = new String("String created with constructor"); var myDate = new Date(); var myObj = {}; var myNonObj = Object.create(null); -simpleStr instanceof String; // 返回 false, 检查原型链会找到 undefined +simpleStr instanceof String; // 返回 false, 非对象实例,因此返回 false myString instanceof String; // 返回 true newStr instanceof String; // 返回 true myString instanceof Object; // 返回 true @@ -113,7 +113,7 @@ myDate instanceof String; // 返回 false</pre> <p>下面的代码创建了一个类型 <code>Car</code>,以及该类型的对象实例 <code>mycar</code>. <code>instanceof</code> 运算符表明了这个 <code>mycar</code> 对象既属于 <code>Car</code> 类型,又属于 <code>Object</code> 类型。</p> -<pre class="brush: js" dir="rtl">function Car(make, model, year) { +<pre class="brush: js notranslate" dir="rtl">function Car(make, model, year) { this.make = make; this.model = model; this.year = year; @@ -128,13 +128,13 @@ var b = mycar instanceof Object; // 返回 true <p>要检测对象不是某个构造函数的实例时,你可以这样做</p> -<pre class="brush: js">if (!(mycar instanceof Car)) { +<pre class="brush: js notranslate">if (!(mycar instanceof Car)) { // Do something, like mycar = new Car(mycar) }</pre> <p>这和以下代码完全不同</p> -<pre class="brush: js">if (!mycar instanceof Car)</pre> +<pre class="brush: js notranslate">if (!mycar instanceof Car)</pre> <p>这段代码永远会得到 <code>false</code>(<code>!mycar</code> 将在 <code>instanceof</code> 之前被处理,所以你总是在验证一个布尔值是否是 <code>Car</code> 的一个实例)。</p> |