Files
element-call-Github/i18next-parser.config.ts
Hugh Nimmo-Smith 1b201eefc3 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
2024-12-11 10:43:13 +00:00

33 lines
806 B
TypeScript

import { readdirSync } from "fs";
export default {
keySeparator: ".",
namespaceSeparator: false,
contextSeparator: "|",
pluralSeparator: "_",
createOldCatalogs: false,
defaultNamespace: "app",
lexers: {
ts: [
{
lexer: "JavascriptLexer",
functions: ["t", "translatedError"],
namespaceFunctions: ["useTranslation", "withTranslation"],
},
],
tsx: [
{
lexer: "JsxLexer",
functions: ["t", "translatedError"],
namespaceFunctions: ["useTranslation", "withTranslation"],
},
],
},
locales: readdirSync("locales", { withFileTypes: true })
.filter(({ isDirectory }) => isDirectory)
.map(({ name }) => name),
output: "locales/$LOCALE/$NAMESPACE.json",
input: ["src/**/*.{ts,tsx}"],
sort: true,
};