Prepare UI definition registries to the introduction of the definition decorators feature (MGNLUI-3822)

[MGNLUI-3824] Use I18NParentable interface duck-type check to determine whether a definition is i18n-ized Created: 23/Mar/16  Updated: 01/Apr/16  Resolved: 30/Mar/16

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.4.5
Fix Version/s: 5.4.6

Type: Sub-task Priority: Neutral
Reporter: Aleksandr Pchelintcev Assignee: Aleksandr Pchelintcev
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Sprint: Basel 37

 Description   

In BaseDialogPresenter class in order to avoid applying i18n magic multiple times we used to check if an incoming definition is a proxy (=> it was i18n-framework who's proxied an object).

However, such an assumption is not necessarily valid, especially since 5.4 (introduction of 'injectable' NamedDefinition interface via proxies) and 5.4.6 - definition decorators use proxies to provide fallbacks.

A safer way to determine that an object has been i18n-ized is to do an instanceof I18NParentable check.


Generated at Mon Feb 12 09:10:27 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.