Compatibility with new I18n API

Description

Since the first version of Blossom labels for tabs has been set in the @TabFactory annotation, Blossom will also set the name property to the same value. The reasoning behind this was that the name had little purpose when using Blossom.

Also the order of tabs has been set with the @TabOrder annotation by specifying the tabs labels.

With the old I18n system you'd specify i18n keys instead to have them translated.

With the new i18n system you can leave tab labels empty and Magnolia will use a key generated by a convention to find the translation.

Using the new API is cumbersome because Blossom will set the label, BLOSSOM-207. Sorting is not possible without replacing the default behavior, BLOSSOM-202.

For backwards compatibility reasons its not straight forward to change this.

Proposed solution

Introduce two properties that control these behaviors. They would by default be set to keep the current behavior but allow for easy configuration without subclassing as in BLOSSOM-202.

magnolia.blossom.sortTabsByLabel

magnolia.blossom.setTabLabels

Additional changes

Javadoc on @TabFactory should indicate that both name and label is set.

The title attribute on @Template is currently required which doesn't make sense when translating it with the new API.

relates to

Activity

Show:

Yan July 25, 2016 at 5:18 AM

Bulk close of all old resolved tickets.

Fixed

Details

Assignee

Reporter

Priority

Fix versions

More fields

Created November 13, 2015 at 5:20 PM
Updated July 25, 2016 at 5:18 AM
Resolved November 20, 2015 at 1:30 PM