yari icon indicating copy to clipboard operation
yari copied to clipboard

fix(macro): reference to same page in some cases

Open yin1999 opened this issue 2 years ago • 0 comments

When referenced l10n page does not exist but actually in en-US, the URL may lead to a different one than the one in en-US.

Summary

Fixes: #6671.

Problem

see the above issue.

Solution

get page in content repo only, so the same macro call will lead to the same document (may or may not be localized).

Screenshots

check out mdn/translated-content#6707. go to URL: http://localhost:5042/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Error

Before

image

After

image

How did you test this change?

check out mdn/translated-content#6707 and then run dev server.

test in browser.

yin1999 avatar Jul 06 '22 09:07 yin1999