[MGNLSTK-1404] STKAssetWrapper is not i18n aware Created: 01/May/14  Updated: 02/Jul/18  Resolved: 02/Jul/18

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: None
Affects Version/s: 2.7.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Tom Wespi Assignee: Unassigned
Resolution: Won't Do Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Magnolia CE 5.2.4


Issue Links:
Relates
relates to MGNLDAM-567 JcrAssetProvider not I18n-aware Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

Go to /demo-project/about/subsection-articles/article, edit a text image component, set an image caption value in en and in de, save.
When changing language, the values are correctly displayed due to the fact that they are served bases on the content node (content.imageCaption and content.imageCaption_de). fine.

The issue there is that model like InternalTeaserModel return an STKAssetWrapper and if the ftl would use this wrapper to display the image caption, we always displayed the default value.
InternalTeaserModel#getImage()

Original description --------------------------------------------------------------------------

assign assetList = damfn.getAssetsFromFolderId(content.link)
list assetList as assetNode
assign asset = damfn.getAssetMap(assetNode)
${asset.caption}
/#list

The asset always returns the values in the default language.

info.magnolia.dam.asset.Asset
info.magnolia.dam.asset.model.AssetMap



 Comments   
Comment by Eric Hechinger [ 17/Jul/14 ]

Two points there:

  • DAM module is not yet i18n aware
    • an asset is not bind to a local so asset properties (set in dam-app) like name, captions are available in one language only.
    • If you need to have different images for content in en and de, you need to have two assets...
  • In STK, the TextImage component for example let you define under the 'TabImage' Image Caption/Copyright that are i18n aware. These are component properties and not asset's properties (values are stored under the component with property name copyright, copyright_de) and served based on the component node to the linked ftl.

What is true is that STKAssetWrapper that encapsulate an asset and also these properties is not i18n aware. Properies served by this wrapper has to be i18n aware.

This ticket will be moved under STK module.

Comment by Jan Haderka [ 02/Jul/18 ]

STK have been deprecated in September 2017. As part of this project nearing end-of-life, we are not planning to fix any of the existing issues except for the critical security issues. For more details, please consult documentation.

Generated at Mon Feb 12 13:39:39 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.