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

Translation middleware is not grabbing es value from paths #3078

Closed
1 task done
doug-s-nava opened this issue Dec 3, 2024 · 0 comments · Fixed by #3089
Closed
1 task done

Translation middleware is not grabbing es value from paths #3078

doug-s-nava opened this issue Dec 3, 2024 · 0 comments · Fixed by #3089
Assignees

Comments

@doug-s-nava
Copy link
Collaborator

Summary

The code that is supposed to be grabbing information about whether to serve an English or Spanish page is always setting the locale to English.

Note that as we do not currently have a usable Spanish version of the site, this is not urgent, but it is important that some basic translation can work to make sure future changes do not break the set up that is in place.

Reproducibility

None

How to reproduce the bug

  • alternatively, add a console log to output the locale in src/i18n/server.tx line 14
  • start a local server with either npm run dev or npm run build && npm start
  • visit localhost:3000/es
  • verify spanish messages do not appear, locale is logged as "en"

Browser

None

Code of Conduct

  • I agree to follow this project's Code of Conduct
@doug-s-nava doug-s-nava self-assigned this Dec 3, 2024
@doug-s-nava doug-s-nava moved this from Icebox to In Progress in Simpler.Grants.gov Product Backlog Dec 3, 2024
doug-s-nava added a commit that referenced this issue Dec 16, 2024
* replaces use of "unstable_setRequestLocale" with "setRequestLocale" and passes in dynamic locales
* includes a couple of quality of life improvements related to translation code
* translation should now work if we provide Spanish content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

1 participant