Overwrite standard translations (#11134)

Manage overwriting translations for standard fields and standard objects
properties
This commit is contained in:
Félix Malfait
2025-03-25 22:17:29 +01:00
committed by GitHub
parent 7a7003d859
commit 6ec06be18d
13 changed files with 1809 additions and 122 deletions

View File

@ -1,6 +1,8 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { IsOptional, IsString } from 'class-validator';
import { IsJSON, IsOptional, IsString } from 'class-validator';
import { GraphQLJSON } from 'graphql-type-json';
import { APP_LOCALES } from 'twenty-shared/translations';
@ObjectType('ObjectStandardOverrides')
export class ObjectStandardOverridesDTO {
@ -23,4 +25,20 @@ export class ObjectStandardOverridesDTO {
@IsOptional()
@Field(() => String, { nullable: true })
icon?: string | null;
@IsJSON()
@IsOptional()
@Field(() => GraphQLJSON, {
nullable: true,
})
translations?: Partial<
Record<
keyof typeof APP_LOCALES,
{
labelSingular?: string | null;
labelPlural?: string | null;
description?: string | null;
}
>
> | null;
}