About string files

Build 1501 on 14/Nov/2017  This topic last edited on: 5/Aug/2014, at 13:55

The following StringScope :

- ObjTypeCaption

- ObjTypeMsg

- ObjTypeInstruction

- ObjAttrCaption

- ObjAttrMsg

- ObjAttrInstruction

- EnumMsg

- EnumCaption

- EnumInstruction

all apply to schema elements (object types, attributes and enumeration defined in the schema).

Therefore:

1. Strings corresponding to schema elements defined in GN4Fixed.xsd and GN4Base.xsd MUST be created in BaseStrings.xx.xml.

2. Strings corresponding to schema elements defined in specific installation schemas (GN4Tera.xsd, GN4Editorial.xsd, etc...) MUST be created to the string file corresponding to that installation (TeraStrings.xx.xml, EditorialStrings.xx.xml, etc...)

NOTE

Keep in mind that object type names are unique, but attribute names and enumeration entries are not, which means that the definition of a string may apply to different things! For example, the enumerations privilegeValues and accessValues (defined in GN4Fixed) both feature an entry “Delete”. It means that the following strings will apply to both accessValues.Delete and privilegeValues.Delete:

<StringDesc Scope="EnumCaption" Name="Delete" Value="Delete" />

<StringDesc Scope="EnumInstruction" Name="Delete" Value="Delete/Un-Spike object" />

In the case of enumerations, sharing strings may not be that good, because two entries with the same name (in two different enumeration definition) probably have different meaning. Keep it in mind when configuring strings.

About the use of "label" in objectUIs:

By default, when editing an attribute, we display the string matching the attribute name and with the StringScope set to "ObjAttrCaption". If there is no match, then we display the attribute name as is.

The parameter objectUI/attribute/ui@label serves to "override" that value when in a specific situation, the default for the attribute being edited is not suitable.

So, rather than writing the following in an objectUI:

<attribute name="versioningRuleRef">

  <ui label="Versioning rule">

    . . .

it is better omiting the label parameter and create the following string in BaseStrings.xx.xml:

<StringDesc Scope="ObjAttrCaption" Name="versioningRuleRef" Value="Versioning rule" />

StringScope.DirectoryStyle

The StringScope "DirectoryStyle" is used for the various "Style" dropdown lists in result webparts. Strings corresponding to directory styles used in "global" pages (i.e. shared between more installation) must be created into the "global" string file (BaseStrings.xx.xml). While strings corresponding to directory styles used in installation specific pages must be created into the installation specific string file (TeraStrings.xx.xml, etc...).

StringScope.Default

That one is special, because it applies to one million of things (the caption of the page tab, the caption of the tabs in objectUI dialogs, the title of the various webparts, the values of the various actions in Audit web part, etc...). At present time it makes difficult understanding where a string comes from, and it makes easy overriding existing strings created for another purpose. We may need to create new StringScope to make things "cleaner"... But again and again and again: string that are installation independent must be created in BaseStrings.xx.xml, and the other ones must be created in the installation string files.