Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-70

ResourceBasedI18nManager - resolving the resource key name uses two dots for action addressing - should be one

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.1.2-incubating
    • Core
    • None

    Description

      The ResourceBasedI18nManager resolves I18N resource bundle keys by requesting wether it is an action or property and constructs the following addressing:

      [Prototype example] Would like to define a german name of the employee's approver name:

      class: org.apache.isis.support.prototype.dom.employee.Employee
      kind of element: property
      property: approver
      type: name

      to address this within the i18n_de.properties - here is the key:
      org.apache.isis.support.prototype.dom.employee.Employee.property.approver.name=XXX

      Implementation org.apache.isis.core.runtime.i18n.resourcebundle.ResourceBasedI18nManager#text
      final String form = identifier.isPropertyOrCollection() ? PROPERTY : ACTION;
      final String key = identifier.getClassName() + "." + form + "." + identifier.getMemberName() + "." + type;

      Requesting an action results in a double dot (in some cases of class level actions?) because the identifier.getMemberName() returns "":
      eq the name of the employee class:
      org.apache.isis.support.prototype.dom.employee.Employee.action..name=XXX

      I will attach a patch for this - checking the above return value and constructing keys always with "one dot" seperator. This might be checked from the runtime team. thx

      Attachments

        1. ResourceBasedI18nManager.java
          4 kB
          Sabine Winkler

        Activity

          People

            danhaywood Daniel Keir Haywood
            winklers Sabine Winkler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: