MCPcopy Index your code
hub / github.com/microsoft/vscode-cpptools / generateLocalizedWalkthroughHtmlFiles

Function generateLocalizedWalkthroughHtmlFiles

Extension/gulpfile.js:364–382  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

362};
363
364const generateLocalizedWalkthroughHtmlFiles = () => {
365 return es.through(function (file) {
366 let relativePath = removePathPrefix(file.path, file.cwd);
367 languages.map((language) => {
368 let newPath = relativePath.substring(0, relativePath.lastIndexOf(".")) + `.nls.${language.id}.md`;
369 let newContent = generateLocalizedHtmlFilesImpl(file, relativePath, language, true);
370 this.queue(new vinyl({
371 path: newPath,
372 contents: Buffer.from(newContent, 'utf8')
373 }));
374 });
375 // Put the original in an 'en' file.
376 let newPath = relativePath.substring(0, relativePath.lastIndexOf(".")) + ".nls.en.md";
377 this.queue(new vinyl({
378 path: newPath,
379 contents: file.contents
380 }));
381 });
382}
383
384// Generate localized versions of HTML files.
385// Check for corresponding localized json file in i18n.

Callers 1

Calls 3

removePathPrefixFunction · 0.85
fromMethod · 0.80

Tested by

no test coverage detected