Labels Naming Convention

From IS480
Jump to navigation Jump to search

Labels Naming Convention

To standardize the labels for all the screens, we can follow the style of how ofbiz makes use of their labels.

All labels file for the different modules will be stored in the /config directory, if you are creating a new deploy file, make sure to create the config, it will be specified in the ofbiz-component.xml For example of orders, inside the directory you can find the following file: - OrderUiLabels.xml

How to use the label file.

  1. Create the key for the label in the OrderUiLabel.
  2. When editing the form screen, instead of hard-code specifying the labels, we can use the code: ${uiLabelMap.OrderOrderQuoteId} where OrderOrderQuoteId will be the key for the label u want to refer to.
  3. uiLabelMap is specified in the QuoteScreen.xml, if you are doing on other modules, it will be found in their respective XXXscreen.xml
  4. If you create any Label.Xml file, make sure it is being directed to from the XXXScreen.xml.

Naming Convention: To prevent any complications, please make sure you add in the Module Name with the key name, such that it is easy to understand, and allow us to make sure no replications or easier to find any replications. Example: if you are creating a Name field in the Reseller Quote module, name it QuoteResellerName with the order ModuleName/labelname. With Capitalisation for every different Word.