Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/server/plugins/engine/components/ComponentCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,11 @@ export class ComponentCollection {
labelOverrides[subField.name] = patchedSchema
}
} else {
const fieldAsComponentDef = field as unknown as ComponentDef
const translatedLabel =
translator.tComponent(
field as unknown as ComponentDef,
'shortDescription'
) ||
translator.tComponent(field as unknown as ComponentDef, 'title')
translator.tComponent(fieldAsComponentDef, 'errorDescription') ||
translator.tComponent(fieldAsComponentDef, 'shortDescription') ||
translator.tComponent(fieldAsComponentDef, 'title')
const messagesOverride =
field.getValidationMessagesOverride(translator)
let patchedSchema = field.formSchema
Expand Down
1 change: 1 addition & 0 deletions src/server/plugins/engine/i18n/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export type FormDefinitionTranslations = Record<
hint: string
content: string
shortDescription: string
errorDescription: string
paymentDescription: string
}>
>
Expand Down
Loading