Uploaded image for project: 'Magnolia Standard Templating Kit (closed)'
  1. Magnolia Standard Templating Kit (closed)
  2. MGNLSTK-614

Freemarker ${i18n[..]} expressions shouldn't result in freemarker exception if "i18nBasename" property is not set for paragraph

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Outdated
    • Major
    • None
    • 1.2.1
    • None
    • None

    Description

      Calling ${i18n[....]} in a template that does not define i18nBasename throws a freemarker exception "Expression i18n is undefined".

      I suggest that the i18n array should always be defined in freemarker, no matter what the i18nBasename is. Having no i18nBasename property in the paragraph definition should IMO be handled as if the i18n messages file isn't available and should not result in an exception.

      So, this is most probably not a STK issue yet, however, I think it would make sense to integrate something like ${i18n(...)} (method call, not array) into STK to achieve the desired behavior.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              pbaerfuss Philipp Bärfuss
              vivi Vivian Steller
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: