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

[C] refactor client i18n #62

Merged
merged 4 commits into from
Oct 18, 2023
Merged

[C] refactor client i18n #62

merged 4 commits into from
Oct 18, 2023

Conversation

alexgoff
Copy link
Contributor

JIRA: https://jira.lsstcorp.org/browse/EPO-8564

What this change does

Refactor client i18n to use a single i18next provider defined at the root level. Client components can now get their translations straight from the react-i18next useTranslation hook. Removed prior uses of the dedicated client translation hook. Added language selector to menu. Added documentation for this setup to README.md

Notes for reviewers

Verify that language selector works and changes routing to new locale. Verify that client translation strings are translated and match the current locale.

Include an indication of how detailed a review you want on a 1-10 scale.

  • 5 = "Please make sure there are no obvious errors and that you believe it does what it says it does"

Checklist

If any of the following are true, please check them off

  • This is a breaking change: changes in page data (/src/data/pages/PAGE.json) or scientific data (anything in /static/) and I will notify Product Marketing when it is in prod and user visible.
  • This change impacts several investigations (e.g. the change affects reuseed styles, widgets, pages, QAs, utility methods, etc.)
  • This change is isolated to a specific page or Component (i.e. it's a one-off)
  • I don't know what this change does

Screenshots (optional)

Before:

After:

@alexgoff alexgoff added documentation Improvements or additions to documentation enhancement New feature or request EPO Issue EPO team is working on labels Oct 17, 2023
@alexgoff alexgoff requested a review from blnkt October 17, 2023 20:51
@alexgoff alexgoff self-assigned this Oct 17, 2023
@github-actions
Copy link

A preview of this PR will be available at https://epo8564-dot-investigations-client-dot-skyviewer.appspot.com until the request is closed.

@blnkt blnkt merged commit 2443544 into develop Oct 18, 2023
@github-actions
Copy link

A preview of this PR will be available at https://epo8564-dot-investigations-client-dot-skyviewer.appspot.com until the request is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request EPO Issue EPO team is working on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants