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

[Issue #1937] Translate Loading component text #2186

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

mdragon
Copy link
Collaborator

@mdragon mdragon commented Sep 20, 2024

Summary

Fixes #1937

Time to review: 5 mins

Changes proposed

Implemented the translation library for the text on the Search loading spinner

Context for reviewers

This component is currently under the Search page, but seems like we'd likely reuse it elsewhere. Since file moves are weird to PR and revert I wanted to get more input before moving stuff around.

Additional information

Tested by implementing Storybook for this component
image

…al for non-search loading translation as well

Fixes #1937
Copy link

github-actions bot commented Sep 20, 2024

Coverage report for ./frontend

St.
Category Percentage Covered / Total
🟢 Statements 90.6% 790/872
🟡 Branches 71.79% 224/312
🟢 Functions 87.89% 167/190
🟢 Lines 91.27% 742/813

Test suite run success

178 tests passing in 54 suites.

Report generated by 🧪jest coverage report action from e73407f

@acouch
Copy link
Collaborator

acouch commented Sep 20, 2024

Looks good, think you need to add unstable_setRequestLocale(). See amannn/next-intl#663 and https://next-intl-docs.vercel.app/docs/getting-started/app-router/with-i18n-routing#static-rendering . We might be able to pass in the locale instead of just default to "en". We didn't do that previously because the next-intl was setup in parts and we did not update that until we fully moved over.

@mdragon mdragon requested a review from acouch September 23, 2024 15:01
@mdragon
Copy link
Collaborator Author

mdragon commented Sep 23, 2024

Looks good, think you need to add unstable_setRequestLocale(). See amannn/next-intl#663 and https://next-intl-docs.vercel.app/docs/getting-started/app-router/with-i18n-routing#static-rendering . We might be able to pass in the locale instead of just default to "en". We didn't do that previously because the next-intl was setup in parts and we did not update that until we fully moved over.

I think we landed in a better place here now.

@mdragon mdragon merged commit 8c4528d into main Sep 25, 2024
12 checks passed
@mdragon mdragon deleted the mdragon/1937-translate-loader branch September 25, 2024 12:30
@mdragon
Copy link
Collaborator Author

mdragon commented Sep 25, 2024

Follow up for further improvements to this component #2201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Update Loading spinner "Loading results..." to use translation utility
2 participants