Initial commit of Descrybe v2 without local scratch artifacts.
Drop one-shot tmp/axe scripts and agent i18n scratch so the Gitea tree is deployable.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const dir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../src/lib/i18n/messages");
|
||||
|
||||
function countKeys(file) {
|
||||
const s = fs.readFileSync(path.join(dir, file), "utf8");
|
||||
const d = {};
|
||||
const re = /"([^"\\]+)"\s*:/g;
|
||||
let m;
|
||||
while ((m = re.exec(s))) d[m[1]] = 1;
|
||||
return Object.keys(d).length;
|
||||
}
|
||||
|
||||
for (const c of ["en", "es", "fr", "de", "it", "pt", "nl", "pl", "ja"]) {
|
||||
console.log(c, countKeys(`${c}.ts`));
|
||||
}
|
||||
Reference in New Issue
Block a user