Add server translation (#9847)
First proof of concept for server-side translation. The goal was to translate one metadata item: <img width="939" alt="Screenshot 2025-01-26 at 08 18 41" src="https://github.com/user-attachments/assets/e42a3f7f-f5e3-4ee7-9be5-272a2adccb23" />
This commit is contained in:
25
packages/twenty-server/lingui.config.js
Normal file
25
packages/twenty-server/lingui.config.js
Normal file
@ -0,0 +1,25 @@
|
||||
import { defineConfig } from '@lingui/cli';
|
||||
|
||||
export default defineConfig({
|
||||
sourceLocale: 'en',
|
||||
locales: ['en', 'fr'],
|
||||
extractorParserOptions: {
|
||||
tsExperimentalDecorators: true,
|
||||
},
|
||||
catalogs: [
|
||||
{
|
||||
path: '<rootDir>/src/engine/core-modules/i18n/locales/{locale}',
|
||||
include: ['src'],
|
||||
},
|
||||
],
|
||||
catalogsMergePath:
|
||||
'<rootDir>/src/engine/core-modules/i18n/locales/generated/{locale}',
|
||||
...(process.env.TRANSLATION_IO_API_KEY_BACKEND
|
||||
? {
|
||||
service: {
|
||||
name: 'TranslationIO',
|
||||
apiKey: process.env.TRANSLATION_IO_API_KEY_BACKEND,
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
});
|
||||
Reference in New Issue
Block a user