Configure i18next with all locales

I noticed that we aren't i18next checking all locales. Should we be? I think it might help keep things consistent.

It also appears to be highlighting some non-visible characters in some entries
This commit is contained in:
Hugh Nimmo-Smith
2024-12-11 10:43:13 +00:00
parent b834d8f679
commit 1b201eefc3
23 changed files with 2239 additions and 161 deletions

View File

@@ -1,3 +1,5 @@
import { readdirSync } from "fs";
export default {
keySeparator: ".",
namespaceSeparator: false,
@@ -21,7 +23,9 @@ export default {
},
],
},
locales: ["en"],
locales: readdirSync("locales", { withFileTypes: true })
.filter(({ isDirectory }) => isDirectory)
.map(({ name }) => name),
output: "locales/$LOCALE/$NAMESPACE.json",
input: ["src/**/*.{ts,tsx}"],
sort: true,