NLS,自然语言字符串,vscode插件使用NLS进行国际化处理。初始化时,通过initializeSettings函数根据vscode配置初始化options与resolvedBundles,此过程涉及languagePackSupport、messageFormat等。调用nls.config,源码位于src/node/main.ts,此过程中重点在于处理opts.messageFormat与opts.bundleFormat。messageFormat类型...
因为一开始初始化并未对resolvedBundles进行赋值,此时resolvedBundles为一个空数组首次获取bundle一定是undifined,通过loadNlsBundle内部的findInTheBoxBundle方法读取nls.bundle.zh-cn.json(生成nls.bundle.zh-cn.json文件需要调用vscode-nls-dev中的bundleLanguageFiles函数打包所有的i18n文件),读取出来的数据就是vscode当前的...
E:\test_code\vscode-master-1.23.1\out\main.js主入口里有取nls json相关的代码 E:\test_code\vscode-master-1.23.1\out\vs\nls.js nls主要实现的地方。但这个文件似乎是从 https://github.com/Microsoft/vscode-loader/blob/master/src/nls.js 里来的。 C:\Users\weo\AppData\Roaming\Code\clp\41d0...
// This must be the first import in the main entry fileimport*asnlsfrom'vscode-nls';letlocalize=nls.config({locale:'de-DE'})();console.log(localize('keyOne',"Hello World"));console.log(localize('keyTwo',"Current Date {0}",Date.now())); ...
eg. { "say.hello": "hello {0}" } const { init, localize } = require("vscode-nls-i18n"); function activate(context) { init(context.extensionPath); console.log(localize("say.hello", "world")); // hello world } Contributors Axetroy💻 🔌 ⚠️ 🐛 🎨 License The LicenseAbout...
1 const message = localize('sayHello.text','Hello World'); 这里也没有成功转化为,正常如下 1 const message = localize(0,null); 解决方法一:package.json处的 "scripts":含有 1 vscode:prepublish :npm run compile 这段代码会编译覆盖掉gulp build的文件导致该错误,去掉这段代码可以正常显示了 ...
vscode 启动语言选择流程 | 1. 首先在主入口 main.js 刚开始解析启动参数时,会去配置目录下寻找 argv.json 文件,它里面包含了一些静态参数。如果用户手工安装了语言扩展,更改了显示语言,那么就会记录在 argv.json 中的 locale 项。读取以后,会使用 getNLSConfiguration 进行进一步处理 ...
"ext.config.disableLanguagesDeprecation": "This feature is no longer supported. Instead, configure VS Code [default formatters](https://github.com/prettier/prettier-vscode#default-formatter) or use .prettierignore.", "ext.config.documentSelectors": "A list of [glob patterns](https://code.visua...
"DataScience.jupyterDebuggerPtvsdParseError": "Unable to parse ptvsd output, please log an issue with https://github.com/microsoft/vscode-python", "DataScience.jupyterDebuggerPortNotAvailableError": "Port {0} cannot be opened for debugging. Please specify a different port in the remoteDebuggerPo...
ide-vscode-maven / package.nls.json package.nls.json 4.92 KB 一键复制 编辑 原始数据 按行查看 历史 xiayuqi 提交于 1年前 . 完善中英文 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 { "description": "(Kylin Modified) Manage Maven projects, execute goals, genera...