Add field description+label translations (#9899)
Add translations for field descriptions
This commit is contained in:
@ -32,8 +32,8 @@ export class TaskTargetWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceRelation({
|
||||
standardId: TASK_TARGET_STANDARD_FIELD_IDS.task,
|
||||
type: RelationMetadataType.MANY_TO_ONE,
|
||||
label: 'Task',
|
||||
description: 'TaskTarget task',
|
||||
label: msg`Task`,
|
||||
description: msg`TaskTarget task`,
|
||||
icon: 'IconCheckbox',
|
||||
inverseSideTarget: () => TaskWorkspaceEntity,
|
||||
inverseSideFieldKey: 'taskTargets',
|
||||
@ -47,8 +47,8 @@ export class TaskTargetWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceRelation({
|
||||
standardId: TASK_TARGET_STANDARD_FIELD_IDS.person,
|
||||
type: RelationMetadataType.MANY_TO_ONE,
|
||||
label: 'Person',
|
||||
description: 'TaskTarget person',
|
||||
label: msg`Person`,
|
||||
description: msg`TaskTarget person`,
|
||||
icon: 'IconUser',
|
||||
inverseSideTarget: () => PersonWorkspaceEntity,
|
||||
inverseSideFieldKey: 'taskTargets',
|
||||
@ -62,8 +62,8 @@ export class TaskTargetWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceRelation({
|
||||
standardId: TASK_TARGET_STANDARD_FIELD_IDS.company,
|
||||
type: RelationMetadataType.MANY_TO_ONE,
|
||||
label: 'Company',
|
||||
description: 'TaskTarget company',
|
||||
label: msg`Company`,
|
||||
description: msg`TaskTarget company`,
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
inverseSideTarget: () => CompanyWorkspaceEntity,
|
||||
inverseSideFieldKey: 'taskTargets',
|
||||
@ -77,8 +77,8 @@ export class TaskTargetWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceRelation({
|
||||
standardId: TASK_TARGET_STANDARD_FIELD_IDS.opportunity,
|
||||
type: RelationMetadataType.MANY_TO_ONE,
|
||||
label: 'Opportunity',
|
||||
description: 'TaskTarget opportunity',
|
||||
label: msg`Opportunity`,
|
||||
description: msg`TaskTarget opportunity`,
|
||||
icon: 'IconTargetArrow',
|
||||
inverseSideTarget: () => OpportunityWorkspaceEntity,
|
||||
inverseSideFieldKey: 'taskTargets',
|
||||
|
||||
@ -3,6 +3,7 @@ import { FieldMetadataType } from 'twenty-shared';
|
||||
|
||||
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
|
||||
|
||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
||||
import { SEARCH_VECTOR_FIELD } from 'src/engine/metadata-modules/constants/search-vector-field.constants';
|
||||
import {
|
||||
ActorMetadata,
|
||||
@ -18,6 +19,7 @@ import { BaseWorkspaceEntity } from 'src/engine/twenty-orm/base.workspace-entity
|
||||
import { WorkspaceEntity } from 'src/engine/twenty-orm/decorators/workspace-entity.decorator';
|
||||
import { WorkspaceFieldIndex } from 'src/engine/twenty-orm/decorators/workspace-field-index.decorator';
|
||||
import { WorkspaceField } from 'src/engine/twenty-orm/decorators/workspace-field.decorator';
|
||||
import { WorkspaceGate } from 'src/engine/twenty-orm/decorators/workspace-gate.decorator';
|
||||
import { WorkspaceIsNullable } from 'src/engine/twenty-orm/decorators/workspace-is-nullable.decorator';
|
||||
import { WorkspaceIsSystem } from 'src/engine/twenty-orm/decorators/workspace-is-system.decorator';
|
||||
import { WorkspaceJoinColumn } from 'src/engine/twenty-orm/decorators/workspace-join-column.decorator';
|
||||
@ -34,8 +36,6 @@ import { FavoriteWorkspaceEntity } from 'src/modules/favorite/standard-objects/f
|
||||
import { TaskTargetWorkspaceEntity } from 'src/modules/task/standard-objects/task-target.workspace-entity';
|
||||
import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-objects/timeline-activity.workspace-entity';
|
||||
import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity';
|
||||
import { WorkspaceGate } from 'src/engine/twenty-orm/decorators/workspace-gate.decorator';
|
||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
||||
|
||||
const TITLE_FIELD_NAME = 'title';
|
||||
|
||||
@ -57,8 +57,8 @@ export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceField({
|
||||
standardId: TASK_STANDARD_FIELD_IDS.position,
|
||||
type: FieldMetadataType.POSITION,
|
||||
label: 'Position',
|
||||
description: 'Task record position',
|
||||
label: msg`Position`,
|
||||
description: msg`Task record position`,
|
||||
icon: 'IconHierarchy2',
|
||||
defaultValue: 0,
|
||||
})
|
||||
@ -68,8 +68,8 @@ export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceField({
|
||||
standardId: TASK_STANDARD_FIELD_IDS.title,
|
||||
type: FieldMetadataType.TEXT,
|
||||
label: 'Title',
|
||||
description: 'Task title',
|
||||
label: msg`Title`,
|
||||
description: msg`Task title`,
|
||||
icon: 'IconNotes',
|
||||
})
|
||||
title: string;
|
||||
@ -77,8 +77,8 @@ export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceField({
|
||||
standardId: TASK_STANDARD_FIELD_IDS.body,
|
||||
type: FieldMetadataType.RICH_TEXT,
|
||||
label: 'Body',
|
||||
description: 'Task body',
|
||||
label: msg`Body`,
|
||||
description: msg`Task body`,
|
||||
icon: 'IconFilePencil',
|
||||
})
|
||||
@WorkspaceIsNullable()
|
||||
@ -87,8 +87,8 @@ export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceField({
|
||||
standardId: TASK_STANDARD_FIELD_IDS.bodyV2,
|
||||
type: FieldMetadataType.RICH_TEXT_V2,
|
||||
label: 'Body',
|
||||
description: 'Task body',
|
||||
label: msg`Body`,
|
||||
description: msg`Task body`,
|
||||
icon: 'IconFilePencil',
|
||||
})
|
||||
@WorkspaceIsNullable()
|
||||
@ -100,8 +100,8 @@ export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceField({
|
||||
standardId: TASK_STANDARD_FIELD_IDS.dueAt,
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
label: 'Due Date',
|
||||
description: 'Task due date',
|
||||
label: msg`Due Date`,
|
||||
description: msg`Task due date`,
|
||||
icon: 'IconCalendarEvent',
|
||||
})
|
||||
@WorkspaceIsNullable()
|
||||
@ -110,8 +110,8 @@ export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceField({
|
||||
standardId: TASK_STANDARD_FIELD_IDS.status,
|
||||
type: FieldMetadataType.SELECT,
|
||||
label: 'Status',
|
||||
description: 'Task status',
|
||||
label: msg`Status`,
|
||||
description: msg`Task status`,
|
||||
icon: 'IconCheck',
|
||||
defaultValue: "'TODO'",
|
||||
options: [
|
||||
@ -136,9 +136,9 @@ export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceField({
|
||||
standardId: TASK_STANDARD_FIELD_IDS.createdBy,
|
||||
type: FieldMetadataType.ACTOR,
|
||||
label: 'Created by',
|
||||
label: msg`Created by`,
|
||||
icon: 'IconCreativeCommonsSa',
|
||||
description: 'The creator of the record',
|
||||
description: msg`The creator of the record`,
|
||||
defaultValue: {
|
||||
source: `'${FieldActorSource.MANUAL}'`,
|
||||
name: "''",
|
||||
@ -148,8 +148,8 @@ export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
|
||||
@WorkspaceRelation({
|
||||
standardId: TASK_STANDARD_FIELD_IDS.taskTargets,
|
||||
label: 'Relations',
|
||||
description: 'Task targets',
|
||||
label: msg`Relations`,
|
||||
description: msg`Task targets`,
|
||||
icon: 'IconArrowUpRight',
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
inverseSideTarget: () => TaskTargetWorkspaceEntity,
|
||||
@ -160,8 +160,8 @@ export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
|
||||
@WorkspaceRelation({
|
||||
standardId: TASK_STANDARD_FIELD_IDS.attachments,
|
||||
label: 'Attachments',
|
||||
description: 'Task attachments',
|
||||
label: msg`Attachments`,
|
||||
description: msg`Task attachments`,
|
||||
icon: 'IconFileImport',
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
inverseSideTarget: () => AttachmentWorkspaceEntity,
|
||||
@ -172,8 +172,8 @@ export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
|
||||
@WorkspaceRelation({
|
||||
standardId: TASK_STANDARD_FIELD_IDS.assignee,
|
||||
label: 'Assignee',
|
||||
description: 'Task assignee',
|
||||
label: msg`Assignee`,
|
||||
description: msg`Task assignee`,
|
||||
icon: 'IconUserCircle',
|
||||
type: RelationMetadataType.MANY_TO_ONE,
|
||||
inverseSideTarget: () => WorkspaceMemberWorkspaceEntity,
|
||||
@ -189,8 +189,8 @@ export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceRelation({
|
||||
standardId: TASK_STANDARD_FIELD_IDS.timelineActivities,
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
label: 'Timeline Activities',
|
||||
description: 'Timeline Activities linked to the task.',
|
||||
label: msg`Timeline Activities`,
|
||||
description: msg`Timeline Activities linked to the task.`,
|
||||
icon: 'IconTimelineEvent',
|
||||
inverseSideTarget: () => TimelineActivityWorkspaceEntity,
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
@ -201,8 +201,8 @@ export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceRelation({
|
||||
standardId: TASK_STANDARD_FIELD_IDS.favorites,
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
label: 'Favorites',
|
||||
description: 'Favorites linked to the task',
|
||||
label: msg`Favorites`,
|
||||
description: msg`Favorites linked to the task`,
|
||||
icon: 'IconHeart',
|
||||
inverseSideTarget: () => FavoriteWorkspaceEntity,
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
|
||||
Reference in New Issue
Block a user