[MGNLUI-3610] Multivalue composite fields not supporting I18N despite i18n:true setting Created: 29/Sep/15 Updated: 14/May/20 Resolved: 20/Oct/15 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | dialogs, forms |
| Affects Version/s: | 5.4.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Mathias Conradt | Assignee: | Mikaël Geljić |
| Resolution: | Not an issue | Votes: | 3 |
| Labels: | fields, i18n | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||
| Date of First Response: | |||||||||||||||||
| Description |
|
A multivalue composite field in Magnolia 4.5.1 CE does not support I18N even though i18n is set to true in all sections of the dialog definitions. In my yaml, I have set i18n: true in every section, however, in the dialog I can only provide one value for the fields for all languages, they don't have I18N support. In my example, the relevant fields are the "features", which each holds a title and an image. My .yaml:
actions:
cancel:
class: info.magnolia.ui.admincentral.dialog.action.CancelDialogActionDefinition
commit:
class: info.magnolia.ui.admincentral.dialog.action.SaveDialogActionDefinition
form:
label: Abschnitt
tabs:
- name: tabMain
label: Abschnitt
fields:
- name: image
class: info.magnolia.ui.form.field.definition.LinkFieldDefinition
targetWorkspace: dam
appName: assets
identifierToPathConverter:
class: info.magnolia.dam.app.assets.field.translator.AssetCompositeIdKeyTranslator
contentPreviewDefinition:
contentPreviewClass: info.magnolia.dam.app.ui.field.DamFilePreviewComponent
label: Bild
required: false
i18n: true
- name: bodyText
class: info.magnolia.ui.form.field.definition.RichTextFieldDefinition
configJsFile: /.resources/sorba-templates/webresources/ckeditor/config-magnolia.js
rows: 6
label: Text
required: true
source: true
i18n: true
- name: features
class: info.magnolia.ui.form.field.definition.MultiValueFieldDefinition
label: Features
i18n: true
transformerClass: info.magnolia.ui.form.field.transformer.multi.MultiValueSubChildrenNodePropertiesTransformer
field:
name: compositeField
class: info.magnolia.ui.form.field.definition.CompositeFieldDefinition
transformerClass: info.magnolia.ui.form.field.transformer.composite.NoOpCompositeTransformer
layout: vertical
i18n: true
fields:
- name: title
class: info.magnolia.ui.form.field.definition.TextFieldDefinition
label: Titel
i18n: true
required: true
- name: image
class: info.magnolia.ui.form.field.definition.LinkFieldDefinition
targetWorkspace: dam
appName: assets
identifierToPathConverter:
class: info.magnolia.dam.app.assets.field.translator.AssetCompositeIdKeyTranslator
contentPreviewDefinition:
contentPreviewClass: info.magnolia.dam.app.ui.field.DamFilePreviewComponent
label: Bild
required: true
i18n: true
The dialog only supports I18N for all other fields except for the "features" and the fields of such (title, image):
(Problem originally posted on StackOverflow: http://stackoverflow.com/questions/32829491/magnolia-how-to-enable-i18n-in-a-multivalue-composite-field) |
| Comments |
| Comment by Mikaël Geljić [ 20/Oct/15 ] |
|
Hi Mathias, Complex fields *do* support i18n, just not with their original default transformers. Use the "delegating" transformers instead:
Concretely, for your use case:
Then, mind the following:
Read on Transforming field values for more details. Cheers, |