45 lines
996 B
JavaScript
45 lines
996 B
JavaScript
module.exports = {
|
|
input: [
|
|
'resources/js/**/*.tsx',
|
|
'!resources/js/**/*.d.ts',
|
|
'!resources/js/i18n/**'
|
|
],
|
|
output: './',
|
|
options: {
|
|
debug: true,
|
|
removeUnusedKeys: true,
|
|
sort: true,
|
|
lineEnding: '\n',
|
|
attr: {
|
|
list: ['t'],
|
|
translateAttribute: 'i18nKey',
|
|
},
|
|
func: {
|
|
list: ['t', 'useTranslation'],
|
|
extensions: ['.tsx'],
|
|
},
|
|
trans: {
|
|
component: 'Trans',
|
|
i18nKey: 'i18nKey',
|
|
extensions: ['.tsx'],
|
|
fallbackKey: (ns, value) => value,
|
|
},
|
|
lngs: ['de', 'en'],
|
|
ns: ['marketing', 'auth', 'guest', 'admin'],
|
|
defaultLng: 'de',
|
|
defaultNs: 'marketing',
|
|
defaultValue: '__STRING_NOT_TRANSLATED__',
|
|
resource: {
|
|
loadPath: 'public/lang/{{lng}}/{{ns}}.json',
|
|
savePath: 'public/lang/{{lng}}/{{ns}}.json',
|
|
jsonIndent: 2,
|
|
lineEnding: '\n'
|
|
},
|
|
nsSeparators: ['.'],
|
|
keySeparator: false,
|
|
interpolation: {
|
|
prefix: '{{',
|
|
suffix: '}}'
|
|
}
|
|
}
|
|
}; |