3

I was able to localize my Alfresco Model (plus constraints lists) by following these rules : http://wiki.alfresco.com/wiki/Data_Dictionary_Guide#Model_Localization

But I would like to know if there is something similar for Share? Do we only have to use the "label-id" attributes without worrying of any convention?

Is it better to use :

label.companyName=Company name

or something like

sop_sopModel.field.sop_companyName.title=Company Name

or anything else ?

I didn't see any recommandation on the wiki.

Here is an example of label-ids I don't know how to format. This is a part of my share-config-custom.xml file. I know this is not really important but I would like to do things properly.

<config evaluator="aspect" condition="sop:company">
   <forms>
      <form>
         <field-visibility>
            <show id="sop:companyName" />
            <show id="sop:companyAddress" />
         </field-visibility>
         <appearance>
            <set id="sopPanel" appearance="bordered-panel" label-id="???" />
            <field id="sop:companyName" label-id="???" set="sopPanel" />
            <field id="sop:companyAddress" label-id="???" set="sopPanel" />
         </appearance>
      </form>
   </forms>
</config>
fop6316
  • 443
  • 5
  • 12
  • 1
    Which parts of your custom model do you want to expose in Share, and where abouts? – Will Abson Oct 12 '12 at 12:55
  • Here is an example of label-id's I don't know how to format. This is a part of my share-config-custom.xml file. I know this is not really important but I would like to do things properly. – fop6316 Oct 15 '12 at 07:46
  • This is awful but I don't know how to format here as well ;) – fop6316 Oct 15 '12 at 07:48
  • It would be better to update your original question with the code, it will display better there. Check out the formatting help for instructions on how to add code blocks. – Will Abson Oct 15 '12 at 12:15
  • Although I should add I was asking for an explanation in words of which bits of your custom model you want to expose in Share. Do you want the aspect to appear in the 'Manage Aspects' dialog? Do you want to display or edit certain metadata properties in Share? Basically what do you want to achive? – Will Abson Oct 15 '12 at 12:17
  • As you said, I want to display certain metadata properties in Share, and being able to change their value. I was able to achieve that. All is working good, all I want is to know if there is a kind of convention to format share label-id's ? – fop6316 Oct 16 '12 at 07:48

1 Answers1

1

You don't normally need to use the label-id attribute. If your model definition has a message bundle associated with it then the correct labels for your current locale will come through from the repository automatically.

Will Abson
  • 1,562
  • 7
  • 13
  • I agree with you, but if you look at the example given on top, there is no label for tag in the model definition. – fop6316 Nov 29 '12 at 14:04
  • I didn't see the `` in there also. You are correct, you will need a custom label for that. To do that, you'll need to add your own `.properties` file containing the labels, and tie that in using a Spring bean instance of `org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent`. It doesn't matter how you format that label name, but it must be unique across the application for obvious reasons. – Will Abson Nov 29 '12 at 14:21