You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/04/05 18:41:00 UTC

[jira] [Commented] (ISIS-2596) Use Identifier#getTranslationContext() consistently

    [ https://issues.apache.org/jira/browse/ISIS-2596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17315035#comment-17315035 ] 

ASF subversion and git services commented on ISIS-2596:
-------------------------------------------------------

Commit 6788f013628627aa731223ba935b0ebedf8e3f95 in isis's branch refs/heads/master from danhaywood
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=6788f01 ]

ISIS-2596: adds guard to not add message to list of messages held by MessageBroker (if already present)


> 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-M6
>
>
> 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.3.4#803005)