在Alfresco Share中为自定义(cm:storeSelector)方面放置I18N消息属性的位置?

时间:2013-10-22 16:35:14

标签: internationalization alfresco alfresco-share

我在Alfresco Share 4.1.x中启用了cm:storeSelector方面,如“Alfresco管理员指南”(第281页)中所述。

我尝试添加这些消息

aspect.cm_storeSelector=Store Selector
cm_storeSelector=Store Selector

下的

/shared/classes/alfresco/messages/slingshot.properties

/shared/classes/alfresco/extension/webclient.properties

这是我的 share-config-custom.xml:

<alfresco-config>

   <!-- cm:content type (existing nodes) -->
   <config evaluator="node-type" condition="cm:content">
      <forms>
         <!-- Default form configuration for the cm:content type -->
         <form>         
            <field-visibility>
                <show id="cm:storeName" />            
                </field-visibility>               
         </form>
      </forms>
   </config>

   <!-- Document Library config section -->
   <config evaluator="string-compare" condition="DocumentLibrary">
      <!--
         Used by the "Manage Aspects" action

         For custom aspects, remember to also add the relevant i18n string(s)
            cm_myaspect=My Aspect
      -->
      <aspects>
         <!-- Aspects that a user can see -->
         <visible>
            <aspect name="cm:storeSelector">                  
                <title>Store Selector</title>
            </aspect>
         </visible>
        </aspects>
   </config>   

</alfresco-config>

问题是:方面名称未显示在Alfresco共享UI(“管理方面”对话框)中 - 而是仅在右侧显示字符串aspect.cm_storeSelector

enter image description here

虽然在Alfresco Explorer上显示正常:

enter image description here

我想知道在哪里为Alfresco Share正确放置I18N字符串。

1 个答案:

答案 0 :(得分:1)

将消息放入(自定义的)露天存储库消息包中应该足以使翻译出现在“无处不在” - 在共享中。

关键是遵循名称映射惯例。

查看alfresco/WEB-INF/classes/alfresco/messages/content-model.properties

其中包含:

cm_contentmodel.aspect.cm_titled.title=Titled
cm_contentmodel.aspect.cm_titled.description=Titled

对应alfresco/WEB-INF/classes/alfresco/model/contentModel.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- xsi:schemaLocation="http://www.alfresco.org/model/dictionary/1.0 modelSchema.xsd" -->
<model name="cm:contentmodel"
...
<aspect name="cm:titled">

类似的映射约定也适用于属性,类型和关联。这些例子也可以在这三个文件中找到。