chore: extract new translations for package shop
This commit is contained in:
45
i18next-scanner.config.cjs
Normal file
45
i18next-scanner.config.cjs
Normal file
@@ -0,0 +1,45 @@
|
||||
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: '}}'
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user