Skip to content

Commit

Permalink
Updated JSON configuration details
Browse files Browse the repository at this point in the history
  • Loading branch information
rmraya committed Nov 17, 2024
1 parent c07942b commit abe91f5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/com/maxprograms/converters/json/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# JSON Filter Configuration Files

Configuration files for JSON filter are defined in a JSON file that contains two arrays and five optional boolean keys:
Configuration files for JSON filter are defined in a JSON file that contains three arrays and five optional boolean keys:

- `traslatable`: array of JSON objects that define translatable keys
- `ignorable`: array of strings listing ignorable keys
- `htmlIgnore`: array of strings listing HTML 5 custom elements that should not be converted to inline tags
- `parseEntities`: boolean value indicating whether HTML entitites should be converted to Unicode characters. Default: `false`
- `trimTags`: send initial/trailing tags to skeleton when possible. Default: `true`
- `mergeTags`: merge adjacent tags. Default: `true`
Expand Down Expand Up @@ -61,6 +62,10 @@ Configuration files must be written using UTF-8 character set without a byte ord
"original_id",
"key"
],
"htmlIgnore": [
"myTitle",
"footNote"
],
"parseEntities": true,
"trimTags": false,
"mergeTags": false,
Expand All @@ -76,4 +81,5 @@ Configuration files must be written using UTF-8 character set without a byte ord
3. If an object that has a key in the `sourceKey` list is found, a new segment is created and its value is used as source text. If the object has other keys defined in the configuration, they are used as target, id, resname attribute or note as indicated. Attribute `approved` is set to `yes` when `approvedKey` is present and conditions are met.
4. If an object contains a key that matches `noteKey`, a list of text strings is created from its content and all descendents. Each found string is added as a `<note>` element in the active segment.
5. All other remaining key/value pairs in the object are checked. If a value contains text, it is extracted as a new segment wihout target or special attributes. To prevent creation of unwanted segments, add the corresponding keys to the `ignorable` list.
6. By default, the filter converts the opening and closing tags of HTML 5 elements to XLIFF inline tags. To prevent this, add the element names to the `htmlIgnore` list.

0 comments on commit abe91f5

Please sign in to comment.