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

I18n for EnumDatasourceDefinition

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Obsolete
    • Neutral
    • None
    • None
    • None

    Description

      Steps to reproduce

      Look at the publishing status column filter in a JCR app.

      Expected results

      Filter values are translatable.

      Actual results

      Values can actually be too technical since those are plain java enumeration names, no spaces allowed (NotActivated).

      Workaround

      Name java enumerations as UI users friendly as possible

      Development notes

      info.magnolia.ui.datasource.enumeration.EnumSelectFieldSupport#getItemCaptionGenerator could do something like
      item -> translationService.translate(contextLocaleProvider.get(), new String[]("key.prefix." + item.name().toLowerCase), item.name());

      Make it more consistent with i18n key by replace (_) to (.), eg: A_B => a.b

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                lam.nguyen Lam Nguyen Bao
                rkovarik Roman Kovařík
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD