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 i18n links not having the locale in hrefs #12050

Merged
merged 2 commits into from
Jan 31, 2024
Merged

Fix i18n links not having the locale in hrefs #12050

merged 2 commits into from
Jan 31, 2024

Conversation

pettinarip
Copy link
Member

@pettinarip pettinarip commented Jan 29, 2024

Currently, when the user loads a page, all the internal navigation links display the href without the locale that the user is using.
For example, when you load https://ethereum.org/de/layer-2, all the internal links ignore the de locale and build the href from the root level.

Description

The problem seems to come from the Link component imported from @chakra-ui/next-js. I'll try to reproduce this bug on a codesandbox later and open an issue in that repo.

For the scope of this PR, it:

  • Removes the dependency
  • Implements a custom integration between Chakra & Next Link component

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 120d0ba
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/65ba848edd894200082063d6
😎 Deploy Preview https://deploy-preview-12050--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

Choose a reason for hiding this comment

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

I don't see this used anywhere, is this necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, good catch. That was left over from a previous implementation. Let me remove it

Copy link
Member

@corwintines corwintines left a comment

Choose a reason for hiding this comment

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

LGTM

@corwintines corwintines merged commit 722ff36 into dev Jan 31, 2024
10 checks passed
@corwintines corwintines deleted the link-i18n branch January 31, 2024 18:38
@corwintines corwintines mentioned this pull request Jan 31, 2024
This was referenced Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies 📦 Changes related to project dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants