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

defineI18nRoute macro does not work for pages without setup syntax #1928

Closed
BobbieGoede opened this issue Mar 13, 2023 · 0 comments · Fixed by #1929
Closed

defineI18nRoute macro does not work for pages without setup syntax #1928

BobbieGoede opened this issue Mar 13, 2023 · 0 comments · Fixed by #1929

Comments

@BobbieGoede
Copy link
Collaborator

BobbieGoede commented Mar 13, 2023

Environment

  • Operating System: Linux
  • Node Version: v16.14.2
  • Nuxt Version: 3.2.3
  • Nitro Version: 2.2.3
  • Package Manager: npm@7.17.0
  • Builder: vite
  • User Config: modules, vite, i18n
  • Runtime Modules: normalizedModule(), @nuxtjs/i18n@8.0.0-beta.10

Reproduction

This can be reproduced using the playground project in this repository, see https://stackblitz.com/edit/github-zvo7zt?file=pages%2Fabout%2Findex.vue

Navigate to the about page and notice the other languages lack translations while they should be configured with:

defineI18nRoute({
  paths: {
    en: '/about-us',
    fr: '/a-propos',
    ja: '/about-ja'
  }
})

Describe the bug

This is probably the same issue as #1852

It looks like the macro is not handled when not using <script setup> syntax. I will try to fix it and submit a PR!

Additional context

No response

Logs

No response

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

Successfully merging a pull request may close this issue.

2 participants