AnsweredAssumed Answered

Unable to get localized label for an aspect

Question asked by tico on Aug 10, 2007
Latest reply on Aug 14, 2007 by tico
Hello you all,

I ma not able to get the localized label for an aspect.

I wrote the resource file my-messages.properties:

my.aspect.title=Ma chaine de charactères

my-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

<!– Registering contacts model (aspects and types) –>
   <bean id="my.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
     <property name="models">
         <list>
             <value>alfresco/extension/myModel.xml</value>
         </list>
     </property>
   </bean>

   <bean id="ldapResourceBundles" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
           <value>alfresco.messages.my-messages</value>
        </list>
      </property>
   </bean>
</beans>

myModel.xml:

<?xml version="1.0" encoding="UTF-8"?>

<!– Definition du model contacts –>
<model name="my:mymodel"
       xmlns="http://www.alfresco.org/model/dictionary/1.0">
      
   <description>my model</description>
   <author>Eric GRAMMATICO</author>
   <version>1.O</version>


     <imports>
         <!– Import Alfresco Dictionary Definitions –>
         <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
         <!– Import Alfresco Content Domain Model Definitions –>
         <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
      </imports>


   <namespaces>
      <!– Define a Namespace for my new definitions –>
      <namespace uri="http://www.csill.fr/model/ldap/1.0" prefix="my"/>
   </namespaces>

   <!– Type and Aspect definitions go here –>
   
<aspects>
   <aspect name="my:text">
         <title>Text String</title>
         <properties>
            <property name="my:textString">
               <type>d:text</type>
            </property>
         </properties>
      </aspect>
</aspects>

</model>



web-client-config-custom.xml:

<alfresco-config>
  
<!– Liste des properties affichées par aspect –>
<config evaluator="aspect-name" condition="my:text">
   <property-sheet>
      <show-property
         name="my:textString"
         display-label-id="my.aspect.title"
         />
   </property-sheet>
</config>

</alfresco-config>

The web client displays ''$$my.aspect.title$$:' as label for the aspect, and the following error is in my catalina.out:
18:01:01,052 WARN  [web.app.ResourceBundleWrapper] Failed to find I18N message string key: my.aspect.title


Any advice is welcome,

Thanks and regards.

Outcomes