There are multiple cases right now when specifying translation key for a component is very obscure and/or doesn't support data objects.
Part of the problem lies in the fact that translation is specified as a String instead of separate class like StyleId for StyleManager. That should be changed to clarify when actual translation is provided and when a simple plain text needs to be used. Something like LanguageKey can be used for that.
On top of that it might allow having a translation structure when something like this key:
LanguageKey.of ( "some.panel" )
Is set into a container and then another key:
LanguageKey.of ( "button", container )
Is used for other component referencing that container to build translation structure:
Some of the String constructors for components will still remain as a simple version of language setup, but it is optional and can be explicitly disabled in UILanguageManager even now.
There are multiple cases right now when specifying translation key for a component is very obscure and/or doesn't support data objects.
Part of the problem lies in the fact that translation is specified as a
String
instead of separate class likeStyleId
forStyleManager
. That should be changed to clarify when actual translation is provided and when a simple plain text needs to be used. Something likeLanguageKey
can be used for that.On top of that it might allow having a translation structure when something like this key:
Is set into a container and then another key:
Is used for other component referencing that container to build translation structure:
Some of the
String
constructors for components will still remain as a simple version of language setup, but it is optional and can be explicitly disabled inUILanguageManager
even now.