-
-
Notifications
You must be signed in to change notification settings - Fork 381
Closed
Labels
Status: PR WelcomeWelcome to Pull RequestWelcome to Pull RequestStatus: ProposalRequest for commentsRequest for commentsType: FeatureIncludes new featuresIncludes new featuresgood first issueGood for newcomersGood for newcomers
Description
Clear and concise description of the problem
Using availableLocales in a component is a list of strings that doesn't update reactively when adding new messages.
const { availableLocales } = useI18n(); // string[]
i18n.global.setLocaleMessage('ca', messages); // Does not trigger an update to availableLocales Suggested solution
Would be useful if availableLocales was a computed list so any list or selector or whatever that is using it can update automatically
const { availableLocales } = useI18n(); // ComputedRef<string[]>Not sure if changing line
vue-i18n/packages/vue-i18n-core/src/composer.ts
Line 2559 in e9ab3e0
| return Object.keys(_messages.value).sort() |
return computed(() => Object.keys(_messages.value).sort());Alternative
No response
Additional context
No response
Validations
- Read the Contributing Guidelines
- Read the Documentation
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Metadata
Metadata
Assignees
Labels
Status: PR WelcomeWelcome to Pull RequestWelcome to Pull RequestStatus: ProposalRequest for commentsRequest for commentsType: FeatureIncludes new featuresIncludes new featuresgood first issueGood for newcomersGood for newcomers