Uploaded image for project: 'Blossom'
  1. Blossom
  2. BLOSSOM-228

Compatibility with new I18n API

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 3.1.2
    • None
    • None
    • None

      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.

        Acceptance criteria

              tmattsson Tobias Mattsson
              tmattsson Tobias Mattsson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD