[BLOSSOM-228] Compatibility with new I18n API Created: 13/Nov/15  Updated: 25/Jul/16  Resolved: 20/Nov/15

Status: Closed
Project: Blossom
Component/s: None
Affects Version/s: None
Fix Version/s: 3.1.2

Type: Improvement Priority: Neutral
Reporter: Tobias Mattsson Assignee: Tobias Mattsson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to BLOSSOM-202 Customize tab sorting Closed
duplicate
is duplicated by BLOSSOM-207 TabFactory annotation shouldn't set t... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 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.



 Comments   
Comment by Jan Haderka [ 25/Jul/16 ]

Bulk close of all old resolved tickets.

Generated at Sun Feb 11 23:31:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.