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

Bug report: Region-specific browser language preferences are being ignored #12027

Closed
2 tasks
wackerow opened this issue Jan 25, 2024 · 4 comments
Closed
2 tasks
Labels
bug 🐛 Something isn't working needs triage 📥 This issue needs triaged before being worked on

Comments

@wackerow
Copy link
Member

Describe the bug

The next/router plugin automatically checks the preferred language/region for the users browser when going to ethereum.org, and forwards the user to the matching locale if available.

In cases where this browser preference contains region-specificity (ie. pt-BR for Brazilian Portuguese) users should be redirected to this region (if available, ie. /pt-br), but is instead being directed to the root language /pt instead.

To reproduce

  1. Set your browser language to Portuguese Brazilian (pt-br), or Chinese Traditional (zh-tw) (use a new browser profile if needed, or clear cache / use a private browser window)
  2. Go to https://ethereum.org (without any language in the path)
  3. Notice the page forwards to https://ethereum.org/pt (or https://ethereum.org/zh if Chinese Traditional was used)

Expected behavior

If browser preference contains a region that is in our list of supported locales, the user should be forwarded to the region-specific path (ie. Brazilian Portuguese should direct ethereum.org to ethereum.org/pr-bt, not ethereum.org/pt).

Screenshots

No response

Desktop (please complete the following information)

  • macOS Sonom 14.2.1
  • Brave 1.62.153

Smartphone (please complete the following information)

No response

Additional context

This may be related to the next-i18next.config.js settings, potentially a side-effect of the cleanCode, load or lowerCaseLng properties but haven't investigated much further yet.

Would you like to work on this issue?

  • Yes
  • No
@wackerow wackerow added the bug 🐛 Something isn't working label Jan 25, 2024
@github-actions github-actions bot added the needs triage 📥 This issue needs triaged before being worked on label Jan 25, 2024
@HiroyukiNaito
Copy link
Contributor

HiroyukiNaito commented Jan 30, 2024

@wackerow
I could reproduce the bug on WIndows

  • Microsoft Windows 11 Home v10.0.22621 N/A build 22621
  • Brave Release Notes v1.62.153 (Jan 25, 2024)

I looks like only Brave browser environment.

@HiroyukiNaito
Copy link
Contributor

I would pick this issue.

@HiroyukiNaito
Copy link
Contributor

It could suppress the issue by the JSON order pt-br -> pt -> zh-tw -> zh (Prioritizing hyphen language order)

Copy link
Contributor

This issue is stale because it has been open 45 days with no activity.

@github-actions github-actions bot added the Status: Stale This issue is stale because it has been open 30 days with no activity. label Mar 16, 2024
@wackerow wackerow removed the Status: Stale This issue is stale because it has been open 30 days with no activity. label May 7, 2024
wackerow added a commit that referenced this issue May 7, 2024
Workdround for brave i18 redirection [Fixes #12027]
This was referenced May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working needs triage 📥 This issue needs triaged before being worked on
Projects
None yet
Development

No branches or pull requests

2 participants