Hi Sabine,
Thanks for raising this ticket and the patch.
When you get a chance, could you do an update and make sure I've applied it correctly. I did do some other relatively minor refactorings at the same time, so just want to make sure I haven't broken it.
Thx
Dan


On 06/01/2011 23:32, Dan Haywood (JIRA) wrote:
      [ 
https://issues.apache.org/jira/browse/ISIS-70?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood resolved ISIS-70.
-----------------------------

        Resolution: Fixed
     Fix Version/s: 0.1.0-incubating

applied provided fix in rev. 1056119

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

                 Key: ISIS-70
                 URL: https://issues.apache.org/jira/browse/ISIS-70
             Project: Isis
          Issue Type: Bug
          Components: Core: Runtime
            Reporter: Sabine Winkler
            Assignee: Dan Haywood
            Priority: Minor
             Fix For: 0.1.0-incubating

         Attachments: ResourceBasedI18nManager.java


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

Reply via email to