rallly/packages/emails/i18next-scanner.config.js
Luke Vella f4218c3115
Translations for Email Notifications (#1278)
Co-authored-by: Niko Heller <hellerniko@gmail.com>
2024-09-02 19:30:58 +01:00

29 lines
705 B
JavaScript

const typescriptTransform = require("i18next-scanner-typescript");
module.exports = {
input: ["src/templates/**/*.{ts,tsx}", "src/components/**/*.{ts,tsx}"],
options: {
nsSeparator: false,
defaultNs: "emails",
defaultValue: "__STRING_NOT_TRANSLATED__",
lngs: ["en"],
ns: ["emails"],
plural: false,
removeUnusedKeys: true,
func: {
list: ["t", "ctx.t"],
},
trans: {
component: "Trans",
i18nKey: "i18nKey",
defaultsKey: "defaults",
},
resource: {
loadPath: "locales/{{lng}}/{{ns}}.json",
savePath: "locales/{{lng}}/{{ns}}.json",
},
},
format: "json",
fallbackLng: "en",
transform: typescriptTransform(),
};