Skip to content

Commit cb6dce0

Browse files
committed
now returns full path to the files
1 parent 462bf46 commit cb6dce0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

i18n/controllers/path.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
export default function PathGenerator(path: string) {
2-
const pathArray: string[] = path.split(".");
1+
import path from "path";
2+
3+
export default function PathGenerator(filePath: string) {
4+
const pathArray: string[] = filePath.split(".");
35
let gitPath: string = "";
46
const gitPathPrefix: string[] = ["chapter", "section", "subsection"];
57

@@ -15,5 +17,5 @@ export default function PathGenerator(path: string) {
1517
i++;
1618
}
1719

18-
return gitPath + ".xml";
20+
return path.resolve("../xml/en" + gitPath + ".xml");
1921
}

0 commit comments

Comments
 (0)