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

SelectFieldFactory should not translate options with old I18n

XMLWordPrintable

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

      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.

        Acceptance criteria

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

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

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