diff --git a/packages/common/i18next-parser.config.js b/packages/common/i18next-parser.config.js new file mode 100644 index 0000000000000000000000000000000000000000..3029872ae1211efa72ee11f064a07354de115ef8 --- /dev/null +++ b/packages/common/i18next-parser.config.js @@ -0,0 +1,10 @@ +module.exports = { + createOldCatalogs: false, + indentation: 4, + keepRemoved: false, + locales: ['en', 'de'], + output: 'src/i18n/$LOCALE/$NAMESPACE.json', + input: ['src/*.js', './*.js'], + sort: true, + i18nextOptions: {compatibilityJSON: 'v3'}, +}; diff --git a/packages/common/i18next-scanner.config.js b/packages/common/i18next-scanner.config.js deleted file mode 100644 index 3372857b7496cfee5ee2707370e162f692705743..0000000000000000000000000000000000000000 --- a/packages/common/i18next-scanner.config.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - input: ['src/*.js', './*.js'], - output: './', - options: { - debug: false, - sort: true, - removeUnusedKeys: true, - func: {list: ['i18n.t', '_i18n.t']}, - lngs: ['en', 'de'], - resource: { - loadPath: 'src/i18n/{{lng}}/{{ns}}.json', - savePath: 'src/i18n/{{lng}}/{{ns}}.json', - jsonIndent: 4, - }, - }, -}; diff --git a/packages/common/package.json b/packages/common/package.json index dec68fcad80419880c486c01427ac003093e9af0..c9dcc0842e62247612d734f1657f2abbe769a5bb 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -16,7 +16,7 @@ "@rollup/plugin-node-resolve": "^13.0.0", "eslint": "^8.0.0", "eslint-plugin-jsdoc": "^38.0.0", - "i18next-scanner": "^3.0.0", + "i18next-parser": "^6.3.0", "karma": "^6.0.0", "karma-chrome-launcher": "^3.0.0", "karma-firefox-launcher": "^2.1.0", @@ -30,7 +30,7 @@ "rollup-plugin-serve": "^1.0.1" }, "scripts": { - "i18next": "i18next-scanner", + "i18next": "i18next", "format": "yarn run format:eslint && yarn run format:prettier", "format:eslint": "eslint \"**/*.{js,ts}\" --fix", "format:prettier": "prettier \"**/*.{js,json,ts}\" --write",