Add field description+label translations (#9899)

Add translations for field descriptions
This commit is contained in:
Félix Malfait
2025-01-28 23:20:28 +01:00
committed by GitHub
parent b1219ff107
commit f74bb5a60b
47 changed files with 4210 additions and 720 deletions

View File

@ -40,24 +40,24 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT,
label: 'Name',
description: 'View name',
label: msg`Name`,
description: msg`View name`,
})
name: string;
@WorkspaceField({
standardId: VIEW_STANDARD_FIELD_IDS.objectMetadataId,
type: FieldMetadataType.UUID,
label: 'Object Metadata Id',
description: 'View target object',
label: msg`Object Metadata Id`,
description: msg`View target object`,
})
objectMetadataId: string;
@WorkspaceField({
standardId: VIEW_STANDARD_FIELD_IDS.type,
type: FieldMetadataType.TEXT,
label: 'Type',
description: 'View type',
label: msg`Type`,
description: msg`View type`,
defaultValue: "'table'",
})
type: string;
@ -65,8 +65,8 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_STANDARD_FIELD_IDS.key,
type: FieldMetadataType.SELECT,
label: 'Key',
description: 'View key',
label: msg`Key`,
description: msg`View key`,
options: [{ value: 'INDEX', label: 'Index', position: 0, color: 'red' }],
defaultValue: "'INDEX'",
})
@ -76,16 +76,16 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_STANDARD_FIELD_IDS.icon,
type: FieldMetadataType.TEXT,
label: 'Icon',
description: 'View icon',
label: msg`Icon`,
description: msg`View icon`,
})
icon: string;
@WorkspaceField({
standardId: VIEW_STANDARD_FIELD_IDS.kanbanFieldMetadataId,
type: FieldMetadataType.TEXT,
label: 'kanbanfieldMetadataId',
description: 'View Kanban column field',
label: msg`kanbanfieldMetadataId`,
description: msg`View Kanban column field`,
})
/**
* @deprecated Use `viewGroups.fieldMetadataId` instead
@ -95,8 +95,8 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.POSITION,
label: 'Position',
description: 'View position',
label: msg`Position`,
description: msg`View position`,
defaultValue: 0,
})
@WorkspaceIsSystem()
@ -105,8 +105,8 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_STANDARD_FIELD_IDS.isCompact,
type: FieldMetadataType.BOOLEAN,
label: 'Compact View',
description: 'Describes if the view is in compact mode',
label: msg`Compact View`,
description: msg`Describes if the view is in compact mode`,
defaultValue: false,
})
isCompact: boolean;
@ -114,8 +114,8 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceRelation({
standardId: VIEW_STANDARD_FIELD_IDS.viewFields,
type: RelationMetadataType.ONE_TO_MANY,
label: 'View Fields',
description: 'View Fields',
label: msg`View Fields`,
description: msg`View Fields`,
icon: 'IconTag',
inverseSideTarget: () => ViewFieldWorkspaceEntity,
onDelete: RelationOnDeleteAction.CASCADE,
@ -126,8 +126,8 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceRelation({
standardId: VIEW_STANDARD_FIELD_IDS.viewGroups,
type: RelationMetadataType.ONE_TO_MANY,
label: 'View Groups',
description: 'View Groups',
label: msg`View Groups`,
description: msg`View Groups`,
icon: 'IconTag',
inverseSideTarget: () => ViewGroupWorkspaceEntity,
onDelete: RelationOnDeleteAction.SET_NULL,
@ -138,8 +138,8 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceRelation({
standardId: VIEW_STANDARD_FIELD_IDS.viewFilters,
type: RelationMetadataType.ONE_TO_MANY,
label: 'View Filters',
description: 'View Filters',
label: msg`View Filters`,
description: msg`View Filters`,
icon: 'IconFilterBolt',
inverseSideTarget: () => ViewFilterWorkspaceEntity,
onDelete: RelationOnDeleteAction.SET_NULL,
@ -150,8 +150,8 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceRelation({
standardId: VIEW_STANDARD_FIELD_IDS.viewFilterGroups,
type: RelationMetadataType.ONE_TO_MANY,
label: 'View Filter Groups',
description: 'View Filter Groups',
label: msg`View Filter Groups`,
description: msg`View Filter Groups`,
icon: 'IconFilterBolt',
inverseSideTarget: () => ViewFilterGroupWorkspaceEntity,
onDelete: RelationOnDeleteAction.SET_NULL,
@ -162,8 +162,8 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceRelation({
standardId: VIEW_STANDARD_FIELD_IDS.viewSorts,
type: RelationMetadataType.ONE_TO_MANY,
label: 'View Sorts',
description: 'View Sorts',
label: msg`View Sorts`,
description: msg`View Sorts`,
icon: 'IconArrowsSort',
inverseSideTarget: () => ViewSortWorkspaceEntity,
onDelete: RelationOnDeleteAction.SET_NULL,
@ -174,8 +174,8 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceRelation({
standardId: VIEW_STANDARD_FIELD_IDS.favorites,
type: RelationMetadataType.ONE_TO_MANY,
label: 'Favorites',
description: 'Favorites linked to the view',
label: msg`Favorites`,
description: msg`Favorites linked to the view`,
icon: 'IconHeart',
inverseSideTarget: () => FavoriteWorkspaceEntity,
onDelete: RelationOnDeleteAction.CASCADE,
@ -186,8 +186,8 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_STANDARD_FIELD_IDS.kanbanAggregateOperation,
type: FieldMetadataType.SELECT,
label: 'Aggregate operation',
description: 'Optional aggregate operation',
label: msg`Aggregate operation`,
description: msg`Optional aggregate operation`,
icon: 'IconCalculator',
options: [
{
@ -259,8 +259,8 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_STANDARD_FIELD_IDS.kanbanAggregateOperationFieldMetadataId,
type: FieldMetadataType.UUID,
label: 'Field metadata used for aggregate operation',
description: 'Field metadata used for aggregate operation',
label: msg`Field metadata used for aggregate operation`,
description: msg`Field metadata used for aggregate operation`,
defaultValue: null,
})
@WorkspaceIsNullable()