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

lib-user: Setup react-i18next for Contributors components #6553

Merged
merged 7 commits into from
Jan 7, 2025

Conversation

goplayoutside3
Copy link
Contributor

@goplayoutside3 goplayoutside3 commented Dec 15, 2024

Package

lib-user

Linked Issue and/or Talk Post

This is the start of a chain of translations PRs. The next one is #6554

Describe your changes

  • Setup react-i18next for Contributors components

How to Review

  • The expected text should display for Contributors components when lib-user is run locally, in Storybook, or as app-root pages.

Checklist

PR Creator - Please cater the checklist to fit the review needed for your code changes.
PR Reviewer - Use the checklist during your review. Each point should be checkmarked or discussed before PR approval.

General

  • Tests are passing locally and on Github
  • Documentation is up to date and changelog has been updated if appropriate
  • You can yarn panic && yarn bootstrap or docker-compose up --build and FEM works as expected
  • FEM works in all major desktop browsers: Firefox, Chrome, Edge, Safari (Use Browserstack account as needed)

New Feature

  • The PR creator has listed user actions to use when testing the new feature
  • Unit tests are included for the new feature
  • A storybook story has been created or updated
    • Example of SlideTutorial component with docgen comments, and its story

Post-merge

  • This PR adds translations keys to English dictionary(s). See guidance for pulling new keys to Lokalise here.

@goplayoutside3 goplayoutside3 added the translations Involves managing text translation label Dec 15, 2024
@coveralls
Copy link

coveralls commented Dec 15, 2024

Coverage Status

coverage: 77.389% (+0.04%) from 77.351%
when pulling 018fdfd on translations-contributors
into 34d9680 on master.

@goplayoutside3
Copy link
Contributor Author

@mcbouslog this is the base of multiple branches that add react-i18next to lib-user, and I'm tagging you for review of all PRs. I split up this feature to make it easier for review since these are live webpages. Please feel free to review in whichever order you prefer, and the PRs are tagged in the project board, too.

@mcbouslog mcbouslog self-assigned this Dec 18, 2024
Copy link
Contributor

@mcbouslog mcbouslog left a comment

Choose a reason for hiding this comment

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

This and related lib-user translation PRs look good. I've tested locally to make sure pages continue to load as expected. 👍 🌐

Is adding the test: "Test Language" to the storybook preview.js and related translation JSON a reasonable addition to these changes or is that something that should be in a different PR? While I noted no issues testing these changes locally, changing the language (to the "Test Language") in storybook would provide additional assurance.

useTranslation as useBaseTranslation
} from 'react-i18next'

const libI18n = i18n.createInstance()
Copy link
Contributor

Choose a reason for hiding this comment

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

This is trivial, but if lib-classifier creates classifierI18n and lib-react-components creates zrcI18n, should this be less generic and include user or a related abbreviation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point! I'll rename to libUserI18n

@github-actions github-actions bot added the approved This PR is approved for merging label Dec 26, 2024
@mcbouslog mcbouslog removed their assignment Dec 26, 2024
* setup react-i18next for GroupStats components

* lib-user: Setup react-i18next for MyGroups components (#6555)

* Setup react-i18next for MyGroups components

* lib-user: Setup react-i18next for UserHome components (#6556)

* Setup react-i18next for UserHome components

* lib-user: Setup react-i18next for BarChart and GroupContainer (#6557)

* Setup react-i18next for BarChart and GroupContainer

* add translations for DeactivatedGroup

* lib-user: Setup react-i18next for GroupForm (#6558)

* Setup react-i18next translations for GroupForm components

* lib-user: Setup react-i18next for HeaderDropdown, ProfileHeader, and TopProjects (#6559)

* Setup react-i18next for HeaderDropdown, ProfileHeader, and TopProjects

* Setup react-i18next for MainContent components (#6561)
@goplayoutside3
Copy link
Contributor Author

Re: Test Language dictionary - I'm going to merge this translations branch, pull the new English dictionary into Lokalise, and then have Lokalise generate a new Test Language json dictionary for me. Along with that dictionary PR, I'll enable translations in Storybook on our way to introducing localization in the app-root Next.js router.

@goplayoutside3 goplayoutside3 merged commit fd585a1 into master Jan 7, 2025
7 checks passed
@goplayoutside3 goplayoutside3 deleted the translations-contributors branch January 7, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This PR is approved for merging translations Involves managing text translation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants