I18n: Migrate to I18next (#55845)

* Switch from lingui from i18next

* Change lingui messages to i18next messages

* Change lingui messages to i18next messages (grafana-ui)

* Init i18n for tests
This commit is contained in:
Josh Hunt
2022-10-06 16:34:04 +01:00
committed by GitHub
parent c1d6df4eb7
commit 5361efc225
58 changed files with 2557 additions and 4364 deletions

View File

@@ -29,13 +29,5 @@ module.exports = {
'\\.svg': '<rootDir>/public/test/mocks/svg.ts',
'\\.css': '<rootDir>/public/test/mocks/style.ts',
'monaco-editor/esm/vs/editor/editor.api': '<rootDir>/public/test/mocks/monaco.ts',
// lingui-macro (for i18n) makes use of babel-macro, which we do not enable in tests, so we
// provide our own mock component
'@lingui/macro': '<rootDir>/public/test/mocks/linguiMacro.tsx',
// i18n messages.js files are auto-generated, and may not exist when the tests are ran.
// Because we mock out <Trans /> anyway, we can mock the messages also
'locales/\\w+/messages$': '<rootDir>/public/test/mocks/i18nMessages.ts',
},
};