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(i18n): do not use legacy api #1669

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidglezz
Copy link
Contributor

@davidglezz davidglezz commented Dec 2, 2024

Pull request template

Motivation and context

Initialise i18n without legacy api.
This allows us to use the composable useI18n()

i18n.global.locale is a ref in the new api as seen in the docs:
https://vue-i18n.intlify.dev/guide/essentials/scope.html#local-scope-1

This is a potential breaking change:

// New api
i18n.global.locale.value = 'en'

// legacy api:
i18n.global.locale = 'en'
  • Dependencies. If any, specify:
  • Open issue. If applicable, link:

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that causes existing functionality to not work as expected)
  • Change requires a documentation update

What is the destination branch of this PR?

  • Main
  • Other. Specify:

How has this been tested?

Tests performed according to testing guidelines:

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review on my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@davidglezz davidglezz requested a review from a team as a code owner December 2, 2024 15:28
@davidglezz davidglezz force-pushed the do-not-use-i18n-legacy-api branch from 6783a53 to 87afa8c Compare December 2, 2024 16:11
Copy link
Contributor

@annacv annacv left a comment

Choose a reason for hiding this comment

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

Tested in x-archetype, no new warns

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.

2 participants