info.magnolia.ui.form.AbstractFormItem#getMessages- should not be public
- Is broken: doesn't use the user locale afaict.
info.magnolia.ui.form.AbstractFormItem#getMessage- should not be public
AbstractFormItemdefines a semi-arbitrary message bundles chain (see
- Definition objects(
TabDefinition, etc) have an
i18nBasenameproperty, which is very redundant with that of the "runtimes" objects (
FormTab, ...). Usage seems consistent (
return definition.getI18nBasename();) but I don't know why this isn't implemented in
- Definition objects don't have a common interface. If they did, we could move i18nBasename and label in there. OTOH, some of these objects have more than 1 item to translate (label and description, for example).
view.addFormSection(tab.getMessage(tabDefinition.getLabel()), tab.getContainer());...translates the message from the tab and passes it translated before it's actually "displayed". (while the method argument is called
tabLabel- but that passed object becomes an argument called
captionlater down the stack) - the below would make this sort of code much more explicit. You pass an object meant to be a label. You translate it explicitly - most likely at the last possible moment. Or we even extend Vaadin component so that they know about
getI18nBasenameis defined in too many places. It's inconsistent and unintuitive. Why the redundancy between
info.magnolia.ui.dialog.definition.DialogDefinition#getI18nBasenamefor example ?
info.magnolia.ui.form.FormBuilder#buildFormstill does "StringUtils.isNotBlank(description)", but since this is now decorated, it will never be blank or null. See
Jira server Magnolia - Issue tracker key MAGNOLIA-5315
Suggested key patterns
The below is a rough outline. The 3 goals below are somewhat hard to reach all at once.