From 5d20c86c23d671e3a119dee0cd24d8c933f9e2ff Mon Sep 17 00:00:00 2001 From: Christoph Reiter <reiter.christoph@gmail.com> Date: Thu, 7 Apr 2022 16:20:02 +0200 Subject: [PATCH] organization-select: port to i18next-parser --- .../organization-select/i18next-parser.config.js | 10 ++++++++++ .../i18next-scanner.config.js | 16 ---------------- packages/organization-select/package.json | 4 ++-- 3 files changed, 12 insertions(+), 18 deletions(-) create mode 100644 packages/organization-select/i18next-parser.config.js delete mode 100644 packages/organization-select/i18next-scanner.config.js diff --git a/packages/organization-select/i18next-parser.config.js b/packages/organization-select/i18next-parser.config.js new file mode 100644 index 00000000..e1513af7 --- /dev/null +++ b/packages/organization-select/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'], + sort: true, + i18nextOptions: {compatibilityJSON: 'v3'}, +}; diff --git a/packages/organization-select/i18next-scanner.config.js b/packages/organization-select/i18next-scanner.config.js deleted file mode 100644 index d15acb02..00000000 --- a/packages/organization-select/i18next-scanner.config.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - input: ['src/*.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/organization-select/package.json b/packages/organization-select/package.json index d2d0385b..31747e01 100644 --- a/packages/organization-select/package.json +++ b/packages/organization-select/package.json @@ -22,7 +22,7 @@ "@rollup/plugin-url": "^6.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", @@ -55,7 +55,7 @@ "build-prod": "rollup -c --environment BUILD:production", "build-demo": "rollup -c --environment BUILD:demo", "build-test": "rollup -c --environment BUILD:test", - "i18next": "i18next-scanner", + "i18next": "i18next", "watch": "npm run watch-local", "watch-local": "rollup -c --watch", "watch-dev": "rollup -c --watch --environment BUILD:development", -- GitLab