forked from SchemaStore/schemastore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chrome-extension-locales-messages.json
60 lines (60 loc) · 3.21 KB
/
chrome-extension-locales-messages.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
"$comment": "https://developer.chrome.com/docs/extensions/mv3/i18n-messages/",
"$id": "https://json.schemastore.org/chrome-extension-locales-messages.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"patternProperties": {
"^(?!@@)[\\w@]+$": {
"properties": {
"message": {
"description": "The translated message, in the form of a string that can contain placeholders. Use `$_placeholder_name_$` (case insensitive) to refer to a particular placeholder. For example, you can refer to a placeholder named \"our_site\" as `$our_site$`, `$OUR_SITE$`, or `$oUR_sITe$`.\nTo put a dollar sign (`$`) into the string, use `$$`.\nAlthough placeholders such as `$USER$` are the preferred way of referring to substitution strings (strings specified using the substitutions parameter of i18n.getMessage) you can also refer to substitution strings directly within the message.",
"examples": [
"What's your name?",
"Hello, $USER$",
"Goodbye, $USER$. Come back to $OUR_SITE$ soon!",
"Amount (in $$)",
"Params: $1, $2, $3"
],
"type": "string",
"title": "message"
},
"description": {
"description": "Optional. A description of the message, intended to give context or details to help the translator make the best possible translation.",
"examples": [
"Ask for the user's name",
"Greet the user",
"Say goodbye to the user"
],
"type": "string",
"title": "description"
},
"placeholders": {
"description": "Optional. Defines one or more substrings to be used within the message.\nEach placeholder has a name, a \"content\" item, and an optional \"example\" item. A placeholder's name is case-insensitive and can contain the same characters as a message name.\n",
"patternProperties": {
"^[\\w@]+$": {
"properties": {
"content": {
"description": "The \"content\" item's value is a string that can refer to substitution strings, which are specified using the i18n.getMessage method's substitutions parameter. The value of a \"content\" item is typically something like \"Example.com\" or \"$1\". If you refer to a substitution string that doesn't exist, you get an empty string. The following table shows how `$_n_` strings correspond to strings specified by the substitutions parameter.",
"type": "string",
"title": "content"
},
"example": {
"description": "The \"example\" item (optional, but highly recommended) helps translators by showing how the content appears to the end user. For example, a placeholder for a dollar amount should have an example like `\"$23.45\"`.",
"type": "string",
"title": "example"
}
},
"required": ["content"],
"type": "object"
}
},
"type": "object",
"title": "placeholders"
}
},
"required": ["message"],
"type": "object"
}
},
"type": "object"
}