Reverse selection path chain Multilingual vscode plugin.
By analyzing the multi-language files (js, ts, json) of the local project, and generating snippet.json, it helps developers to achieve multi-language rapid reuse and improve development efficiency.
https://github.com/FrankKai/i18n-chain
- i18n-json: For projects with locales file type json.
- i18n-ts: For projects with locales file type ts file.
- Search for i18n-chain in the plugin market and install it
- Configure multilingual file directory Preferences->Settings->User->Extensions->i18n-chain (for example, configure Locale Path, the default path is /src/locales/zh)
- Command+Shift+P => i18n-json(The content in the Locale Path directory is a json file) or Command+Shift+P => i18n-ts(The content in the Locale Path directory is the ts file)
- Type i18n- and select the desired chain。
E.g:
{
"foo": "understood",
"foo.bar": "understood",
"foo.bar.baz": "understood",
}
i18n-understood
=>
1.foo
2.foo.bar
3.foo.bar.baz
=>
foo.bar.baz
After running the command, you can check whether there is any content in i18n-chain.code-snippets in the .vscode directory. If not, check whether the directory format of the Locale Path configuration is consistent with the executed command.
- vscode executes Extension
- Find an extension development host project to test
- When the plugin code is updated, you need to compile it with
yarn compile
and click the refresh button in the upper right corner to keep the plugins in the extension development host up to date
yarn test-compile
yarn build
tsc -p ./
vsce publish