-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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" />
- Loading branch information
1 parent
2a911b4
commit 549c3fa
Showing
35 changed files
with
398 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/twenty-front/src/modules/apollo/types/apolloManager.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import { ApolloClient } from '@apollo/client'; | ||
|
||
import { CurrentWorkspaceMember } from '@/auth/states/currentWorkspaceMemberState'; | ||
import { AuthTokenPair } from '~/generated/graphql'; | ||
|
||
export interface ApolloManager<TCacheShape> { | ||
getClient(): ApolloClient<TCacheShape>; | ||
updateTokenPair(tokenPair: AuthTokenPair | null): void; | ||
updateWorkspaceMember(workspaceMember: CurrentWorkspaceMember | null): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
}, | ||
} | ||
: {}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 4 additions & 6 deletions
10
packages/twenty-server/src/engine/core-modules/admin-panel/admin-panel.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
packages/twenty-server/src/engine/core-modules/auth/services/auth.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/twenty-server/src/engine/core-modules/i18n/i18n.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Global, Module } from '@nestjs/common'; | ||
|
||
import { I18nService } from 'src/engine/core-modules/i18n/i18n.service'; | ||
|
||
@Global() | ||
@Module({ | ||
providers: [I18nService], | ||
exports: [I18nService], | ||
}) | ||
export class I18nModule {} |
Oops, something went wrong.