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

The horizontal menu cannot be localized due to a hardcoded String in LinkImpl

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.2
    • 1.1
    • base system

    Description

      The menu in STK uses the navigationTitle property to store the text to show in the menu. I am using localisation in Magnolia and I noticed that this text could not be translated with adding the locale to the end of the property, for example: navigationTitle_de. When attaching a debugger I found that "navigationTitle" is hardcoded into info.magnolia.module.templatingkit.navigation.LinkTitle. See the code snippet below.

      public String getNavigationTitle(){
      String navigationTitle = node.getNodeData("navigationTitle").getString();
      return StringUtils.defaultIfEmpty(StringUtils.defaultIfEmpty(navigationTitle, node.getTitle()), node.getName());
      }

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                pbaerfuss Philipp Bärfuss
                rdridder Ron de Ridder
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: