feat(packages): i18n (#1708)

This commit is contained in:
Sam Potts
2026-07-10 12:58:47 +10:00
committed by GitHub
parent 5f48fcc6d6
commit 028dadb385
561 changed files with 13059 additions and 1320 deletions
+8 -2
View File
@@ -18,6 +18,8 @@ export interface Change {
}
export function getChanges(): Change[] {
// `src/` is gitignored and generated from `templates/` on setup/build.
fs.ensureDirSync(SRC);
const res: Result = compareSync(SRC, TEMPLATES, { compareContent: true });
return (res.diffSet ?? [])
@@ -98,9 +100,13 @@ export async function mirrorTemplatesToSrc(): Promise<string[]> {
continue;
}
if (await fs.pathExists(targetPath)) continue;
if (await fs.pathExists(targetPath)) {
const existing = await fs.readFile(targetPath, 'utf8');
const next = await fs.readFile(templatePath, 'utf8');
if (existing === next) continue;
}
await fs.copy(templatePath, targetPath);
await fs.copy(templatePath, targetPath, { overwrite: true });
created.push(targetPath);
}
}