| 294 | // Generates ./dist/nls.bundle.<language_id>.json from files in ./i18n/** *//<src_path>/<filename>.i18n.json |
| 295 | // Localized strings are read from these files at runtime. |
| 296 | const generateSrcLocBundle = () => { |
| 297 | // Transpile the TS to JS, and let vscode-nls-dev scan the files for calls to localize. |
| 298 | return tsProject.src() |
| 299 | .pipe(sourcemaps.init()) |
| 300 | .pipe(tsProject()).js |
| 301 | .pipe(nls.createMetaDataFiles()) |
| 302 | .pipe(nls.createAdditionalLanguageFiles(languages, "i18n")) |
| 303 | .pipe(nls.bundleMetaDataFiles('ms-vscode.cpptools', 'dist')) |
| 304 | .pipe(nls.bundleLanguageFiles()) |
| 305 | .pipe(filter(['**/nls.bundle.*.json', '**/nls.metadata.header.json', '**/nls.metadata.json'])) |
| 306 | .pipe(gulp.dest('dist')); |
| 307 | }; |
| 308 | |
| 309 | const generateLocalizedHtmlFilesImpl = (file, relativePath, language, isFragment) => { |
| 310 | let stringTable = {}; |