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

fix(spas): use cased locale for homepage, not lowercase #8377

Merged
merged 3 commits into from
Mar 9, 2023

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Mar 8, 2023

Summary

Problem

On https://developer.mozilla.org/en-US/, the menu links point to en-us, e.g. https://developer.mozilla.org/en-us/docs/Web instead of https://developer.mozilla.org/en-US/docs/Web. This causes an unnecessary redirect.

Solution

Build the homepage using the properly cased locale (en-US).

(While at it, this also makes use of DEFAULT_LOCALE where possible.)


How did you test this change?

  1. On main, I ran yarn build:prepare.
  2. Ran git add -f client/build.
  3. Switched to this branch.
  4. Ran yarn build:prepare again.
  5. Looked at git diff --word-diff client/build and saw the following:

image

@caugner caugner requested a review from LeoMcA March 8, 2023 13:37
@caugner caugner force-pushed the fix-homepage-locale branch from e9467bd to 9b75065 Compare March 8, 2023 13:40
@caugner
Copy link
Contributor Author

caugner commented Mar 9, 2023

@LeoMcA In 648de18, I typed the params and fixed the m2h call.

Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@caugner caugner merged commit fa7a72f into main Mar 9, 2023
@caugner caugner deleted the fix-homepage-locale branch March 9, 2023 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants