Skip to content

Commit

Permalink
✍️ Always overwrite translation files
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashu11-A committed Oct 24, 2024
1 parent a4b7d23 commit ca034bb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/src/controller/lang.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ export class Lang {
const content = languages[lang]
const externalPath = join(RootPATH, 'locales', dirname(lang.split('/')[0]), lang)

if (!(await exists(externalPath))) {
await mkdir(externalPath, { recursive: true }).catch(() => undefined)
await writeFile(join(externalPath, '/translation.json'), JSON.stringify(content, null, 2), { encoding: 'utf8' })
}
await mkdir(externalPath, { recursive: true }).catch(() => undefined)
await writeFile(join(externalPath, '/translation.json'), JSON.stringify(content, null, 2), { encoding: 'utf8' })
}
}

Expand Down

0 comments on commit ca034bb

Please sign in to comment.