Details
-
Bug
-
Resolution: Obsolete
-
Neutral
-
None
-
5.3.12
-
None
Description
Expectation
When i18n is enabled on a form field, we expect it to be saved with suffixes for corresponding languages, e.g. title_fr for French, and without a suffix for the default language, e.g. title for German if that's the default. This works as expected for most fields.
Problem
When using special fields like the DAM upload field, the default language version is also stored with a suffix (e.g. myImage_de instead of myImage).
Cause
The reason is that DefaultI18NAuthoringSupport only handles default languages on transformers extending BasicTransformer (see line 118 of DefaultI18NAuthoringSupport in Magnolia 5.3.12), but AssetTransformer doesn't do this.
Workaround
As an ad-hoc workaround, we're using a custom I18nFixedAssetTransformer<T extends AssetUploadReceiver> extends BasicTransformer<T>. This one mostly adapts the behaviour of BasicTransformer, but wraps an instance of AssetTranformer and redirects the methods writeToItem(T newValue) and readFromItem() to it.
This has only been tested on 5.3.12. I'm not sure what the situation on 5.4.* is, as i18n authoring seems to have changed quite a bit.
Checklists
Attachments
Issue Links
- relates to
-
MGNLUI-3602 info.magnolia.dam.app.ui.field.definition.DamUploadFieldDefinition is not i18n aware
-
- Closed
-