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:
@ -1,3 +1,4 @@
|
||||
import { msg } from '@lingui/core/macro';
|
||||
import { FieldMetadataType } from 'twenty-shared';
|
||||
|
||||
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
|
||||
@ -52,9 +53,9 @@ export const SEARCH_FIELDS_FOR_COMPANY: FieldTypeAndNameMetadata[] = [
|
||||
@WorkspaceEntity({
|
||||
standardId: STANDARD_OBJECT_IDS.company,
|
||||
namePlural: 'companies',
|
||||
labelSingular: 'Company',
|
||||
labelPlural: 'Companies',
|
||||
description: 'A company',
|
||||
labelSingular: msg`Company`,
|
||||
labelPlural: msg`Companies`,
|
||||
description: msg`A company`,
|
||||
icon: STANDARD_OBJECT_ICONS.company,
|
||||
shortcut: 'C',
|
||||
labelIdentifierStandardId: COMPANY_STANDARD_FIELD_IDS.name,
|
||||
@ -67,7 +68,7 @@ export class CompanyWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
description: 'The company name',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
})
|
||||
[NAME_FIELD_NAME]: string;
|
||||
name: string;
|
||||
|
||||
@WorkspaceField({
|
||||
standardId: COMPANY_STANDARD_FIELD_IDS.domainName,
|
||||
@ -78,7 +79,7 @@ export class CompanyWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
icon: 'IconLink',
|
||||
})
|
||||
@WorkspaceIsUnique()
|
||||
[DOMAIN_NAME_FIELD_NAME]?: LinksMetadata;
|
||||
domainName: LinksMetadata;
|
||||
|
||||
@WorkspaceField({
|
||||
standardId: COMPANY_STANDARD_FIELD_IDS.employees,
|
||||
@ -294,5 +295,5 @@ export class CompanyWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceIsNullable()
|
||||
@WorkspaceIsSystem()
|
||||
@WorkspaceFieldIndex({ indexType: IndexType.GIN })
|
||||
[SEARCH_VECTOR_FIELD.name]: any;
|
||||
searchVector: any;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user