*---*/ import * as nls from 'vs/nls'; import { URI } from 'vs/base/common/uri'; import { ICodeEditor, IDiffEditor } from 'vs/editor/browser/editorBrowser'; import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; import { Position } from 'vs/editor/commo...
这里的tryFindMetaDataHeaderFile要想成功返回,需要引入vscode-nls-dev在打包脚本中调用nls.bundleMetaDataFiles生成一个nls.metadata.header.json文件。 因为一开始初始化并未对resolvedBundles进行赋值,此时resolvedBundles为一个空数组首次获取bundle一定是undifined,通过loadNlsBundle内部的findInTheBoxBundle方法读取nls.bundle...
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...
NLS,自然语言字符串,vscode插件使用NLS进行国际化处理。初始化时,通过initializeSettings函数根据vscode配置初始化options与resolvedBundles,此过程涉及languagePackSupport、messageFormat等。调用nls.config,源码位于src/node/main.ts,此过程中重点在于处理opts.messageFormat与opts.bundleFormat。messageFormat类型...
1 const localize = nls.config({ messageFormat: nls.MessageFormat.both })(__filename); 函数框内 1 const message = localize('sayHello.text','Hello World'); 这里也没有成功转化为,正常如下 1 const message = localize(0,null); 解决方法一:package.json处的 ...
// 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())); ...
首先会检查用户语言环境配置,如果没有设置默认使用英语 const startup = nlsConfig => { nlsConfig._languagePackSupport = true; process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig); process.env['VSCODE_NODE_CACHED_DATA_DIR'] = cachedDataDir || ''; perf.mark('willLoadMainBundle'); /...
(), resolveNlsConfiguration()]); startup(cachedDataDir, nlsConfig);}function startup(cachedDataDir, nlsConfig) { // 先加载 vscode 自己开源的 AMD Loader https://github.com/Microsoft/vscode-loader/ // 再使用这个 loader 去加载 VSCode 的主入口文件 require('./bootstrap-amd').load('vs/code...
='MinGW.org GCC-6.3.0-1'--enable-static--enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable-libgomp --disable-libvtv --enable-nls...
package.nls.json [Power Pages] [Actions Hub] Add 'Open in Power Pages Studio' command (#… Mar 5, 2025 package.nls.ko.json Fix Desktop Copilot issue due to tenantId empty and localization chan… May 9, 2024 package.nls.pt-br.json ...