Translate label and descriptions for objects (#9876)

Begin server-side translations
This commit is contained in:
Félix Malfait
2025-01-28 09:54:59 +01:00
committed by GitHub
parent 4542199e5c
commit 08a0e67477
44 changed files with 1015 additions and 132 deletions

View File

@ -53,6 +53,18 @@ export class ObjectMetadataResolver {
);
}
@ResolveField(() => String, { nullable: true })
async description(
@Parent() objectMetadata: ObjectMetadataDTO,
@Context() context,
): Promise<string> {
return this.objectMetadataService.resolveTranslatableString(
objectMetadata,
'description',
context.req.headers['x-locale'],
);
}
@Mutation(() => ObjectMetadataDTO)
async deleteOneObject(
@Args('input') input: DeleteOneObjectInput,