Files
zulip-desktop/i18next-parser.config.ts
Anders Kaseorg a9c9de2dee Convert i18next-parser configuration to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-08-06 13:29:46 -07:00

19 lines
529 B
TypeScript

import type {UserConfig} from "i18next-parser";
const config: UserConfig = {
createOldCatalogs: false,
defaultValue: (locale, namespace, key, value) =>
locale === "en" ? key! : value!,
indentation: "\t" as unknown as number,
input: ["app/**/*.ts"],
keySeparator: false,
lexers: {
ts: [{lexer: "JavascriptLexer", functions: ["t.__"]}],
},
locales: ["en"],
namespaceSeparator: false,
output: "public/translations/$LOCALE.json",
sort: (a, b) => (a < b ? -1 : a > b ? 1 : 0),
};
export default config;