[
https://issues.apache.org/jira/browse/ISIS-2596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andi Huber updated ISIS-2596:
-----------------------------
Fix Version/s: 2.0.0
(was: 2.0.0-M7)
> Use Identifier#getTranslationContext() consistently
> ---------------------------------------------------
>
> Key: ISIS-2596
> URL: https://issues.apache.org/jira/browse/ISIS-2596
> Project: Isis
> Issue Type: Improvement
> Components: Isis Core
> Affects Versions: 2.0.0-M5
> Reporter: Daniel Keir Haywood
> Priority: Minor
> Fix For: 2.0.0
>
>
> from
> [https://the-asf.slack.com/archives/CFC42LWBV/p1617614428185000?thread_ts=1617614189.183900&cid=CFC42LWBV]
>
> Provide more context to TranslationService for collections.
>
> The VisitorAdapter that handles the translations does not implement visit
> for FieldSets, rather the translations for FieldSets are picked up during the
> traversing of properties, but then all the context goes missing for some
> reason
>
> it would be nice to have more than the class name as context I guess
>
> maybe the {{MemberOrderFacetXml}} facet that does the ordering of the
> members shouldn't also handle translations? There seems to be quite a few
> cases where it makes more sense to use the ID for ordering, but then the ID
> is not the text that should be translated I guess
>
> It seems that the context that the MemberOrderFacet is passing to the
> translation service is a different one than the context passed to the
> translation service during the metamodel introspection for the same piece of
> text ... `MemberOrderFacetAbstract` line 72.
>
> Just passing the className is a mismatch with the context that is used by the
> TranslationFacetFactory
> final String context = holder.getIdentifier().getTranslationContext();
>
> Question is why the context is computed differently
>
> Andi introduced that method quite recently, I think this is one area which
> probably always had a bug lurking and we didn't refactor it to the new style
> ... *So, we should just change it I think.*
>
> Consistently using the translation context of the IdentifiedHolder should fix
> a good number of misaligned cases between the translation facet factory and
> the member order facet.
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)