-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ilib-loctool-json] Add test for localizable keywords
- Loading branch information
Natalia Kędziora
committed
Mar 7, 2025
1 parent
57fca72
commit a6a6673
Showing
4 changed files
with
123 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/ilib-loctool-json/test/testfiles/json/localizable.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"project.whateverModal.saveButton": { | ||
"defaultMessage": "Save", | ||
"description": "Button text for save" | ||
}, | ||
"project.whateverModal.createButton": { | ||
"defaultMessage": "Create", | ||
"description": "Button text for create" | ||
}, | ||
"project.whateverModal.invalid": { | ||
"defaultMessage": "Invalid", | ||
"description": "Title for invalid" | ||
}, | ||
"project.whateverModal.nameLabel": { | ||
"description": "Input label", | ||
"defaultMessage": "Name" | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
packages/ilib-loctool-json/test/testfiles/schemas/localizable-schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "localizable-schema", | ||
"title": "Sample schema for testing localizable supported keywords (comment, key, source)", | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "object", | ||
"localizable": "key", | ||
"properties": { | ||
"defaultMessage": { | ||
"type": "string", | ||
"localizable": "source" | ||
}, | ||
"description": { | ||
"type": "string", | ||
"localizable": "comment" | ||
} | ||
}, | ||
"required": [ | ||
"defaultMessage", | ||
"description" | ||
], | ||
"additionalProperties": false | ||
} | ||
} |