()
| 362 | }; |
| 363 | |
| 364 | const 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. |
no test coverage detected