Open DonalMe opened 2 months ago
@DonalMe Overall, this seems to work as intended: https://developer.mozilla.org/docs/Web/API/WebCodecs_API redirects to https://developer.mozilla.org/fr/docs/Web/API/WebCodecs_API, because this is the first locale in the Accept-Language
header that MDN supports, but since the page isn't localized yet, a 404 page is displayed instead, with a link to the English version.
Do you expect to be redirected to en-US
instead, because it's the first locale listed in the Accept-Language
header for which the page exists?
@caugner sorry, I didn't realize this behavior was because the page wasn't localized. If the redirect works when the page is localized, maybe it should fallback to en-us when it is not localized instead of a 404?
IMO, MDN should go through all the accept-lang fallback locales through content negociation (https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation#the_accept-language_header)
Thank you for this suggestion, it does make sense to me do content negociation, rather than redirecting to the first locale in the list of accepted languages that we support. We will discuss this in the team, and prioritize accordingly.
Note that https://github.com/mdn/yari/pull/11518 will not fix this.
FWIW The link is here.
Enabled the Web Codecs API on desktop platforms, allowing low-level access to audio and video encoders and decoders.
(Meanwhile, the en-US
locale seems to have been added to the link, given that it is not available in most locales.)
Summary
We do not include a local in the MDN URLs in the Firefox release notes. The goal is for users in non-en locales following links in the release notes to be correctly redirected to their locale. This is not working for MDN URLs and leads to a 404 in non-English locales.
URL
Example: https://developer.mozilla.org/docs/Web/API/WebCodecs_API
Reproduction steps
Expected behavior
There should be a redirect to your locale (example https://developer.mozilla.org/fr/docs/Web/API/WebCodecs_API)
Actual behavior
404 page
Device
Desktop
Browser
Firefox
Browser version
Stable
Operating system
Mac OS
Screenshot
No response
Anything else?
curl --header "Accept-Language: fr,fr-fr,en-us,en" -LIs https://developer.mozilla.org/docs/Web/API/WebCodecs_API | grep HTTP
Validations