Awesome
<p align="center"> <img src="https://raw.githubusercontent.com/think2011/vscode-vue-i18n/master/static/logo.png" alt="logo" width="100"/> </p> <h1 align="center">vscode-vue-i18n</h1> <p align="center"> <a href="https://marketplace.visualstudio.com/items?itemName=think2011.vue-i18n"><img src="https://img.shields.io/visual-studio-marketplace/v/think2011.vue-i18n.svg?color=blue&label=VSCode%20Marketplace&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjU2IDI1NiI+PGRlZnM+PHN0eWxlPi5he2ZpbGw6I2ZmZjt9LmEsLmd7ZmlsbC1ydWxlOmV2ZW5vZGQ7fS5ie21hc2s6dXJsKCNhKTt9LmN7ZmlsbDojMDA2NWE5O30uZHtmaWxsOiMwMDdhY2M7fS5le2ZpbGw6IzFmOWNmMDt9LmZ7b3BhY2l0eTowLjI1O30uZ3tmaWxsOnVybCgjYik7fTwvc3R5bGU+PG1hc2sgaWQ9ImEiIHg9Ii0wLjE2IiB5PSIwLjY2IiB3aWR0aD0iMjU2LjE2IiBoZWlnaHQ9IjI1NC42OCIgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggY2xhc3M9ImEiIGQ9Ik0xODEuNTMsMjU0LjI1YTE1LjkzLDE1LjkzLDAsMCwwLDEyLjctLjQ5bDUyLjcxLTI1LjM2QTE2LDE2LDAsMCwwLDI1NiwyMTRWNDJhMTYsMTYsMCwwLDAtOS4wNi0xNC40MkwxOTQuMjMsMi4yNEExNS45NCwxNS45NCwwLDAsMCwxNzgsMy43YTE2LjMsMTYuMywwLDAsMC0xLjkxLDEuNjNMNzUuMTUsOTcuMzksMzEuMiw2NGExMC42NSwxMC42NSwwLDAsMC0xMy42MS42MUwzLjQ5LDc3LjQ1YTEwLjY4LDEwLjY4LDAsMCwwLDAsMTUuNz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ace Version" /></a> <a href="https://marketplace.visualstudio.com/items?itemName=think2011.vue-i18n"><img src="https://img.shields.io/visual-studio-marketplace/d/think2011.vue-i18n.svg" alt="Visual Studio Marketplace Downloads" /></a> <a href="https://marketplace.visualstudio.com/items?itemName=think2011.vue-i18n"><img src="https://img.shields.io/visual-studio-marketplace/i/think2011.vue-i18n.svg" alt="Visual Studio Marketplace Installs" /></a> </p> <p align="center"> 为什么要做这个插件?因为写 i18n 真的很啰嗦很麻烦啊 😫 </p> <p align="center"> 这个插件能够帮到你方便查看和编写 <a href="https://github.com/kazupon/vue-i18n">vue-i18n</a> 🎉 </p> <h2 align="center"> ⚡ 主要功能 </h2>提取并自动翻译文案 (快捷键 ⌘+.)
直观的看到对应的翻译文案
通过翻译中心管理翻译
<h2 align="center"> 🦉 如何使用? </h2>1. 首先你的目录应该是类似这样的结构
locales
├── en.json
├── zh-CN.json
├── zh-TW.json
├── ...
└── <contry-code>.json
或者
locales
├── en
| ├── common.json
| ├── buttons.json
| ├── ...
| └── <filenames>.json
├── zh-CN
| ├── common.json
| ├── buttons.json
| └── ...
└── <contry-code>
├── common.json
├── buttons.json
└── ...
2. 那么安装好插件后就会自动识别目录了
如果不是的话,那请执行如图的命令吧 😝
📆 功能列表
- 翻译提示
- 翻译注释
- 翻译中心
- 删除多个语言
- google、youdao、baidu 在线翻译
- 字段补全
- 自动配置翻译目录
- 手动配置翻译目录
- 可指定翻译源语言
- 重复、覆盖检测
- YAML 支持
QA
怎么安装?
在 vscode
插件里搜索 vue-i18n
,或者点击上上方的小徽章安装吧!
怎么不开 Issues?
估计很长一段时间里都比较忙,而且懒,如果你遇到了实在难以解决的问题或者非要提需求 吐槽,那你给我发封邮件吧 452125301.hzplay@gmail.com,要是可以贡献 PR 那真的太棒了 🙂
👏 特别感谢
谢谢你帮忙完善了插件
✨ 同时也推荐功能更为强大的 vue-i18n-ally@antfu