generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 247
/
Copy pathi18next-parser.config.js
28 lines (28 loc) · 986 Bytes
/
i18next-parser.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module.exports = {
input: ['src/**/*.{ts,svelte}'], // Scan relevant files
output: 'src/i18n/locales/$LOCALE.json', // Output files
locales: [
// Supported locales, in alphabetical order
'be',
'en',
'ru',
'uk',
'zh_cn',
],
defaultNamespace: 'translation',
keySeparator: '.', // Use dots to represent nested keys
namespaceSeparator: false, // Disable namespace separation
interpolation: {
prefix: '{{', // Preserve placeholders like {{name}}
suffix: '}}',
},
useKeysAsDefaultValue: true, // Use keys for default values if no translation exists
resetDefaultValueLocale: null, // Retain existing default values
sort: true, // Sort keys alphabetically
keepRemoved: true, // Keep keys not found in source files
jsonIndent: 2, // Pretty-print JSON
lexers: {
ts: ['JavascriptLexer'], // TypeScript files
svelte: ['HTMLLexer'], // Svelte files
},
};