我用了一段时间,但是配置了半天一直报错,说找不到文案文件(我的 i18n 文案是写成类似于 bundle.l10n.zh-tw.json 这样的文件里的,显然 i18n Ally 无法识别它们)。网上找了一段时间解决方案,无法解决,于是放弃。 Vue i18n 我也直接不看,因为我的工程场景是 typescript 和 rust 中的 t 函数使用。 根据我暴躁...
首先、安装Vue相关的VSCode扩展插件,比较推荐的是Vetur和i18n Ally。其次、通过配置jsconfig.json或tsconfig.json文件来增强VSCode对项目结构的理解进而提供更准确的提示。再次、使用TypeScript能提供更完善的类型提示和检查,从而让开发者更有效地编写i18n代码。这些方法不仅能提升开发效率,还能减少因语言文件错误造成的bug。
- 在插件市场中搜索 `Vue I18n` 或相关插件(如 `i18n-ally`),然后点击安装。 ## 2. 配置 TypeScript 服务 如果你在 Vue 项目中使用了 TypeScript,可能需要调整 TypeScript 服务的设置,以便 WebStorm 能够正确识别 `$t` 函数。 - 进入`File` > `Settings` > `Languages & Frameworks` >...
In your.vscode/settings.json, add: {"i18n-ally.parsers.typescript.compilerOptions": {"moduleResolution":"node", } } Solved my problem. Thanks!
打开VSCode 的设置文件并手动设置vue-i18n-ally.localesPaths。 源语言/显示语言设置。 默认语言环境设置为英语(en)。 如果您的项目不支持英语,则可能需要通过命令Vue i18n 助手: 更改源语言进行修改。 检查你的目录结构 👨💻 感谢 本插件最初来源于think2011/vscode-vue-i18n,非常感谢@think2011的启发。
VScode插件中心直接搜索i18n Ally进行安装使用。 vscode插件“i18n-ally”,使用它可以构建和自动化翻译,实现国际化。 支持的文案格式 * 受限于yaml.dumps和JSON5.stringify,YAML 和 JSON5 的注释在任何写入操作后将会丢失。如果你希望保留注释,可以可以通过设置i18n-ally.readonly让插件在只读模式工作。
lokalise / i18n-ally Star 4.4k Code Issues Pull requests Discussions 🌍 All in one i18n extension for VS Code react i18n angular translation vue vscode i10n vscode-extension i18next locales vue-i18n Updated Dec 13, 2024 TypeScript ...
The footprint of thetypesafe-i18npackage is smaller compared to other existing i18n packages. Most of the magic happens in development mode, where the generator creates TypeScript definitions for your translations. This means, you don't have to ship the whole package to your users. The only tw...
Lokalise Get Compatible with IntelliJ IDEA Ultimate, PhpStormand3 more
"vue", "general" ], "i18n-ally.theme.annotationMissingBorder": "#d37070", "i18n-ally.theme.annotationMissing": "#d37070", "eslint.validate": [ "javascript", "typescript", "javascriptreact", "typescriptreact", "vue", "html" ], "typescript.tsdk": "node_modules/typescript/lib", ...