[MGNLUI-3773] SelectFieldFactory should not translate options with old I18n Created: 15/Feb/16  Updated: 25/Oct/16  Resolved: 19/Feb/16

Status: Closed
Project: Magnolia UI
Component/s: dialogs
Affects Version/s: None
Fix Version/s: 5.4.5

Type: Bug Priority: Neutral
Reporter: Roman Kovařík Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 0.25d
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLTPLSMPL-22 samplesFieldShowRoom dialog has i18nB... Closed
relates to MGNLUI-1548 Remove/inline FormItem and related su... Closed
causality
is causing MGNLUI-3818 SelectFieldFactory is not translating... Closed
dependency
is depended upon by MTE-76 Make sure that i18n keys may be reuse... Closed
duplicate
is duplicated by MAGNOLIA-6455 SelectFieldFactory still uses getMess... 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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: Introduction of new i18n
Sprint: Kromeriz 32
Story Points: 2

 Description   

info.magnolia.ui.form.field.factory.SelectFieldFactory#getSelectFieldOptionDefinition does:

  1. option.getLabel(): Since it's wrapped by i18n proxy and there is no translation in new message bundles, the longest key is returned.
  2. getMessage(option.getLabel): The old translation mechanism uses this longest key returned from new i18n and looks in default UI message bundles.
    => We use the key generated by NEW i18n as the key to translate by OLD i18n.
    => This only works if there is a translation for the longest key, otherwise it doesn't work.

The old i18n mechanism should not be called at all since the option definition is already wrapped by i18n proxy.



 Comments   
Comment by Robert Šiška [ 19/Feb/16 ]

Sorry I switched to resolved. You can integrate.

Generated at Mon Feb 12 09:09:56 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.