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

nuxt3国际化报错 #359

Closed
4 tasks done
Jing-sir opened this issue Apr 20, 2024 · 1 comment
Closed
4 tasks done

nuxt3国际化报错 #359

Jing-sir opened this issue Apr 20, 2024 · 1 comment
Labels
Status: Review Needed Request for review comments

Comments

@Jing-sir
Copy link

Jing-sir commented Apr 20, 2024

Reporting a bug?

我在nux3中国际化使用这个插件去解析.yml文件貌似和组件中的冲突报错了,不知道怎么解决

Expected behavior

期望这个问题能解决

Reproduction

https://github.com/Jing-sir/nuxt3--i18n.git, 项目仓库地址
项目源码
nuxt3--i18n-main.zip

Issue Package

vite-plugin-vue-i18n

System Info

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 327.23 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
    Watchman: 2023.06.26.00 - /opt/homebrew/bin/watchman
  npmPackages:
    vue: ^3.4.21 => 3.4.21

Screenshot

No response

Additional context

image 我在nuxt3中配置了国际化文件,然后抽离了全局的语言文件单独放在了lang文件夹下面,并重写了i18n配置文件 image 我是使用了@intlify/unplugin-vue-i18n/vite这个插件去处理lang文件下下面的.yml文件, image 但是好像和组件中的标签冲突了,报错 image 我如果干掉nuxt.config.ts中的vite plugins这个插件就不会报错,并把i18n.config.ts文件引入语言文件换成.json格式就不会报错了,但是我想在组件外的语言配置.yml格式,我不知道是我哪里配置的问题还是代码写错了,我找了所有的文档都没有解决这个问题, 麻烦帮帮我,谢谢

Validations

  • Read the Contributing Guidelines.
  • Read the README
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion.
@Jing-sir Jing-sir added the Status: Review Needed Request for review comments label Apr 20, 2024
@kazupon
Copy link
Member

kazupon commented May 15, 2024

Thank you for your reporting!

You can add lang="yaml" attribute to <i18n>
Thanks!

@kazupon kazupon closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Review Needed Request for review comments
Projects
None yet
Development

No branches or pull requests

2 participants