core
core copied to clipboard
[FEATURE] 支持 VSCODE_NLS_CONFIG 环境变量
code 在启动时会生成一个 VSCODE_NLS_CONFIG 环境变量,里面会存一个 locale 参数代表当前 language,
code-settings-sync 这个插件(https://github.com/shanalikhan/code-settings-sync/blob/master/src/localize.ts#L17)就是靠该参数来获取 locale 并进行后续操作的
这个环境变量在安装了语言包以后会注入,如果没有的话可能是启动插件进程的时候丢了
看起来是在语言包的 localizations 这个贡献点下才会注入该变量,但默认我们好像没有语言包?所以应该不会注入这个变量吧
没有语言包的话确实不会注入,需要一个默认值
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
按现在的逻辑:https://github.com/opensumi/core/pull/2529/files#diff-5637d5b22e87217b5f315ce965f10b7c914d1337fe1ce29ec2503665f446c74a
我们也支持了这个变量的,并且会在插件启动前注入。