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

I18n for EnumDatasourceDefinition

XMLWordPrintable

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

      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

        Acceptance criteria

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

                Created:
                Updated:
                Resolved:

                  Task DoD