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

Page not found with fallback notecard doesn't present language switcher #10784

Open
3 tasks done
bsmth opened this issue Mar 25, 2024 · 0 comments
Open
3 tasks done

Page not found with fallback notecard doesn't present language switcher #10784

bsmth opened this issue Mar 25, 2024 · 0 comments
Labels
idle involves: UX Requires the attention of the UX team. localization i18n & l10n p3 We don't have visibility when this will be addressed.

Comments

@bsmth
Copy link
Member

bsmth commented Mar 25, 2024

Summary

If you visit a page with no locale in the URL and have a language preference set (through browser or OS settings), we will 404 the page even though there may be an EN equivalent.

The 404 notecard with a fallback doesn't offer to change languages and persist this preference for future visits.

URL

https://developer.mozilla.org/docs/Mozilla/Firefox/Releases/124

Reproduction steps

  1. Set FR as preferred language in browser preferences
  2. Navigate to https://www.mozilla.org/firefox/124.0/releasenotes/
  3. Scroll to Developer and click Developer Information (links to https://developer.mozilla.org/docs/Mozilla/Firefox/Releases/124 with no locale)

Expected behavior

The notecard with a fallback URL also includes a language switcher to set preferredlocale for site-wide preferences.

Actual behavior

Visiting the https://developer.mozilla.org/docs/Mozilla/Firefox/Releases/124 page will make us land on the FR version with no option to persist language preference.

Additionally, the destination URL (an en-US fallback) exists, but there is no translated version, so we do not offer the language switcher to set future preferences when the visitor lands there.

Device

Desktop

Browser

Firefox

Browser version

Stable

Operating system

Mac OS

Screenshot

No response

Anything else?

Request headers to send back fr equivalent looks like Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3

} else if (document) {
return (
<NoteCard type="success" extraClasses="fallback-document">
<h4>Good news!</h4>
<p>
The page you requested doesn't exist in{" "}
<b>{LANGUAGES.get(locale.toLowerCase())?.English}</b> but it exists in{" "}
<b>English</b>
</p>
<p className="fallback-link">
<a href={document.mdn_url}>
<b>{document.title}</b>
<br />
<small>{document.mdn_url}</small>
</a>
</p>
</NoteCard>
);

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Mar 25, 2024
@caugner caugner added localization i18n & l10n p3 We don't have visibility when this will be addressed. involves: UX Requires the attention of the UX team. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Mar 25, 2024
@github-actions github-actions bot added the idle label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle involves: UX Requires the attention of the UX team. localization i18n & l10n p3 We don't have visibility when this will be addressed.
Projects
None yet
Development

No branches or pull requests

2 participants