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

【开源自荐】反向选择路径链多语言vscode插件i18n-chain #53

Open
FrankKai opened this issue Jul 22, 2022 · 0 comments
Open

Comments

@FrankKai
Copy link

github:https://github.com/FrankKai/i18n-chain
vscode marketplace: https://marketplace.visualstudio.com/items?itemName=frankkai.i18n-chain

i18n-chain

反向选择路径链多语言vscode插件。

通过分析本地项目的多语言文件(js、ts、json),生成snippet.json,帮助开发者实现多语言快速复用,提升开发效率。

演示图

两种方式

  • i18n-json: 适用于locales文件类型为json的项目。
  • i18n-ts: 适用于locales文件类型为ts file的项目。

安装及使用

  1. 插件市场搜索i18n-chain,安装即可
  2. 配置多语言文件目录 Preferences->Settings->User->Extensions->i18n-chain(例如,配置Locale Path,默认路径为/src/locales/zh)
  3. Command+Shift+P => i18n-json(Locale Path目录中的内容为json文件) 或者 Command+Shift+P => i18n-ts(Locale Path目录中的内容为ts文件)
  4. 键入i18n-后选择需要的链即可。

例如:

{
  "foo": "知道了",
  "foo.bar": "知道了",
  "foo.bar.baz": "知道了",
}
i18n-知道了

=>

1.foo

2.foo.bar

3.foo.bar.baz

=>

foo.bar.baz
@FrankKai FrankKai changed the title 【开源自荐】反向选择路径链多语言vscode插件 【开源自荐】反向选择路径链多语言vscode插件i18n-chain Jul 22, 2022
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

No branches or pull requests

1 participant