Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(zh-CN): Replace macros Bug and WebkitBug by regular MD links #11892

Merged
merged 4 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/zh-cn/glossary/quality_values/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ text/html;q=0.8,text/*;q=0.8,*/*;q=0.8

### 火狐

从 Firefox 18 开始,质量因子的值可达小数点后二位(之前的版本只能达小数点后一位)。({{bug(672448)}})
从 Firefox 18 开始,质量因子的值可达小数点后二位(之前的版本只能达小数点后一位)。([Firefox bug 672448](https://bugzil.la/672448))
yin1999 marked this conversation as resolved.
Show resolved Hide resolved

## 更多

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ function createLink(testItem) {

每个链接都有双重用途,即它不仅告诉你错误是什么,而且可以单击它或激活它直接跳转到有问题的输入元素,并且更正输入。

> **备注:** 此示例的 `focus()` 部分有点棘手。Chrome 和 Edge(以及较新版本的 IE)将在单击链接时聚焦元素,而无需 `onclick`/`focus()` 代码块。Safari 只会突出显示表单元素,并自行显示链接,因此需要 `onclick/focus()` 代码块来实际聚焦它。Firefox 没有在上下文中正确的聚焦输入,因此 Firefox 用户目前无法利用这一点(尽管其他一切都正常)。Firefox 问题应该尽快会得到修复——现在的工作是使 Firefox 行为与其他浏览器的行为相同(参见 {{bug(277178)}})。
> **备注:** 此示例的 `focus()` 部分有点棘手。Chrome 和 Edge(以及较新版本的 IE)将在单击链接时聚焦元素,而无需 `onclick`/`focus()` 代码块。Safari 只会突出显示表单元素,并自行显示链接,因此需要 `onclick/focus()` 代码块来实际聚焦它。Firefox 没有在上下文中正确的聚焦输入,因此 Firefox 用户目前无法利用这一点(尽管其他一切都正常)。Firefox 问题应该尽快会得到修复——现在的工作是使 Firefox 行为与其他浏览器的行为相同(参见 [Firefox bug 277178](https://bugzil.la/277178))。

此外,`errorField` 被放置在源顺序的顶部(与 UI 中使用 CSS 时相比,位置不同),这意味着用户可以准确找出表单提交时的问题,并通过返回到页面的开头,来获悉有问题的输入元素。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ Many developers implemented bad browser sniffing code and didn't maintain it, an

The lesson to be learned here is — NEVER use browser sniffing. The only really use case for browser sniffing code in the modern day is if you are implementing a fix for a bug in a very specific version of a particular browser. But even then, most bugs get fixed pretty quickly in browser vendor rapid release cycles. It won't come up very often. [Feature detection](#feature_detection) is almost always a better option — if you detect whether a feature is supported, you won't need to change your code when new browser versions come out, and the tests are much more reliable.

If you come across browser sniffing when joining an existing project, look at whether it can be replaced with something more sensible. Browser sniffing causes all kind of interesting bugs, like {{bug(1308462)}}.
If you come across browser sniffing when joining an existing project, look at whether it can be replaced with something more sensible. Browser sniffing causes all kind of interesting bugs, like [Firefox bug 1308462](https://bugzil.la/1308462).

### Handling JavaScript prefixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ The iterator will iterate over values of type _valueType_, with keys of type _ke
- `entries()` that returns an {{jsxref('iterator')}} on the indexes (of type _keyType_). E.g. {{domxref('FormData.entries()')}}
- `values()` that returns an {{jsxref('iterator')}} on the values. E.g. {{domxref('FormData.values()')}}
- `keys()` that returns an {{jsxref('iterator')}} on the keys. E.g. {{domxref('FormData.keys()')}}
- Once {{bug(1216751)}} lands, `forEach()`.
- Once [Firefox bug 1216751](https://bugzil.la/1216751) lands, `forEach()`.

Such an iterator allows to use the syntax `for (var p in object)` as a shorthand of `for (var p in object.entries())`. We add a sentence about it in the interface description. E.g. {{domxref('FormData')}}.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,6 @@ slug: MDN/Writing_guidelines/Page_structures/Macros/Commonly_used_macros
</tbody>
</table>

### 链接到某个 Bug

- Bug

- 通过编号,[`bug`](https://github.com/mdn/yari/blob/main/kumascript/macros/bug.ejs) 宏可以指向 bugzilla.mozilla.org 站内相应的 bug,`\{{Bug(123456)}}` 会指向 {{Bug(123456)}}。
- 类似的,[`WebkitBug`](https://github.com/mdn/yari/blob/main/kumascript/macros/WebkitBug.ejs) 宏同样可以借助编号,指向 WebKit bug 库里对应的 bug。例如,`\{{WebkitBug(31277)}}` 会指向 {{WebkitBug(31277)}}。

yin1999 marked this conversation as resolved.
Show resolved Hide resolved
### 多页面间的导航栏

[`Previous`](https://github.com/mdn/yari/blob/main/kumascript/macros/Previous.ejs)、[`Next`](https://github.com/mdn/yari/blob/main/kumascript/macros/Next.ejs) 和 [`PreviousNext`](https://github.com/mdn/yari/blob/main/kumascript/macros/PreviousNext.ejs) 这几个宏可以在页面中创建导航栏,帮助读者按照文章的先后顺序阅读。其中的参数需要填入目标页面在 MDN 中的位置,你可以在页面的网址中找到所需的信息。对于 [`PreviousNext`](https://github.com/mdn/yari/blob/main/kumascript/macros/PreviousNext.ejs),需要的两个参数是相应文章的 Wiki 位置。第一个参数用于上一篇文章,第二个参数用于下一篇文章。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ slug: Mozilla/Add-ons/WebExtensions/user_interface/Browser_styles
</tbody>
</table>

> **备注:** 查看 {{bug(1465256)}} 以了解相关修订
> **备注:** 查看 [Firefox bug 1465256](https://bugzil.la/1465256) 以了解相关修订

## 浏览器兼容性

Expand Down
18 changes: 9 additions & 9 deletions files/zh-cn/mozilla/firefox/experimental_features/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ Mozilla 发布了测试的 nightly 版本,用于测试新的浏览器特性。
</p>
<p>
Firefox currently implements the <code>&#x3C;shape-box></code> values
({{bug(1309467)}}) as well as the
<code>circle()</code> ({{bug(1311244)}}),
<code>ellipse()</code> ({{bug(1326406)}}), and
<code>polygon()</code> ({{bug(1326409)}}) functions.
(<a href="https://bugzil.la/1309467">Firefox bug 1309467</a>) as well as the
<code>circle()</code> (<a href="https://bugzil.la/1311244">Firefox bug 1311244</a>),
<code>ellipse()</code> (<a href="https://bugzil.la/1326406">Firefox bug 1326406</a>), and
<code>polygon()</code> (<a href="https://bugzil.la/1326409">Firefox bug 1326409</a>) functions.
</p>
</td>
<td>关闭<br /><sub>(available since 53)</sub></td>
Expand Down Expand Up @@ -184,8 +184,8 @@ Mozilla 发布了测试的 nightly 版本,用于测试新的浏览器特性。
to specify how many columns an element spans across.
</p>
<p>
Firefox currently only parses the property ({{bug(1339298)}}),
it's not actually implemented yet ({{bug(616436)}}).
Firefox currently only parses the property (<a href="https://bugzil.la/1339298">Firefox bug 1339298</a>),
it's not actually implemented yet (<a href="https://bugzil.la/616436">Firefox bug 616436</a>).
</p>
</td>
<td>
Expand Down Expand Up @@ -331,7 +331,7 @@ See also [ECMAScript Next support](/zh-CN/docs/Web/JavaScript/New_in_JavaScript/
<tr>
<td>
<strong><code>GeometryUtils.getBoxQuads()</code></strong>
({{bug(917755)}})
(<a href="https://bugzil.la/917755">Firefox bug 917755</a>)
</td>
<td>31</td>
<td>31</td>
Expand All @@ -353,7 +353,7 @@ See also [ECMAScript Next support](/zh-CN/docs/Web/JavaScript/New_in_JavaScript/
>,<br /><strong><code>GeometryUtils.RectFromNode()</code></strong
>, and<br /><code
><strong>GeometryUtils.convertQuadFromNode()</strong></code
><br />({{bug(918189)}})
><br />(<a href="https://bugzil.la/918189">Firefox bug 918189</a>)
</td>
<td>31</td>
<td>31</td>
Expand Down Expand Up @@ -516,7 +516,7 @@ See also [ECMAScript Next support](/zh-CN/docs/Web/JavaScript/New_in_JavaScript/
constructors can be used to clone existing
{{domxref("KeyframeEffectReadOnly")}} object instances by
being given the object to clone as their only parameter (see
{{bug(1273784)}}.)
<a href="https://bugzil.la/1273784">Firefox bug 1273784</a>.)
</td>
<td>52</td>
<td>52</td>
Expand Down
6 changes: 3 additions & 3 deletions files/zh-cn/mozilla/firefox/releases/14/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Firefox 14 shipped on July 17, 2012. This article lists key changes that are use
- {{ domxref("DOMException", "DOMException.code") }}已被废弃,根据最新的 DOM Level 4 规范。
- {{ domxref("Range.insertNode()") }} method now works correctly when used on collapsed ranges.
- The {{ domxref("BlobBuilder", "MozBlobBuilder") }} interface has been deprecated in favor of the constructor on {{ domxref("Blob") }}. If you use `MozBlobBuilder` you'll see a warning message in the Web Console.
- The {{domxref("Blob.Blob", "Blob()")}} constructor is now available to workers ({{bug(736686)}}).
- The {{domxref("Blob.Blob", "Blob()")}} constructor is now available to workers ([Firefox bug 736686](https://bugzil.la/736686)).
- Support for the [Mutation Observers](/zh-CN/DOM/DOM_Mutation_Observers) has been landed. It is designed as a replacement for the Mutation Events in DOM3, which has a number of issues regarding performance.
- The {{ domxref("HTMLImageElement") }} interface's `x` and `y` properties were removed in Gecko 7.0 but restored in this release for compatibility reasons.
- {{ domxref("Document") }}上的方法`execCommandShowHelp()`和`queryCommandText()`,没有任何作用,已被删除。
- The `GeoPositionAddress` interface, an obsolete part of the [Geolocation](/zh-CN/Using_geolocation) API, has been removed.
- {{ domxref("Storage", "localStorage/sessionStorage") }} now correctly return `undefined` instead of `null` for undeclared keys through property access.
- The {{domxref("ImageData")}} object has been implemented ({{bug(550309)}}).
- Attributes and methods related to child nodes on {{domxref("Attr")}} interface where obsoleted ({{bug(737122)}}).
- The {{domxref("ImageData")}} object has been implemented ([Firefox bug 550309](https://bugzil.la/550309)).
- Attributes and methods related to child nodes on {{domxref("Attr")}} interface where obsoleted ([Firefox bug 737122](https://bugzil.la/737122)).

### CSS

Expand Down
8 changes: 4 additions & 4 deletions files/zh-cn/mozilla/firefox/releases/16/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Firefox 16 shipped on October 9, 2012. This article lists key changes that are u
- Support for reverse animation direction (keywords `reverse` and `alternate-reverse` on the {{cssxref("animation-direction")}} property) has been added. ([bug 655920](https://bugzilla.mozilla.org/show_bug.cgi?id=655920)).
- You can now animate the CSS {{cssxref("height")}} and {{cssxref("width")}} properties.
- The {{cssxref("animation-duration")}} and {{cssxref("transition-duration")}} CSS properties now reject negative values (and do not handle them as `0s` anymore) ([bug 773102](https://bugzilla.mozilla.org/show_bug.cgi?id=773102)).
- Support for the standard, unprefixed version of [CSS Transforms](/zh-CN/docs/CSS/Using_CSS_transforms) has been landed ([bug 745523](https://bugzilla.mozilla.org/show_bug.cgi?id=745523)). {{cssxref("&lt;length&gt;")}} cannot be used for translation values in `matrix()` and `matrix3d()` anymore ({{bug(719054)}}).
- Support for the standard, unprefixed version of [CSS Transforms](/zh-CN/docs/CSS/Using_CSS_transforms) has been landed ([bug 745523](https://bugzilla.mozilla.org/show_bug.cgi?id=745523)). {{cssxref("&lt;length&gt;")}} cannot be used for translation values in `matrix()` and `matrix3d()` anymore ([Firefox bug 719054](https://bugzil.la/719054)).
- Support for the standard, unprefixed version of [CSS Gradients](/zh-CN/docs/CSS/Using_CSS_gradients) has been landed. Note that the syntax has changed significantly since the prefixed version, so you should read up on this ([bug 752187](https://bugzilla.mozilla.org/show_bug.cgi?id=752187)).
- The {{cssxref("box-sizing", "-moz-box-sizing")}} implementation has been updated to apply to table cells too ([bug 338554](https://bugzilla.mozilla.org/show_bug.cgi?id=338554)).
- Support for the standard, unprefixed version of {{cssxref("calc")}} has been landed ([bug 771678](https://bugzilla.mozilla.org/show_bug.cgi?id=771678)).
Expand All @@ -43,14 +43,14 @@ Firefox 16 shipped on October 9, 2012. This article lists key changes that are u
- The [`java`](/zh-CN/docs/LiveConnect_Reference/java) and [`Packages`](/zh-CN/docs/LiveConnect_Reference/Packages) global objects have been removed. See [LiveConnect](/zh-CN/docs/LiveConnect).
- The `CSSRule.type` associated with {{domxref("CSSNamespaceRule")}} has been updated from `UNKNOWN_RULE` (`0`) to `NAMESPACE_RULE` (`10`) ([bug 765590](https://bugzilla.mozilla.org/show_bug.cgi?id=765590)).
- WebSMS API: {{domxref("SmsRequest")}} has been superseded by the more general {{domxref("DOMRequest")}}.
- The non-standard {{domxref("Element.scrollTopMax")}} and {{domxref("Element.scrollLeftMax")}} read-only properties have been added ({{bug(766937)}}).
- The second parameter of {{domxref("Blob.blob", "Blob()")}}, when set to `null` or `undefined`, is now being handled as an empty dictionary ({{bug(7691119)}}).
- The non-standard {{domxref("Element.scrollTopMax")}} and {{domxref("Element.scrollLeftMax")}} read-only properties have been added ([Firefox bug 766937](https://bugzil.la/766937)).
- The second parameter of {{domxref("Blob.blob", "Blob()")}}, when set to `null` or `undefined`, is now being handled as an empty dictionary ([Firefox bug 7691119](https://bugzil.la/7691119)).

### JavaScript

- [`Number`](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Number) objects now offer `isFinite()`, `toInteger()`, and `isInteger()` methods. ([bug 761480](https://bugzilla.mozilla.org/show_bug.cgi?id=761480), [bug 761495](https://bugzilla.mozilla.org/show_bug.cgi?id=761495))
- The Harmony [spread operator](http://wiki.ecmascript.org/doku.php?id=harmony:spread) is now supported in [`Array`](/zh-CN/docs/JavaScript/Reference/Global_Objects/Array) initializers ([bug 574130](https://bugzilla.mozilla.org/show_bug.cgi?id=574130)). Note it is not yet supported in calls ([bug 762363](https://bugzilla.mozilla.org/show_bug.cgi?id=762363)).
- The experimental {{jsxref("TypedArray.prototype.move()")}} method has been added (available in Aurora and Nightly channels only) ({{bug(730873)}}).
- The experimental {{jsxref("TypedArray.prototype.move()")}} method has been added (available in Aurora and Nightly channels only) ([Firefox bug 730873](https://bugzil.la/730873)).

### WebGL

Expand Down
24 changes: 12 additions & 12 deletions files/zh-cn/mozilla/firefox/releases/22/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ slug: Mozilla/Firefox/Releases/22

### HTML

- 实现了 HTML5 中的{{HTMLElement("data")}}元素 ({{bug(839371)}}).
- The HTML5 {{HTMLElement("time")}} element has been implemented ({{bug(629801)}}).
- The `range` state of the {{HTMLElement("input")}} element (`<input type="range">`) has been implemented, behind the preference `dom.experimental_forms_range`, only enabled by default on Nightly and Aurora channel ({{bug(841948)}}).
- The support for the {{HTMLElement("template")}} element, part of the Web component specification has been implemented ({{bug(818976)}}).
- 实现了 HTML5 中的{{HTMLElement("data")}}元素 ([Firefox bug 839371](https://bugzil.la/839371)).
- The HTML5 {{HTMLElement("time")}} element has been implemented ([Firefox bug 629801](https://bugzil.la/629801)).
- The `range` state of the {{HTMLElement("input")}} element (`<input type="range">`) has been implemented, behind the preference `dom.experimental_forms_range`, only enabled by default on Nightly and Aurora channel ([Firefox bug 841948](https://bugzil.la/841948)).
- The support for the {{HTMLElement("template")}} element, part of the Web component specification has been implemented ([Firefox bug 818976](https://bugzil.la/818976)).

### JavaScript

- [Asm.js](http://asmjs.org/spec/latest/) optimizations are enabled, making it possible to compile C/C++ applications to a subset of JavaScript for better performance.
- 实现了 ES6 中的[箭头函数](/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_functions)({{bug(846406)}}).
- The new [Object.is](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/is) function has been added ({{bug(839979)}}).
- [`arguments`](/zh-CN/docs/Web/JavaScript/Reference/Functions/arguments) in generator expressions is now inherited from enclosing lexical scope ({{bug(848051)}}).
- The ES2015 Proxy {{jsxref("Global_Objects/Proxy/handler/preventExtensions", "preventExtensions")}} trap have been implemented ({{bug(789897)}}).
- 实现了 ES6 中的[箭头函数](/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_functions)([Firefox bug 846406](https://bugzil.la/846406)).
- The new [Object.is](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/is) function has been added ([Firefox bug 839979](https://bugzil.la/839979)).
- [`arguments`](/zh-CN/docs/Web/JavaScript/Reference/Functions/arguments) in generator expressions is now inherited from enclosing lexical scope ([Firefox bug 848051](https://bugzil.la/848051)).
- The ES2015 Proxy {{jsxref("Global_Objects/Proxy/handler/preventExtensions", "preventExtensions")}} trap have been implemented ([Firefox bug 789897](https://bugzil.la/789897)).

### DOM

- 不再支持 `XMLHttpRequest` 中的 `multipart` 属性和 `multipart/x-mixed-replace` 响应。这是一个 Gecko 独有的特性,从来没被标准化过。你可以使用[Server-Sent Events](/zh-CN/docs/Server-sent_events), [Web Sockets](/zh-CN/docs/WebSockets)或者在 progress 事件中查看 `responseText` 属性的变化来实现同样的效果。
- 实现了[Web Notifications](http://notifications.spec.whatwg.org/) ({{bug(782211)}}).
- {{domxref("XMLHttpRequest/FormData", "FormData")}}对象的`append`方法现在开始接受第三个参数`filename`({{bug(690659)}}).
- 移除了{{domxref("Node.isSupported")}}方法 ({{bug(801562)}}).
- {{domxref("Node.setUserData")}} and {{domxref("Node.getUserData")}} has been removed for web content and are deprecated for chrome content ({{bug(842372)}}).
- 实现了[Web Notifications](http://notifications.spec.whatwg.org/) ([Firefox bug 782211](https://bugzil.la/782211)).
- {{domxref("XMLHttpRequest/FormData", "FormData")}}对象的`append`方法现在开始接受第三个参数`filename`([Firefox bug 690659](https://bugzil.la/690659)).
- 移除了{{domxref("Node.isSupported")}}方法 ([Firefox bug 801562](https://bugzil.la/801562)).
- {{domxref("Node.setUserData")}} and {{domxref("Node.getUserData")}} has been removed for web content and are deprecated for chrome content ([Firefox bug 842372](https://bugzil.la/842372)).
- The {{domxref("Element.attributes")}} property has been moved there from {{domxref("Node")}} as required by the spec ({{bug("844134")}}).
- 实现了 Mac OS X 中的{{domxref("DeviceLightEvent", "Ambient Light Events")}}后端。
- Elements in the HTML namespace with local names {{HTMLElement("bgsound")}}, {{HTMLElement("multicol")}}, and {{HTMLElement("image")}} no longer implement the {{domxref("HTMLSpanElement")}} interface. {{HTMLElement("bgsound")}} and {{HTMLElement("bgsound")}} implement {{domxref("HTMLUnknownElement")}} and {{HTMLElement("image")}} implements {{domxref("HTMLElement")}}.
Expand Down
2 changes: 1 addition & 1 deletion files/zh-cn/mozilla/firefox/releases/24/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ slug: Mozilla/Firefox/Releases/24

### JavaScript

- [箭头函数](/zh-CN/docs/Web/JavaScript/Reference/arrow_functions)不再默认处于严格模式,除非显示使用 `"use strict"`. ({{bug(852762)}})
- [箭头函数](/zh-CN/docs/Web/JavaScript/Reference/arrow_functions)不再默认处于严格模式,除非显示使用 `"use strict"`. ([Firefox bug 852762](https://bugzil.la/852762))
yin1999 marked this conversation as resolved.
Show resolved Hide resolved

### DOM

Expand Down
Loading