Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.0-M5
-
None
-
None
Description
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.
Attachments
Issue Links
- is related to
-
CAUSEWAY-2523 Combine @MemberOrder into @PropertyLayout etc.
- Closed