en.javascript.info icon indicating copy to clipboard operation
en.javascript.info copied to clipboard

resolveMdn no longer trustworthy?

Open joaquinelio opened this issue 4 years ago • 3 comments

I have to replace many [ ](mdn: ) links and insert the full url in the spanish repo because they lead to 404

  • some work ok,
  • some give 404 and the lucky english link to click
  • some give just the 404 and no other clue

it can not be solved by the engine because some URL are translated too (some lang keep the same url, but Spanish and French translate some MDN url too)

I tested just one Arab article ( https://ar.javascript.info/prototype-inheritance ), I got the same issue,

mdn: link obj.hasOwnProperty transforms to https://developer.mozilla.org/ar/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty

404 with the lucky link this time.

joaquinelio avatar Jan 28 '21 14:01 joaquinelio

So, when translating, we will have to use full URL?

I tested just one Arab article ( https://ar.javascript.info/prototype-inheritance ), I got the same issue,

mdn: link obj.hasOwnProperty transforms to https://developer.mozilla.org/ar/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty

404 with the lucky link this time.

Looks like this article isn't translated to Arabic? In such cases, should we link English article instead?

MuhammedZakir avatar Feb 02 '21 05:02 MuhammedZakir

it means it's important to check every link after translation on our local test server (can't do in the editor nor github) . It MAY work, or it may give mdn customized 404 with the link to English version, not so bad.

I wanted to do a regex script that search all the repo (for mdn: and full links) and make a clickable link list for us to test (File, Line, link) ...but I am a bit lazy. edit: This script would help maintenance too.

joaquinelio avatar Feb 02 '21 11:02 joaquinelio

Yes, put a full English link to MDN then.

Using the mdn:// scheme doesn't look that good any more.

iliakan avatar Feb 02 '21 12:02 iliakan