Skip to content

Commit 546ecdd

Browse files
author
Ruben van Leeuwen
committed
874: Remove empty line
1 parent 4f81f06 commit 546ecdd

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

translations/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,30 @@ The resulting translation keys and messages that are used is
4242
}
4343
}
4444
```
45+
46+
### Form label translations
47+
48+
Forms provide translations that are used when displaying form elements. They are retrieved dynamically by calling
49+
the `translations/${locale}` endpoint. From the json result of this call the data in the `forms.fields` key is merged into
50+
the translations under the `pydanticForms.backendTranslations` key. These translations are referenced when rendering form input
51+
elements.
52+
53+
The final translation dictionary will look like this
54+
55+
```
56+
{
57+
metadata: {
58+
product: {
59+
name: 'A better name',
60+
description: 'Description'
61+
}
62+
}
63+
pydanticForms: {
64+
...
65+
backendTranslations: {
66+
... `form.fields` result from `translations/${locale}` call
67+
68+
}
69+
}
70+
}
71+
```

0 commit comments

Comments
 (0)