-
Notifications
You must be signed in to change notification settings - Fork 204
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
Update Nuxt i18n #5176
Update Nuxt i18n #5176
Conversation
Latest k6 run output1
Footnotes
|
1cf820e
to
3c6c77b
Compare
Full-stack documentation: https://docs.openverse.org/_preview/5176 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
203c807
to
2d8ae64
Compare
362799e
to
b0b0537
Compare
b0b0537
to
d2c3fea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big PR. Hopes it facilitates the locales management! The commands work for me.
Fixes
Description
This PR updates Nuxt i18n, and adds the necessary changes:
frontend/i18n/locales/
instead offrontend/src/locales/
useI18n
is now typed differently (uses the locales available in the app), and it's difficult to get it correct in all environment (unit/Playwright tests, type checks and production), so I refactored the functions that accepti18n
object to accepti18n.t
instead.The unused i18n-check script was removed
Testing Instructions
The CI should pass, and the app should work correctly without warning.
Run the i18n scripts and check that they all work. Delete locale files between running the scripts.
ov just frontend/run i18n:en
ov just frontend/run i18n:copy-test-locales
ov just frontend/run i18n
ov just frontend/run i18n:copy-test-locales
ov just frontend/run i18n:no-get
(without removing the existing locales: check that they are reused and saved asvalid-locales.json
)ov just frontend/run i18n:create-locales-list
ov just frontend/run i18n:get-translations
ov just frontend/run i18n:update-locales
ov just frontend/run i18n:generate-pot
Checklist
Update index.md
).main
) or a parent feature branch.ov just catalog/generate-docs
for catalogPRs) or the media properties generator (
ov just catalog/generate-docs media-props
for the catalog or
ov just api/generate-docs
for the API) where applicable.Developer Certificate of Origin
Developer Certificate of Origin