|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +use Yiisoft\Validator\Rule\AtLeast; |
| 6 | +use Yiisoft\Validator\Rule\BooleanValue; |
| 7 | +use Yiisoft\Validator\Rule\Compare; |
| 8 | +use Yiisoft\Validator\Rule\Count; |
| 9 | +use Yiisoft\Validator\Rule\Each; |
| 10 | +use Yiisoft\Validator\Rule\Email; |
| 11 | +use Yiisoft\Validator\Rule\Equal; |
| 12 | +use Yiisoft\Validator\Rule\GreaterThan; |
| 13 | +use Yiisoft\Validator\Rule\GreaterThanOrEqual; |
| 14 | +use Yiisoft\Validator\Rule\In; |
| 15 | +use Yiisoft\Validator\Rule\Integer; |
| 16 | +use Yiisoft\Validator\Rule\Ip; |
| 17 | +use Yiisoft\Validator\Rule\Json; |
| 18 | +use Yiisoft\Validator\Rule\Length; |
| 19 | +use Yiisoft\Validator\Rule\LessThan; |
| 20 | +use Yiisoft\Validator\Rule\LessThanOrEqual; |
| 21 | +use Yiisoft\Validator\Rule\Nested; |
| 22 | +use Yiisoft\Validator\Rule\NotEqual; |
| 23 | +use Yiisoft\Validator\Rule\Number; |
| 24 | +use Yiisoft\Validator\Rule\OneOf; |
| 25 | +use Yiisoft\Validator\Rule\Regex; |
| 26 | +use Yiisoft\Validator\Rule\Required; |
| 27 | +use Yiisoft\Validator\Rule\Subset; |
| 28 | +use Yiisoft\Validator\Rule\TrueValue; |
| 29 | +use Yiisoft\Validator\Rule\Url; |
| 30 | + |
| 31 | +return [ |
| 32 | + // Used in single rule |
| 33 | + |
| 34 | + /** @see AtLeast */ |
| 35 | + 'At least {min, number} {min, plural, one{attribute} other{attributes}} from this list must be filled' => |
| 36 | + 'Mindestens {min, number} {min, plural, one{Attribut aus dieser Liste muss} other{Attribute aus dieser ' . |
| 37 | + 'Liste müssen}} ausgefüllt werden', |
| 38 | + /** @see BooleanValue */ |
| 39 | + 'Value must be either "{true}" or "{false}".' => 'Der Wert muss "{true}" oder "{false}" sein.', |
| 40 | + /** @see Count */ |
| 41 | + 'This value must be an array or implement \Countable interface.' => 'Dieser Wert muss ein Array sein oder das ' . |
| 42 | + '\Countable Interface implementieren.', |
| 43 | + 'This value must contain at least {min, number} {min, plural, one{item} other{items}}.' => 'Dieser Wert muss ' . |
| 44 | + 'mindestens {min, number} {min, plural, one{Eintrag} other{Einträge}} enthalten.', |
| 45 | + 'This value must contain at most {max, number} {max, plural, one{item} other{items}}.' => 'Dieser Wert darf ' . |
| 46 | + 'maximal {max, number} {max, plural, one{Eintrag} other{Einträge}} enthalten.', |
| 47 | + 'This value must contain exactly {exactly, number} {exactly, plural, one{item} other{items}}.' => 'Dieser Wert ' . |
| 48 | + 'muss genau {exactly, number} {exactly, plural, one{Eintrag} other{Einträge}} enthalten.', |
| 49 | + /** @see Each */ |
| 50 | + 'Value must be array or iterable.' => 'Wert muss ein Array oder iterierbar sein.', |
| 51 | + 'Every iterable key must have an integer or a string type.' => 'Jeder iterierbarer Schlüssel muss vom Typ ' . |
| 52 | + 'Integer oder String sein.', |
| 53 | + /** @see Email */ |
| 54 | + 'This value is not a valid email address.' => 'Dieser Wert ist keine gültige E-Mail-Adresse.', |
| 55 | + /** @see In */ |
| 56 | + 'This value is not in the list of acceptable values.' => 'Dieser Wert ist nicht in der Liste der akzeptierten ' . |
| 57 | + 'Werte.', |
| 58 | + /** @see Ip */ |
| 59 | + 'Must be a valid IP address.' => 'Muss eine gültige IP-Adresse sein.', |
| 60 | + 'Must not be an IPv4 address.' => 'Darf keine IPv4-Adresse sein.', |
| 61 | + 'Must not be an IPv6 address.' => 'Darf keine IPv6-Adresse sein.', |
| 62 | + 'Contains wrong subnet mask.' => 'Enthält falsche Subnetz-Maske.', |
| 63 | + 'Must be an IP address with specified subnet.' => 'Muss eine gültige IP-Adresse mit Subnetz sein.', |
| 64 | + 'Must not be a subnet.' => 'Darf kein Subnetz sein.', |
| 65 | + 'Is not in the allowed range.' => 'Ist nicht im erlaubten Bereich.', |
| 66 | + /** @see Integer */ |
| 67 | + 'Value must be an integer.' => 'Wert muss ein Integer sein.', |
| 68 | + /** @see Json */ |
| 69 | + 'The value is not JSON.' => 'Der Wert ist kein JSON.', |
| 70 | + /** @see Length */ |
| 71 | + 'This value must contain at least {min, number} {min, plural, one{character} other{characters}}.' => 'Dieser ' . |
| 72 | + 'Wert muss mindestens {min, number} {min, plural, one{Buchstabe} other{Buchstaben}} enthalten.', |
| 73 | + 'This value must contain at most {max, number} {max, plural, one{character} other{characters}}.' => 'Dieser ' . |
| 74 | + 'Wert darf maximal {max, number} {max, plural, one{Buchstabe} other{Buchstaben}} enthalten.', |
| 75 | + 'This value must contain exactly {exactly, number} {exactly, plural, one{character} other{characters}}.' => |
| 76 | + 'Dieser Wert muss genau {exactly, number} {exactly, plural, one{Buchstabe} other{Buchstaben}} enthalten.', |
| 77 | + /** @see Nested */ |
| 78 | + 'Nested rule without rules can be used for objects only.' => 'Verschachtelte Regeln ohne Regeln können nur ' . |
| 79 | + 'für Objekte verwendet werden.', |
| 80 | + 'An object data set data can only have an array type.' => 'Die Daten eines Objektdatensatzes können nur den ' . |
| 81 | + 'Typ Array haben.', |
| 82 | + 'Property "{path}" is not found.' => 'Eigenschaft "{path}" nicht gefunden.', |
| 83 | + /** @see Number */ |
| 84 | + 'Value must be a number.' => 'Wert muss eine Nummer sein.', |
| 85 | + /** @see OneOf */ |
| 86 | + 'Exactly 1 attribute from this list must be filled: {attributes}.' => 'Exakt ein Attribut aus dieser Liste ' . |
| 87 | + 'muss gefüllt sein: {attributes}.', |
| 88 | + /** @see Regex */ |
| 89 | + 'Value is invalid.' => 'Wert ist ungültig.', |
| 90 | + /** @see Required */ |
| 91 | + 'Value cannot be blank.' => 'Wert darf nicht leer sein.', |
| 92 | + 'Value not passed.' => 'Wert nicht übergeben.', |
| 93 | + /** @see Subset */ |
| 94 | + 'Value must be iterable.' => 'Der Wert muss iterierbar sein.', |
| 95 | + 'This value is not a subset of acceptable values.' => 'Dieser Wert ist keine Teilmenge akzeptabler Werte.', |
| 96 | + /** @see TrueValue */ |
| 97 | + 'The value must be "{true}".' => 'Der Wert muss "{true}" sein.', |
| 98 | + /** @see Url */ |
| 99 | + 'This value is not a valid URL.' => 'Dieser Wert ist keine gültige URL.', |
| 100 | + |
| 101 | + // Used in multiple rules |
| 102 | + |
| 103 | + /** |
| 104 | + * @see AtLeast |
| 105 | + * @see Nested |
| 106 | + * @see OneOf |
| 107 | + */ |
| 108 | + 'The value must be an array or an object.' => 'Dieser Wert muss ein Array oder Object sein.', |
| 109 | + /** |
| 110 | + * @see BooleanValue |
| 111 | + * @see TrueValue |
| 112 | + */ |
| 113 | + 'The allowed types are integer, float, string, boolean. {type} given.' => 'Die erlaubten Typen sind: integer, ' . |
| 114 | + 'float, string, boolean. Er ist aber vom Typ {type}.', |
| 115 | + /** |
| 116 | + * @see Compare |
| 117 | + * @see Equal |
| 118 | + * @see GreaterThan |
| 119 | + * @see GreaterThanOrEqual |
| 120 | + * @see LessThan |
| 121 | + * @see LessThanOrEqual |
| 122 | + * @see NotEqual |
| 123 | + */ |
| 124 | + 'The allowed types are integer, float, string, boolean, null and object implementing \Stringable or ' . |
| 125 | + '\DateTimeInterface.' => 'Die erlaubten Typen sind: integer, float, string, boolean, null und Objekte, die ' . |
| 126 | + '\Stringable oder \DateTimeInterface implementieren.', |
| 127 | + 'The attribute value returned from a custom data set must have one of the following types: integer, float, ' . |
| 128 | + 'string, boolean, null or an object implementing \Stringable interface or \DateTimeInterface.' => 'Der von ' . |
| 129 | + 'einem benutzerdefinierten Datensatz zurückgegebene Attributwert muss einen der folgenden Typen haben: ' . |
| 130 | + 'integer, float, string, boolean, null oder ein Objekte, das \Stringable oder \DateTimeInterface ' . |
| 131 | + 'implementiert.', |
| 132 | + 'Value must be equal to "{targetValueOrAttribute}".' => 'Der Wert muss gleich "{targetValueOrAttribute}" sein.', |
| 133 | + 'Value must be strictly equal to "{targetValueOrAttribute}".' => 'Der Wert muss strikt gleich ' . |
| 134 | + '"{targetValueOrAttribute}" sein.', |
| 135 | + 'Value must not be equal to "{targetValueOrAttribute}".' => 'Der Wert darf nicht gleich ' . |
| 136 | + '"{targetValueOrAttribute}" sein.', |
| 137 | + 'Value must not be strictly equal to "{targetValueOrAttribute}".' => 'Der Wert darf nicht strikt gleich ' . |
| 138 | + '"{targetValueOrAttribute}" sein.', |
| 139 | + 'Value must be greater than "{targetValueOrAttribute}".' => 'Der Wert muss größer als ' . |
| 140 | + '"{targetValueOrAttribute}" sein.', |
| 141 | + 'Value must be greater than or equal to "{targetValueOrAttribute}".' => 'Der Wert muss größer als oder gleich ' . |
| 142 | + '"{targetValueOrAttribute}" sein.', |
| 143 | + 'Value must be less than "{targetValueOrAttribute}".' => 'Der Wert muss kleiner als "{targetValueOrAttribute}" ' . |
| 144 | + 'sein.', |
| 145 | + 'Value must be less than or equal to "{targetValueOrAttribute}".' => 'Der Wert muss kleiner als oder gleich ' . |
| 146 | + '"{targetValueOrAttribute}" sein.', |
| 147 | + /** |
| 148 | + * @see Email |
| 149 | + * @see Ip |
| 150 | + * @see Json |
| 151 | + * @see Length |
| 152 | + * @see Regex |
| 153 | + * @see Url |
| 154 | + */ |
| 155 | + 'The value must be a string.' => 'Der Wert muss eine Zeichenkette sein.', |
| 156 | + /** |
| 157 | + * @see Number |
| 158 | + * @see Integer |
| 159 | + */ |
| 160 | + 'The allowed types are integer, float and string.' => 'Die erlaubte Typen sind: integer, float und string.', |
| 161 | + 'Value must be no less than {min}.' => 'Der Wert darf nicht kleiner als {min} sein.', |
| 162 | + 'Value must be no greater than {max}.' => 'Der Wert darf nicht größer als {max} sein.', |
| 163 | +]; |
0 commit comments