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

@ -42,8 +42,8 @@ export class ViewFieldWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_FIELD_STANDARD_FIELD_IDS.fieldMetadataId,
type: FieldMetadataType.UUID,
label: 'Field Metadata Id',
description: 'View Field target field',
label: msg`Field Metadata Id`,
description: msg`View Field target field`,
icon: 'IconTag',
})
fieldMetadataId: string;
@ -51,8 +51,8 @@ export class ViewFieldWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_FIELD_STANDARD_FIELD_IDS.isVisible,
type: FieldMetadataType.BOOLEAN,
label: 'Visible',
description: 'View Field visibility',
label: msg`Visible`,
description: msg`View Field visibility`,
icon: 'IconEye',
defaultValue: true,
})
@ -61,8 +61,8 @@ export class ViewFieldWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_FIELD_STANDARD_FIELD_IDS.size,
type: FieldMetadataType.NUMBER,
label: 'Size',
description: 'View Field size',
label: msg`Size`,
description: msg`View Field size`,
icon: 'IconEye',
defaultValue: 0,
})
@ -71,8 +71,8 @@ export class ViewFieldWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_FIELD_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.NUMBER,
label: 'Position',
description: 'View Field position',
label: msg`Position`,
description: msg`View Field position`,
icon: 'IconList',
defaultValue: 0,
})
@ -82,8 +82,8 @@ export class ViewFieldWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceRelation({
standardId: VIEW_FIELD_STANDARD_FIELD_IDS.view,
type: RelationMetadataType.MANY_TO_ONE,
label: 'View',
description: 'View Field related view',
label: msg`View`,
description: msg`View Field related view`,
icon: 'IconLayoutCollage',
inverseSideTarget: () => ViewWorkspaceEntity,
inverseSideFieldKey: 'viewFields',
@ -93,8 +93,8 @@ export class ViewFieldWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_FIELD_STANDARD_FIELD_IDS.aggregateOperation,
type: FieldMetadataType.SELECT,
label: 'Aggregate operation',
description: 'Optional aggregate operation',
label: msg`Aggregate operation`,
description: msg`Optional aggregate operation`,
icon: 'IconCalculator',
options: [
{

View File

@ -35,8 +35,8 @@ export class ViewFilterGroupWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceRelation({
standardId: VIEW_FILTER_GROUP_STANDARD_FIELD_IDS.view,
type: RelationMetadataType.MANY_TO_ONE,
label: 'View',
description: 'View',
label: msg`View`,
description: msg`View`,
inverseSideTarget: () => ViewWorkspaceEntity,
inverseSideFieldKey: 'viewFilterGroups',
})
@ -48,8 +48,8 @@ export class ViewFilterGroupWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_FILTER_GROUP_STANDARD_FIELD_IDS.parentViewFilterGroupId,
type: FieldMetadataType.UUID,
label: 'Parent View Filter Group Id',
description: 'Parent View Filter Group',
label: msg`Parent View Filter Group Id`,
description: msg`Parent View Filter Group`,
})
@WorkspaceIsNullable()
parentViewFilterGroupId: string | null;
@ -57,8 +57,8 @@ export class ViewFilterGroupWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_FILTER_GROUP_STANDARD_FIELD_IDS.logicalOperator,
type: FieldMetadataType.SELECT,
label: 'Logical Operator',
description: 'Logical operator for the filter group',
label: msg`Logical Operator`,
description: msg`Logical operator for the filter group`,
options: [
{
value: ViewFilterGroupLogicalOperator.AND,
@ -86,8 +86,8 @@ export class ViewFilterGroupWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_FILTER_GROUP_STANDARD_FIELD_IDS.positionInViewFilterGroup,
type: FieldMetadataType.POSITION,
label: 'Position in view filter group',
description: 'Position in the parent view filter group',
label: msg`Position in view filter group`,
description: msg`Position in the parent view filter group`,
icon: 'IconHierarchy2',
})
@WorkspaceIsSystem()

View File

@ -31,16 +31,16 @@ export class ViewFilterWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_FILTER_STANDARD_FIELD_IDS.fieldMetadataId,
type: FieldMetadataType.UUID,
label: 'Field Metadata Id',
description: 'View Filter target field',
label: msg`Field Metadata Id`,
description: msg`View Filter target field`,
})
fieldMetadataId: string;
@WorkspaceField({
standardId: VIEW_FILTER_STANDARD_FIELD_IDS.operand,
type: FieldMetadataType.TEXT,
label: 'Operand',
description: 'View Filter operand',
label: msg`Operand`,
description: msg`View Filter operand`,
defaultValue: "'Contains'",
})
operand: string;
@ -48,24 +48,24 @@ export class ViewFilterWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_FILTER_STANDARD_FIELD_IDS.value,
type: FieldMetadataType.TEXT,
label: 'Value',
description: 'View Filter value',
label: msg`Value`,
description: msg`View Filter value`,
})
value: string;
@WorkspaceField({
standardId: VIEW_FILTER_STANDARD_FIELD_IDS.displayValue,
type: FieldMetadataType.TEXT,
label: 'Display Value',
description: 'View Filter Display Value',
label: msg`Display Value`,
description: msg`View Filter Display Value`,
})
displayValue: string;
@WorkspaceRelation({
standardId: VIEW_FILTER_STANDARD_FIELD_IDS.view,
type: RelationMetadataType.MANY_TO_ONE,
label: 'View',
description: 'View Filter related view',
label: msg`View`,
description: msg`View Filter related view`,
icon: 'IconLayoutCollage',
inverseSideTarget: () => ViewWorkspaceEntity,
inverseSideFieldKey: 'viewFilters',
@ -79,8 +79,8 @@ export class ViewFilterWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_FILTER_STANDARD_FIELD_IDS.viewFilterGroupId,
type: FieldMetadataType.UUID,
label: 'View Filter Group Id',
description: 'View Filter Group',
label: msg`View Filter Group Id`,
description: msg`View Filter Group`,
})
@WorkspaceIsNullable()
viewFilterGroupId: string | null;
@ -88,8 +88,8 @@ export class ViewFilterWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_FILTER_STANDARD_FIELD_IDS.positionInViewFilterGroup,
type: FieldMetadataType.POSITION,
label: 'Position in view filter group',
description: 'Position in the view filter group',
label: msg`Position in view filter group`,
description: msg`Position in the view filter group`,
icon: 'IconHierarchy2',
})
@WorkspaceIsSystem()

View File

@ -29,8 +29,8 @@ export class ViewGroupWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_GROUP_STANDARD_FIELD_IDS.fieldMetadataId,
type: FieldMetadataType.UUID,
label: 'Field Metadata Id',
description: 'View Group target field',
label: msg`Field Metadata Id`,
description: msg`View Group target field`,
icon: 'IconTag',
})
fieldMetadataId: string;
@ -38,8 +38,8 @@ export class ViewGroupWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_GROUP_STANDARD_FIELD_IDS.isVisible,
type: FieldMetadataType.BOOLEAN,
label: 'Visible',
description: 'View Group visibility',
label: msg`Visible`,
description: msg`View Group visibility`,
icon: 'IconEye',
defaultValue: true,
})
@ -48,16 +48,16 @@ export class ViewGroupWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_GROUP_STANDARD_FIELD_IDS.fieldValue,
type: FieldMetadataType.TEXT,
label: 'Field Value',
description: 'Group by this field value',
label: msg`Field Value`,
description: msg`Group by this field value`,
})
fieldValue: string;
@WorkspaceField({
standardId: VIEW_GROUP_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.NUMBER,
label: 'Position',
description: 'View Field position',
label: msg`Position`,
description: msg`View Field position`,
icon: 'IconList',
defaultValue: 0,
})
@ -67,8 +67,8 @@ export class ViewGroupWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceRelation({
standardId: VIEW_GROUP_STANDARD_FIELD_IDS.view,
type: RelationMetadataType.MANY_TO_ONE,
label: 'View',
description: 'View Group related view',
label: msg`View`,
description: msg`View Group related view`,
icon: 'IconLayoutCollage',
inverseSideTarget: () => ViewWorkspaceEntity,
inverseSideFieldKey: 'viewGroups',

View File

@ -36,8 +36,8 @@ export class ViewSortWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_SORT_STANDARD_FIELD_IDS.fieldMetadataId,
type: FieldMetadataType.UUID,
label: 'Field Metadata Id',
description: 'View Sort target field',
label: msg`Field Metadata Id`,
description: msg`View Sort target field`,
icon: 'IconTag',
})
fieldMetadataId: string;
@ -45,8 +45,8 @@ export class ViewSortWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: VIEW_SORT_STANDARD_FIELD_IDS.direction,
type: FieldMetadataType.TEXT,
label: 'Direction',
description: 'View Sort direction',
label: msg`Direction`,
description: msg`View Sort direction`,
defaultValue: "'asc'",
})
direction: string;
@ -54,8 +54,8 @@ export class ViewSortWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceRelation({
standardId: VIEW_SORT_STANDARD_FIELD_IDS.view,
type: RelationMetadataType.MANY_TO_ONE,
label: 'View',
description: 'View Sort related view',
label: msg`View`,
description: msg`View Sort related view`,
icon: 'IconLayoutCollage',
inverseSideTarget: () => ViewWorkspaceEntity,
inverseSideFieldKey: 'viewSorts',

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()