Update utils.ts
This commit is contained in:
parent
77b0d69262
commit
93509257d8
1 changed files with 2 additions and 1 deletions
|
|
@ -152,8 +152,9 @@ async function getTranslation(node: Node): Promise<string | null> {
|
|||
const path = splitPath.join(".");
|
||||
|
||||
// load the namespace
|
||||
const base = __dirname.endsWith("scripts") ? join(__dirname, "..") : __dirname;
|
||||
const bundle = JSON.parse(
|
||||
await readFile(join(__dirname, `./i18n/en/${namespace}.json`), "utf-8")
|
||||
await readFile(join(base, `i18n/en/${namespace}.json`), "utf-8")
|
||||
);
|
||||
|
||||
const dotProp = (key: string, object: any) =>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue