mirror of https://github.com/mifi/lossless-cut
fix i18n
parent
251204215b
commit
2512048a24
@ -0,0 +1,35 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import type { defineConfig } from 'i18next-cli';
|
||||
|
||||
const configBase: Parameters<typeof defineConfig>[0] = {
|
||||
extract: {
|
||||
input: [
|
||||
'src/renderer/**/*.{ts,tsx}',
|
||||
'src/main/**/*.ts',
|
||||
'src/common/**/*.ts',
|
||||
'src/preload/**/*.ts',
|
||||
],
|
||||
output: 'locales/{{language}}/{{namespace}}.json',
|
||||
defaultNS: 'translation',
|
||||
functions: [
|
||||
't',
|
||||
'*.t',
|
||||
],
|
||||
transComponents: [
|
||||
'Trans',
|
||||
],
|
||||
ignoredAttributes: ['data-testid', 'aria-label', 'role'],
|
||||
|
||||
// Keep in sync between i18next-parser.config.js and i18nCommon.js:
|
||||
keySeparator: false,
|
||||
nsSeparator: false,
|
||||
},
|
||||
types: {
|
||||
input: [
|
||||
'locales/{{language}}/{{namespace}}.json',
|
||||
],
|
||||
output: 'src/types/i18next.d.ts',
|
||||
},
|
||||
};
|
||||
|
||||
export default configBase;
|
||||
@ -0,0 +1,10 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from 'i18next-cli';
|
||||
|
||||
import configBase from './i18next.config.base.js';
|
||||
|
||||
|
||||
export default defineConfig({
|
||||
...configBase,
|
||||
locales: ['en'],
|
||||
});
|
||||
Loading…
Reference in New Issue