![]() |
Composite format strings / Interpolated strings |
Use this sheet to specify how comment values of composite format strings and interpolated strings are checked.
Specifies how the comment value of composite format strings / interpolated strings are checked. Possible values are:
| Value | Description |
|---|---|
| None | Comments are not required, and they are not checked. |
| Comment value required | Comments are required, but the content of the comments are not checked. |
| Placeholder description required | Comments are required, and the content of the comments is checked. For each placeholder, you have to have the following text in the comment: index/name comment |
Sample string, Sample comment, and Sample code show a sample string, a comment that the selected check accepts, and how they appear in the source code of the platform.
The following table contains some samples. Sample string contains the actual resource string value. Sample comment contains a comment string that the checker accepts. Required characters (i.e., placeholder index) are marked with bold typeface.
| Platform | Sample string in code | Sample string in edit grid | Sample comment |
|---|---|---|---|
| .NET | Hello {0}, welcome to {1} | Hello [0], welcome to [1] | <data name="Str" xml:space="preserve">
<value>Hello {0}, welcome to {1}</value>
<comment>0: Name of the person, 1: Name of the place</comment>
</data>
|
| Angular | Hello {{name}}, welcome to {{place}} | Hello [name], welcome to [place] | <p i18n="name: Name of the person, place: Name of the place">
Hello {{name}}, welcome to {{place}}
</p> |
| Delphi | Hello %s, welcome to %s | Hello [0], welcome to [1] | resourcestring |
| WiX | Hello [name], welcome to [place] | Hello [name], welcome to [place] |