Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-3773

SelectFieldFactory should not translate options with old I18n

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 5.4.5
    • None
    • dialogs
    • None

    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.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                rkovarik Roman Kovařík
                rkovarik Roman Kovařík
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 0.25d
                      0.25d