From 546ecddf15d733b46a0e2e8c034da9691e86a560 Mon Sep 17 00:00:00 2001 From: Ruben van Leeuwen Date: Tue, 15 Oct 2024 12:16:57 +0200 Subject: [PATCH] 874: Remove empty line --- translations/README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/translations/README.md b/translations/README.md index 05cec4e..f1a1f65 100644 --- a/translations/README.md +++ b/translations/README.md @@ -42,3 +42,30 @@ The resulting translation keys and messages that are used is } } ``` + +### Form label translations + +Forms provide translations that are used when displaying form elements. They are retrieved dynamically by calling +the `translations/${locale}` endpoint. From the json result of this call the data in the `forms.fields` key is merged into +the translations under the `pydanticForms.backendTranslations` key. These translations are referenced when rendering form input +elements. + +The final translation dictionary will look like this + +``` +{ + metadata: { + product: { + name: 'A better name', + description: 'Description' + } + } + pydanticForms: { + ... + backendTranslations: { + ... `form.fields` result from `translations/${locale}` call + + } + } +} +```