cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic model titles not localized

aspa
Champ in-the-making
Champ in-the-making
Hi,

I can't get content model localization to work for a dynamic model in Alfresco community v3.3g.
The aspect and property labels are not localized and the Explorer only shows the titles from the model file, not the properties file.
I've reloaded the message bundle and the web client config after each update.

I've placed the model in Company Home -> Data Dictionary -> Models and it looks like this:

<model name="foo:xxfoomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

    <aspect name="foo:siteFolder">
      <title>foo site folder</title>
      <properties>
        <property name="foo:siteKey">
          <title>site's key</title>
          <type>d:text</type>
        </property>
      </properties>


web-client-config-custom.xml is placed in Company Home -> Data Dictionary -> Web Client Extension:

  <config evaluator="aspect-name" condition="foo:siteFolder">
    <property-sheet>
      <show-property name="foo:siteKey" read-only="true"/>
    </property-sheet>
  </config>
xxfoomodel.properties is placed in Company Home -> Data Dictionary -> Messages:


foo_xxfoomodel.aspect.foo_siteFolder.title=Site folder
foo_xxfoomodel.property.foo_siteKey.title=Site key

Is there something obvious I'm missing here?
5 REPLIES 5

aspa
Champ in-the-making
Champ in-the-making
I just tried deploying the model statically using the bootstrap method and using this approach the titles are localized as expected.

janv
Employee
Employee
For reference, can you give an example of the bootstrap config ?

In the case of Explorer you can also put the messages into a "webclient.properties" (or locale-specific, eg. "webclient_fr_FR.properties") file which you can add to "Company Home -> Data Dictionary -> Web Client Extension". Does this work ? See also: http://wiki.alfresco.com/wiki/Dynamic_Models#Deploying_web_client_properties

Regards,
Jan

frankb
Champ in-the-making
Champ in-the-making
I have a similar problem that the string won't show up in Share (The Change Type dialog on a document), but in Explore (/Alfresco) it works fine.
Whats the necesarry steps to add localization to types in the Share app?

My current configurations is like this:

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

<model name="dw:dwcustommodels" xmlns="http://www.alfresco.org/model/dictionary/1.0">
  
    …..

   <namespaces>
      <namespace uri="dw.custom.models" prefix="dw"/>
   </namespaces>
  
   <constraints>
      ….
   </constraints>
  
   <types>
      <type name="dw:tegning">
         <title>Tegning</title>
         <parent>cm:content</parent>
         <properties>
            <property name="dw:dokumentnummer">
            <title>Dokumentnummer</title>
            <description>Dokumentnummer til dokument</description>
            <type>d:int</type>
            <mandatory>true</mandatory>
            </property>
                …………….
         </properties>
      </type>
     <type name="dw:teknisk">
      <title>Teknisk tegning</title>
      <parent>dw:tegning</parent>
      <properties>
         <property name="dw:teknisk_tegning_type">
            <title>Teknisk tegningtype</title>
            <description>Teknisk tegningstype</description>
            <type>d:text</type>
            <constraints>
               <constraint ref="dw:teknisk_tegning_type_constraint" />
            </constraints>
         </property>
      </properties>
     </type>
    </types>
</model>

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

<beans>
    <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
            <value>alfresco/extension/darwinModel.xml</value>
            </list>
        </property>
      <property name="labels">
         <list>
            <value>alfresco/messages/darwinModelLabels</value>
         </list>
      </property>
    </bean>
</beans>

and my share-config-custom.xml file:
<alfresco-config>
  
   …….
  
   <config evaluator="string-compare" condition="DocumentLibrary" replace="true">
      <types>
         <type name="cm:content">
         <subtype name="dw:tegning" />
         <subtype name="dw:teknisk" />
         </type>
      
       <type name="dw:tegning">
         <subtype name="dw:teknisk"/>
       </type>
        
       <type name="cm:folder">
         </type>
      </types>
   </config>
</alfresco-config>

and my properties file:
dw_dwcustommodels.description=Darwin content models
dw_dwcustommodels.type.dw_tegning.title=Tegning
dw_dwcustommodels.type.dw_tegning.description=Tegning
dw_dwcustommodels.property.dw_dokumentnummer.title=Dokumentnummer
dw_dwcustommodels.property.dw_dokumentnummer.description=Dokumentnummer
dw_dwcustommodels.property.dw_tegning_type.title=Tegningstype
dw_dwcustommodels.property.dw_tegning_type.description=Tegningstype
dw_dwcustommodels.property.dw_status.title=Dokumentstatus
dw_dwcustommodels.property.dw_status.description=Dokumentstatus
dw_dwcustommodels.type.dw_teknisk.title=Teknisk tegning
dw_dwcustommodels.type.dw_teknisk.description=Teknisk tegning
dw_dwcustommodels.property.dw_teknisk_tegning_type.title=Teknisk tegningstype
dw_dwcustommodels.property.dw_teknisk_tegning_type.description=Teknisk tegningstype

frankb
Champ in-the-making
Champ in-the-making
**Duplicate**

frankb
Champ in-the-making
Champ in-the-making
Noone? I guess this answers my worries.