Set up localization with feature flag control (#9649)

Refers #8128 

Changes Introduced:
- Added i18n configuration.
- Added a feature flag for localization.
- Enabled language switching based on the flag.

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
Anne Deepa Prasanna
2025-01-17 01:30:56 +05:30
committed by GitHub
parent b81ffcc77c
commit f44b31573a
38 changed files with 912 additions and 79 deletions

View File

@ -1,4 +1,5 @@
/* eslint-disable no-console */
import { lingui } from '@lingui/vite-plugin';
import { isNonEmptyString } from '@sniptt/guards';
import react from '@vitejs/plugin-react-swc';
import wyw from '@wyw-in-js/vite';
@ -93,11 +94,17 @@ export default defineConfig(({ command, mode }) => {
},
plugins: [
react({ jsxImportSource: '@emotion/react' }),
react({
jsxImportSource: '@emotion/react',
plugins: [['@lingui/swc-plugin', {}]],
}),
tsconfigPaths({
projects: ['tsconfig.json', '../twenty-ui/tsconfig.json'],
}),
svgr(),
lingui({
configPath: path.resolve(__dirname, './lingui.config.ts'),
}),
checker(checkers),
// TODO: fix this, we have to restrict the include to only the components that are using linaria
// Otherwise the build will fail because wyw tries to include emotion styled components