Skip to content

Commit 105e7e9

Browse files
committed
translations: Add missing translatable strings with i18next-scanner.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent a736f66 commit 105e7e9

File tree

4 files changed

+732
-1
lines changed

4 files changed

+732
-1
lines changed

i18next-scanner.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"use strict";
2+
3+
module.exports = {
4+
input: ["app/**/*.ts"],
5+
options: {
6+
debug: true,
7+
removeUnusedKeys: true,
8+
sort: true,
9+
func: {list: ["t.__"], extensions: [".ts"]},
10+
defaultLng: "en",
11+
defaultValue: (lng, ns, key) => (lng === "en" ? key : ""),
12+
resource: {
13+
loadPath: "public/translations/{{lng}}.json",
14+
savePath: "public/translations/{{lng}}.json",
15+
jsonIndent: "\t",
16+
},
17+
keySeparator: false,
18+
nsSeparator: false,
19+
context: false,
20+
},
21+
};

0 commit comments

Comments
 (0)