Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
BabelSchema | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Babel\Config; |
4 | |
5 | use MediaWiki\Extension\CommunityConfiguration\Schema\JsonSchema; |
6 | use MediaWiki\Extension\CommunityConfiguration\Schemas\MediaWiki\MediaWikiDefinitions; |
7 | |
8 | // phpcs:disable Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase |
9 | class BabelSchema extends JsonSchema { |
10 | public const VERSION = '1.0.0'; |
11 | |
12 | public const BabelCategoryNames = [ |
13 | self::TYPE => self::TYPE_OBJECT, |
14 | self::PROPERTIES => [ |
15 | '0' => [ |
16 | self::TYPE => self::TYPE_STRING, |
17 | self::DEFAULT => '%code%-0', |
18 | ], |
19 | '1' => [ |
20 | self::TYPE => self::TYPE_STRING, |
21 | self::DEFAULT => '%code%-1', |
22 | ], |
23 | '2' => [ |
24 | self::TYPE => self::TYPE_STRING, |
25 | self::DEFAULT => '%code%-2', |
26 | ], |
27 | '3' => [ |
28 | self::TYPE => self::TYPE_STRING, |
29 | self::DEFAULT => '%code%-3', |
30 | ], |
31 | '4' => [ |
32 | self::TYPE => self::TYPE_STRING, |
33 | self::DEFAULT => '%code%-4', |
34 | ], |
35 | '5' => [ |
36 | self::TYPE => self::TYPE_STRING, |
37 | self::DEFAULT => '%code%-5', |
38 | ], |
39 | 'N' => [ |
40 | self::TYPE => self::TYPE_STRING, |
41 | self::DEFAULT => '%code%-N', |
42 | ], |
43 | ] |
44 | ]; |
45 | |
46 | public const BabelMainCategory = [ |
47 | self::TYPE => self::TYPE_STRING, |
48 | self::DEFAULT => 'User %code%', |
49 | ]; |
50 | |
51 | public const BabelUseUserLanguage = [ |
52 | self::TYPE => self::TYPE_BOOLEAN, |
53 | self::DEFAULT => false, |
54 | ]; |
55 | |
56 | public const BabelCategorizeNamespaces = [ |
57 | self::REF => [ |
58 | 'class' => MediaWikiDefinitions::class, 'field' => 'Namespaces' |
59 | ] |
60 | ]; |
61 | |
62 | public const BabelAutoCreate = [ |
63 | self::TYPE => self::TYPE_BOOLEAN, |
64 | self::DEFAULT => true, |
65 | ]; |
66 | } |