Skip to content

fix(ru): clean up jsxref macro args#36167

Open
caugner wants to merge 27 commits into
mainfrom
fix-jsxref-ru
Open

fix(ru): clean up jsxref macro args#36167
caugner wants to merge 27 commits into
mainfrom
fix-jsxref-ru

Conversation

@caugner
Copy link
Copy Markdown
Contributor

@caugner caugner commented May 21, 2026

Description

Clean up stale jsxref macro arguments in Russian content so they resolve against the en-US JS Reference index. Changes are scoped to the first argument of jsxref() invocations; display text is preserved everywhere it was already explicit, and inserted as the original arg when missing so the rendered label keeps reflecting what the author originally wrote.

26 commits, applied in order:

# Commit Files Args Description
1 5e8b0e1 18 39 Rewrite @@<name> to Symbol.<name>.
2 ff2e620 19 29 Strip trailing .prototype from class refs.
3 889eebb 5 5 Rewrite Proxy.handler[.X] (dot form) to Proxy/Proxy[/X].
4 bf370dd 10 46 Rewrite stale Operators aggregate-page slugs.
5 b0e8392 4 16 Rewrite Operators/Assignment_Operators with anchor.
6 7eefa3e 3 8 Operator expression-forms deprecated/non-standard.
7 d9b0e97 8 13 Additional Functions/<leaf> localized slugs.
8 886ac3b 12 32 Rewrite Global_Objects/<IntlClass>[/X] to Intl/<IntlClass>[/X].
9 c9f9480 1 16 Rewrite full-path Global_Objects/Proxy/handler[/X].
10 7ed8918 71 99 Rewrite stale slugs that en-US redirects resolve cleanly.
11 e97f14d 169 544 Strip redundant Global_Objects/ prefix when safe.
12 06996a3 25 67 Merge ("foo", "foo()") into ("foo()").
13 27a1b91 13 27 Rewrite bare/dotted <IntlClass> refs. Display preservation.
14 2b3b61e 11 64 Convert WebAssembly jsxref refs to markdown links.
15 609d5d1 5 13 Translate Russian leaf slugs.
16 a671c37 2 8 Normalize lowercase Global_objects/ and Functions_and_function_scope/.
17 a235a96 6 7 One-off cleanups round 1.
18 95b8ed3 6 7 One-off cleanups round 2.
19 38c3ed4 4 6 Bare pre-namespace slugs.
20 47da337 17 27 Case-correct slugs surfaced by the index-aware rari. Display preservation.
21 4fedf4f 1 1 Round 2 of case-fix covering dotted variants.
22 c48d052 2 3 Round 3 of case-fix covering paren'd and .prototype. segment variants.
23 9f05d73 11 25 Drop display arg when arg1/arg2 differ only in case.
24 09ee50f 1 16 Rewrite Proxy.Proxy[.X] (dotted) → Proxy/Proxy[/X] (slash).
25 6087d6c 68 116 Collapse ("Operators/<kw>", "<kw>")("<kw>") for the 5 operator-keyword shortforms (null, this, delete, new, instanceof), per the convention introduced in mdn/content#44221.
26 e96c8ef 1 5 Add the per-locale Reference/<kw>Reference/Operators/<kw> redirects that back the shorthand calls under the deployed rari.

Motivation

These arguments produced broken or redirected links (templ-broken-link/templ-redirected-link/templ-ill-cased-arg) in the upcoming Rari-based build. The new index-based jsxref resolver is being introduced in mdn/rari#715; this PR ensures the Russian content resolves cleanly against both the deployed rari and the index-aware version.

Additional details

  • 275 files changed; 925 lines modified (net diff vs main).
  • 26 commits, applied as multiple passes. Verified clean against rari@jsxref-with-index — only intentional-broken residuals remain (Number.toInteger(), Object.observe(), ParallelArray, Reflect.enumerate(), Statements/for_each...in, StopIteration, Array.observe()/unobserve(), Date.toLocaleFormat, Function.arity, IteratorResult, Object.{Parent,count,eval,getNotifier,unobserve,unwatch,watch}, Proxy.Proxy.enumerate, SIMD, String.prototype.quote, WeakSet.prototype.clear()).
  • Under rari@main (deployed), the operator-shorthand calls produce templ-redirected-link warnings because the rendered href bounces through the new per-locale redirects to the canonical Operators/<kw> URL. These warnings disappear once fix(jsxref): build Web/JavaScript index to resolve names rari#715 ships — same temporary state Use jsxref shortform for null, this, delete, new, instanceof content#44221 introduced for en-US.

Related issues and pull requests

Related to mdn/rari#715 and mdn/content#44221.

caugner added 3 commits May 21, 2026 18:39
The `@@iterator` / `@@species` / etc. notation is the old MDN
convention for well-known symbol properties. Canonical pages now
live under `Symbol.<name>` (e.g. `Symbol.iterator`). Update the
macro args to match and insert a `/` so the normalization step
(`.` -> `/`) doesn't split the `Symbol.` qualifier.
`{{jsxref("Object.prototype")}}` and similar refs were producing
broken links because no `Object/prototype` page exists; the class
page (`Object`, `Array`, etc.) documents `.prototype` directly.
Rewrite to link to the class page.
The handler-trap pages live under `Global_Objects/Proxy/Proxy/<trap>`;
the old `Proxy.handler` namespace was retired. Update the macro
args to point at the canonical paths.
@github-actions github-actions Bot added the l10n-ru Issues related to Russian content. label May 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

Preview URLs (274 pages)
Flaws (202)

Note! 206 documents with no flaws that don't need to be listed. 🎉

Found an unexpected or unresolvable flaw? Please report it here.

URL: /ru/docs/Learn_web_development/Core/Scripting/Arrays
Title: Массивы
Flaw count: 2

  • macros:
    • Macro previousmenunext produces link /ru/docs/Learn/JavaScript/Первые_шаги/Создатель_глупых_историй which doesn't resolve
  • unknown:
    • page(Doc) not found /ru/docs/Learn/JavaScript/Первые_шаги/Создатель_глупых_историй

URL: /ru/docs/Mozilla/Firefox/Releases/29
Title: Firefox 29 для разработчика
Flaw count: 11

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/IteratorResult which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/URLUtils which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/URLUtils/searchParams which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/Worker/onLine which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/HTMLShadowElement which doesn't resolve
    • and 6 more flaws omitted

URL: /ru/docs/Mozilla/Firefox/Releases/53
Title: Firefox 53 для разработчиков
Flaw count: 21

  • macros:
    • Macro domxref produces link /ru/docs/Web/API/GlobalEventHandlers/onauxclick which is a redirect
    • Macro domxref produces link /ru/docs/Web/API/HTMLHyperLinkElementUtils/pathname which is a redirect
    • Macro domxref produces link /ru/docs/Web/API/HTMLHyperLinkElementUtils/search which is a redirect
    • Macro domxref produces link /ru/docs/Web/API/HTMLHyperLinkElementUtils which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/USVString which is a redirect
    • and 16 more flaws omitted

URL: /ru/docs/Mozilla/Firefox/Releases/62
Title: Firefox 62 для разработчиков
Flaw count: 6

  • macros:
    • Macro domxref produces link /ru/docs/Web/API/DOMPointInit which is a redirect
    • Macro domxref produces link /ru/docs/Web/API/Navigator/registerContentHandler which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/UserProximityEvent which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/DeviceProximityEvent which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/DeviceLightEvent which doesn't resolve
    • and 1 more flaws omitted

URL: /ru/docs/Mozilla/Firefox/Releases/64
Title: Firefox 64 для разработчиков
Flaw count: 6

  • macros:
    • Macro cssxref produces link /ru/docs/Web/CSS/::-moz-tree which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/fullscreenchange which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/fullscreenerror which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/RTCRtpEncodingParameters which is a redirect
    • Macro domxref produces link /ru/docs/Web/API/RTCIceCandidateStats/mozLocalTransport which is a redirect
    • and 1 more flaws omitted

URL: /ru/docs/Mozilla/Firefox/Releases/65
Title: Firefox 65 для разработчиков
Flaw count: 5

  • macros:
    • Macro domxref produces link /ru/docs/Web/API/SharedWorkerGlobalScope/onconnect which is a redirect
    • Macro domxref produces link /ru/docs/Web/API/ServiceWorkerGlobalScope/onmessageerror which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/ServiceWorkerContainer/onmessageerror which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/MediaRecorder/onpause which is a redirect
    • Macro domxref produces link /ru/docs/Web/API/MediaRecorder/onresume which is a redirect

URL: /ru/docs/Web/API/Document/cookie
Title: Document.cookie
Flaw count: 2

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/this which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect

URL: /ru/docs/Web/API/Screen_Capture_API/Using_Screen_Capture
Title: Использование интерфейса Screen Capture API
Flaw count: 5

  • macros:
    • Macro domxref produces link /ru/docs/Web/API/DisplayMediaStreamConstraints which is a redirect
    • Macro domxref produces link /ru/docs/Web/API/MediaTrackConstraints/cursor which is a redirect
    • Macro domxref produces link /ru/docs/Web/API/MediaStreamConstraints which is a redirect
    • Macro domxref produces link /ru/docs/Web/API/MediaTrackConstraints/cursor which is a redirect
    • Macro httpheader produces link /ru/docs/Web/HTTP/Reference/Headers/Feature-Policy which doesn't resolve

URL: /ru/docs/Web/API/Sensor_APIs
Title: Sensor APIs
Flaw count: 2

  • macros:
    • Macro httpheader produces link /ru/docs/Web/HTTP/Reference/Headers/Feature-Policy which doesn't resolve
    • Macro httpheader produces link /ru/docs/Web/HTTP/Reference/Headers/Feature-Policy which doesn't resolve

URL: /ru/docs/Web/API/ServiceWorkerRegistration/update
Title: ServiceWorkerRegistration.update()
Flaw count: 1

  • macros:
    • Macro domxref produces link /ru/docs/Web/API/Промис which doesn't resolve

URL: /ru/docs/Web/API/Web_Workers_API/Using_web_workers
Title: Использование Web Workers
Flaw count: 8

  • broken_links:
    • Link /en-US/js-ctypes doesn't resolve
  • macros:
    • Macro domxref produces link /ru/docs/Web/API/Worker/onmessage which is a redirect
    • Macro domxref produces link /ru/docs/Web/API/Transferable which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/ArrayBuffer which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/ArrayBuffer which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/ChromeWorker which doesn't resolve
    • and 2 more flaws omitted

URL: /ru/docs/Web/API/Window/deviceorientation_event
Title: deviceorientation
Flaw count: 2

  • macros:
    • Macro domxref produces link /ru/docs/Web/API/DOMString which doesn't resolve
    • Macro domxref produces link /ru/docs/Web/API/window/ondeviceorientation which is a redirect

URL: /ru/docs/Web/JavaScript
Title: JavaScript
Flaw count: 3

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/instanceof which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/new which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/this which is a redirect

URL: /ru/docs/Web/JavaScript/Guide/Data_structures
Title: Типы и структуры данных JavaScript
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect

URL: /ru/docs/Web/JavaScript/Guide/Expressions_and_operators
Title: Выражения и операторы
Flaw count: 3

  • broken_links:
    • Link /ru/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#&lt;&lt;_(Left_shift) is a redirect
    • Link /ru/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#&gt;&gt;_(Sign-propagating_right_shift) is a redirect
    • Link /ru/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#&gt;&gt;&gt;_(Zero-fill_right_shift) is a redirect

URL: /ru/docs/Web/JavaScript/Guide/Meta_programming
Title: Мета-программирование
Flaw count: 3

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/instanceof which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/Proxy%2FProxy%2Fenumerate which doesn't resolve
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/Reflect.enumerate() which doesn't resolve

URL: /ru/docs/Web/JavaScript/Reference
Title: Справочник по JavaScript
Flaw count: 4

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/this which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/new which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/delete which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/instanceof which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Classes/extends
Title: extends
Flaw count: 2

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features
Title: Deprecated and obsolete features
Flaw count: 17

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/StopIteration which doesn't resolve
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/Object.watch which doesn't resolve
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/Object.unwatch which doesn't resolve
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/Date.toLocaleFormat which doesn't resolve
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/String.prototype.quote which doesn't resolve
    • and 12 more flaws omitted

URL: /ru/docs/Web/JavaScript/Reference/Errors/No_non-null_object
Title: TypeError: "x" is not a non-null object(Тип ошибки: "x" не является ненулевым объектом)
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Functions/get
Title: getter
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/delete which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Functions/set
Title: setter
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/delete which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects
Title: Стандартные встроенные объекты
Flaw count: 4

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/this which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/ParallelArray which doesn't resolve
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/StopIteration which doesn't resolve

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach
Title: Array.prototype.forEach()
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/this which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Array/slice
Title: Array.prototype.slice()
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Boolean
Title: Boolean
Flaw count: 2

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Date
Title: Дата
Flaw count: 2

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/new which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/new which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Error
Title: Error
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/instanceof which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Float32Array
Title: Float32Array
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/new which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Float64Array
Title: Float64Array
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/new which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Function/apply
Title: Function.prototype.apply()
Flaw count: 2

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
Title: Function.prototype.bind()
Flaw count: 6

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/new which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/new which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/new which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/new which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/new which is a redirect
    • and 1 more flaws omitted

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Function/call
Title: Function.prototype.call()
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Function/caller
Title: Function.caller
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Int8Array
Title: Int8Array
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/new which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Int32Array
Title: Int32Array
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/new which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Object
Title: Object
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/Object.observe() which doesn't resolve

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Object/create
Title: Object.create()
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty
Title: Object.defineProperty()
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Object/is
Title: Object.is()
Flaw count: 1

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/null which is a redirect

URL: /ru/docs/Web/JavaScript/Reference/Global_Objects/Object/isPrototypeOf
Title: Object.prototype.isPrototypeOf()
Flaw count: 3

  • macros:
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/instanceof which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/instanceof which is a redirect
    • Macro jsxref produces link /ru/docs/Web/JavaScript/Reference/instanceof which is a redirect

URL: [`/ru/docs/Web/JavaScript/Reference/Global_Objects/Object/prot…

TRUNCATED!

(comment last updated: 2026-05-22 21:19:33)

caugner added 23 commits May 21, 2026 19:02
The old `Operators/<Group>_Operators` slugs (Arithmetic, Bitwise,
Comparison, Logical) and related obsolete leaves
(`Destructuring_assignment`, `Legacy_generator_function`,
`Logical_nullish_assignment`, `Nullish_coalescing_operator`,
`Spread_operator`) redirect under the en-US slug graph but never
reach the canonical pages cleanly. Rewrite the first arg to the
current canonical sub-path.
The old slug redirects to `Operators#Assignment_operators`. Rewrite
the macro to use the canonical `Operators` page; existing anchors
on the call site are preserved (most calls already pointed at a
specific assignment-operator section).
`Operators/Array_comprehensions`, `Operators/Generator_comprehensions`,
`Operators/Expression_closures`, and `Statements/Legacy_generator_function`
were removed from JavaScript. Rewrite the macro args to point at
`Deprecated_and_obsolete_features`.
Cover the bare and member forms of the legacy `Functions_and_function_scope`
namespace (canonical: `Functions`).
Intl member classes (`Collator`, `DateTimeFormat`, `NumberFormat`,
`PluralRules`, etc.) live under `Global_Objects/Intl/`; the top-level
`Global_Objects/<Class>` slug is only a redirect. Rewrite the macro
args (including member sub-paths) to the canonical Intl path so the
`jsxref` index resolves directly.
The Proxy constructor page was renamed; the handler-trap namespace
now lives under `Global_Objects/Proxy/Proxy/<trap>`.
Rewrite arg1 for slugs that en-US redirects resolve cleanly so the
macro doesn't hop: bare `null`/`eval[()]`, `Global_Objects/null`,
`Operators/get`/`set`, `Global_Objects/<X>/toSource`,
`<X>.prototype.toSource[()]`, `Global_Objects/TypedArray/name`,
`TypedArray.name`, `Global_Objects/Array/flatten`,
`Global_Objects/Date/toGMTString`, `Global_Objects/String/trim{Left,Right}`,
`Global_Objects/uneval` (and bare `uneval[()]`), `Object.toSource[()]`,
`Atomics.wake[()]` → `Atomics.notify[()]`,
`Functions_and_function_scope/{Strict_mode,arguments/length}` → canonical,
`<Class>.Symbol.species` → `<Class>/Symbol.species`.
Strip the `Global_Objects/` prefix when safe — display arg2 is dropped
only when it's the last positional arg and equals the post-strip
default. Skips dotted-leaf suffixes and bare `eval`.
The macro strips `()` for URL resolution but keeps it in the default
display, so arg2 is redundant when it only adds parens to arg1. Only
drops arg2 when it's the last positional arg.
`{{jsxref("NumberFormat")}}` and friends resolve via redirect because
the canonical page lives under `Global_Objects/Intl/<Class>`. Rewrite
the bare and dotted forms to the canonical `Intl/<Class>` path. When
no explicit display arg is set, insert the original arg as the
display text so the rendered label keeps reflecting what the author
originally wrote.
WebAssembly was moved out of `Web/JavaScript/Reference/Global_Objects/`
and now lives at `/WebAssembly/Reference/JavaScript_interface/`. The
`jsxref` macro is scoped to JS Reference, so `WebAssembly.<X>` refs
all surface as `templ-redirected-link`. Convert them to plain markdown
links pointing at the canonical WebAssembly path.

Display preservation: keep an explicit display arg when set; otherwise
use the dotted `WebAssembly.<X>` form (with parens preserved when arg1
had them) so the rendered label is unchanged.
Cover residual Russian-translated leaves that weren't reached by the
en-US namespace-prefix sweep:

- `бесконечность` (RU: "infinity") → `Infinity`.
- `Атомарные` (RU: "atomic") → `Atomics`.
- `Промисы`/`промис` (RU: "promises"/"promise") → `Promise`.
- `операторы/Destructuring_assignment` (RU prefix + en-US leaf) →
  `Operators/Destructuring`.
- `операторы/функции` (RU prefix + RU leaf) → `Operators/function`.
- `функции/Default_parameters`/`rest_parameters` → `Functions/<canonical>`.
- `Ведомости/функция` (RU "Statements/function") → `Statements/function`.

Display preservation: when the macro had no explicit display arg, the
original Russian term is inserted as the display so the rendered label
keeps reflecting the translator's wording.
…n_scope/` and convert WebAssembly refs

`files/ru/webassembly/index.md` had `jsxref("Global_objects/…")`
(lowercase `o`) args that were missed by the earlier round-1
localized-namespace sweep. Normalize them to canonical
`Global_Objects/` and then convert the WebAssembly subset to plain
markdown links pointing at `/ru/docs/WebAssembly/Reference/JavaScript_interface/<X>`.

Also normalize `Functions_and_function_scope/arguments/caller` (legacy
slug) to `Functions/arguments/caller`.
Mechanical edits not covered by the bulk sweeps:

- Strip stray spaces around `()` (`Array.prototype.push ()`,
  `Array.prototype.pop ()`, `ArrayBuffer.slice ()`); plus the
  matching display-string spaces in the same calls.
- `Memory.prototype.grow()` → plain markdown link (WebAssembly).
- `DOMException` → `domxref` (DOM type, not JS).
- `Array.prototype[@@unscopables]` (bracket syntax not normalized by
  the at-symbol sweep) → `Array/Symbol.unscopables` with the original
  bracket form as display.
- Mirror fr decision: `Functions/arguments/caller` →
  `Function.prototype.caller`.
Continued cleanup:

- Strip stray spaces before `()` (`Math.floor ()`, `Math.round ()`,
  `Object.defineProperty ()`, `String.prototype.split ()`).
- Strip literal `%2E` URL-encoding in arg1 (`Operators/new%2Etarget`,
  `Operators/import%2Emeta`) so the macro produces the dotted slug.
- `Strict_mode/Transitioning_to_strict_mode` → `Strict_mode` (the
  sub-page was merged into the parent).
- `Selection.toString()` → `domxref` (Selection is a DOM API).
Bare `arguments`/`arguments.callee`/`await`/`template_strings`/`promise`
slugs were pre-namespace forms that the macro can't resolve under the
deployed rari. Add them to `SIMPLE_RENAMES_REDIRECTS` so they rewrite
to `Functions/arguments[/callee]`, `Operators/await`,
`Template_literals`, and `Promise` respectively.
Lowercase JS class names (`string`/`boolean`/`number`/`object`/
`promise`/`array`/`symbol`) → canonical capitalized form;
`Operators/Conditional_Operator`/`Comma_Operator`/`Function`/
`Operator_Precedence`/`Property_Accessors` → lowercase suffix;
method-name typos (`Date/valueof` → `valueOf`, `Map/foreach` →
`forEach`, `object/defineProperty`/`defineProperties` → `Object/`);
lowercase namespace slugs (`statements/`/`operators/`/`functions/`/
`classes`) → canonical capitalized; `Classes/Constructor` → lowercase
`constructor`; `Regexp/` → `RegExp/`; `Intl/DatetimeFormat` →
`DateTimeFormat`; `Statements/empty` → `Empty`;
`Global_objects/` → `Global_Objects/`; `template_literals` →
`Template_literals`; `Errors/Strict_Non_Simple_Params` casing.

Also resolve the bare `function` ambiguous arg (matches both
`Operators/function` and `Statements/function`) by picking the
expression form — all observed call sites are callback parameters in
WebAPI pages.

Display preservation keeps the original (mis-cased) form rendered so
the link text is unchanged.
Round 2 of the case-fix sweep covering the dotted variants the round-1
mapping missed: `Date.valueof` → `Date.valueOf`, `Map.foreach` →
`Map.forEach`, `Regexp.<member>` → `RegExp.<member>` (for
`global`/`ignoreCase`/`multiline`/`sticky`), `object.defineProperty`/
`defineProperties` → `Object.`, and `Operators/conditional_operator`
(uppercase Operators, lowercase Conditional) → `Operators/Conditional_operator`.
Round 3 of the case-fix sweep covering dotted forms with parens and/or
`.prototype.` segments that the round-1/2 mappings missed:
`object.defineProperty()`/`defineProperties()` → `Object.<X>()`, and
`Date.prototype.valueof` → `Date.prototype.valueOf`.
… case

Over-zealous display preservation inserted by the case-fix sweep:
`{{jsxref("Object", "object")}}` was meant to keep "object" rendered,
but for JS type references the canonical (capitalized) class name
should also be the rendered text. Drop the redundant arg2 when it
matches arg1 case-insensitively — covers `Object`/`String`/`Number`/
`Array`/`Boolean`/`Promise`/`Symbol`/`undefined` and any other
mis-cased pair caught by the index-aware rari.

Only drops arg2 when it's the last positional arg (same safety policy
as `merge-parens-display`).
…sh) in `jsxref`

The dotted form implies `Proxy.Proxy.X` is a valid JS member access,
but `Proxy.Proxy.<trap>` is not a real namespace — `Proxy/Proxy/<trap>`
is just MDN's URL convention for the constructor + handler-trap
sub-pages. Switch to the slash form everywhere so the rendered default
display doesn't suggest a namespaced `Proxy.Proxy.X` access pattern.

Display args are preserved as-is where set.
…ator shorthands

Use the bare-keyword shortform for the 5 operator keywords `null`,
`this`, `delete`, `new`, `instanceof` per the convention introduced
in mdn/content#44221. The shortform resolves cleanly on current rari
thanks to the `Reference/<kw>` -> `Reference/Operators/<kw>`
redirects that PR added, and resolves natively under the index-aware
rari from mdn/rari#715.

Only collapses the redundant-display pattern (`("Operators/X", "X")`);
longforms with custom display text (`"delete x"`, `"deleted"`,
`"x instanceof y"`) are preserved.
Mirrors the en-US redirects added in mdn/content#44221 for the 5
operator-keyword shorthands (`null`, `this`, `delete`, `new`,
`instanceof`). Without these per-locale redirects, the bare-keyword
`{{jsxref("null")}}` shortform produces a 404 under the deployed
rari; with them, it falls back via redirect to the canonical
`Reference/Operators/<kw>` page. The index-aware rari from
mdn/rari#715 resolves the shortform directly without needing the
redirect.
@caugner caugner changed the title fix(ru): clean up stale jsxref macro args fix(ru): clean up jsxref macro args May 22, 2026
@caugner caugner marked this pull request as ready for review May 22, 2026 21:16
@caugner caugner requested a review from a team as a code owner May 22, 2026 21:16
@caugner caugner requested review from leon-win and removed request for a team May 22, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

l10n-ru Issues related to Russian content.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant