(srcLocalesDir, {platforms, debug})
| 70 | } |
| 71 | |
| 72 | async function bundleLocales(srcLocalesDir, {platforms, debug}) { |
| 73 | const absoluteSrcLocalesDir = absolutePath(srcLocalesDir); |
| 74 | const list = await fs.readdir(absoluteSrcLocalesDir); |
| 75 | for (const name of list) { |
| 76 | if (!name.endsWith('.config')) { |
| 77 | continue; |
| 78 | } |
| 79 | const code = /** @type {string} */(name.split('.').at(-2)); |
| 80 | const locale = await mergeLocale(absoluteSrcLocalesDir, code); |
| 81 | const fileName = name.substring(name.lastIndexOf('/') + 1); |
| 82 | await writeFiles(locale, fileName, {platforms, debug}); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | async function writeFiles(data, fileName, {platforms, debug}){ |
| 87 | const locale = fileName.substring(0, fileName.lastIndexOf('.')).replace('-', '_'); |
no test coverage detected