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

feat: add loadLocaleMessages to manually load locale messages #2799

Merged

Conversation

BobbieGoede
Copy link
Collaborator

@BobbieGoede BobbieGoede commented Feb 15, 2024

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Resolves #740

Adds the function loadLocaleMessages which allows users to load locale messages for non-loaded locales when using lazy-load translations.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

nuxt-studio bot commented Feb 15, 2024

βœ… Live Preview ready!

Name Edit Preview Latest Commit
i18n Edit on Studio β†—οΈŽ View Live Preview b75b528

@BobbieGoede BobbieGoede force-pushed the feat/load-locale-messages-function branch from b75b528 to 9746848 Compare February 15, 2024 23:26
@BobbieGoede BobbieGoede changed the title [WIP] feat: extend Vue i18n with loadLocaleMessages function feat: extend Vue i18n with loadLocaleMessages function Feb 15, 2024
@BobbieGoede BobbieGoede changed the title feat: extend Vue i18n with loadLocaleMessages function feat: add loadLocaleMessages to manually load locale messages Feb 15, 2024
@BobbieGoede BobbieGoede marked this pull request as ready for review February 15, 2024 23:27
Copy link
Collaborator

@kazupon kazupon left a comment

Choose a reason for hiding this comment

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

Thanks!
Oh, I was not aware of the v7 issue. πŸ˜…
This feature is useful and we should be included! ✨

@kazupon kazupon merged commit bd8a2dd into nuxt-modules:main Feb 16, 2024
7 checks passed
DarthGigi pushed a commit to DarthGigi/i18n that referenced this pull request Apr 16, 2024
…-modules#2799)

* feat: extend Vue i18n with `loadLocaleMessages` function

* docs: add `loadLocaleMessages` to lazy-load en vue-i18n sections

* test: add test for `loadLocaleMessages`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't access non-loaded lazy locales using $t
2 participants