summaryrefslogtreecommitdiff
blob: 06186b00396546ba6ccf09640cde81997c7d66b9 (plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# HOW-TO: https://github.com/romaricdrigon/MetaYaml#how-to-write-a-schema
root:
  _type: array
  _children:
    BASIC:
      _type: array
      _required: true
      _children:
        class:
          _type: text
          _not_empty: true
        codeBrowser:
          _type: text
        description:
          _type: text
        icon:
          _type: text
        id:
          _type: text
          _not_empty: true
        label:
          _type: text
          _not_empty: true
        meta:
          _type: boolean
        namespace:
          _type: text
        sourcelanguage:
          _type: text
          _description: defaults to "en"
        projectPage:
          _type: text
          _description: Title of the page that explains the group
        translatorCategory:
          _type: text
          _description: Name of the category for translators of this group
        support:
          _type: array
          _description: Configuration for the ask for more information link
          _children:
            url:
              _type: text
            page:
              _type: text
            params:
              _type: array
              _children: []
              _ignore_extra_keys: true
    MANGLER:
      _type: array
      _children:
        class:
          _type: text
          _not_empty: true
    INSERTABLES:
      _type: prototype
      _prototype:
        _type: array
        _children:
          class:
            _type: text
          params:
            _type: choice
            _choices:
              1:
                _type: array
                _children: []
                _ignore_extra_keys: true
              2:
                _type: text
    VALIDATORS:
      _type: prototype
      _prototype:
        _type: array
        _children:
          id:
            _type: text
            _not_empty: true
            _description: ID of a pre-defined validator. Required if "class" is not specified
          class:
            _type: text
            _not_empty: true
            _description: Custom validator class. Required if "id" is not specified
          enforce:
            _type: boolean
          insertable:
            _type: boolean
          params:
            _type: choice
            _choices:
              1:
                 _type: array
                 _children: []
                 _ignore_extra_keys: true
              2:
                 _type: text
          keymatch:
            _type: array
            _description: 'Specify the message keys for which this validation should be run. *DEPRECATED*: Use "include" instead'
            _children: []
            _ignore_extra_keys: true
          include:
            _type: array
            _description: Specify the message keys for which this validation should be run
            _children: []
            _ignore_extra_keys: true
          exclude:
            _type: array
            _description: Specify the message keys for which this validation should not be run
            _children: []
            _ignore_extra_keys: true
    TAGS:
      _type: prototype
      _prototype:
        _type: prototype
        _max_items: 99999 # default is 200, which is too little
        _prototype:
          _type: text
    AUTOLOAD:
      _type: array
      _ignore_extra_keys: true
      _children: []
    GROUPS:
      _type: prototype
      _min_items: 1
      _prototype:
        _type: text
    LANGUAGES:
      _type: array
      _children:
        include:
          _type: prototype
          _prototype:
            _type: text
        exclude:
          _type: prototype
          _prototype:
            _type: text