mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-11 07:56:47 +02:00
♻️ Refactor i18n files (#670)
This commit is contained in:
parent
cd5bf11179
commit
82499ff48d
166 changed files with 4372 additions and 2052 deletions
34
apps/web/i18next-scanner.config.js
Normal file
34
apps/web/i18next-scanner.config.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
const typescriptTransform = require("i18next-scanner-typescript");
|
||||
|
||||
module.exports = {
|
||||
input: ["src/**/*.{ts,tsx}"],
|
||||
options: {
|
||||
keySeparator: ".",
|
||||
nsSeparator: false,
|
||||
defaultNs: "app",
|
||||
defaultValue: function (lng) {
|
||||
if (lng === "en") {
|
||||
return "__STRING_NOT_TRANSLATED__";
|
||||
}
|
||||
return "";
|
||||
},
|
||||
lngs: ["en"],
|
||||
ns: ["app"],
|
||||
plural: false,
|
||||
removeUnusedKeys: true,
|
||||
func: {
|
||||
list: ["t"],
|
||||
extensions: [".js", ".jsx"],
|
||||
},
|
||||
trans: {
|
||||
extensions: [".js", ".jsx"],
|
||||
},
|
||||
resource: {
|
||||
loadPath: "public/locales/{{lng}}/{{ns}}.json",
|
||||
savePath: "public/locales/{{lng}}/{{ns}}.json",
|
||||
},
|
||||
},
|
||||
format: "json",
|
||||
fallbackLng: "en",
|
||||
transform: typescriptTransform(),
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue