Skip to content

Commit 57e85bb

Browse files
committed
fix: Update module translations for non-unix OS
This change is needed during `yarn i18n:update-translations`. Otherwise the translation files are placed in src/modules/undefined.
1 parent e8933ae commit 57e85bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/update-modules-translations.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { resolve } from "node:path";
88
import { glob } from "glob";
99
import { load } from "js-yaml";
1010
import { parseArgs } from "node:util";
11+
import { sep as filePathSeparator } from "path";
1112

1213
const BASE_URL = `https://static.zdassets.com/translations`;
1314

@@ -67,7 +68,7 @@ async function getModules() {
6768
for (const file of files) {
6869
const content = await readFile(file);
6970
const parsedContent = load(content);
70-
const moduleName = file.split("/")[2];
71+
const moduleName = file.split(filePathSeparator)[2];
7172
result[moduleName] = parsedContent.packages[0];
7273
}
7374

0 commit comments

Comments
 (0)